navit  0.5.3-trunk
menu.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_MENU_H
21 #define NAVIT_MENU_H
22 
23 enum menu_type {
27 };
28 
29 struct container;
30 struct menu;
31 struct callback;
32 
33 struct menu_methods {
34  struct menu_priv *(*add)(struct menu_priv *menu, struct menu_methods *meth, char *name, enum menu_type type, struct callback *cb);
35  void (*set_toggle)(struct menu_priv *menu, int active);
36  int (*get_toggle)(struct menu_priv *menu);
37  void (*popup)(struct menu_priv *menu);
38 };
39 
40 struct menu {
41  struct menu_priv *priv;
42  struct menu_methods meth;
43 };
44 
45 /* prototypes */
46 struct menu *menu_add(struct menu *menu, char *name, enum menu_type type, struct callback *cb);
47 void menu_popup(struct menu *menu);
48 /* end of prototypes */
49 #endif
char type[3]
Definition: garmin_img.c:2
void menu_popup(struct menu *menu)
Definition: menu.c:39
menu_type
Definition: menu.h:23
@ menu_type_menu
Definition: menu.h:25
@ menu_type_submenu
Definition: menu.h:24
@ menu_type_toggle
Definition: menu.h:26
struct menu * menu_add(struct menu *menu, char *name, enum menu_type type, struct callback *cb)
Definition: menu.c:25
struct attr active
Definition: speech.c:77
char name[0]
Definition: street.c:3
Definition: callback.c:27
Definition: menu.h:33
void(* set_toggle)(struct menu_priv *menu, int active)
Definition: menu.h:35
void(* popup)(struct menu_priv *menu)
Definition: menu.h:37
int(* get_toggle)(struct menu_priv *menu)
Definition: menu.h:36
Definition: graphics_win32.h:46
Definition: menu.h:40
struct menu_methods meth
Definition: menu.h:42
struct menu_priv * priv
Definition: menu.h:41