summaryrefslogtreecommitdiffstats
path: root/apps/menus/display_menu.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-07-19 13:42:04 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-07-19 22:10:26 +0000
commitc39f95465b9844f70f375f1690e0bf75c7ee7cc1 (patch)
tree2fda6bd805a74f41dd4303c7699eabb9e1aa4a1c /apps/menus/display_menu.c
parent4663d94b4e4edec609b6a24581ee345f2a1bedaa (diff)
downloadrockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.tar.gz
rockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.tar.bz2
rockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.zip
do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu it isn't too bad when you don't need voice but once you do the fun awaits do_menu likes to talk on menu enter which is in a loop when you use do_menu I would like to move the processing to the callback TOO BAD you only get an action and the menu_item_ex struct you sent it when calling the function Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r--apps/menus/display_menu.c51
1 files changed, 37 insertions, 14 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 5d53cbfe16..83bd8066d5 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -50,10 +50,12 @@
#include "rbunicode.h"
#ifdef HAVE_BACKLIGHT
-static int selectivebacklight_callback(int action,const struct menu_item_ex *this_item)
+static int selectivebacklight_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
(void)this_item;
-
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -69,10 +71,11 @@ static int selectivebacklight_callback(int action,const struct menu_item_ex *thi
return action;
}
-static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item)
+static int filterfirstkeypress_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
/*(void)this_item;REMOVED*/
-
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -81,7 +84,7 @@ static int filterfirstkeypress_callback(int action,const struct menu_item_ex *th
set_remote_backlight_filter_keypress(
global_settings.remote_bl_filter_first_keypress);
#endif /* HAVE_REMOTE_LCD */
- selectivebacklight_callback(action,this_item);/*uses Filter First KP*/
+ selectivebacklight_callback(action,this_item, this_list);/*uses Filter First KP*/
break;
}
@@ -118,9 +121,12 @@ static int selectivebacklight_set_mask(void* param)
#endif /* HAVE_BACKLIGHT */
#ifdef HAVE_LCD_FLIP
-static int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
+static int flipdisplay_callback(int action,
+ const struct menu_item_ex *this_item
+ struct gui_synclist *this_list)
{
(void)this_item;
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -265,9 +271,12 @@ MENUITEM_SETTING(remote_flip_display,
#endif
#ifdef HAVE_REMOTE_LCD_TICKING
-static int ticking_callback(int action,const struct menu_item_ex *this_item)
+static int ticking_callback(int action,
+ const struct menu_item_ex *this_item
+ struct gui_synclist *this_list)
{
(void)this_item;
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -334,9 +343,12 @@ MENUITEM_SETTING(list_accel_start_delay,
MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL);
#endif /* HAVE_WHEEL_ACCELERATION */
#ifdef HAVE_LCD_BITMAP
-static int screenscroll_callback(int action,const struct menu_item_ex *this_item)
+static int screenscroll_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
(void)this_item;
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -375,9 +387,12 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
/* PEAK METER MENU */
#ifdef HAVE_LCD_BITMAP
-static int peakmeter_callback(int action,const struct menu_item_ex *this_item)
+static int peakmeter_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
(void)this_item;
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM:
@@ -561,9 +576,12 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON,
#ifdef HAVE_TOUCHSCREEN
-static int touch_mode_callback(int action,const struct menu_item_ex *this_item)
+static int touch_mode_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
(void)this_item;
+ (void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM: /* on exit */
@@ -573,10 +591,12 @@ static int touch_mode_callback(int action,const struct menu_item_ex *this_item)
return action;
}
-static int line_padding_callback(int action,const struct menu_item_ex *this_item)
+static int line_padding_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list);
{
(void)this_item;
-
+ (void)this_list;
if (action == ACTION_EXIT_MENUITEM)
viewportmanager_theme_changed(THEME_LISTS);
return action;
@@ -594,11 +614,14 @@ MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON,
&touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration);
#endif
-static int codepage_callback(int action, const struct menu_item_ex *this_item)
+static int codepage_callback(int action,
+ const struct menu_item_ex *this_item,
+ struct gui_synclist *this_list)
{
+ (void)this_item;
+ (void)this_list;
static int old_codepage;
int new_codepage = global_settings.default_codepage;
- (void)this_item;
switch (action)
{
case ACTION_ENTER_MENUITEM: