navit
0.5.3-trunk
|
navit is the object containing most global data structures. More...
Data Structures | |
struct | navit_vehicle |
The vehicle used for navigation. More... | |
struct | navit |
struct | attr_iter |
Functions | |
static void | navit_vehicle_update_position (struct navit *this_, struct navit_vehicle *nv) |
Called when the position of a vehicle changes. More... | |
static void | navit_vehicle_draw (struct navit *this_, struct navit_vehicle *nv, struct point *pnt) |
static int | navit_add_vehicle (struct navit *this_, struct vehicle *v) |
Registers a new vehicle. More... | |
static int | navit_set_attr_do (struct navit *this_, struct attr *attr, int init) |
static int | navit_get_cursor_pnt (struct navit *this_, struct point *p, int keep_orientation, int *dir) |
Calculates the position of the cursor on the screen. More... | |
static void | navit_set_cursors (struct navit *this_) |
static int | navit_cmd_zoom_to_route (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_set_center_cursor (struct navit *this_, char *function, struct attr **in, struct attr ***out) |
Recenters the map so that the vehicle cursor is visible. More... | |
static int | navit_cmd_announcer_toggle (struct navit *this_, char *function, struct attr **in, struct attr ***out) |
Toggles the navigation announcer for navit. More... | |
static void | navit_set_vehicle (struct navit *this_, struct navit_vehicle *nv) |
static int | navit_set_vehicleprofile (struct navit *this_, struct vehicleprofile *vp) |
static int | navit_cmd_switch_layout_day_night (struct navit *this_, char *function, struct attr **in, struct attr ***out) |
this command is used to change the layout and enable/disable the automatic layout switcher More... | |
void | navit_add_mapset (struct navit *this_, struct mapset *ms) |
struct mapset * | navit_get_mapset (struct navit *this_) |
Get the current mapset. More... | |
struct map * | navit_get_search_results_map (struct navit *this_) |
Get the search result map (and create it if it does not exist) More... | |
int | navit_populate_search_results_map (struct navit *this_, GList *search_results, struct coord_rect *r) |
Populate a map containing one or more search result points. More... | |
struct tracking * | navit_get_tracking (struct navit *this_) |
char * | navit_get_user_data_directory (int create) |
Get the user data directory. More... | |
void | navit_draw_async (struct navit *this_, int async) |
void | navit_draw (struct navit *this_) |
int | navit_get_ready (struct navit *this_) |
void | navit_draw_displaylist (struct navit *this_) |
static void | navit_map_progress (struct navit *this_) |
static void | navit_redraw_route (struct navit *this_, struct route *route, struct attr *attr) |
void | navit_handle_resize (struct navit *this_, int w, int h) |
static void | navit_resize (void *data, int w, int h) |
int | navit_get_width (struct navit *this_) |
int | navit_get_height (struct navit *this_) |
static void | navit_popup (void *data) |
int | navit_ignore_button (struct navit *this_) |
Sets a flag indicating that the current button event should be ignored by subsequent handlers. More... | |
void | navit_ignore_graphics_events (struct navit *this_, int ignore) |
static int | navit_restrict_to_range (int value, int min, int max) |
static void | navit_restrict_map_center_to_world_boundingbox (struct transformation *tr, struct coord *new_center) |
static void | update_transformation (struct transformation *tr, struct point *old, struct point *new) |
Change map center position by translating from "old" to "new". More... | |
void | navit_set_timeout (struct navit *this_) |
int | navit_handle_button (struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback) |
static void | navit_button (void *data, int pressed, int button, struct point *p) |
static void | navit_motion_timeout (struct navit *this_) |
void | navit_handle_motion (struct navit *this_, struct point *p) |
static void | navit_motion (void *data, struct point *p) |
static void | navit_predraw (struct navit *this_) |
static void | navit_scale (struct navit *this_, long scale, struct point *p, int draw) |
static void | navit_autozoom (struct navit *this_, struct coord *center, int speed, int draw) |
Automatically adjusts zoom level. More... | |
void | navit_zoom_in (struct navit *this_, int factor, struct point *p) |
void | navit_zoom_out (struct navit *this_, int factor, struct point *p) |
void | navit_zoom_in_cursor (struct navit *this_, int factor) |
void | navit_zoom_out_cursor (struct navit *this_, int factor) |
static int | navit_cmd_zoom_in (struct navit *this_, char *cmd, struct attr **in, struct attr ***out) |
static int | navit_cmd_zoom_out (struct navit *this_, char *cmd, struct attr **in, struct attr ***out) |
static int | navit_cmd_say (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_set_int_var (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_set_attr_var (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_toggle_layer (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_map_add_curr_pos (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_map_item_set_attr (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_get_attr_var (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_get_int_var (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_push_int (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_pop_int (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_int_stack_size (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static struct attr ** | navit_get_coord (struct navit *this, struct attr **in, struct pcoord *pc) |
static int | navit_cmd_set_destination (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_route_remove_next_waypoint (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_route_remove_last_waypoint (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_set_center (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_set_position (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_fmt_coordinates (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_strjoin (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static int | navit_cmd_spawn (struct navit *this, char *function, struct attr **in, struct attr ***out) |
void | navit_command_add_table (struct navit *this_, struct command_table *commands, int count) |
struct navit * | navit_new (struct attr *parent, struct attr **attrs) |
static int | navit_set_gui (struct navit *this_, struct gui *gui) |
void | navit_add_message (struct navit *this_, const char *message) |
struct message * | navit_get_messages (struct navit *this_) |
static int | navit_set_graphics (struct navit *this_, struct graphics *gra) |
struct graphics * | navit_get_graphics (struct navit *this_) |
struct vehicleprofile * | navit_get_vehicleprofile (struct navit *this_) |
GList * | navit_get_vehicleprofiles (struct navit *this_) |
static void | navit_projection_set (struct navit *this_, enum projection pro, int draw) |
static void | navit_mark_navigation_stopped (char *former_destination_file) |
void | navit_set_destination (struct navit *this_, struct pcoord *c, const char *description, int async) |
void | navit_add_destination_description (struct navit *this_, struct pcoord *c, const char *description) |
void | navit_set_destinations (struct navit *this_, struct pcoord *c, int count, const char *description, int async) |
int | navit_get_destinations (struct navit *this_, struct pcoord *pc, int count) |
Retrieves destinations from the route. More... | |
int | navit_get_destination_count (struct navit *this_) |
Get the destinations count for the route. More... | |
char * | navit_get_destination_description (struct navit *this_, int n) |
void | navit_remove_nth_waypoint (struct navit *this_, int n) |
void | navit_remove_waypoint (struct navit *this_) |
int | navit_check_route (struct navit *this_) |
Checks if a route is calculated. More... | |
static int | navit_former_destinations_active (struct navit *this_) |
struct map * | read_former_destinations_from_file () |
static void | navit_add_former_destinations_from_file (struct navit *this_) |
void | navit_textfile_debug_log (struct navit *this_, const char *fmt,...) |
void | navit_textfile_debug_log_at (struct navit *this_, struct pcoord *pc, const char *fmt,...) |
void | navit_say (struct navit *this_, const char *text) |
void | navit_speak (struct navit *this_) |
static void | navit_window_roadbook_update (struct navit *this_) |
void | navit_window_roadbook_destroy (struct navit *this_) |
void | navit_window_roadbook_new (struct navit *this_) |
int | navit_init (struct navit *this_) |
void | navit_zoom_to_rect (struct navit *this_, struct coord_rect *r) |
void | navit_zoom_to_route (struct navit *this_, int orientation) |
void | navit_set_center (struct navit *this_, struct pcoord *center, int set_timeout) |
static void | navit_set_center_coord_screen (struct navit *this_, struct coord *c, struct point *p, int set_timeout) |
void | navit_set_center_cursor (struct navit *this_, int autozoom, int keep_orientation) |
Recalculates the map view so that the vehicle cursor is visible. More... | |
static void | navit_set_center_cursor_draw (struct navit *this_) |
Recenters the map so that the vehicle cursor is visible. More... | |
void | navit_set_center_screen (struct navit *this_, struct point *p, int set_timeout) |
int | navit_set_attr (struct navit *this_, struct attr *attr) |
int | navit_get_attr (struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) |
struct layout * | navit_get_layout_by_name (struct navit *this_, const char *layout_name) |
Select the default layout by name. More... | |
void | navit_update_current_layout (struct navit *this_, struct layout *layout) |
Set the current layout. More... | |
static int | navit_add_log (struct navit *this_, struct log *log) |
static int | navit_add_layout (struct navit *this_, struct layout *layout) |
int | navit_add_attr (struct navit *this_, struct attr *attr) |
int | navit_remove_attr (struct navit *this_, struct attr *attr) |
struct attr_iter * | navit_attr_iter_new (void *unused) |
void | navit_attr_iter_destroy (struct attr_iter *iter) |
void | navit_add_callback (struct navit *this_, struct callback *cb) |
void | navit_remove_callback (struct navit *this_, struct callback *cb) |
static int | coord_not_set (struct coord c) |
static void | navit_vehicle_update_status (struct navit *this_, struct navit_vehicle *nv, enum attr_type type) |
Called when a status attribute of a vehicle changes. More... | |
void | navit_set_position (struct navit *this_, struct pcoord *c) |
int | navit_set_vehicleprofile_name (struct navit *this_, char *name) |
struct gui * | navit_get_gui (struct navit *this_) |
struct transformation * | navit_get_trans (struct navit *this_) |
struct route * | navit_get_route (struct navit *this_) |
struct navigation * | navit_get_navigation (struct navit *this_) |
struct displaylist * | navit_get_displaylist (struct navit *this_) |
void | navit_layout_switch (struct navit *n) |
int | navit_set_vehicle_by_name (struct navit *n, const char *name) |
int | navit_set_layout_by_name (struct navit *n, const char *name) |
void | navit_disable_suspend () |
int | navit_block (struct navit *this_, int block) |
Blocks or unblocks redraw operations. More... | |
int | navit_get_blocked (struct navit *this_) |
Returns whether redraw operations are currently blocked. More... | |
void | navit_destroy (struct navit *this_) |
Variables | |
struct gui * | main_loop_gui |
struct object_func | navit_func |
struct navit * | global_navit |
static GHashTable * | cmd_int_var_hash = NULL |
static GHashTable * | cmd_attr_var_hash = NULL |
GList * | cmd_int_var_stack = NULL |
static struct command_table | commands [] |
navit is the object containing most global data structures.
Among others:
|
static |
References c, pcoord::x, and pcoord::y.
Referenced by navit_vehicle_draw().
References attr_cbl, attr_generic_add_attr(), autozoom_max, autozoom_min, attr::callback, callback_list_call_attr_2, attr::graphics, attr::gui, attr::layout, attr::log, attr::mapset, mapsets, attr::navigation, navigation, navit_add_callback(), navit_add_layout(), navit_add_log(), navit_add_vehicle(), navit_set_graphics(), navit_set_gui(), attr::num, recentdest_count, attr::route, route, attr::speech, speech, attr::tracking, tracking, attr::type, attr::u, attr::vehicle, attr::vehicleprofile, and vehicleprofiles.
Referenced by dbus_main_navit(), pedestrian_navit(), request_navit_add_attr(), and win32_main_navit().
References attr_cbl, and callback_list_add().
Referenced by graphics_gd_new(), gui_gtk_destinations_init(), gui_gtk_new(), gui_gtk_statusbar_new(), gui_gtk_vehicles_init(), gui_internal_button_navit_attr_new(), gui_internal_cmd2_route_description(), navit_add_attr(), osd_auxmap_new(), osd_button_init(), osd_button_new(), osd_cmd_interface_init(), osd_cmd_interface_new(), osd_compass_init(), osd_compass_new(), osd_gps_status_init(), osd_gps_status_new(), osd_image_new(), osd_j1850_new(), osd_marker_new(), osd_nav_next_turn_init(), osd_nav_next_turn_new(), osd_nav_toggle_announcer_init(), osd_nav_toggle_announcer_new(), osd_navigation_status_new(), osd_odometer_init(), osd_odometer_new(), osd_route_guard_init(), osd_route_guard_new(), osd_scale_new(), osd_set_std_config(), osd_speed_cam_new(), osd_speed_warner_new(), osd_stopwatch_init(), osd_stopwatch_new(), osd_text_init(), osd_text_new(), osd_text_prepare(), osd_volume_init(), osd_volume_new(), traffic_traff_android_init(), and win32_main_navit().
void navit_add_destination_description | ( | struct navit * | this_, |
struct pcoord * | c, | ||
const char * | description | ||
) |
Add destination description to the recent dest file. Doesn't start routing.
navit | The navit instance |
c | The coordinate to start routing to |
description | A label which allows the user to later identify this destination in the former destinations selection |
References bookmarks_append_destinations(), bookmarks_get_destination_file(), c, description(), former_destination, and recentdest_count.
Referenced by gui_internal_cmd_insert_destination_do(), gui_internal_cmd_load_bookmarks_as_waypoints(), and popup_set_visitbefore().
|
static |
References c, destination, destination_valid, former_destination, item, item_coord_get(), map_projection(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), navit_former_destinations_active(), pcoord::pro, read_former_destinations_from_file(), route, route_set_destination(), route_set_destinations(), item::type, vehicle, pcoord::x, and pcoord::y.
Referenced by navit_init().
check if we want to immediately activate this layout. Unfortunately we have concurring conditions about when to activate a layout:
References active, dbg, default_layout_name, layout, layout_current, layout_get_attr(), layouts, lvl_debug, layout::name, attr::num, and attr::u.
Referenced by navit_add_attr().
References attr::log, log_get_attr(), log_set_header(), attr::str, textfile_debug_log, and attr::u.
Referenced by navit_add_attr().
void navit_add_message | ( | struct navit * | this_, |
const char * | message | ||
) |
References message_new(), and messages.
Referenced by bookmarks_store_bookmarks_to_file(), navit_set_attr_do(), navit_speak(), and request_navit_add_message().
Registers a new vehicle.
this_ | The navit instance |
v | The vehicle to register |
References active, navit_vehicle::animate_cursor, attr::callback, navit_vehicle::callback, callback_cast, callback_new_attr_2, callback_new_attr_3, navit_vehicle::follow, navit_vehicle::follow_curr, navit_vehicle::last, navit_set_vehicle(), navit_vehicle_update_position(), navit_vehicle_update_status(), attr::num, self, attr::type, attr::u, navit_vehicle::vehicle, vehicle_add_attr(), vehicle_get_attr(), vehicle_set_attr(), vehicles, coord::x, and coord::y.
Referenced by navit_add_attr().
void navit_attr_iter_destroy | ( | struct attr_iter * | iter | ) |
References attr_iter::iter.
Referenced by NGQProxyNavit::dropIterFunc(), Backend::get_vehicles(), gui_gtk_layouts_init(), gui_gtk_maps_init(), gui_gtk_vehicles_update(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_vehicle(), navit_get_layout_by_name(), navit_init(), navit_set_vehicle_by_name(), pedestrian_navit_init(), request_navit_attr_iter_destroy(), request_navit_traffic_export_gpx(), request_navit_traffic_inject(), traffic_set_shared(), and traffic_traff_android_on_feed_received().
struct attr_iter* navit_attr_iter_new | ( | void * | unused | ) |
Referenced by Backend::get_maps(), Backend::get_vehicles(), NGQProxyNavit::getIterFunc(), gui_gtk_layouts_init(), gui_gtk_maps_init(), gui_gtk_vehicles_update(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_vehicle(), navit_get_layout_by_name(), navit_init(), navit_set_vehicle_by_name(), pedestrian_navit_init(), request_navit_attr_iter(), request_navit_set_layout(), request_navit_traffic_export_gpx(), request_navit_traffic_inject(), traffic_set_shared(), and traffic_traff_android_on_feed_received().
|
static |
Automatically adjusts zoom level.
This function automatically adjusts the current zoom level according to the current speed.
this_ | The navit struct |
center | The "immovable" point - i.e. the vehicles position if we're centering on the vehicle |
speed | The vehicles speed in meters per second |
dir | The direction into which the vehicle moves |
References autozoom_active, autozoom_max, autozoom_min, autozoom_paused, autozoom_secs, center, navit_scale(), trans, transform_get_projection(), transform_get_scale(), transform_get_size(), and transform_point().
Referenced by navit_set_center_cursor().
int navit_block | ( | struct navit * | this_, |
int | block | ||
) |
Blocks or unblocks redraw operations.
The
parameter specifies the operation to carry out:
cancels all draw operations in progress and blocks future operations. It sets flag 1 of the
member. If draw operations in progress were canceled, flag 2 is also set.
unblocks redraw operations, resetting
to 0. If flag 2 was previously set, indicating that draw operations had been previously canceled, a redraw is triggered.
unblocks redraw operations and forces a redraw. As above,
is reset to 0.
this_ | The navit instance |
block | The operation to perform, see description |
References blocked, displaylist, gra, graphics_draw_cancel(), and navit_draw().
Referenced by Backend::block_draw(), gui_internal_check_exit(), gui_internal_enter(), Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel(), request_navit_block(), Backend::resize(), and Backend::showMenu().
|
static |
References callback_cast, callback_new_1, data, dbg, ignore_graphics_events, lvl_debug, navit_handle_button(), navit_popup(), p, and popup_callback.
Referenced by navit_set_graphics().
int navit_check_route | ( | struct navit * | this_ | ) |
Checks if a route is calculated.
This function checks if a route is calculated.
this_ | The navit struct whose route should be checked. |
References route, and route_get_path_set().
|
static |
Toggles the navigation announcer for navit.
this_ | The navit object |
References attr_cbl, callback_list_call_attr_1, navit_get_attr(), attr::num, attr::speech, speech_get_attr(), speech_set_attr(), attr::type, and attr::u.
|
static |
References attr_generic_add_attr(), attr::str, attr::type, and attr::u.
|
static |
Get attr variable given a key string for the command system (for opaque usage)
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] is the key string |
out | output attribute, the attr for the given key string if exists or NULL |
References attr_dup(), ATTR_IS_STRING, cmd_attr_var_hash, attr::item, attr::type, type, and attr::u.
|
static |
Get value given a key string for the command system
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] is the key string |
out | output attribute, the value for the given key string if exists or 0 |
References attr_dup(), ATTR_IS_STRING, cmd_int_var_hash, attr::num, attr::type, type, and attr::u.
|
static |
Get current size of command system's integer stack
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes unused |
out | output attribute, the size of stack |
References cmd_int_var_stack, attr::num, attr::type, and attr::u.
|
static |
adds an item with the current coordinate of the vehicle to a named map
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] is the name of the map |
out | output attribute, 0 on error or the id of the created item on success |
References attr_dup_content(), ATTR_IS_STRING, map_selection::c_rect, change_mode_modify, attr::coord_geo, dbg, attr::item, item_coord_set(), item_from_name(), coord_rect::lu, lvl_error, map_rect_create_item(), map_rect_destroy(), map_rect_new(), mapset_get_map_by_name(), item_range::max, navit_get_mapset(), map_selection::next, map_selection::order, projection_mg, map_selection::range, coord_rect::rl, attr::str, transform_from_geo(), attr::type, type, attr::u, map_selection::u, vehicle_get_attr(), coord::x, and coord::y.
|
static |
sets an attribute (name value pair) of a map item specified by map name and item id
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] - name of the map ; in[1] - item ; in[2] - attr name ; in[3] - attr value |
out | output attribute, 0 on error, 1 on success |
References attr_from_name(), ATTR_IS_DOUBLE, ATTR_IS_INT, ATTR_IS_ITEM, ATTR_IS_STRING, change_mode_modify, dbg, item::id_hi, item::id_lo, attr::item, item_attr_set(), lvl_debug, map_rect_destroy(), map_rect_get_item_byid(), map_rect_new(), mapset_get_map_by_name(), navit_get_mapset(), attr::num, attr::numd, attr::str, attr::type, type, and attr::u.
|
static |
Pop an integer from the command system's integer stack
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes unused |
out | output attribute, the value popped if stack isn't empty or 0 |
References cmd_int_var_stack, attr::num, attr::type, and attr::u.
|
static |
Push an integer to the stack for the command system
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] is the integer attibute to push |
out | output attributes, unused |
References attr_dup_content(), ATTR_IS_NUMERIC, cmd_int_var_stack, and type.
|
static |
References navit_get_destination_count(), and navit_remove_nth_waypoint().
|
static |
References navit_remove_waypoint().
|
static |
References ATTR_IS_STRING, navit_say(), attr::str, and type.
|
static |
Store key value pair for the command system (for attr typed values, can be used as opaque handles)
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes in[0] is the key string, in[1] is the attr* value to store |
out | output attributes, unused |
References attr_dup(), attr_free(), ATTR_IS_STRING, cmd_attr_var_hash, dbg, key, lvl_warning, type, and attr::u.
|
static |
References ATTR_IS_INT, navit_get_coord(), navit_set_center(), attr::num, type, and attr::u.
|
static |
Recenters the map so that the vehicle cursor is visible.
This is the callback function for the
command. It is just a wrapper around
.
this_ | The navit object |
References navit_set_center_cursor_draw().
|
static |
References ATTR_IS_STRING, description(), navit_get_coord(), navit_set_destination(), attr::str, type, and attr::u.
|
static |
Store key value pair for the command system (for int typed values)
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes in[0] is the key string, in[1] is the integer value to store |
out | output attributes, unused |
References attr_dup_content(), ATTR_IS_NUMERIC, ATTR_IS_STRING, cmd_int_var_hash, key, type, and attr::u.
|
static |
References navit_get_coord(), and navit_set_position().
|
static |
Call external program
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes in[0] - name of executable, in[1..] - parameters |
out | output attribute unused |
|
static |
Join several string attributes into one
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attributes in[0] - separator, in[1..] - attributes to join |
out | output attribute joined attribute as string |
References attr_generic_add_attr(), attr_to_text(), attr::str, attr::type, and attr::u.
|
static |
this command is used to change the layout and enable/disable the automatic layout switcher
this_ | The navit instance |
function | unused |
in | input attributes in[0], a string, see usage below |
out | output attribute unused |
usage : manual : disable autoswitcher auto : enable autoswitcher manual_toggle : disable autoswitcher and toggle between day / night layout manual_day : disable autoswitcher and set to day layout manual_night : disable autoswitcher and set to night layout
todo : make it return the state of the autoswitcher and the version of the active layout (day/night/undefined)
References ATTR_IS_STRING, auto_switch, layout::dayname, dbg, layout_current, lvl_debug, layout::name, navit_layout_switch(), navit_set_layout_by_name(), layout::nightname, prevTs, attr::str, type, and vehicle.
|
static |
command to toggle the active state of a named layer of the current layout
navit | The navit instance |
function | unused (needed to match command function signature) |
in | input attribute in[0] is the name of the layer |
out | output unused |
valid | unused |
References layer::active, ATTR_IS_STRING, layer::name, navit_draw(), attr::str, type, and attr::u.
|
static |
References navit_zoom_in_cursor().
|
static |
References navit_zoom_out_cursor().
|
static |
References navit_zoom_to_route().
void navit_command_add_table | ( | struct navit * | this_, |
struct command_table * | commands, | ||
int | count | ||
) |
References attr_cbl, command_add_table(), and commands.
Referenced by osd_button_new(), osd_cmd_interface_new(), and osd_odometer_new().
void navit_destroy | ( | struct navit * | this_ | ) |
References attr_cbl, attr_free_content(), attr_free_g(), attr_list_free(), bookmarks, bookmarks_destroy(), bookmarks_get_center_file(), bookmarks_write_center_to_file(), button_callback, callback_destroy(), callback_list_call_attr_1, cmd_attr_var_hash, cmd_int_var_hash, cmd_int_var_stack, dbg, displaylist, former_destination, gra, graphics_displaylist_destroy(), graphics_draw_cancel(), graphics_free(), graphics_remove_callback(), lvl_debug, attr::map, map_destroy(), map_get_attr(), maps, mapset_close(), mapset_next(), mapset_open(), mapset_remove_attr(), mapsets, motion_callback, motion_timeout_callback, nav_speech_cb, popup_callback, predraw_callback, progress_cb, resize_callback, roadbook_callback, route, route_cb, route_destroy(), attr::type, and attr::u.
Referenced by graphics_sdl_idle(), gui_gtk_delete(), NGQProxyNavit::quit(), quit_action(), and window_fullscreen().
void navit_disable_suspend | ( | void | ) |
References attr_cbl, callback_list_call_attr_0, global_navit, gui, and gui_disable_suspend().
Referenced by navit_vehicle_update_position().
void navit_draw | ( | struct navit * | this_ | ) |
References navit_draw_async(), and ready.
Referenced by gui_gtk_action_toggled(), gui_internal_check_exit(), gui_internal_cmd_results_map_clean(), gui_qml_set_graphics(), gui_qt5_qml_set_graphics(), Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), keypress(), navit_block(), navit_cmd_toggle_layer(), navit_handle_button(), navit_projection_set(), navit_redraw_route(), navit_scale(), navit_set_attr_do(), navit_set_center(), navit_set_destination(), navit_set_destinations(), navit_set_position(), osd_button_set_attr(), osd_text_set_attr(), pedestrian_rocket_idle(), refresh_action(), request_navit_draw(), and WndProc().
void navit_draw_async | ( | struct navit * | this_, |
int | async | ||
) |
References blocked, displaylist, gra, graphics_draw(), graphics_flags, layout_current, mapsets, trans, and transform_setup_source_rect().
Referenced by navit_draw(), navit_handle_resize(), navit_init(), navit_set_center_cursor_draw(), navit_zoom_to_rect(), and traffic_process_messages_int().
void navit_draw_displaylist | ( | struct navit * | this_ | ) |
References displaylist, gra, graphics_displaylist_draw(), graphics_flags, layout_current, ready, and trans.
Referenced by gui_internal_check_exit().
|
static |
References active, bookmarks_get_destination_file(), and TEXTFILE_COMMENT_NAVI_STOPPED.
Referenced by navit_add_former_destinations_from_file().
int navit_get_attr | ( | struct navit * | this_, |
enum attr_type | type, | ||
struct attr * | attr, | ||
struct attr_iter * | iter | ||
) |
References attr_cbl, attr_generic_get_attr(), attr_to_name(), auto_switch, autozoom_active, attr::bookmarks, bookmarks, bookmarks_get_map(), c, attr::callback_list, center, center_timeout, attr::coord_geo, dbg, destination, destination_valid, attr::displaylist, displaylist, navit_vehicle::follow_curr, follow_cursor, former_destination, gra, attr::graphics, attr::gui, gui, h, imperial, attr_iter::iter, attr::layout, layout_current, layouts, attr_iter::list, lvl_debug, attr::map, attr::mapset, mapset_close(), attr_iter::mapset_handle, mapset_next(), mapset_open(), mapsets, attr::navigation, navigation, navit_get_messages(), navit_object_get_attr(), message::next, attr::num, offset, orientation, osd_configuration, attr::pcoord, attr::route, route, attr::speech, speech, attr::str, sunrise_degrees, message::text, attr::tracking, tracking, tracking_flag, trans, transform_get_center(), transform_get_pitch(), transform_get_projection(), transform_get_scale(), transform_to_geo(), attr::transformation, tunnel_nightlayout, attr::type, type, attr::u, attr_iter::u, attr::vehicle, navit_vehicle::vehicle, vehicle, attr::vehicleprofile, vehicleprofile, vehicleprofiles, vehicles, w, and waypoints_flag.
Referenced by NGQProxyBookmarks::AddBookmark(), NGQProxyBookmarks::AddFolder(), bookmarks_emit_dbus_signal(), button_bookmark(), NGQProxyBookmarks::Copy(), NGQProxyBookmarks::Cut(), NGQProxyBookmarks::Delete(), Backend::get_bookmarks(), get_distance_str(), get_icon(), Backend::get_maps(), Backend::get_vehicles(), NGQProxyNavit::getAttrFunc(), NGQProxyNavit::getAttrList(), NGQProxyBookmarks::getBookmarks(), graphics_sdl_idle(), gtk_gui_poi(), gui_gtk_add_bookmark_do(), gui_gtk_bookmarks_init(), gui_gtk_bookmarks_update(), gui_gtk_destinations_update(), gui_gtk_init(), gui_gtk_layouts_init(), gui_gtk_maps_init(), gui_gtk_route_callback(), gui_gtk_toggle_init(), gui_gtk_ui_init(), gui_gtk_vehicles_update(), gui_internal_button_navit_attr_new(), gui_internal_cmd2_pois(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_vehicle(), gui_internal_cmd_add_bookmark_do(), gui_internal_cmd_add_bookmark_folder_do(), gui_internal_cmd_bookmarks(), gui_internal_cmd_copy_bookmark(), gui_internal_cmd_cut_bookmark(), gui_internal_cmd_delete_bookmark(), gui_internal_cmd_delete_bookmark_folder(), gui_internal_cmd_formerdests(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_paste_bookmark(), gui_internal_cmd_pois(), gui_internal_cmd_position_do(), gui_internal_cmd_rename_bookmark_clicked(), gui_internal_cmd_replace_bookmarks_from_waypoints(), gui_internal_dbus_signal(), gui_internal_is_active_vehicle(), gui_internal_poi_icon(), gui_internal_populate_route_table(), gui_internal_set_position_coord(), gui_qml_dbus_signal(), invoke(), map_route_occluded_rect_new(), model_poi(), NGQProxyBookmarks::moveDown(), NGQProxyBookmarks::moveRoot(), NGQProxyBookmarks::moveUp(), navit_cmd_announcer_toggle(), navit_get_attr_py(), navit_get_layout_by_name(), navit_init(), navit_layout_switch(), navit_set_destination(), navit_set_layout_by_name(), navit_set_vehicle_by_name(), navit_window_roadbook_update(), NPP_SetWindow(), osd_auxmap_draw(), osd_compass_draw(), osd_gps_status_draw(), osd_marker_draw(), osd_nav_toggle_announcer_draw(), osd_odometer_draw(), osd_rocket_init(), osd_route_guard_draw(), osd_scale_draw(), osd_speed_cam_draw(), osd_speed_warner_draw(), osd_std_calculate_sizes_and_redraw(), osd_std_config(), osd_text_draw(), NGQProxyBookmarks::Paste(), pedestrian_draw_arrows(), pedestrian_navit_init(), pedestrian_read_tilt(), popup_set_bookmark(), request_navit_get_attr(), request_navit_set_layout(), request_navit_traffic_export_gpx(), request_navit_traffic_inject(), resolve_object(), NGQProxyBookmarks::setPoint(), speech_dbus_say(), statusbar_route_update(), traffic_set_shared(), and traffic_traff_android_on_feed_received().
int navit_get_blocked | ( | struct navit * | this_ | ) |
Returns whether redraw operations are currently blocked.
References blocked.
Referenced by osd_button_draw(), osd_button_set_attr(), and osd_text_set_attr().
|
static |
References ATTR_IS_COORD, ATTR_IS_INT, ATTR_IS_PCOORD, ATTR_IS_STRING, c, attr::coord, coord_parse(), attr::num, attr::pcoord, pcoord::pro, attr::str, transform_get_projection(), type, attr::u, coord::x, pcoord::x, coord::y, and pcoord::y.
Referenced by navit_cmd_set_center(), navit_cmd_set_destination(), and navit_cmd_set_position().
|
static |
Calculates the position of the cursor on the screen.
This method considers padding if supported by the graphics plugin. In that case, the inner rectangle (i.e. screen size minus padding) will be used to center the cursor and to determine cursor offset (as specified in this_->radius
).
this_ | The navit object |
p | Receives the screen coordinates for the cursor |
keep_orientation | Whether to maintain the current map orientation. If false, the map will be rotated so that the bearing of the vehicle is up. |
dir | Receives the new map orientation as requested by screen_orientation (can be NULL ) |
References padding::bottom, dbg, navit_vehicle::dir, gra, graphics_get_data(), height, padding::left, lvl_debug, lvl_warning, M_PI, offset, orientation, p, radius, padding::right, navit_vehicle::speed, padding::top, tracking, tracking_flag, tracking_get_angle(), trans, transform_get_size(), vehicle, and width.
Referenced by navit_set_center_cursor(), navit_zoom_in_cursor(), and navit_zoom_out_cursor().
int navit_get_destination_count | ( | struct navit * | this_ | ) |
Get the destinations count for the route.
this | The Navit instance |
References route, and route_get_destination_count().
Referenced by gui_internal_cmd_bookmarks(), gui_internal_cmd_delete_waypoint(), gui_internal_cmd_insert_destination_do(), gui_internal_cmd_position_do(), gui_internal_cmd_replace_bookmarks_from_waypoints(), gui_internal_select_waypoint(), navit_cmd_route_remove_last_waypoint(), popup_set_visitbefore(), popup_show_visitbefore(), and traffic_traff_android_set_selection().
char* navit_get_destination_description | ( | struct navit * | this_, |
int | n | ||
) |
References route, and route_get_destination_description().
Referenced by gui_internal_cmd_replace_bookmarks_from_waypoints().
Retrieves destinations from the route.
Prior to calling this method, you may want to retrieve the number of destinations by calling navit_get_destination_count(struct navit *) and assigning a buffer of sufficient capacity.
If the return value equals count
, the buffer was either just large enough or too small to hold the entire list of destinations; there is no way to tell from the result which is the case.
If the Navit instance does not have a route, the result is 0.
this_ | The Navit instance |
pc | Pointer to an array of projected coordinates which will receive the destination coordinates |
count | Capacity of pc |
pc
, never greater than count
References route, and route_get_destinations().
Referenced by gui_internal_cmd_delete_waypoint(), gui_internal_cmd_insert_destination_do(), gui_internal_cmd_replace_bookmarks_from_waypoints(), and popup_set_visitbefore().
struct displaylist* navit_get_displaylist | ( | struct navit * | this_ | ) |
References displaylist.
Referenced by gui_internal_cmd_position_do(), gui_internal_dbus_signal(), and gui_qml_dbus_signal().
References gra.
Referenced by osd_button_draw(), osd_button_init(), osd_button_set_attr(), osd_image_init(), osd_scale_init(), osd_set_keypress(), osd_set_std_graphic(), and win32_cb_graphics_ready().
References gui.
Referenced by popup(), and popup_set_bookmark().
int navit_get_height | ( | struct navit * | this_ | ) |
References h.
Referenced by graphics_new(), model_poi(), osd_button_draw(), osd_button_init(), osd_scale_draw(), osd_set_std_graphic(), osd_wrap_point(), and set_std_osd_attr().
Select the default layout by name.
this_ | The navit instance |
name | The new default layout's name |
References attr_iter::iter, attr::layout, layout::name, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), and attr::u.
Referenced by layout_new(), and navit_update_current_layout().
Get the current mapset.
this_ | The navit instance |
References dbg, lvl_error, and mapsets.
Referenced by NGQPoint::_coordName(), create_destination_window(), destination_address(), Backend::get_pois(), NGQPoint::getPOI(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd_pois(), gui_internal_search_list_new(), Java_org_navitproject_navit_NavitAddressSearchActivity_callbackStartAddressSearch(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), Java_org_navitproject_navit_NavitGraphics_getAllCountries(), Java_org_navitproject_navit_NavitGraphics_getDefaultCountry(), model_poi(), navit_cmd_map_add_curr_pos(), navit_cmd_map_item_set_attr(), navit_get_search_results_map(), NGQProxySearch::NGQProxySearch(), osd_route_guard_init(), osd_speed_cam_draw(), and Backend::updateSearch().
References message_get(), and messages.
Referenced by navit_get_attr(), and osd_text_draw().
struct navigation* navit_get_navigation | ( | struct navit * | this_ | ) |
References navigation.
Referenced by gui_internal_populate_route_table(), osd_nav_next_turn_draw(), osd_navigation_status_draw(), osd_navigation_status_init(), osd_text_draw(), request_navit_route_export_geojson(), request_navit_route_export_gpx(), statusbar_route_update(), and traffic_traff_android_init().
int navit_get_ready | ( | struct navit * | this_ | ) |
References ready.
Referenced by gui_internal_set_graphics(), osd_scale_init(), and traffic_process_messages_int().
Get the search result map (and create it if it does not exist)
this_ | The navit instance |
References attr::attr_types, attrmap, attr::attrs, attr::map, map_new(), mapset_add_attr(), mapset_get_map_by_name(), navit_get_mapset(), attr::num, attr::str, attr::type, types, and attr::u.
Referenced by navit_populate_search_results_map().
struct transformation* navit_get_trans | ( | struct navit * | this_ | ) |
References trans.
Referenced by NGQPoint::_coordName(), Backend::get_bookmarks(), Backend::get_pois(), NGQProxyNavit::getPosition(), gui_internal_cmd_position_do(), gui_internal_keypress(), gui_internal_set_click_coord(), gui_internal_set_graphics(), gui_internal_set_position_coord(), gui_qml_keypress(), gui_qt5_qml_set_graphics(), info_action(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), Java_org_navitproject_navit_NavitGraphics_getCoordForPoint(), keypress(), model_poi(), NGQPoint::NGQPoint(), pedestrian_draw_arrows(), pedestrian_navit_init(), popup(), popup_set_destination(), popup_show_item(), NGQPoint::setNewPoint(), Backend::showMenu(), and WndProc().
char* navit_get_user_data_directory | ( | int | create | ) |
Get the user data directory.
[in] | create | - create the directory if it does not exist |
returns the directory used to store user data files (center.txt, destination.txt, bookmark.txt, ...)
References dbg, file_exists(), file_mkdir(), lvl_debug, and lvl_error.
Referenced by bookmarks_get_center_file(), bookmarks_get_destination_file(), bookmarks_new(), gui_internal_set(), gui_internal_setup(), main_setup_environment(), osd_odometer_new(), osd_odometer_save(), popup_traffic_distortion(), tm_dump_item_to_textfile(), traffic_dump_messages_to_xml(), and traffic_get_map().
struct vehicleprofile* navit_get_vehicleprofile | ( | struct navit * | this_ | ) |
References vehicleprofile.
Referenced by osd_speed_warner_draw(), and osd_text_draw().
References vehicleprofiles.
Referenced by gui_internal_menu_vehicle_settings().
int navit_get_width | ( | struct navit * | this_ | ) |
References w.
Referenced by graphics_new(), model_poi(), osd_button_draw(), osd_button_init(), osd_scale_draw(), osd_set_std_graphic(), osd_wrap_point(), and set_std_osd_attr().
int navit_handle_button | ( | struct navit * | this_, |
int | pressed, | ||
int | button, | ||
struct point * | p, | ||
struct callback * | popup_callback | ||
) |
References attr_cbl, button_pressed, button_timeout, callback_list_call_attr_4, dbg, event_add_timeout(), event_remove_timeout(), gra, graphics_draw_drag(), graphics_overlay_disable(), ignore_button, lvl_debug, motion_timeout, moved, navit_draw(), navit_set_center_screen(), navit_set_timeout(), navit_zoom_in(), navit_zoom_out(), p, popped, popup(), trans, trans_cursor, transform_copy(), transform_within_border(), update_transformation(), use_mousewheel, and zoomed.
Referenced by gui_internal_button(), gui_qml_button(), gui_qt5_qml_button(), and navit_button().
References button_pressed, button_timeout, callback_cast, callback_new_1, current, drag_bitmap, event_add_timeout(), event_remove_timeout(), motion_timeout, motion_timeout_callback, moved, navit_motion_timeout(), p, and popped.
Referenced by gui_internal_motion(), gui_qml_motion(), gui_qt5_qml_motion(), and navit_motion().
void navit_handle_resize | ( | struct navit * | this_, |
int | w, | ||
int | h | ||
) |
References attr_cbl, callback_list_call_attr_1, displaylist, gra, graphics_draw_cancel(), graphics_init(), graphics_set_rect(), h, navit_draw_async(), navit_set_attr(), attr::num, map_selection::p_rect, pitch, ready, point_rect::rl, trans, transform_set_screen_selection(), attr::type, attr::u, map_selection::u, w, point::x, and point::y.
Referenced by gui_internal_resize(), gui_qml_resize(), gui_qt5_qml_resize(), navit_resize(), request_navit_resize(), and Backend::resize().
int navit_ignore_button | ( | struct navit * | this_ | ) |
Sets a flag indicating that the current button event should be ignored by subsequent handlers.
Calling this function will set the
member to
and return its previous state. The default handler, navit_handle_button(navit *, int, int, point *, callback *) calls this function just before the actual event handling core and aborts if the result is
. In order to prevent multiple handlers from firing on a single event, custom button click handlers should implement the same logic for events they wish to handle.
If a handler wishes to pass down an event to other handlers, it must abort without calling this function.
this_ | The navit instance |
References ignore_button.
Referenced by osd_odometer_click(), osd_speed_warner_click(), osd_std_click(), osd_stopwatch_click(), and osd_volume_click().
void navit_ignore_graphics_events | ( | struct navit * | this_, |
int | ignore | ||
) |
References ignore_graphics_events.
Referenced by gui_internal_set_graphics(), gui_qml_new(), and gui_qt5_qml_set_graphics().
int navit_init | ( | struct navit * | this_ | ) |
References active, attr_cbl, bookmarks, bookmarks_get_center_file(), bookmarks_set_center_from_file(), callback_cast, callback_list_call_attr_1, callback_new_1, callback_new_attr_1, dbg, exit, flags, global_navit, gra, graphics_get_attr(), gui, gui_get_attr(), gui_set_graphics(), h, attr_iter::iter, lvl_error, lvl_info, attr::map, map_add_callback(), map_set_attr(), mapset_add_attr(), mapset_close(), mapset_next(), mapset_open(), mapsets, messagelist_init(), messages, nav_speech_cb, navigation, navigation_get_map(), navigation_register_callback(), navigation_set_attr(), navigation_set_route(), navit_add_former_destinations_from_file(), navit_attr_iter_destroy(), navit_attr_iter_new(), navit_draw_async(), navit_get_attr(), navit_map_progress(), attr::navit_object, navit_redraw_route(), navit_set_cursors(), navit_set_vehicle(), navit_speak(), attr::num, progress_cb, ready, route, route_add_attr(), route_cb, route_get_graph_map(), route_get_map(), route_set_mapset(), route_set_projection(), speech, attr::str, tracking, tracking_get_map(), tracking_set_mapset(), tracking_set_route(), traffic_get_map(), traffic_set_mapset(), traffic_set_route(), trans, transform_get_projection(), attr::type, callback::type, attr::u, vehicle, and w.
void navit_layout_switch | ( | struct navit * | n | ) |
References __sunriset__(), attr_position_valid_invalid, auto_switch, attr::coord_geo, layout::dayname, dbg, HOURS, iso8601_to_secs(), coord_geo::lat, attr::layout, layout_before_tunnel, layout_current, coord_geo::lng, lvl_debug, MINUTES, layout::name, navit_get_attr(), navit_set_layout_by_name(), layout::nightname, attr::num, prevTs, attr::str, sunrise_degrees, tracking, tracking_get_current_tunnel(), tunnel_nightlayout, attr::u, navit_vehicle::vehicle, vehicle, and vehicle_get_attr().
Referenced by navit_cmd_switch_layout_day_night(), and navit_vehicle_update_position().
|
static |
References draw_mode_begin, draw_mode_end, gra, graphics_draw_mode(), graphics_draw_text_std(), map_get_attr(), mapset_close(), mapset_next(), mapset_open(), mapsets, p, ready, attr::str, and attr::u.
Referenced by navit_init().
|
static |
References dbg, lvl_error, and TEXTFILE_COMMENT_NAVI_STOPPED.
Referenced by navit_set_destination().
|
static |
References data, ignore_graphics_events, and navit_handle_motion().
Referenced by navit_set_graphics().
|
static |
References current, displaylist, drag_bitmap, draw_mode_end, gra, graphics_displaylist_draw(), graphics_draw_cancel(), graphics_draw_drag(), graphics_draw_mode(), graphics_flags, graphics_overlay_disable(), layout_current, motion_timeout, moved, trans, transform_destroy(), transform_dup(), update_transformation(), point::x, and point::y.
Referenced by navit_handle_motion().
References attr_cbl, attr_list_dup(), auto_switch, autozoom_active, autozoom_max, autozoom_min, autozoom_paused, autozoom_secs, bookmarks, bookmarks_new(), border, callback_list_new(), center, center_timeout, command_add_table(), commands, dbg, default_layout_name, displaylist, follow_cursor, graphics_displaylist_new(), coord_geo::lat, layout_before_tunnel, coord_geo::lng, lvl_debug, messagelist_new(), messages, attr::navit, navit_func, navit_object_ref(), navit_set_attr_do(), orientation, osd_configuration, prevTs, projection_mg, radius, recentdest_count, self, sunrise_degrees, tracking_flag, trans, trans_cursor, transform_from_geo(), transform_new(), tunnel_nightlayout, attr::type, attr::u, use_mousewheel, coord::x, coord::y, zoom, zoom_max, and zoom_min.
int navit_populate_search_results_map | ( | struct navit * | this_, |
GList * | search_results, | ||
struct coord_rect * | r | ||
) |
Populate a map containing one or more search result points.
These search results will be displayed as an overlay on the top of the geographic map.
this_ | The navit instance | |
search_results | A GList storing elements to display on the result map If this argument in NULL, all existing results will be removed from the map | |
[in,out] | coord_rect | An optional rectangular zone that will be extended to contain all result points or NULL if no zone needs to be computed |
References change_mode_modify, coord_rect_extend(), dbg, item, item_attr_set(), item_coord_set(), item_type_set(), coord_rect::lu, lvl_info, lvl_warning, map_rect_create_item(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), navit_get_search_results_map(), coord_rect::rl, square_shape_str(), attr::str, attr::type, and attr::u.
Referenced by button_destination(), button_destination_clicked(), button_map(), button_map_clicked(), button_visit_clicked(), gtk_gui_poi(), gui_gtk_action_activate(), and gui_internal_prepare_search_results_map().
|
static |
References button_timeout, data, popped, and popup().
Referenced by navit_button().
|
static |
References navit_vehicle_draw(), trans, trans_cursor, transform_copy(), and vehicles.
Referenced by navit_set_graphics().
|
static |
References c, navit_draw(), trans, transform_center(), transform_from_geo(), transform_get_projection(), transform_set_projection(), and transform_to_geo().
Referenced by navit_set_attr_do().
|
static |
References navit_vehicle::follow, navit_vehicle::follow_curr, navit_draw(), attr::num, ready, route_status_path_done_new, attr::type, attr::u, and vehicle.
Referenced by navit_init().
References attr_generic_remove_attr(), attr::callback, navit_remove_callback(), attr::type, and attr::u.
Referenced by request_navit_remove_attr().
References attr_cbl, and callback_list_remove().
Referenced by gui_internal_button_navit_attr_new(), and navit_remove_attr().
void navit_remove_nth_waypoint | ( | struct navit * | this_, |
int | n | ||
) |
References navit_set_destination(), route, route_get_destination_count(), and route_remove_nth_waypoint().
Referenced by navit_cmd_route_remove_last_waypoint().
void navit_remove_waypoint | ( | struct navit * | this_ | ) |
References navit_set_destination(), route, route_get_destination_count(), and route_remove_waypoint().
Referenced by navit_cmd_route_remove_next_waypoint().
|
static |
References data, h, ignore_graphics_events, and navit_handle_resize().
Referenced by navit_set_graphics().
|
static |
References navit_restrict_to_range(), WORLD_BOUNDINGBOX_MAX_X, WORLD_BOUNDINGBOX_MAX_Y, WORLD_BOUNDINGBOX_MIN_X, WORLD_BOUNDINGBOX_MIN_Y, coord::x, and coord::y.
Referenced by update_transformation().
|
static |
Referenced by navit_restrict_map_center_to_world_boundingbox().
void navit_say | ( | struct navit * | this_, |
const char * | text | ||
) |
References dbg, lvl_debug, attr::num, speech, speech_get_attr(), speech_say(), attr::text, and attr::u.
Referenced by gui_internal_say(), navit_cmd_say(), osd_route_guard_draw(), osd_speed_cam_draw(), and osd_speed_warner_draw().
References c1, c2, center, navit_draw(), p, trans, transform_center(), transform_reverse(), transform_set_scale(), zoom_max, and zoom_min.
Referenced by navit_autozoom(), navit_zoom_in(), and navit_zoom_out().
References navit_set_attr_do().
Referenced by autozoom_action(), cursor_action(), follow_vehicle_action(), gui_gtk_action_changed(), gui_internal_button_navit_attr_new(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_set_active_profile(), gui_internal_cmd_set_active_vehicle(), gui_internal_cmd_set_destination(), gui_internal_cmd_set_position(), gui_internal_prepare_search_results_map(), navit_handle_resize(), navit_set_attr_py(), navit_set_layout_by_name(), navit_set_timeout(), navit_set_vehicle_by_name(), orient_north_action(), pedestrian_navit_init(), pedestrian_rocket_idle(), request_navit_set_attr(), request_navit_set_layout(), NGQProxyNavit::setAttrFunc(), tracking_action(), and WndProc().
References active, attr_cbl, attr_to_name(), auto_switch, autozoom_active, autozoom_secs, border, callback_list_call_attr_2, center_timeout, attr::coord_geo, dbg, default_layout_name, navit_vehicle::dir, drag_bitmap, draw_mode_end, flags, navit_vehicle::follow_curr, follow_cursor, gra, graphics_draw_mode(), graphics_flags, graphics_font_destroy_all(), h, imperial, attr::layout, layout_current, layouts, lvl_debug, layout::name, navit_add_message(), navit_draw(), navit_object_set_attr(), navit_projection_set(), navit_set_cursors(), navit_set_vehicle(), navit_set_vehicleprofile(), navit_update_current_layout(), attr::num, orientation, osd_configuration, pitch, attr::projection, radius, ready, recentdest_count, attr::speech, speech, attr::str, sunrise_degrees, tracking_flag, trans, transform_from_geo(), transform_get_projection(), transform_get_scale(), transform_set_center(), transform_set_pitch(), transform_set_scale(), transform_set_yaw(), attr::transformation, tunnel_nightlayout, attr::type, attr::u, use_mousewheel, attr::vehicle, navit_vehicle::vehicle, vehicle, vehicle_set_attr(), attr::vehicleprofile, vehicles, w, waypoints_flag, coord::x, coord::y, zoom, zoom_max, and zoom_min.
Referenced by navit_new(), and navit_set_attr().
Change the current zoom level
navit | The navit instance |
center | The point where to center the map, including its projection |
References c, c1, c2, center, navit_draw(), navit_set_timeout(), ready, trans, transform_center(), transform_from_to(), and transform_get_projection().
Referenced by button_map(), button_map_clicked(), gui_internal_cmd_view_on_map(), keypress(), navit_cmd_set_center(), navit_set_center_py(), navit_set_center_screen(), request_navit_set_center(), Backend::setActivePoi(), NGQProxyNavit::setCenter(), and Backend::setCurrentBookmark().
|
static |
References c, height, navit_set_timeout(), p, trans, transform_get_size(), transform_set_center(), update_transformation(), width, point::x, and point::y.
Referenced by navit_set_center_cursor().
void navit_set_center_cursor | ( | struct navit * | this_, |
int | autozoom, | ||
int | keep_orientation | ||
) |
Recalculates the map view so that the vehicle cursor is visible.
This function recalculates the parameters which control the visible map area, zoom and orientation. The caller is responsible for redrawing the map after the function returns.
If the vehicle supplies a
attribute and it is
, the map position is not changed.
this_ | The navit object |
autozoom | Whether to set zoom based on current speed. If false, current zoom will be maintained. |
keep_orientation | Whether to maintain the current map orientation. If false, the map will be rotated so that the bearing of the vehicle is up. |
References attr_position_valid_invalid, navit_vehicle::coord, navit_autozoom(), navit_get_cursor_pnt(), navit_set_center_coord_screen(), attr::num, navit_vehicle::speed, trans, transform_set_yaw(), attr::u, navit_vehicle::vehicle, vehicle, and vehicle_get_attr().
Referenced by navit_set_center_cursor_draw().
|
static |
Recenters the map so that the vehicle cursor is visible.
This function first calls
to recalculate the map display, then triggers a redraw of the map.
this_ | The navit object |
References navit_draw_async(), navit_set_center_cursor(), and ready.
Referenced by navit_cmd_set_center_cursor(), and navit_vehicle_update_position().
References c, navit_set_center(), p, pcoord::pro, trans, transform_get_projection(), transform_reverse(), pcoord::x, and pcoord::y.
Referenced by gui_internal_keypress(), gui_qml_keypress(), keypress(), navit_handle_button(), request_navit_set_center_screen(), and WndProc().
|
static |
Links all vehicles to a cursor depending on the current profile.
this_ | A navit instance |
References c, layout_current, layout_get_cursor(), name, navit_vehicle::vehicle, vehicle_get_attr(), vehicle_set_cursor(), and vehicles.
Referenced by navit_init(), and navit_set_attr_do().
void navit_set_destination | ( | struct navit * | this_, |
struct pcoord * | c, | ||
const char * | description, | ||
int | async | ||
) |
Start or add a given set of coordinates for route computing
navit | The navit instance |
c | The coordinate to start routing to |
description | A label which allows the user to later identify this destination in the former destinations selection |
async | Set to 1 to do route calculation asynchronously |
References attr_cbl, bookmarks_append_destinations(), bookmarks_get_destination_file(), c, callback_list_call_attr_0, dbg, description(), destination, destination_valid, flags, former_destination, lvl_debug, navit_draw(), navit_get_attr(), navit_mark_navigation_stopped(), ready, recentdest_count, route, route_append_destination(), route_get_destination_count(), route_get_destinations(), route_set_destination(), waypoints_flag, pcoord::x, and pcoord::y.
Referenced by button_destination(), button_destination_clicked(), gui_gtk_action_activate(), gui_internal_cmd2_abort_navigation(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_set_destination(), Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel(), Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel(), navit_cmd_set_destination(), navit_remove_nth_waypoint(), navit_remove_waypoint(), navit_set_destination_py(), navit_vehicle_update_position(), notify_apply(), popup_set_destination(), request_navit_clear_destination(), request_navit_set_destination(), route_clear_action(), Backend::setActivePoiAsDestination(), NGQProxyNavit::setDestination(), and NGQProxyNavit::stopNavigation().
void navit_set_destinations | ( | struct navit * | this_, |
struct pcoord * | c, | ||
int | count, | ||
const char * | description, | ||
int | async | ||
) |
Start the route computing to a given set of coordinates including waypoints
this_ | The navit instance |
c | The coordinate to start routing to |
description | A label which allows the user to later identify this destination in the former destinations selection |
async | If routing should be done asynchronously |
References attr_cbl, bookmarks_append_destinations(), bookmarks_get_destination_file(), c, callback_list_call_attr_0, description(), destination, destination_valid, former_destination, navit_draw(), ready, recentdest_count, route, and route_set_destinations().
Referenced by gui_internal_cmd_delete_waypoint(), gui_internal_cmd_insert_destination_do(), gui_internal_cmd_load_bookmarks_as_waypoints(), and popup_set_visitbefore().
References button_callback, callback_cast, callback_new_attr_1, gra, graphics_add_callback(), motion_callback, navit_button(), navit_motion(), navit_predraw(), navit_resize(), predraw_callback, and resize_callback.
Referenced by navit_add_attr().
References dbg, gui, gui_has_main_loop(), lvl_error, and main_loop_gui.
Referenced by navit_add_attr().
int navit_set_layout_by_name | ( | struct navit * | n, |
const char * | name | ||
) |
References attr_iter::iter, attr::layout, attr_iter::list, layout::name, name, navit_get_attr(), navit_set_attr(), attr::type, attr::u, and attr_iter::u.
Referenced by navit_cmd_switch_layout_day_night(), navit_layout_switch(), and NGQProxyNavit::setObjectByName().
Set the position of the vehicle
navit | The navit instance |
c | The coordinate to set as position |
References attr_cbl, c, callback_list_call_attr_0, navit_draw(), ready, route, and route_set_position().
Referenced by gui_internal_cmd_set_position(), navit_cmd_set_position(), navit_set_position_py(), popup_set_position(), request_navit_set_position(), NGQProxyNavit::setPosition(), and Backend::showMenu().
void navit_set_timeout | ( | struct navit * | this_ | ) |
References center_timeout, navit_set_attr(), attr::num, attr::type, and attr::u.
Referenced by navit_handle_button(), navit_set_center(), and navit_set_center_coord_screen().
|
static |
References navit_set_vehicleprofile_name(), route, route_set_profile(), attr::str, attr::u, navit_vehicle::vehicle, vehicle, vehicle_get_attr(), vehicleprofile, and vehicleprofiles.
Referenced by navit_add_vehicle(), navit_init(), and navit_set_attr_do().
int navit_set_vehicle_by_name | ( | struct navit * | n, |
const char * | name | ||
) |
References attr_iter::iter, name, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), navit_set_attr(), attr::str, attr::type, attr::u, attr::vehicle, and vehicle_get_attr().
Referenced by NGQProxyNavit::setObjectByName().
|
static |
References route, route_set_profile(), and vehicleprofile.
Referenced by navit_set_attr_do(), and navit_set_vehicleprofile_name().
int navit_set_vehicleprofile_name | ( | struct navit * | this_, |
char * | name | ||
) |
References name, navit_set_vehicleprofile(), attr::str, attr::u, vehicleprofile_get_attr(), and vehicleprofiles.
Referenced by gui_internal_cmd_set_active_profile(), and navit_set_vehicle().
void navit_speak | ( | struct navit * | this_ | ) |
References dbg, item, item_attr_get(), lvl_debug, map_rect_destroy(), map_rect_get_item(), map_rect_new(), navigation, navigation_get_map(), navit_add_message(), navit_textfile_debug_log(), attr::num, speech, speech_get_attr(), speech_say(), attr::str, item::type, and attr::u.
Referenced by navit_init().
void navit_textfile_debug_log | ( | struct navit * | this_, |
const char * | fmt, | ||
... | |||
) |
References navit_vehicle::coord, log_write(), textfile_debug_log, vehicle, coord::x, and coord::y.
Referenced by gui_internal_cmd_log_do(), navit_speak(), and navit_vehicle_update_position().
void navit_textfile_debug_log_at | ( | struct navit * | this_, |
struct pcoord * | pc, | ||
const char * | fmt, | ||
... | |||
) |
References log_write(), textfile_debug_log, vehicle, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd_log_do().
Set the current layout.
this_ | The navit instance |
layout | The layout to set as default (if NULL, we will set the current layout according to the default name stored in this_->default_layout_name |
layout
is NULL and the default layout name in the config file does not exist or has not been provided in the config file, the default layout is unchanged References dbg, default_layout_name, layout, layout_current, lvl_debug, lvl_warning, and navit_get_layout_by_name().
Referenced by navit_set_attr_do().
|
static |
Toggle the cursor update : refresh the map each time the cursor has moved (instead of only when it reaches a border)
this_ | The navit instance |
nv | vehicle to draw |
pnt | Screen coordinates of the vehicle. If NULL, position stored in nv is used. |
References blocked, navit_vehicle::coord, coord_not_set(), navit_vehicle::dir, gra, navit_vehicle::speed, trans_cursor, transform_get_projection(), transform_get_yaw(), transform_point(), navit_vehicle::vehicle, and vehicle_draw().
Referenced by navit_predraw(), and navit_vehicle_update_position().
|
static |
Called when the position of a vehicle changes.
This function is called when the position of any configured vehicle changes and triggers all actions that need to happen in response, such as:
this_ | The navit object |
nv | The which reported a new position |
References attr_cbl, attr_position_valid_invalid, bookmarks_append_destinations(), bookmarks_get_destination_file(), border, button_pressed, callback_list_call_attr_0, callback_list_call_attr_2, navit_vehicle::coord, attr::coord_geo, description(), navit_vehicle::dir, navit_vehicle::follow, navit_vehicle::follow_curr, follow_cursor, former_destination, gui, navit_disable_suspend(), navit_layout_switch(), navit_set_center_cursor_draw(), navit_set_destination(), navit_textfile_debug_log(), navit_vehicle_draw(), attr::num, attr::numd, pcoord::pro, profile, ready, recentdest_count, route, route_destination_reached(), route_get_destination_count(), route_get_destination_description(), route_get_destinations(), route_remove_waypoint(), route_set_position(), route_set_position_from_tracking(), navit_vehicle::speed, tracking, tracking_flag, tracking_get_attr(), tracking_update(), trans_cursor, transform_from_geo(), transform_get_projection(), transform_point(), transform_within_border(), attr::u, navit_vehicle::vehicle, vehicle, vehicle_get_attr(), vehicleprofile, coord::x, pcoord::x, coord::y, and pcoord::y.
Referenced by navit_add_vehicle().
|
static |
Called when a status attribute of a vehicle changes.
This function is called when the
,
or
attribute of any configured vehicle changes.
The function checks if
refers to the active vehicle and if
is one of the above types. If this is the case, it invokes the callback functions for
's respective attributes.
Future actions that need to happen when one of these three attribute changes for any vehicle should be implemented here.
this_ | The navit object |
nv | The which reported a new status attribute |
type | The type of attribute with has changed |
References attr_cbl, callback_list_call_attr_2, type, navit_vehicle::vehicle, and vehicle.
Referenced by navit_add_vehicle().
void navit_window_roadbook_destroy | ( | struct navit * | this_ | ) |
References callback_destroy(), dbg, lvl_debug, navigation, navigation_unregister_callback(), roadbook_callback, and roadbook_window.
Referenced by navit_window_roadbook_new().
void navit_window_roadbook_new | ( | struct navit * | this_ | ) |
References _, callback_cast, callback_new_1, gui, gui_datawindow_new(), navigation, navigation_register_callback(), navit_window_roadbook_destroy(), navit_window_roadbook_update(), roadbook_callback, and roadbook_window.
Referenced by roadbook_action().
|
static |
References _, datawindow_add(), datawindow_mode(), dbg, FEET_PER_METER, item, item_attr_get(), lvl_debug, lvl_info, map_rect_destroy(), map_rect_get_item(), map_rect_new(), METERS_TO_MILES, param_list::name, navigation, navigation_get_map(), navit_get_attr(), attr::num, roadbook_window, attr::str, item::type, attr::u, and param_list::value.
Referenced by navit_window_roadbook_new().
Change the current zoom level, zooming closer to the ground
navit | The navit instance |
factor | The zoom factor, usually 2 |
p | The invariant point (if set to NULL, default to center) |
References autozoom_active, autozoom_paused, navit_scale(), p, trans, and transform_get_scale().
Referenced by gui_internal_keypress(), gui_qml_keypress(), keypress(), navit_handle_button(), navit_zoom_in_cursor(), request_navit_zoom(), WndProc(), and zoom_in_action().
void navit_zoom_in_cursor | ( | struct navit * | this_, |
int | factor | ||
) |
References navit_vehicle::follow, navit_vehicle::follow_curr, navit_get_cursor_pnt(), navit_zoom_in(), p, and vehicle.
Referenced by Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel(), and navit_cmd_zoom_in().
Change the current zoom level
navit | The navit instance |
factor | The zoom factor, usually 2 |
p | The invariant point (if set to NULL, default to center) |
References autozoom_active, autozoom_paused, navit_scale(), p, trans, and transform_get_scale().
Referenced by gui_internal_keypress(), gui_qml_keypress(), keypress(), navit_handle_button(), navit_zoom_out_cursor(), request_navit_zoom(), WndProc(), and zoom_out_action().
void navit_zoom_out_cursor | ( | struct navit * | this_, |
int | factor | ||
) |
References navit_vehicle::follow, navit_vehicle::follow_curr, navit_get_cursor_pnt(), navit_zoom_out(), p, and vehicle.
Referenced by Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel(), and navit_cmd_zoom_out().
void navit_zoom_to_rect | ( | struct navit * | this_, |
struct coord_rect * | r | ||
) |
References c, dbg, coord_rect::lu, lvl_debug, navit_draw_async(), ready, coord_rect::rl, trans, transform_get_projection(), transform_get_size(), transform_point(), transform_set_center(), transform_set_scale(), transform_setup_source_rect(), coord::x, pcoord::x, point::x, coord::y, pcoord::y, and point::y.
Referenced by gui_internal_prepare_search_results_map(), and navit_zoom_to_route().
void navit_zoom_to_route | ( | struct navit * | this_, |
int | orientation | ||
) |
References c, coord_rect_extend(), dbg, item, item_coord_get(), item_to_name(), coord_rect::lu, lvl_debug, map_rect_destroy(), map_rect_get_item(), map_rect_new(), navit_zoom_to_rect(), orientation, coord_rect::rl, route, route_get_map(), trans, transform_set_yaw(), and item::type.
Referenced by gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_set_destination(), navit_cmd_zoom_to_route(), navit_zoom_to_route_py(), and request_navit_zoom_to_route().
struct map* read_former_destinations_from_file | ( | void | ) |
References attr::attrs, bookmarks_get_destination_file(), data, map_new(), attr::num, attr::type, type, and attr::u.
Referenced by navit_add_former_destinations_from_file().
|
static |
Change map center position by translating from "old" to "new".
References coord_new(), dbg, lvl_debug, navit_restrict_map_center_to_world_boundingbox(), transform_get_center(), transform_reverse(), transform_set_center(), coord::x, and coord::y.
Referenced by navit_handle_button(), navit_motion_timeout(), and navit_set_center_coord_screen().
|
static |
Referenced by navit_cmd_get_attr_var(), navit_cmd_set_attr_var(), and navit_destroy().
|
static |
Referenced by navit_cmd_get_int_var(), navit_cmd_set_int_var(), and navit_destroy().
GList* cmd_int_var_stack = NULL |
Referenced by navit_cmd_int_stack_size(), navit_cmd_pop_int(), navit_cmd_push_int(), and navit_destroy().
|
static |
Referenced by navit_command_add_table(), and navit_new().
struct navit* global_navit |
Referenced by navit_disable_suspend(), and navit_init().
struct gui* main_loop_gui |
Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Referenced by navit_set_gui().
struct object_func navit_func |
Referenced by navit_new(), and object_func_lookup().