Fix:Core:Cleaned up a bit
[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 mapset;
37 struct navigation;
38 struct navit;
39 struct navit_vehicle;
40 struct navit_window_items;
41 struct pcoord;
42 struct point;
43 struct route;
44 struct speech;
45 struct tracking;
46 struct transformation;
47 struct vehicle;
48 void navit_add_mapset(struct navit *this_, struct mapset *ms);
49 struct mapset *navit_get_mapset(struct navit *this_);
50 struct tracking *navit_get_tracking(struct navit *this_);
51 void navit_draw(struct navit *this_);
52 void navit_draw_displaylist(struct navit *this_);
53 void navit_handle_resize(struct navit *this_, int w, int h);
54 int navit_get_width(struct navit *this_);
55 int navit_check_route(struct navit *this_);
56 int navit_get_height(struct navit *this_);
57 int navit_ignore_button(struct navit *this_);
58 void navit_ignore_graphics_events(struct navit *this_, int ignore);
59 int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
60 void navit_handle_motion(struct navit *this_, struct point *p);
61 void navit_zoom_in(struct navit *this_, int factor, struct point *p);
62 void navit_zoom_out(struct navit *this_, int factor, struct point *p);
63 struct navit *navit_new(struct attr *parent, struct attr **attrs);
64 struct graphics *navit_get_graphics(struct navit *this_);
65 void navit_set_destination(struct navit *this_, struct pcoord *c, const char *description);
66 void navit_add_bookmark(struct navit *this_, struct pcoord *c, const char *description);
67 void navit_say(struct navit *this_, char *text);
68 int navit_speech_estimate(struct navit *this_, char *str);
69 void navit_speak(struct navit *this_);
70 void navit_announcer_toggle(struct navit *this_);
71 void navit_window_roadbook_destroy(struct navit *this_);
72 void navit_window_roadbook_new(struct navit *this_);
73 struct navit_window_items *navit_window_items_new(const char *name, int distance);
74 void navit_window_items_add_item(struct navit_window_items *nwi, enum item_type type);
75 void navit_add_window_items(struct navit *this_, struct navit_window_items *nwi);
76 void navit_init(struct navit *this_);
77 void navit_zoom_to_route(struct navit *this_, int orientation);
78 void navit_set_center(struct navit *this_, struct pcoord *center);
79 void navit_set_center_screen(struct navit *this_, struct point *p);
80 int navit_set_attr(struct navit *this_, struct attr *attr);
81 int navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
82 int navit_add_attr(struct navit *this_, struct attr *attr);
83 int navit_remove_attr(struct navit *this_, struct attr *attr);
84 struct attr_iter *navit_attr_iter_new(void);
85 void navit_attr_iter_destroy(struct attr_iter *iter);
86 void navit_add_callback(struct navit *this_, struct callback *cb);
87 void navit_remove_callback(struct navit *this_, struct callback *cb);
88 void navit_set_position(struct navit *this_, struct pcoord *c);
89 void navit_tracking_add(struct navit *this_, struct tracking *tracking);
90 void navit_set_speech(struct navit *this_, struct speech *speech);
91 struct gui *navit_get_gui(struct navit *this_);
92 struct transformation *navit_get_trans(struct navit *this_);
93 struct route *navit_get_route(struct navit *this_);
94 struct navigation *navit_get_navigation(struct navit *this_);
95 struct displaylist *navit_get_displaylist(struct navit *this_);
96 int navit_block(struct navit *this_, int block);
97 int navit_command_register(struct navit *this_, char *command, struct callback *cb);
98 struct callback *navit_command_unregister(struct navit *this_, char *command);
99 int navit_command_call_attrs(struct navit *this_, char *command, struct attr **in, struct attr ***out);
100 int navit_command_call(struct navit *this_, char *command);
101 void navit_destroy(struct navit *this_);
102 /* end of prototypes */
103 #ifdef __cplusplus
104 }
105 #endif
106
107 #endif
108