Navit SVN

/work/compile/navit/src/navit/gui.h

00001 
00020 #ifndef NAVIT_GUI_H
00021 #define NAVIT_GUI_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 struct navit;
00027 struct gui_priv;
00028 struct menu_methods;
00029 struct datawindow_methods;
00030 struct callback;
00031 struct graphics;
00032 struct coord;
00033 struct pcoord;
00034 
00035 struct gui_methods {
00036         struct menu_priv *(*menubar_new)(struct gui_priv *priv, struct menu_methods *meth);
00037         struct menu_priv *(*popup_new)(struct gui_priv *priv, struct menu_methods *meth);
00038         int (*set_graphics)(struct gui_priv *priv, struct graphics *gra);
00039         int (*run_main_loop)(struct gui_priv *priv);
00040         struct datawindow_priv *(*datawindow_new)(struct gui_priv *priv, char *name, struct callback *click, struct callback *close, struct datawindow_methods *meth);
00041         int (*add_bookmark)(struct gui_priv *priv, struct pcoord *c, char *description);
00042         void (*disable_suspend)(struct gui_priv *priv);
00043         int (*get_attr)(struct gui_priv *priv, enum attr_type type, struct attr *attr);
00044         int (*add_attr)(struct gui_priv *priv, struct attr *attr);
00045         int (*set_attr)(struct gui_priv *priv, struct attr *attr);
00046 };
00047 
00048 
00049 /* prototypes */
00050 enum attr_type;
00051 struct attr;
00052 struct attr_iter;
00053 struct callback;
00054 struct datawindow;
00055 struct graphics;
00056 struct gui;
00057 struct menu;
00058 struct pcoord;
00059 struct gui *gui_new(struct attr *parent, struct attr **attrs);
00060 int gui_get_attr(struct gui *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
00061 int gui_set_attr(struct gui *this_, struct attr *attr);
00062 int gui_add_attr(struct gui *this_, struct attr *attr);
00063 struct menu *gui_menubar_new(struct gui *gui);
00064 struct menu *gui_popup_new(struct gui *gui);
00065 struct datawindow *gui_datawindow_new(struct gui *gui, char *name, struct callback *click, struct callback *close);
00066 int gui_add_bookmark(struct gui *gui, struct pcoord *c, char *description);
00067 int gui_set_graphics(struct gui *this_, struct graphics *gra);
00068 void gui_disable_suspend(struct gui *this_);
00069 int gui_has_main_loop(struct gui *this_);
00070 int gui_run_main_loop(struct gui *this_);
00071 /* end of prototypes */
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075 
00076 #endif
00077