(menu_display.h) Remove some header dependencies
This commit is contained in:
parent
45a74e589f
commit
3fb751ebd2
|
@ -109,8 +109,9 @@ static void menu_display_fb_free(menu_framebuf_t *frame_buf)
|
||||||
frame_buf->data = NULL;
|
frame_buf->data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_free(menu_handle_t *menu)
|
void menu_display_free(void *data)
|
||||||
{
|
{
|
||||||
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -120,8 +121,9 @@ void menu_display_free(menu_handle_t *menu)
|
||||||
menu_display_fb_free(&menu->frame_buf);
|
menu_display_fb_free(&menu->frame_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_init(menu_handle_t *menu)
|
bool menu_display_init(void *data)
|
||||||
{
|
{
|
||||||
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -186,9 +188,10 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||||
font_path, font_size, FONT_DRIVER_RENDER_OPENGL_API);
|
font_path, font_size, FONT_DRIVER_RENDER_OPENGL_API);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font_bind_block(menu_handle_t *menu,
|
bool menu_display_font_bind_block(void *data,
|
||||||
const struct font_renderer *font_driver, void *userdata)
|
const struct font_renderer *font_driver, void *userdata)
|
||||||
{
|
{
|
||||||
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
if (!font_driver || !font_driver->bind_block)
|
if (!font_driver || !font_driver->bind_block)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -197,9 +200,10 @@ bool menu_display_font_bind_block(menu_handle_t *menu,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font_flush_block(menu_handle_t *menu,
|
bool menu_display_font_flush_block(void *data,
|
||||||
const struct font_renderer *font_driver)
|
const struct font_renderer *font_driver)
|
||||||
{
|
{
|
||||||
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
if (!font_driver || !font_driver->flush)
|
if (!font_driver || !font_driver->flush)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -209,8 +213,9 @@ bool menu_display_font_flush_block(menu_handle_t *menu,
|
||||||
font_driver, NULL);
|
font_driver, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_free_main_font(menu_handle_t *menu)
|
void menu_display_free_main_font(void *data)
|
||||||
{
|
{
|
||||||
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
|
|
||||||
if (menu->font.buf)
|
if (menu->font.buf)
|
||||||
|
@ -220,12 +225,13 @@ void menu_display_free_main_font(menu_handle_t *menu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_init_main_font(menu_handle_t *menu,
|
bool menu_display_init_main_font(void *data,
|
||||||
const char *font_path, float font_size)
|
const char *font_path, float font_size)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
driver_t *driver = driver_get_ptr();
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
void *video = video_driver_get_ptr(NULL);
|
driver_t *driver = driver_get_ptr();
|
||||||
|
void *video = video_driver_get_ptr(NULL);
|
||||||
|
|
||||||
if (menu->font.buf)
|
if (menu->font.buf)
|
||||||
menu_display_free_main_font(menu);
|
menu_display_free_main_font(menu);
|
||||||
|
|
|
@ -16,12 +16,25 @@
|
||||||
#ifndef __MENU_DISPLAY_H__
|
#ifndef __MENU_DISPLAY_H__
|
||||||
#define __MENU_DISPLAY_H__
|
#define __MENU_DISPLAY_H__
|
||||||
|
|
||||||
#include "menu_driver.h"
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <boolean.h>
|
||||||
|
|
||||||
|
#include "../gfx/font_renderer_driver.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct menu_framebuf
|
||||||
|
{
|
||||||
|
uint16_t *data;
|
||||||
|
unsigned width;
|
||||||
|
unsigned height;
|
||||||
|
size_t pitch;
|
||||||
|
bool dirty;
|
||||||
|
} menu_framebuf_t;
|
||||||
|
|
||||||
menu_framebuf_t *menu_display_fb_get_ptr(void);
|
menu_framebuf_t *menu_display_fb_get_ptr(void);
|
||||||
|
|
||||||
void menu_display_fb(void);
|
void menu_display_fb(void);
|
||||||
|
@ -30,9 +43,9 @@ void menu_display_fb_set_dirty(void);
|
||||||
|
|
||||||
void menu_display_fb_unset_dirty(void);
|
void menu_display_fb_unset_dirty(void);
|
||||||
|
|
||||||
void menu_display_free(menu_handle_t *menu);
|
void menu_display_free(void *data);
|
||||||
|
|
||||||
bool menu_display_init(menu_handle_t *menu);
|
bool menu_display_init(void *data);
|
||||||
|
|
||||||
bool menu_display_update_pending(void);
|
bool menu_display_update_pending(void);
|
||||||
|
|
||||||
|
@ -42,16 +55,16 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||||
void **font_handle, void *video_data, const char *font_path,
|
void **font_handle, void *video_data, const char *font_path,
|
||||||
float font_size);
|
float font_size);
|
||||||
|
|
||||||
bool menu_display_font_bind_block(menu_handle_t *menu,
|
bool menu_display_font_bind_block(void *data,
|
||||||
const struct font_renderer *font_driver, void *userdata);
|
const struct font_renderer *font_driver, void *userdata);
|
||||||
|
|
||||||
bool menu_display_font_flush_block(menu_handle_t *menu,
|
bool menu_display_font_flush_block(void *data,
|
||||||
const struct font_renderer *font_driver);
|
const struct font_renderer *font_driver);
|
||||||
|
|
||||||
bool menu_display_init_main_font(menu_handle_t *menu,
|
bool menu_display_init_main_font(void *data,
|
||||||
const char *font_path, float font_size);
|
const char *font_path, float font_size);
|
||||||
|
|
||||||
void menu_display_free_main_font(menu_handle_t *menu);
|
void menu_display_free_main_font(void *data);
|
||||||
|
|
||||||
void menu_display_set_viewport(void);
|
void menu_display_set_viewport(void);
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
#include <queues/message_queue.h>
|
#include <queues/message_queue.h>
|
||||||
#include "menu_animation.h"
|
#include "menu_animation.h"
|
||||||
|
#include "menu_display.h"
|
||||||
#include "menu_displaylist.h"
|
#include "menu_displaylist.h"
|
||||||
#include "menu_list.h"
|
#include "menu_list.h"
|
||||||
#include "menu_input.h"
|
#include "menu_input.h"
|
||||||
|
@ -42,15 +43,6 @@ typedef enum
|
||||||
MENU_IMAGE_BOXART,
|
MENU_IMAGE_BOXART,
|
||||||
} menu_image_type_t;
|
} menu_image_type_t;
|
||||||
|
|
||||||
typedef struct menu_framebuf
|
|
||||||
{
|
|
||||||
uint16_t *data;
|
|
||||||
unsigned width;
|
|
||||||
unsigned height;
|
|
||||||
size_t pitch;
|
|
||||||
bool dirty;
|
|
||||||
} menu_framebuf_t;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
Loading…
Reference in New Issue