summaryrefslogtreecommitdiffstats
path: root/apps/menus/eq_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-03-17 12:33:34 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-03-17 12:33:34 +0000
commitdaf66940b1a06de2681c91dcb8cf72d95a234e86 (patch)
treecf19ca0f426f3a44718fbe42ce64306ac28aa815 /apps/menus/eq_menu.c
parent86ecc9588beca55162d7b4ef44ffcddd9c447600 (diff)
downloadrockbox-daf66940b1a06de2681c91dcb8cf72d95a234e86.tar.gz
rockbox-daf66940b1a06de2681c91dcb8cf72d95a234e86.zip
Unify the way functions are called from menus.
Optionally, the functions return value can be checked for a value to tell the menu to quit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12821 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/eq_menu.c')
-rw-r--r--apps/menus/eq_menu.c57
1 files changed, 30 insertions, 27 deletions
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
index 0cf63bb20d..f2c1f9b22d 100644
--- a/apps/menus/eq_menu.c
+++ b/apps/menus/eq_menu.c
@@ -142,21 +142,21 @@ MENUITEM_SETTING(gain_2, &global_settings.eq_band2_gain, dsp_set_coefs_callback)
MENUITEM_SETTING(gain_3, &global_settings.eq_band3_gain, dsp_set_coefs_callback);
MENUITEM_SETTING(gain_4, &global_settings.eq_band4_gain, dsp_set_coefs_callback);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_0, do_option, (void*)&gain_0, NULL,
- gainitem_get_name,
- &global_settings.eq_band0_cutoff, Icon_NOICON);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_1, do_option, (void*)&gain_1, NULL,
- gainitem_get_name,
- &global_settings.eq_band1_cutoff, Icon_NOICON);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_2, do_option, (void*)&gain_2, NULL,
- gainitem_get_name,
- &global_settings.eq_band2_cutoff, Icon_NOICON);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_3, do_option, (void*)&gain_3, NULL,
- gainitem_get_name,
- &global_settings.eq_band3_cutoff, Icon_NOICON);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_4, do_option, (void*)&gain_4, NULL,
- gainitem_get_name,
- &global_settings.eq_band4_cutoff, Icon_NOICON);
+MENUITEM_FUNCTION_DYNTEXT(gain_item_0, MENU_FUNC_USEPARAM, do_option, (void*)&gain_0,
+ 0, gainitem_get_name, &global_settings.eq_band0_cutoff,
+ NULL, Icon_NOICON);
+MENUITEM_FUNCTION_DYNTEXT(gain_item_1, MENU_FUNC_USEPARAM, do_option, (void*)&gain_1,
+ 0, gainitem_get_name, &global_settings.eq_band1_cutoff,
+ NULL, Icon_NOICON);
+MENUITEM_FUNCTION_DYNTEXT(gain_item_2, MENU_FUNC_USEPARAM, do_option, (void*)&gain_2,
+ 0, gainitem_get_name, &global_settings.eq_band2_cutoff,
+ NULL, Icon_NOICON);
+MENUITEM_FUNCTION_DYNTEXT(gain_item_3, MENU_FUNC_USEPARAM, do_option, (void*)&gain_3,
+ 0, gainitem_get_name, &global_settings.eq_band3_cutoff,
+ NULL, Icon_NOICON);
+MENUITEM_FUNCTION_DYNTEXT(gain_item_4, MENU_FUNC_USEPARAM, do_option, (void*)&gain_4,
+ 0, gainitem_get_name, &global_settings.eq_band4_cutoff,
+ NULL, Icon_NOICON);
MAKE_MENU(gain_menu, ID2P(LANG_EQUALIZER_GAIN), NULL, Icon_NOICON, &gain_item_0,
&gain_item_1, &gain_item_2, &gain_item_3, &gain_item_4);
@@ -192,12 +192,15 @@ int do_center_band_menu(void* param)
}
MAKE_MENU(band_0_menu, ID2P(LANG_EQUALIZER_BAND_LOW_SHELF), NULL,
Icon_EQ, &cutoff_0, &q_0, &gain_0);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(band_1_menu, do_center_band_menu, (void*)1, NULL,
- centerband_get_name, (void*)1, Icon_EQ);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(band_2_menu, do_center_band_menu, (void*)2, NULL,
- centerband_get_name, (void*)2, Icon_EQ);
-MENUITEM_FUNCTION_WPARAM_DYNTEXT(band_3_menu, do_center_band_menu, (void*)3, NULL,
- centerband_get_name, (void*)3, Icon_EQ);
+MENUITEM_FUNCTION_DYNTEXT(band_1_menu, MENU_FUNC_USEPARAM,
+ do_center_band_menu, (void*)1, 0,
+ centerband_get_name, (void*)1, NULL, Icon_EQ);
+MENUITEM_FUNCTION_DYNTEXT(band_2_menu, MENU_FUNC_USEPARAM,
+ do_center_band_menu, (void*)2, 0,
+ centerband_get_name, (void*)2, NULL, Icon_EQ);
+MENUITEM_FUNCTION_DYNTEXT(band_3_menu, MENU_FUNC_USEPARAM,
+ do_center_band_menu, (void*)3, 0,
+ centerband_get_name, (void*)3, NULL, Icon_EQ);
MAKE_MENU(band_4_menu, ID2P(LANG_EQUALIZER_BAND_HIGH_SHELF), NULL,
Icon_EQ, &cutoff_4, &q_4, &gain_4);
@@ -625,13 +628,13 @@ bool eq_browse_presets(void)
}
-MENUITEM_FUNCTION(eq_graphical, ID2P(LANG_EQUALIZER_GRAPHICAL),
- (int(*)(void))eq_menu_graphical, NULL,
+MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL),
+ (int(*)(void))eq_menu_graphical, NULL, 0, NULL,
Icon_EQ);
-MENUITEM_FUNCTION(eq_save, ID2P(LANG_EQUALIZER_SAVE),
- (int(*)(void))eq_save_preset, NULL, Icon_NOICON);
-MENUITEM_FUNCTION(eq_browse, ID2P(LANG_EQUALIZER_BROWSE),
- (int(*)(void))eq_browse_presets, NULL, Icon_NOICON);
+MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE),
+ (int(*)(void))eq_save_preset, NULL, 0, NULL, Icon_NOICON);
+MENUITEM_FUNCTION(eq_browse, 0, ID2P(LANG_EQUALIZER_BROWSE),
+ (int(*)(void))eq_browse_presets, NULL, 0, NULL, Icon_NOICON);
MAKE_MENU(equalizer_menu, ID2P(LANG_EQUALIZER), NULL, Icon_EQ,
&eq_enable, &eq_graphical, &eq_precut, &gain_menu,