/[zanavi_public1]/navit/navit/menu.h
ZANavi

Contents of /navit/navit/menu.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (12 years, 5 months ago) by zoff99
File MIME type: text/plain
File size: 1488 byte(s)
import files
1 /**
2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program 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 Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef NAVIT_MENU_H
21 #define NAVIT_MENU_H
22
23 enum menu_type {
24 menu_type_submenu,
25 menu_type_menu,
26 menu_type_toggle,
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

   
Visit the ZANavi Wiki