add the possibility to show a statusline when printing a menu
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
return NULL;
}
+void __menu_display_statusline(struct menu *m)
+{
+ return;
+}
+void menu_display_statusline(struct menu *m)
+ __attribute__ ((weak, alias("__menu_display_statusline")));
+
/*
* Display a menu so the user can make a choice of an item. First display its
* title, if any, and then each item in the menu.
puts(m->title);
putc('\n');
}
+ menu_display_statusline(m);
menu_items_iter(m, menu_item_print, NULL);
}
*/
int menu_destroy(struct menu *m);
+/*
+ * menu_display_statusline(struct menu *m);
+ * shows a statusline for every menu_display call.
+ */
+void menu_display_statusline(struct menu *m);
Example Code
------------
int menu_get_choice(struct menu *m, void **choice);
int menu_item_add(struct menu *m, char *item_key, void *item_data);
int menu_destroy(struct menu *m);
+void menu_display_statusline(struct menu *m);
#endif /* __MENU_H__ */