From 5af0ce575c0c98e4d632abece38307c7d33c49f5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 8 Jun 2015 16:01:57 +0200 Subject: [PATCH] Add menu driver 'init_bind' --- menu/drivers/glui.c | 1 + menu/drivers/null.c | 49 +++++++++++++++++++------------------- menu/drivers/rgui.c | 1 + menu/drivers/rmenu_xui.cpp | 1 + menu/drivers/xmb.c | 9 +++++++ menu/menu_driver.h | 4 ++++ 6 files changed, 41 insertions(+), 24 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index fb60e82e98..8ff5cb35db 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -696,6 +696,7 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, NULL, NULL, + NULL, glui_load_image, "glui", NULL, diff --git a/menu/drivers/null.c b/menu/drivers/null.c index 877e972256..00bf56dc21 100644 --- a/menu/drivers/null.c +++ b/menu/drivers/null.c @@ -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, }; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index f09722ee38..dbacbb0198 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -656,6 +656,7 @@ menu_ctx_driver_t menu_ctx_rgui = { NULL, NULL, NULL, + NULL, "rgui", NULL, }; diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index 98259061ff..b57bd5dad3 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -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", diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 0b03031956..2a8a769386 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -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, diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 7ad9be2b79..943baea58b 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -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);