blob: a3841943fd9605be19696e6b418b723480ccc63a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef NAVIT_MENU_H
#define NAVIT_MENU_H
enum menu_type {
menu_type_submenu,
menu_type_menu,
menu_type_toggle,
};
struct container;
struct menu;
struct callback;
struct menu_methods {
struct menu_priv *(*add)(struct menu_priv *menu, struct menu_methods *meth, char *name, enum menu_type type, struct callback *cb);
void (*set_toggle)(struct menu_priv *menu, int active);
int (*get_toggle)(struct menu_priv *menu);
void (*popup)(struct menu_priv *menu);
};
struct menu {
struct menu_priv *priv;
struct menu_methods meth;
};
/* prototypes */
struct menu *menu_add(struct menu *menu, char *name, enum menu_type type, struct callback *cb);
void menu_popup(struct menu *menu);
/* end of prototypes */
#endif
|