10000l : fix a crash on x86 due to an horrible mistake in my x86_64 patch
[mplayer.git] / libmenu / menu_list.h
blob74219753fa9b285ffb68cd20ad32eb52c05ce391
2 typedef struct list_entry_s list_entry_t;
5 #ifdef IMPL
6 struct list_entry_s {
7 #else
8 struct list_entry {
9 #endif
10 list_entry_t* prev;
11 list_entry_t* next;
13 char* txt;
17 #ifndef IMPL
18 typedef struct menu_list_priv_s {
19 #else
20 typedef struct menu_priv_s {
21 #endif
22 list_entry_t* menu;
23 list_entry_t* current;
24 int count;
26 char* title;
27 int x,y;
28 int w,h;
29 int vspace, minb;
30 char* ptr;
31 } menu_list_priv_t;
33 typedef void (*free_entry_t)(list_entry_t* entry);
35 void menu_list_read_cmd(menu_t* menu,int cmd);
36 void menu_list_read_key(menu_t* menu,int c,int jump_to);
37 void menu_list_draw(menu_t* menu,mp_image_t* mpi);
38 void menu_list_add_entry(menu_t* menu,list_entry_t* entry);
39 void menu_list_init(menu_t* menu);
40 void menu_list_uninit(menu_t* menu,free_entry_t free_func);
41 void menu_list_jump_to_key(menu_t* menu,int c);
43 extern const menu_list_priv_t menu_list_priv_dflt;
45 #define MENU_LIST_PRIV_DFLT { \
46 NULL, \
47 NULL, \
48 0, \
50 "MPlayer", \
51 -1,-1, \
52 0,0, \
53 5, 3, \
54 ">" \
58 #define MENU_LIST_PRIV_FIELDS \
59 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
60 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
61 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
62 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
63 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
64 { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
65 { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }