Add menu driver 'init_bind'

This commit is contained in:
twinaphex 2015-06-08 16:01:57 +02:00
parent 161464b0bc
commit 5af0ce575c
6 changed files with 41 additions and 24 deletions

View File

@ -696,6 +696,7 @@ menu_ctx_driver_t menu_ctx_glui = {
NULL,
NULL,
NULL,
NULL,
glui_load_image,
"glui",
NULL,

View File

@ -24,30 +24,31 @@
#include "../../general.h"
menu_ctx_driver_t menu_ctx_null = {
NULL, // set_texture
NULL, // render_messagebox
NULL, // render
NULL, // frame
NULL, // init
NULL, // free
NULL, // context_reset
NULL, // context_destroy
NULL, // populate_entries
NULL, // toggle
NULL, // navigation_clear
NULL, // navigation_decrement
NULL, // navigation_increment
NULL, // navigation_set
NULL, // navigation_set_last
NULL, // navigation_descend_alphabet
NULL, // navigation_ascend_alphabet
NULL, // list_insert
NULL, // list_delete
NULL, // list_clear
NULL, // list_cache
NULL, // list_get_size
NULL, // list_set_selection
NULL,
NULL, // set_texture
NULL, // render_messagebox
NULL, // render
NULL, // frame
NULL, // init
NULL, // free
NULL, // context_reset
NULL, // context_destroy
NULL, // populate_entries
NULL, // toggle
NULL, // navigation_clear
NULL, // navigation_decrement
NULL, // navigation_increment
NULL, // navigation_set
NULL, // navigation_set_last
NULL, // navigation_descend_alphabet
NULL, // navigation_ascend_alphabet
NULL, // list_insert
NULL, // list_delete
NULL, // list_clear
NULL, // list_cache
NULL, // list_get_size
NULL, // list_set_selection
NULL, // bind_init
NULL, // load_image
"null",
NULL,
};

View File

@ -656,6 +656,7 @@ menu_ctx_driver_t menu_ctx_rgui = {
NULL,
NULL,
NULL,
NULL,
"rgui",
NULL,
};

View File

@ -681,6 +681,7 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = {
rmenu_xui_list_clear,
NULL,
NULL,
NULL,
rmenu_xui_list_set_selection,
NULL,
"rmenu_xui",

View File

@ -2094,6 +2094,14 @@ static void xmb_toggle(bool menu_on)
xmb_toggle_horizontal_list(xmb, menu);
}
static int xmb_list_bind_init(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *elem0, const char *elem1,
uint32_t label_hash, uint32_t menu_label_hash)
{
return 0;
}
menu_ctx_driver_t menu_ctx_xmb = {
NULL,
xmb_render_messagebox_internal,
@ -2118,6 +2126,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
xmb_list_cache,
xmb_list_get_size,
NULL,
xmb_list_bind_init,
xmb_load_image,
"xmb",
NULL,

View File

@ -259,6 +259,10 @@ typedef struct menu_ctx_driver
void (*list_cache)(menu_list_type_t, unsigned);
size_t(*list_get_size)(void *data, menu_list_type_t);
void (*list_set_selection)(file_list_t *list);
int (*menu_entries_cbs_init_bind)(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *elem0, const char *elem1,
uint32_t label_hash, uint32_t menu_label_hash);
bool (*load_image)(void *data, menu_image_type_t type);
const char *ident;
bool (*perform_action)(void* data, unsigned action);