Fix:gui_internal:More functionality for gui_internal
[navit-package] / navit / navit.h
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_NAVIT_H
21 #define NAVIT_NAVIT_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 extern struct gui *main_loop_gui;
27 /* prototypes */
28 enum attr_type;
29 enum item_type;
30 struct attr;
31 struct attr_iter;
32 struct callback;
33 struct displaylist;
34 struct graphics;
35 struct gui;
36 struct layout;
37 struct mapset;
38 struct navigation;
39 struct navit;
40 struct navit_vehicle;
41 struct navit_window_items;
42 struct pcoord;
43 struct point;
44 struct route;
45 struct speech;
46 struct tracking;
47 struct transformation;
48 struct vehicle;
49 void navit_add_mapset(struct navit *this_, struct mapset *ms);
50 struct mapset *navit_get_mapset(struct navit *this_);
51 struct tracking *navit_get_tracking(struct navit *this_);
52 void navit_add_layout(struct navit *this_, struct layout *lay);
53 void navit_draw(struct navit *this_);
54 void navit_draw_displaylist(struct navit *this_);
55 void navit_resize(void *data, int w, int h);
56 int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
57 void navit_handle_motion(struct navit *this_, struct point *p);
58 void navit_zoom_in(struct navit *this_, int factor, struct point *p);
59 void navit_zoom_out(struct navit *this_, int factor, struct point *p);
60 struct navit *navit_new(struct attr *parent, struct attr **attrs);
61 struct graphics *navit_get_graphics(struct navit *this_);
62 void navit_set_destination(struct navit *this_, struct pcoord *c, char *description);
63 void navit_add_bookmark(struct navit *this_, struct pcoord *c, const char *description);
64 void navit_speak(struct navit *this_);
65 void navit_window_roadbook_destroy(struct navit *this_);
66 void navit_window_roadbook_new(struct navit *this_);
67 struct navit_window_items *navit_window_items_new(const char *name, int distance);
68 void navit_window_items_add_item(struct navit_window_items *nwi, enum item_type type);
69 void navit_add_window_items(struct navit *this_, struct navit_window_items *nwi);
70 void navit_init(struct navit *this_);
71 void navit_set_center(struct navit *this_, struct pcoord *center);
72 void navit_set_center_screen(struct navit *this_, struct point *p);
73 int navit_set_attr(struct navit *this_, struct attr *attr);
74 int navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
75 int navit_add_attr(struct navit *this_, struct attr *attr);
76 struct attr_iter *navit_attr_iter_new(void);
77 void navit_attr_iter_destroy(struct attr_iter *iter);
78 void navit_add_callback(struct navit *this_, struct callback *cb);
79 void navit_remove_callback(struct navit *this_, struct callback *cb);
80 void navit_set_position(struct navit *this_, struct pcoord *c);
81 struct navit_vehicle *navit_add_vehicle(struct navit *this_, struct vehicle *v, struct attr **attrs);
82 void navit_set_vehicle(struct navit *this_, struct navit_vehicle *nv);
83 void navit_tracking_add(struct navit *this_, struct tracking *tracking);
84 void navit_route_add(struct navit *this_, struct route *route);
85 void navit_navigation_add(struct navit *this_, struct navigation *navigation);
86 void navit_set_speech(struct navit *this_, struct speech *speech);
87 struct gui *navit_get_gui(struct navit *this_);
88 struct transformation *navit_get_trans(struct navit *this_);
89 struct route *navit_get_route(struct navit *this_);
90 struct navigation *navit_get_navigation(struct navit *this_);
91 struct displaylist *navit_get_displaylist(struct navit *this_);
92 int navit_block(struct navit *this_, int block);
93 void navit_destroy(struct navit *this_);
94 /* end of prototypes */
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif
100