Mercurial > mplayer.hg
annotate libmenu/menu_list.h @ 25322:078bdfd44751
Fix spudec to display current vobsub immediately after a seek.
author | ulion |
---|---|
date | Tue, 11 Dec 2007 10:12:58 +0000 |
parents | 96d0992c7920 |
children | 6ac1ece1f9fe |
rev | line source |
---|---|
8197 | 1 |
2 typedef struct list_entry_s list_entry_t; | |
3 | |
4 | |
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; | |
12 | |
13 char* txt; | |
17946
0afe12256464
Allow hiding list elements and disableing the pointer.
albeu
parents:
8197
diff
changeset
|
14 char hide; |
8197 | 15 }; |
16 | |
17 | |
18 #ifndef IMPL | |
19 typedef struct menu_list_priv_s { | |
20 #else | |
21 typedef struct menu_priv_s { | |
22 #endif | |
23 list_entry_t* menu; | |
24 list_entry_t* current; | |
25 int count; | |
26 | |
27 char* title; | |
28 int x,y; | |
29 int w,h; | |
30 int vspace, minb; | |
24979
476d4922566a
Make page up and down with proper page size instead of always 10 rows.
ulion
parents:
19759
diff
changeset
|
31 int disp_lines; |
8197 | 32 char* ptr; |
17993
98eb966a4024
Add a function to draw flat boxes and use it to make the list
albeu
parents:
17946
diff
changeset
|
33 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
|
34 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
|
35 int ptr_bg,ptr_bg_alpha; |
8197 | 36 } menu_list_priv_t; |
37 | |
38 typedef void (*free_entry_t)(list_entry_t* entry); | |
39 | |
40 void menu_list_read_cmd(menu_t* menu,int cmd); | |
41 void menu_list_draw(menu_t* menu,mp_image_t* mpi); | |
42 void menu_list_add_entry(menu_t* menu,list_entry_t* entry); | |
43 void menu_list_init(menu_t* menu); | |
44 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
|
45 int menu_list_jump_to_key(menu_t* menu,int c); |
8197 | 46 |
47 extern const menu_list_priv_t menu_list_priv_dflt; | |
48 | |
49 #define MENU_LIST_PRIV_DFLT { \ | |
50 NULL, \ | |
51 NULL, \ | |
52 0, \ | |
53 \ | |
54 "MPlayer", \ | |
55 -1,-1, \ | |
56 0,0, \ | |
57 5, 3, \ | |
24979
476d4922566a
Make page up and down with proper page size instead of always 10 rows.
ulion
parents:
19759
diff
changeset
|
58 0, \ |
17993
98eb966a4024
Add a function to draw flat boxes and use it to make the list
albeu
parents:
17946
diff
changeset
|
59 NULL, \ |
19759
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
60 0xFF, 0xFF, \ |
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
61 0xFF, 0xFF, \ |
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
62 0xA4, 0x50 \ |
8197 | 63 } |
64 | |
65 | |
66 #define MENU_LIST_PRIV_FIELDS \ | |
67 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
68 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
69 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
70 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
71 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
72 { "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
|
73 { "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
|
74 { "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
|
75 { "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
|
76 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
|
77 { "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
|
78 { "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
|
79 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
|
80 { "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
|
81 { "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
|
82 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
|
83 |
8197 | 84 |