mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Split up driver_menu.h into three separate header files -
for menu display API, menu backend API, and menu driver general API
This commit is contained in:
parent
18e20b0975
commit
a09e04f679
4
driver.h
4
driver.h
@ -35,7 +35,9 @@
|
||||
#include "miscellaneous.h"
|
||||
#endif
|
||||
|
||||
#include "driver_menu.h"
|
||||
#include "frontend/menu/menu_driver.h"
|
||||
#include "frontend/menu/backend/menu_backend.h"
|
||||
#include "frontend/menu/disp/menu_display.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
29
frontend/menu/backend/menu_backend.h
Normal file
29
frontend/menu/backend/menu_backend.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef DRIVER_MENU_BACKEND_H__
|
||||
#define DRIVER_MENU_BACKEND_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct menu_ctx_driver_backend
|
||||
{
|
||||
int (*iterate)(unsigned);
|
||||
void (*shader_manager_init)(menu_handle_t *);
|
||||
void (*shader_manager_get_str)(struct gfx_shader *, char *,
|
||||
size_t, const char *, const char *, unsigned);
|
||||
void (*shader_manager_set_preset)(struct gfx_shader *,
|
||||
unsigned, const char*);
|
||||
void (*shader_manager_save_preset)(const char *, bool);
|
||||
unsigned (*shader_manager_get_type)(const struct gfx_shader *);
|
||||
int (*shader_manager_setting_toggle)(unsigned, const char *, unsigned);
|
||||
unsigned (*type_is)(const char *, unsigned);
|
||||
void (*setting_set_label)(char *, size_t, unsigned *,
|
||||
unsigned, const char *, const char *, unsigned);
|
||||
const char *ident;
|
||||
} menu_ctx_driver_backend_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -21,6 +21,7 @@
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include "menu_common_backend.h"
|
||||
#include "menu_backend.h"
|
||||
#include "../menu_action.h"
|
||||
#include "../menu_entries.h"
|
||||
#include "../menu_navigation.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <ctype.h>
|
||||
#include "../menu_action.h"
|
||||
#include "../menu_navigation.h"
|
||||
#include "menu_backend.h"
|
||||
|
||||
#include "../../../gfx/gfx_common.h"
|
||||
#include "../../../driver.h"
|
||||
|
@ -21,8 +21,10 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../menu_common.h"
|
||||
#include "../menu_driver.h"
|
||||
#include "menu_display.h"
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../../../general.h"
|
||||
#include "../../../gfx/gfx_common.h"
|
||||
#include "../../../config.def.h"
|
||||
|
@ -22,8 +22,10 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_common.h"
|
||||
#include "menu_display.h"
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../../../general.h"
|
||||
#include "../../../gfx/gfx_common.h"
|
||||
#include "../../../gfx/gl_common.h"
|
||||
|
43
frontend/menu/disp/menu_display.h
Normal file
43
frontend/menu/disp/menu_display.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef DRIVER_MENU_DISPLAY_H__
|
||||
#define DRIVER_MENU_DISPLAY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct menu_ctx_driver
|
||||
{
|
||||
void (*set_texture)(void*);
|
||||
void (*render_messagebox)(const char*);
|
||||
void (*render)(void);
|
||||
void (*frame)(void);
|
||||
void* (*init)(void);
|
||||
void (*free)(void*);
|
||||
void (*context_reset)(void*);
|
||||
void (*context_destroy)(void*);
|
||||
void (*populate_entries)(void*, const char *, const char *,
|
||||
unsigned);
|
||||
void (*iterate)(void*, unsigned);
|
||||
int (*input_postprocess)(uint64_t);
|
||||
void (*navigation_clear)(void *);
|
||||
void (*navigation_decrement)(void *);
|
||||
void (*navigation_increment)(void *);
|
||||
void (*navigation_set)(void *);
|
||||
void (*navigation_set_last)(void *);
|
||||
void (*navigation_descend_alphabet)(void *, size_t *);
|
||||
void (*navigation_ascend_alphabet)(void *, size_t *);
|
||||
void (*list_insert)(void *, const char *, const char *, size_t);
|
||||
void (*list_delete)(void *, size_t);
|
||||
void (*list_clear)(void *);
|
||||
void (*list_set_selection)(void *);
|
||||
void (*init_core_info)(void *);
|
||||
|
||||
const menu_ctx_driver_backend_t *backend;
|
||||
const char *ident;
|
||||
} menu_ctx_driver_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../menu_common.h"
|
||||
#include "../../../general.h"
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "menu_display.h"
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../menu_common.h"
|
||||
#include "../../../general.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <xui.h>
|
||||
#include <xuiapp.h>
|
||||
|
||||
#include "menu_display.h"
|
||||
#include "../backend/menu_common_backend.h"
|
||||
#include "../menu_common.h"
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "boolean.h"
|
||||
#include "file_list.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -35,6 +36,10 @@ extern "C" {
|
||||
#define MAX_PLAYERS 16
|
||||
#endif
|
||||
|
||||
#ifndef LIBRETRO_H__
|
||||
typedef int64_t retro_time_t;
|
||||
#endif
|
||||
|
||||
struct menu_bind_state_port
|
||||
{
|
||||
bool buttons[MENU_MAX_BUTTONS];
|
||||
@ -130,55 +135,6 @@ typedef struct
|
||||
retro_time_t sleep_msec;
|
||||
} menu_handle_t;
|
||||
|
||||
typedef struct menu_ctx_driver_backend
|
||||
{
|
||||
int (*iterate)(unsigned);
|
||||
void (*shader_manager_init)(menu_handle_t *);
|
||||
void (*shader_manager_get_str)(struct gfx_shader *, char *,
|
||||
size_t, const char *, const char *, unsigned);
|
||||
void (*shader_manager_set_preset)(struct gfx_shader *,
|
||||
unsigned, const char*);
|
||||
void (*shader_manager_save_preset)(const char *, bool);
|
||||
unsigned (*shader_manager_get_type)(const struct gfx_shader *);
|
||||
int (*shader_manager_setting_toggle)(unsigned, const char *, unsigned);
|
||||
unsigned (*type_is)(const char *, unsigned);
|
||||
void (*setting_set_label)(char *, size_t, unsigned *,
|
||||
unsigned, const char *, const char *, unsigned);
|
||||
const char *ident;
|
||||
} menu_ctx_driver_backend_t;
|
||||
|
||||
typedef struct menu_ctx_driver
|
||||
{
|
||||
void (*set_texture)(void*);
|
||||
void (*render_messagebox)(const char*);
|
||||
void (*render)(void);
|
||||
void (*frame)(void);
|
||||
void* (*init)(void);
|
||||
void (*free)(void*);
|
||||
void (*context_reset)(void*);
|
||||
void (*context_destroy)(void*);
|
||||
void (*populate_entries)(void*, const char *, const char *,
|
||||
unsigned);
|
||||
void (*iterate)(void*, unsigned);
|
||||
int (*input_postprocess)(uint64_t);
|
||||
void (*navigation_clear)(void *);
|
||||
void (*navigation_decrement)(void *);
|
||||
void (*navigation_increment)(void *);
|
||||
void (*navigation_set)(void *);
|
||||
void (*navigation_set_last)(void *);
|
||||
void (*navigation_descend_alphabet)(void *, size_t *);
|
||||
void (*navigation_ascend_alphabet)(void *, size_t *);
|
||||
void (*list_insert)(void *, const char *, const char *, size_t);
|
||||
void (*list_delete)(void *, size_t);
|
||||
void (*list_clear)(void *);
|
||||
void (*list_set_selection)(void *);
|
||||
void (*init_core_info)(void *);
|
||||
|
||||
const menu_ctx_driver_backend_t *backend;
|
||||
const char *ident;
|
||||
} menu_ctx_driver_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user