diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-14 23:47:11 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-14 23:47:11 +0000 |
commit | c83ebc0b7df94135390661a0d7a1a7b9bda57462 (patch) | |
tree | 5c1a489baddf23a95de12d1a678599f0da04f399 /libmenu/menu_list.h | |
parent | 54e31581a3cc8cd5501baa8553ab0a1cf2a75bee (diff) | |
download | mpv-c83ebc0b7df94135390661a0d7a1a7b9bda57462.tar.bz2 mpv-c83ebc0b7df94135390661a0d7a1a7b9bda57462.tar.xz |
OSD menus initial version
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8198 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmenu/menu_list.h')
-rw-r--r-- | libmenu/menu_list.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/libmenu/menu_list.h b/libmenu/menu_list.h new file mode 100644 index 0000000000..74219753fa --- /dev/null +++ b/libmenu/menu_list.h @@ -0,0 +1,66 @@ + +typedef struct list_entry_s list_entry_t; + + +#ifdef IMPL +struct list_entry_s { +#else +struct list_entry { +#endif + list_entry_t* prev; + list_entry_t* next; + + char* txt; +}; + + +#ifndef IMPL +typedef struct menu_list_priv_s { +#else +typedef struct menu_priv_s { +#endif + list_entry_t* menu; + list_entry_t* current; + int count; + + char* title; + int x,y; + int w,h; + int vspace, minb; + char* ptr; +} menu_list_priv_t; + +typedef void (*free_entry_t)(list_entry_t* entry); + +void menu_list_read_cmd(menu_t* menu,int cmd); +void menu_list_read_key(menu_t* menu,int c,int jump_to); +void menu_list_draw(menu_t* menu,mp_image_t* mpi); +void menu_list_add_entry(menu_t* menu,list_entry_t* entry); +void menu_list_init(menu_t* menu); +void menu_list_uninit(menu_t* menu,free_entry_t free_func); +void menu_list_jump_to_key(menu_t* menu,int c); + +extern const menu_list_priv_t menu_list_priv_dflt; + +#define MENU_LIST_PRIV_DFLT { \ + NULL, \ + NULL, \ + 0, \ +\ + "MPlayer", \ + -1,-1, \ + 0,0, \ + 5, 3, \ + ">" \ +} + + +#define MENU_LIST_PRIV_FIELDS \ + { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ + { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL } + |