Fix:maptool:Another name for faroe islands
[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 // defined in glib.h.
28 #ifndef __G_LIST_H__
29 struct _GList;
30 typedef struct _GList GList;
31 #endif
32
33 /* prototypes */
34 enum attr_type;
35 struct attr;
36 struct attr_iter;
37 struct callback;
38 struct displaylist;
39 struct graphics;
40 struct gui;
41 struct mapset;
42 struct message;
43 struct navigation;
44 struct navit;
45 struct pcoord;
46 struct point;
47 struct route;
48 struct tracking;
49 struct transformation;
50 struct vehicleprofile;
51 void navit_add_mapset(struct navit *this_, struct mapset *ms);
52 struct mapset *navit_get_mapset(struct navit *this_);
53 struct tracking *navit_get_tracking(struct navit *this_);
54 void navit_draw(struct navit *this_);
55 int navit_get_ready(struct navit *this_);
56 void navit_draw_displaylist(struct navit *this_);
57 void navit_handle_resize(struct navit *this_, int w, int h);
58 int navit_get_width(struct navit *this_);
59 int navit_get_height(struct navit *this_);
60 int navit_ignore_button(struct navit *this_);
61 void navit_ignore_graphics_events(struct navit *this_, int ignore);
62 int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
63 void navit_handle_motion(struct navit *this_, struct point *p);
64 void navit_zoom_in(struct navit *this_, int factor, struct point *p);
65 void navit_zoom_out(struct navit *this_, int factor, struct point *p);
66 struct navit *navit_new(struct attr *parent, struct attr **attrs);
67 void navit_add_message(struct navit *this_, char *message);
68 struct message *navit_get_messages(struct navit *this_);
69 struct graphics *navit_get_graphics(struct navit *this_);
70 struct vehicleprofile *navit_get_vehicleprofile(struct navit *this_);
71 GList *navit_get_vehicleprofiles(struct navit *this_);
72 void navit_set_destination(struct navit *this_, struct pcoord *c, const char *description, int async);
73 int navit_check_route(struct navit *this_);
74 void navit_add_bookmark(struct navit *this_, struct pcoord *c, const char *description);
75 void navit_textfile_debug_log(struct navit *this_, const char *fmt, ...);
76 int navit_speech_estimate(struct navit *this_, char *str);
77 void navit_say(struct navit *this_, char *text);
78 void navit_speak(struct navit *this_);
79 void navit_window_roadbook_destroy(struct navit *this_);
80 void navit_window_roadbook_new(struct navit *this_);
81 void navit_init(struct navit *this_);
82 void navit_zoom_to_route(struct navit *this_, int orientation);
83 void navit_set_center(struct navit *this_, struct pcoord *center, int set_timeout);
84 void navit_set_center_screen(struct navit *this_, struct point *p, int set_timeout);
85 int navit_set_attr(struct navit *this_, struct attr *attr);
86 int navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
87 int navit_add_attr(struct navit *this_, struct attr *attr);
88 int navit_remove_attr(struct navit *this_, struct attr *attr);
89 struct attr_iter *navit_attr_iter_new(void);
90 void navit_attr_iter_destroy(struct attr_iter *iter);
91 void navit_add_callback(struct navit *this_, struct callback *cb);
92 void navit_remove_callback(struct navit *this_, struct callback *cb);
93 void navit_set_position(struct navit *this_, struct pcoord *c);
94 struct gui *navit_get_gui(struct navit *this_);
95 struct transformation *navit_get_trans(struct navit *this_);
96 struct route *navit_get_route(struct navit *this_);
97 struct navigation *navit_get_navigation(struct navit *this_);
98 struct displaylist *navit_get_displaylist(struct navit *this_);
99 int navit_block(struct navit *this_, int block);
100 void navit_layout_switch(struct navit *n);
101 int navit_set_layout_by_name(struct navit *n, char* name);
102 void navit_destroy(struct navit *this_);
103 /* end of prototypes */
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif
109