Remove special error message for -ao alsa1x and alsa9
[mplayer.git] / libmenu / menu_list.h
blobaf5a9747da3dd2365c412de5ad3be8c6b48c9708
1 #ifndef MPLAYER_MENU_LIST_H
2 #define MPLAYER_MENU_LIST_H
4 #include "menu.h"
6 typedef struct list_entry_s list_entry_t;
9 #ifdef IMPL
10 struct list_entry_s {
11 #else
12 struct list_entry {
13 #endif
14 list_entry_t* prev;
15 list_entry_t* next;
17 char* txt;
18 char hide;
22 #ifndef IMPL
23 typedef struct menu_list_priv_s {
24 #else
25 typedef struct menu_priv_s {
26 #endif
27 list_entry_t* menu;
28 list_entry_t* current;
29 int count;
31 char* title;
32 int x,y;
33 int w,h;
34 int vspace, minb;
35 int disp_lines;
36 char* ptr;
37 int title_bg,title_bg_alpha;
38 int item_bg,item_bg_alpha;
39 int ptr_bg,ptr_bg_alpha;
40 } menu_list_priv_t;
42 typedef void (*free_entry_t)(list_entry_t* entry);
44 void menu_list_read_cmd(menu_t* menu,int cmd);
45 void menu_list_draw(menu_t* menu,mp_image_t* mpi);
46 void menu_list_add_entry(menu_t* menu,list_entry_t* entry);
47 void menu_list_init(menu_t* menu);
48 void menu_list_uninit(menu_t* menu,free_entry_t free_func);
49 int menu_list_jump_to_key(menu_t* menu,int c);
51 extern const menu_list_priv_t menu_list_priv_dflt;
53 #define MENU_LIST_PRIV_DFLT { \
54 NULL, \
55 NULL, \
56 0, \
58 "MPlayer", \
59 -1,-1, \
60 0,0, \
61 5, 3, \
62 0, \
63 NULL, \
64 0xFF, 0xFF, \
65 0xFF, 0xFF, \
66 0xA4, 0x50 \
70 #define MENU_LIST_PRIV_FIELDS \
71 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
72 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
73 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
74 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
75 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
76 { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
77 { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }, \
78 { "title-bg", M_ST_OFF(menu_list_priv_t,title_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
79 { "title-bg-alpha", M_ST_OFF(menu_list_priv_t,title_bg_alpha), \
80 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
81 { "item-bg", M_ST_OFF(menu_list_priv_t,item_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
82 { "item-bg-alpha", M_ST_OFF(menu_list_priv_t,item_bg_alpha), \
83 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
84 { "ptr-bg", M_ST_OFF(menu_list_priv_t,ptr_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
85 { "ptr-bg-alpha", M_ST_OFF(menu_list_priv_t,ptr_bg_alpha), \
86 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \
88 #endif /* MPLAYER_MENU_LIST_H */