summaryrefslogtreecommitdiff
path: root/apps/menu.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menu.h')
-rw-r--r--apps/menu.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/menu.h b/apps/menu.h
index acdc8e987f..1f017b0c49 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -195,8 +195,7 @@ int do_menu(const struct menu_item_ex *menu, int *start_selected,
195 When the user selects this item the function will be run, 195 When the user selects this item the function will be run,
196 if MENU_FUNC_CHECK_RETVAL is set, the return value 196 if MENU_FUNC_CHECK_RETVAL is set, the return value
197 will be checked, returning 1 will exit do_menu(); */ 197 will be checked, returning 1 will exit do_menu(); */
198#define MENUITEM_FUNCTION(name, flags, str, func, reserved, \ 198#define MENUITEM_FUNCTION(name, flags, str, func, callback, icon) \
199 callback, icon) \
200 static const struct menu_callback_with_desc name##_ = {callback,str,icon}; \ 199 static const struct menu_callback_with_desc name##_ = {callback,str,icon}; \
201 static const struct menu_func name##__ = {(void*)func}; \ 200 static const struct menu_func name##__ = {(void*)func}; \
202 /* should be const, but recording_settings wont let us do that */ \ 201 /* should be const, but recording_settings wont let us do that */ \
@@ -205,14 +204,14 @@ int do_menu(const struct menu_item_ex *menu, int *start_selected,
205 { .function = & name##__}, {.callback_and_desc = & name##_}}; 204 { .function = & name##__}, {.callback_and_desc = & name##_}};
206 205
207/* As above, except the text is dynamic */ 206/* As above, except the text is dynamic */
208#define MENUITEM_FUNCTION_DYNTEXT(name, flags, func, reserved, \ 207#define MENUITEM_FUNCTION_DYNTEXT(name, flags, func, \
209 text_callback, voice_callback, \ 208 text_callback, voice_callback, \
210 text_cb_data, callback, icon) \ 209 text_cb_data, callback, icon) \
211 static const struct menu_get_name_and_icon name##_ \ 210 static const struct menu_get_name_and_icon name##_ \
212 = {callback,text_callback,voice_callback,text_cb_data,icon}; \ 211 = {callback,text_callback,voice_callback,text_cb_data,icon}; \
213 static const struct menu_func name##__ = {(void*)func}; \ 212 static const struct menu_func name##__ = {(void*)func}; \
214 const struct menu_item_ex name = \ 213 const struct menu_item_ex name = \
215 { MT_FUNCTION_CALL|MENU_DYNAMIC_DESC|flags, \ 214 { MT_FUNCTION_CALL|MENU_DYNAMIC_DESC|flags, \
216 { .function = & name##__}, {.menu_get_name_and_icon = & name##_}}; 215 { .function = & name##__}, {.menu_get_name_and_icon = & name##_}};
217 216
218/* Use this to put a function call into the menu. 217/* Use this to put a function call into the menu.