summaryrefslogtreecommitdiff
path: root/gui.h
blob: c204b05560c5d783fd1d99be82c46206c6d576b7 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef NAVIT_GUI_H
#define NAVIT_GUI_H

struct navit;
struct gui_priv;
struct menu_methods;
struct datawindow_methods;
struct callback;
struct graphics;
struct coord;
struct pcoord;

struct gui_methods {
	struct menu_priv *(*menubar_new)(struct gui_priv *priv, struct menu_methods *meth);
	struct menu_priv *(*popup_new)(struct gui_priv *priv, struct menu_methods *meth);
	int (*set_graphics)(struct gui_priv *priv, struct graphics *gra);
	int (*run_main_loop)(struct gui_priv *priv);
	struct datawindow_priv *(*datawindow_new)(struct gui_priv *priv, char *name, struct callback *click, struct callback *close, struct datawindow_methods *meth);
	int (*add_bookmark)(struct gui_priv *priv, struct pcoord *c, char *description);
};


struct gui {
	struct gui_methods meth;
	struct gui_priv *priv;		
};

/* prototypes */
struct attr;
struct callback;
struct coord;
struct datawindow;
struct graphics;
struct gui;
struct menu;
struct navit;
struct gui *gui_new(struct navit *nav, const char *type, struct attr **attrs);
struct menu *gui_menubar_new(struct gui *gui);
struct menu *gui_popup_new(struct gui *gui);
struct datawindow *gui_datawindow_new(struct gui *gui, char *name, struct callback *click, struct callback *close);
int gui_add_bookmark(struct gui *gui, struct pcoord *c, char *description);
int gui_set_graphics(struct gui *this_, struct graphics *gra);
int gui_has_main_loop(struct gui *this_);
int gui_run_main_loop(struct gui *this_);
/* end of prototypes */

#endif