/[zanavi_public1]/navit/navit/navit.h
ZANavi

Contents of /navit/navit/navit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (hide annotations) (download)
Mon Nov 21 20:53:45 2011 UTC (12 years, 4 months ago) by zoff99
File MIME type: text/plain
File size: 7961 byte(s)
better search, destination reached
1 zoff99 2 /**
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     extern int allow_gui_internal;
34     extern int draw_display_at_speed;
35     extern int routing_mode; // 0-> normal highway rounting
36     // 1-> normal roads routing
37     // 2-> future use
38 zoff99 14 extern int offline_search_filter_duplicates;
39     extern int offline_search_break_searching;
40 zoff99 2
41 zoff99 14
42 zoff99 2 /* prototypes */
43     enum attr_type;
44     struct attr;
45     struct attr_iter;
46     struct callback;
47     struct coord_rect;
48     struct displaylist;
49     struct graphics;
50     struct gui;
51     struct mapset;
52     struct message;
53     struct navigation;
54     struct navit;
55     struct pcoord;
56     struct point;
57     struct route;
58     struct tracking;
59     struct transformation;
60     struct vehicleprofile;
61     struct command_table;
62     void navit_add_mapset(struct navit *this_, struct mapset *ms);
63     struct mapset *navit_get_mapset(struct navit *this_);
64     struct tracking *navit_get_tracking(struct navit *this_);
65     char *navit_get_user_data_directory(int create);
66     void navit_draw_async(struct navit *this_, int async);
67     void navit_draw(struct navit *this_);
68     int navit_get_ready(struct navit *this_);
69     void navit_draw_displaylist(struct navit *this_);
70     void navit_handle_resize(struct navit *this_, int w, int h);
71     int navit_get_width(struct navit *this_);
72     int navit_get_height(struct navit *this_);
73     int navit_ignore_button(struct navit *this_);
74     void navit_ignore_graphics_events(struct navit *this_, int ignore);
75     void navit_set_timeout(struct navit *this_);
76     int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
77     void navit_handle_motion(struct navit *this_, struct point *p);
78     void navit_zoom_in(struct navit *this_, int factor, struct point *p);
79     void navit_zoom_out(struct navit *this_, int factor, struct point *p);
80     void navit_zoom_in_cursor(struct navit *this_, int factor);
81     void navit_zoom_out_cursor(struct navit *this_, int factor);
82     struct navit *navit_new(struct attr *parent, struct attr **attrs);
83     void navit_add_message(struct navit *this_, char *message);
84     struct message *navit_get_messages(struct navit *this_);
85     struct graphics *navit_get_graphics(struct navit *this_);
86     struct vehicleprofile *navit_get_vehicleprofile(struct navit *this_);
87     GList *navit_get_vehicleprofiles(struct navit *this_);
88     void navit_set_destination(struct navit *this_, struct pcoord *c, const char *description, int async);
89     void navit_set_destinations(struct navit *this_, struct pcoord *c, int count, const char *description, int async);
90     int navit_check_route(struct navit *this_);
91     void navit_textfile_debug_log(struct navit *this_, const char *fmt, ...);
92     void navit_textfile_debug_log_at(struct navit *this_, struct pcoord *pc, const char *fmt, ...);
93     int navit_speech_estimate(struct navit *this_, char *str);
94     void navit_say(struct navit *this_, char *text);
95     void navit_speak(struct navit *this_);
96     void navit_window_roadbook_destroy(struct navit *this_);
97     void navit_window_roadbook_new(struct navit *this_);
98     void navit_reload_maps(struct navit *this_);
99     void navit_init(struct navit *this_);
100     void navit_zoom_to_rect(struct navit *this_, struct coord_rect *r);
101     void navit_zoom_to_route(struct navit *this_, int orientation);
102     void navit_set_center(struct navit *this_, struct pcoord *center, int set_timeout);
103     void navit_set_center_cursor(struct navit *this_, int autozoom, int keep_orientation);
104     void navit_set_center_screen(struct navit *this_, struct point *p, int set_timeout);
105     int navit_set_attr(struct navit *this_, struct attr *attr);
106     int navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
107     int navit_add_attr(struct navit *this_, struct attr *attr);
108     int navit_remove_attr(struct navit *this_, struct attr *attr);
109     struct attr_iter *navit_attr_iter_new(void);
110     void navit_attr_iter_destroy(struct attr_iter *iter);
111     void navit_add_callback(struct navit *this_, struct callback *cb);
112     void navit_remove_callback(struct navit *this_, struct callback *cb);
113     void navit_set_position(struct navit *this_, struct pcoord *c);
114     struct gui *navit_get_gui(struct navit *this_);
115     struct transformation *navit_get_trans(struct navit *this_);
116     struct route *navit_get_route(struct navit *this_);
117     struct navigation *navit_get_navigation(struct navit *this_);
118     struct displaylist *navit_get_displaylist(struct navit *this_);
119     void navit_layout_switch(struct navit *n);
120     int navit_set_vehicle_by_name(struct navit *n, const char *name);
121     int navit_set_layout_by_name(struct navit *n, const char *name);
122     void navit_disable_suspend(void);
123     int navit_block(struct navit *this_, int block);
124     void navit_destroy(struct navit *this_);
125     void navit_command_add_table(struct navit*this_, struct command_table *commands, int count);
126     //
127     // extern static int navit_get_cursor_pnt(struct navit *this_, struct point *p, int keep_orientation, int *dir);
128     int navit_get_cur_pnt(struct navit *this_, struct point *p);
129    
130    
131    
132    
133    
134     #include "coord.h"
135     #include "point.h"
136     #include "item.h"
137     #include "attr.h"
138    
139     struct coord global_vehicle_pos_onscreen;
140    
141     //! The navit_vehicule
142     struct navit_vehicle {
143     int follow;
144     /*! Limit of the follow counter. See navit_add_vehicle */
145     int follow_curr;
146     /*! Deprecated : follow counter itself. When it reaches 'update' counts, map is recentered*/
147     struct coord coord;
148     int dir;
149     int speed;
150     struct coord last; /*< Position of the last update of this vehicle */
151     struct vehicle *vehicle;
152     struct attr callback;
153     int animate_cursor;
154     };
155    
156     struct navit {
157     struct attr self;
158     GList *mapsets;
159     GList *layouts;
160     struct gui *gui;
161     struct layout *layout_current;
162     struct graphics *gra;
163     struct action *action;
164     struct transformation *trans, *trans_cursor;
165     struct compass *compass;
166     struct route *route;
167     struct navigation *navigation;
168     struct speech *speech;
169     struct tracking *tracking;
170     int ready;
171     struct window *win;
172     struct displaylist *displaylist;
173     int tracking_flag;
174     int orientation;
175     int recentdest_count;
176     int osd_configuration;
177     GList *vehicles;
178     GList *windows_items;
179     struct navit_vehicle *vehicle;
180     struct callback_list *attr_cbl;
181     struct callback *nav_speech_cb, *roadbook_callback, *popup_callback, *route_cb, *progress_cb;
182     struct datawindow *roadbook_window;
183     struct map *former_destination;
184     struct point pressed, last, current;
185     int button_pressed,moved,popped,zoomed;
186     int center_timeout;
187     int autozoom_secs;
188     int autozoom_min;
189     int autozoom_active;
190     struct event_timeout *button_timeout, *motion_timeout;
191     struct callback *motion_timeout_callback;
192     int ignore_button;
193     int ignore_graphics_events;
194     struct log *textfile_debug_log;
195     struct pcoord destination;
196     int destination_valid;
197     int blocked;
198     int w,h;
199     int drag_bitmap;
200     int use_mousewheel;
201     struct messagelist *messages;
202     struct callback *resize_callback,*button_callback,*motion_callback,*predraw_callback;
203     struct vehicleprofile *vehicleprofile;
204     GList *vehicleprofiles;
205     int pitch;
206     int follow_cursor;
207     int prevTs;
208     int graphics_flags;
209     int zoom_min, zoom_max;
210     int radius;
211     struct bookmarks *bookmarks;
212     int flags;
213     /* 1=No graphics ok */
214     /* 2=No gui ok */
215     int border;
216     int imperial;
217     };
218    
219    
220    
221     /* end of prototypes */
222     #ifdef __cplusplus
223     }
224     #endif
225    
226     #endif
227    

   
Visit the ZANavi Wiki