A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://technical.swissmicros.com/dmcp/doc/DMCP-ifc-html/group__menu__system.html below:

DMCP interface: Menu system

This functionality allows to extend and use default menu system for programs where this functionality is sufficient enough. More...

typedef int  run_menu_item_fn_t(uint8_t line_id)   Prototype for run_menu_item function.
  typedef const char *  menu_line_str_fn_t(uint8_t line_id, char *s, const int slen)   Prototype for menu_line_str function.
  int  handle_menu (const smenu_t *menu_id, int action, int cur_line)   Starts menu screen.
  int  run_menu_item_sys (uint8_t line_id)   Invoke particular sys menu function.
  int  run_menu_item (uint8_t line_id)   (Defined by user) Invoke functionality for selected menu item
  const char *  menu_line_str (uint8_t line_id, char *ln, const int ln_len)   (Defined by user) Should return string representation of given menu item
 

This functionality allows to extend and use default menu system for programs where this functionality is sufficient enough.

User has to define run_menu_item() and menu_line_str() functions and assign them to system variables

to extend default menu functionality.

◆ handle_menu() int handle_menu ( const smenu_t * menu_id, int action, int cur_line )

Starts menu screen.

Parameters
menu_id Menu definition structure action MENU_RESET for first menu screen, MENU_ADD for nested menu cur_line Line selected at start
Returns
Exit code.
◆ menu_line_str() const char * menu_line_str ( uint8_t line_id, char * ln, const int ln_len )

(Defined by user) Should return string representation of given menu item

Parameters
line_id Menu item id ln Buffer which can be used for line text ln_len Length of ln return Line item string

This function is called by system when particular line is drawn only if this function is assigned to menu_line_str_app system variable.

◆ run_menu_item() int run_menu_item ( uint8_t line_id )

(Defined by user) Invoke functionality for selected menu item

Parameters
Returns
Exit code

This function is called by system when particular menu item is selected only if this function is assigned to run_menu_item_app system variable.

◆ run_menu_item_sys() int run_menu_item_sys ( uint8_t line_id )

Invoke particular sys menu function.

Parameters

It allows e.g. launching of USB disk mode from user program by running run_menu_item_sys(MI_MSC).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4