2
* This file is part of MPlayer.
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.
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.
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.
19
#ifndef MPLAYER_MENU_LIST_H
20
#define MPLAYER_MENU_LIST_H
24
typedef struct list_entry_s list_entry_t;
41
typedef struct menu_list_priv_s {
43
typedef struct menu_priv_s {
46
list_entry_t* current;
55
int title_bg,title_bg_alpha;
56
int item_bg,item_bg_alpha;
57
int ptr_bg,ptr_bg_alpha;
60
typedef void (*free_entry_t)(list_entry_t* entry);
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);
67
int menu_list_jump_to_key(menu_t* menu,int c);
69
extern const menu_list_priv_t menu_list_priv_dflt;
71
#define MENU_LIST_PRIV_DFLT { \
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 }, \
95
{ "ptr", M_ST_OFF(menu_list_priv_t,ptr), CONF_TYPE_STRING, 0, 0, 0, NULL }, \
96
{ "title-bg", M_ST_OFF(menu_list_priv_t,title_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
97
{ "title-bg-alpha", M_ST_OFF(menu_list_priv_t,title_bg_alpha), \
98
CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
99
{ "item-bg", M_ST_OFF(menu_list_priv_t,item_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
100
{ "item-bg-alpha", M_ST_OFF(menu_list_priv_t,item_bg_alpha), \
101
CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL }, \
102
{ "ptr-bg", M_ST_OFF(menu_list_priv_t,ptr_bg), CONF_TYPE_INT, M_OPT_RANGE, -1, 255, NULL }, \
103
{ "ptr-bg-alpha", M_ST_OFF(menu_list_priv_t,ptr_bg_alpha), \
104
CONF_TYPE_INT, M_OPT_RANGE, 0, 255, NULL } \
106
#endif /* MPLAYER_MENU_LIST_H */