annotate libmenu/menu_list.h @ 27251:93503c403d56

Add missing headers to configure checks.
author diego
date Tue, 15 Jul 2008 08:18:08 +0000
parents 4ebf3c3f2bf6
children f8b6c7045cf8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
1 #ifndef MPLAYER_MENU_LIST_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
2 #define MPLAYER_MENU_LIST_H
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
3
26139
4ebf3c3f2bf6 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
4 #include "menu.h"
4ebf3c3f2bf6 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
5
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
6 typedef struct list_entry_s list_entry_t;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
7
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
8
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
9 #ifdef IMPL
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
10 struct list_entry_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
11 #else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
12 struct list_entry {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
13 #endif
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
14 list_entry_t* prev;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
15 list_entry_t* next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
16
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
17 char* txt;
17946
0afe12256464 Allow hiding list elements and disableing the pointer.
albeu
parents: 8197
diff changeset
18 char hide;
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
19 };
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
20
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
21
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
22 #ifndef IMPL
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
23 typedef struct menu_list_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
24 #else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
25 typedef struct menu_priv_s {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
26 #endif
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
27 list_entry_t* menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
28 list_entry_t* current;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
29 int count;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
30
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
31 char* title;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
32 int x,y;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
33 int w,h;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
34 int vspace, minb;
24979
476d4922566a Make page up and down with proper page size instead of always 10 rows.
ulion
parents: 19759
diff changeset
35 int disp_lines;
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
36 char* ptr;
17993
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
37 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
38 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
39 int ptr_bg,ptr_bg_alpha;
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
40 } menu_list_priv_t;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
41
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
42 typedef void (*free_entry_t)(list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
43
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
44 void menu_list_read_cmd(menu_t* menu,int cmd);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
45 void menu_list_draw(menu_t* menu,mp_image_t* mpi);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
46 void menu_list_add_entry(menu_t* menu,list_entry_t* entry);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
47 void menu_list_init(menu_t* menu);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
48 void menu_list_uninit(menu_t* menu,free_entry_t free_func);
25263
96d0992c7920 Remove hardcoded key->cmd bindings in libmenu, support custom key bindings
ulion
parents: 24979
diff changeset
49 int menu_list_jump_to_key(menu_t* menu,int c);
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
50
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
51 extern const menu_list_priv_t menu_list_priv_dflt;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
52
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
53 #define MENU_LIST_PRIV_DFLT { \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
54 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
55 NULL, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
56 0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
57 \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
58 "MPlayer", \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
59 -1,-1, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
60 0,0, \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
61 5, 3, \
24979
476d4922566a Make page up and down with proper page size instead of always 10 rows.
ulion
parents: 19759
diff changeset
62 0, \
17993
98eb966a4024 Add a function to draw flat boxes and use it to make the list
albeu
parents: 17946
diff changeset
63 NULL, \
19759
9ad9b0a4db27 better readability on selected menu item by tweaking alpha channel properties
ben
parents: 18193
diff changeset
64 0xFF, 0xFF, \
9ad9b0a4db27 better readability on selected menu item by tweaking alpha channel properties
ben
parents: 18193
diff changeset
65 0xFF, 0xFF, \
9ad9b0a4db27 better readability on selected menu item by tweaking alpha channel properties
ben
parents: 18193
diff changeset
66 0xA4, 0x50 \
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
67 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
68
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
69
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
70 #define MENU_LIST_PRIV_FIELDS \
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
71 { "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
72 { "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
73 { "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
74 { "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
75 { "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
76 { "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
77 { "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
78 { "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
79 { "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
80 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
81 { "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
82 { "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
83 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
84 { "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
85 { "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
86 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
87
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
88 #endif /* MPLAYER_MENU_LIST_H */