annotate libmenu/menu_list.h @ 18217:0ca00f163c2e

typo fix
author gabrov
date Sun, 23 Apr 2006 09:07:38 +0000
parents e8cbaf092e96
children 9ad9b0a4db27
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
1
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
2 typedef struct list_entry_s list_entry_t;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
3
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
4
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
5 #ifdef IMPL
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
6 struct list_entry_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
7 #else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
8 struct list_entry {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
9 #endif
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
10 list_entry_t* prev;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
11 list_entry_t* next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
12
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
13 char* txt;
17946
0afe12256464 Allow hiding list elements and disableing the pointer.
albeu
parents: 8197
diff changeset
14 char hide;
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
15 };
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
16
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
17
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
18 #ifndef IMPL
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
19 typedef struct menu_list_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
20 #else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
21 typedef struct menu_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
22 #endif
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
23 list_entry_t* menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
24 list_entry_t* current;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
25 int count;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
26
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
27 char* title;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
28 int x,y;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
29 int w,h;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
30 int vspace, minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
31 char* ptr;
17993
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
32 int title_bg,title_bg_alpha;
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
33 int item_bg,item_bg_alpha;
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
34 int ptr_bg,ptr_bg_alpha;
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
35 } menu_list_priv_t;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
36
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
37 typedef void (*free_entry_t)(list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
38
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
39 void menu_list_read_cmd(menu_t* menu,int cmd);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
40 void menu_list_read_key(menu_t* menu,int c,int jump_to);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
41 void menu_list_draw(menu_t* menu,mp_image_t* mpi);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
42 void menu_list_add_entry(menu_t* menu,list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
43 void menu_list_init(menu_t* menu);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
44 void menu_list_uninit(menu_t* menu,free_entry_t free_func);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
45 void menu_list_jump_to_key(menu_t* menu,int c);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
46
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
47 extern const menu_list_priv_t menu_list_priv_dflt;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
48
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
49 #define MENU_LIST_PRIV_DFLT { \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
50 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
51 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
52 0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
53 \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
54 "MPlayer", \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
55 -1,-1, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
56 0,0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
57 5, 3, \
17993
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
58 NULL, \
18193
e8cbaf092e96 Fix menu background drawing.
albeu
parents: 17993
diff changeset
59 0xE0, 0x20, \
e8cbaf092e96 Fix menu background drawing.
albeu
parents: 17993
diff changeset
60 0x80, 0x50, \
e8cbaf092e96 Fix menu background drawing.
albeu
parents: 17993
diff changeset
61 0xC0, 0x50 \
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
62 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
63
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
64
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
65 #define MENU_LIST_PRIV_FIELDS \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
66 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
67 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
68 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
69 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
70 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
71 { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
17993
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
72 { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
73 { "title-bg", M_ST_OFF(menu_list_priv_t,title_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
74 { "title-bg-alpha", M_ST_OFF(menu_list_priv_t,title_bg_alpha), \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
75 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
76 { "item-bg", M_ST_OFF(menu_list_priv_t,item_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
77 { "item-bg-alpha", M_ST_OFF(menu_list_priv_t,item_bg_alpha), \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
78 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
79 { "ptr-bg", M_ST_OFF(menu_list_priv_t,ptr_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
80 { "ptr-bg-alpha", M_ST_OFF(menu_list_priv_t,ptr_bg_alpha), \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
81 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
82
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
83