2 typedef struct list_entry_s list_entry_t
;
19 typedef struct menu_list_priv_s
{
21 typedef struct menu_priv_s
{
24 list_entry_t
* current
;
33 int title_bg
,title_bg_alpha
;
34 int item_bg
,item_bg_alpha
;
35 int ptr_bg
,ptr_bg_alpha
;
38 typedef void (*free_entry_t
)(list_entry_t
* entry
);
40 void menu_list_read_cmd(menu_t
* menu
,int cmd
);
41 void menu_list_read_key(menu_t
* menu
,int c
,int jump_to
);
42 void menu_list_draw(menu_t
* menu
,mp_image_t
* mpi
);
43 void menu_list_add_entry(menu_t
* menu
,list_entry_t
* entry
);
44 void menu_list_init(menu_t
* menu
);
45 void menu_list_uninit(menu_t
* menu
,free_entry_t free_func
);
46 void menu_list_jump_to_key(menu_t
* menu
,int c
);
48 extern const menu_list_priv_t menu_list_priv_dflt
;
50 #define MENU_LIST_PRIV_DFLT { \
67 #define MENU_LIST_PRIV_FIELDS \
68 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
69 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
70 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
71 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
72 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
73 { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
74 { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }, \
75 { "title-bg", M_ST_OFF(menu_list_priv_t,title_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
76 { "title-bg-alpha", M_ST_OFF(menu_list_priv_t,title_bg_alpha), \
77 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
78 { "item-bg", M_ST_OFF(menu_list_priv_t,item_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
79 { "item-bg-alpha", M_ST_OFF(menu_list_priv_t,item_bg_alpha), \
80 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
81 { "ptr-bg", M_ST_OFF(menu_list_priv_t,ptr_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
82 { "ptr-bg-alpha", M_ST_OFF(menu_list_priv_t,ptr_bg_alpha), \
83 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \