Mercurial > mplayer.hg
annotate libmenu/menu_list.h @ 30983:8b6727d2d479
cosmetics: Reorder some x86-related preprocessor conditionals.
This fixes two of the following warnings on non-x86 machines:
libmpcodecs/vf_gradfun.c:388:5: warning: "HAVE_EBX_AVAILABLE" is not defined
author | diego |
---|---|
date | Tue, 06 Apr 2010 09:46:47 +0000 |
parents | 0f1b5b68af32 |
children |
rev | line source |
---|---|
28113 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_MENU_LIST_H |
20 #define MPLAYER_MENU_LIST_H | |
8197 | 21 |
26139
4ebf3c3f2bf6
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
22 #include "menu.h" |
4ebf3c3f2bf6
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
23 |
8197 | 24 typedef struct list_entry_s list_entry_t; |
25 | |
26 | |
27 #ifdef IMPL | |
28 struct list_entry_s { | |
29 #else | |
30 struct list_entry { | |
31 #endif | |
32 list_entry_t* prev; | |
33 list_entry_t* next; | |
34 | |
35 char* txt; | |
17946
0afe12256464
Allow hiding list elements and disableing the pointer.
albeu
parents:
8197
diff
changeset
|
36 char hide; |
8197 | 37 }; |
38 | |
39 | |
40 #ifndef IMPL | |
41 typedef struct menu_list_priv_s { | |
42 #else | |
43 typedef struct menu_priv_s { | |
44 #endif | |
45 list_entry_t* menu; | |
46 list_entry_t* current; | |
47 int count; | |
48 | |
49 char* title; | |
50 int x,y; | |
51 int w,h; | |
52 int vspace, minb; | |
24979
476d4922566a
Make page up and down with proper page size instead of always 10 rows.
ulion
parents:
19759
diff
changeset
|
53 int disp_lines; |
8197 | 54 char* ptr; |
17993
98eb966a4024
Add a function to draw flat boxes and use it to make the list
albeu
parents:
17946
diff
changeset
|
55 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
|
56 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
|
57 int ptr_bg,ptr_bg_alpha; |
8197 | 58 } menu_list_priv_t; |
59 | |
60 typedef void (*free_entry_t)(list_entry_t* entry); | |
61 | |
62 void menu_list_read_cmd(menu_t* menu,int cmd); | |
63 void menu_list_draw(menu_t* menu,mp_image_t* mpi); | |
64 void menu_list_add_entry(menu_t* menu,list_entry_t* entry); | |
65 void menu_list_init(menu_t* menu); | |
66 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
|
67 int menu_list_jump_to_key(menu_t* menu,int c); |
8197 | 68 |
69 extern const menu_list_priv_t menu_list_priv_dflt; | |
70 | |
71 #define MENU_LIST_PRIV_DFLT { \ | |
72 NULL, \ | |
73 NULL, \ | |
74 0, \ | |
75 \ | |
76 "MPlayer", \ | |
77 -1,-1, \ | |
78 0,0, \ | |
79 5, 3, \ | |
24979
476d4922566a
Make page up and down with proper page size instead of always 10 rows.
ulion
parents:
19759
diff
changeset
|
80 0, \ |
17993
98eb966a4024
Add a function to draw flat boxes and use it to make the list
albeu
parents:
17946
diff
changeset
|
81 NULL, \ |
19759
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
82 0xFF, 0xFF, \ |
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
83 0xFF, 0xFF, \ |
9ad9b0a4db27
better readability on selected menu item by tweaking alpha channel properties
ben
parents:
18193
diff
changeset
|
84 0xA4, 0x50 \ |
8197 | 85 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28113
diff
changeset
|
86 |
8197 | 87 |
88 #define MENU_LIST_PRIV_FIELDS \ | |
89 { "minbor", M_ST_OFF(menu_list_priv_t,minb), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
90 { "vspace", M_ST_OFF(menu_list_priv_t,vspace), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
91 { "x", M_ST_OFF(menu_list_priv_t,x), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
92 { "y", M_ST_OFF(menu_list_priv_t,y), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
93 { "w", M_ST_OFF(menu_list_priv_t,w), CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, \ | |
94 { "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
|
95 { "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
|
96 { "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
|
97 { "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
|
98 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
|
99 { "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
|
100 { "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
|
101 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
|
102 { "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
|
103 { "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
|
104 CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \ |
8197 | 105 |
26029 | 106 #endif /* MPLAYER_MENU_LIST_H */ |