annotate libmenu/menu_list.h @ 16807:f11cf6fe9599

Formal syncing. Typo hunting.
author jheryan
date Wed, 19 Oct 2005 12:09:56 +0000
parents b31caec933e9
children 0afe12256464
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;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
14 };
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 #ifndef IMPL
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
18 typedef struct menu_list_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
19 #else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
20 typedef struct menu_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
21 #endif
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
22 list_entry_t* menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
23 list_entry_t* current;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
24 int count;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
25
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
26 char* title;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
27 int x,y;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
28 int w,h;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
29 int vspace, minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
30 char* ptr;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
31 } menu_list_priv_t;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
32
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
33 typedef void (*free_entry_t)(list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
34
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
35 void menu_list_read_cmd(menu_t* menu,int cmd);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
36 void menu_list_read_key(menu_t* menu,int c,int jump_to);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
37 void menu_list_draw(menu_t* menu,mp_image_t* mpi);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
38 void menu_list_add_entry(menu_t* menu,list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
39 void menu_list_init(menu_t* menu);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
40 void menu_list_uninit(menu_t* menu,free_entry_t free_func);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
41 void menu_list_jump_to_key(menu_t* menu,int c);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
42
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
43 extern const menu_list_priv_t menu_list_priv_dflt;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
44
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
45 #define MENU_LIST_PRIV_DFLT { \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
46 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
47 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
48 0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
49 \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
50 "MPlayer", \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
51 -1,-1, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
52 0,0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
53 5, 3, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
54 ">" \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
55 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
56
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
57
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
58 #define MENU_LIST_PRIV_FIELDS \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
59 { "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
60 { "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
61 { "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
62 { "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
63 { "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
64 { "h", M_ST_OFF(menu_list_priv_t,h), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
65 { "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
66