Navit SVN
Classes | Functions | Variables

the navit core instance. navit is the object containing nearly everything: A set of maps, one or more vehicle, a graphics object for rendering the map, a gui object for displaying the user interface, a route object, a navigation object and so on. Be warned that it is theoretically possible to have more than one navit object

Classes

struct  navit_vehicle
 The navit_vehicule. More...
struct  navit
struct  attr_iter

Functions

void navit_add_mapset (struct navit *this_, struct mapset *ms)
struct mapsetnavit_get_mapset (struct navit *this_)
struct trackingnavit_get_tracking (struct navit *this_)
char * navit_get_user_data_directory (int create)
 Get the user data directory.
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_)
void navit_handle_resize (struct navit *this_, int w, int h)
int navit_get_width (struct navit *this_)
int navit_get_height (struct navit *this_)
int navit_ignore_button (struct navit *this_)
void navit_ignore_graphics_events (struct navit *this_, int ignore)
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)
void navit_handle_motion (struct navit *this_, struct point *p)
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)
void navit_command_add_table (struct navit *this_, struct command_table *commands, int count)
struct navitnavit_new (struct attr *parent, struct attr **attrs)
void navit_add_message (struct navit *this_, char *message)
struct messagenavit_get_messages (struct navit *this_)
struct graphicsnavit_get_graphics (struct navit *this_)
struct vehicleprofilenavit_get_vehicleprofile (struct navit *this_)
GListnavit_get_vehicleprofiles (struct navit *this_)
void navit_set_destination (struct navit *this_, struct pcoord *c, const char *description, int async)
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)
int navit_get_destination_count (struct navit *this_)
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.
struct mapread_former_destinations_from_file ()
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_, char *text)
void navit_speak (struct navit *this_)
void navit_window_roadbook_destroy (struct navit *this_)
void navit_window_roadbook_new (struct navit *this_)
void 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)
void navit_set_center_cursor (struct navit *this_, int autozoom, int keep_orientation)
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)
int navit_add_attr (struct navit *this_, struct attr *attr)
int navit_remove_attr (struct navit *this_, struct attr *attr)
struct attr_iternavit_attr_iter_new (void)
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)
void navit_set_position (struct navit *this_, struct pcoord *c)
struct guinavit_get_gui (struct navit *this_)
struct transformationnavit_get_trans (struct navit *this_)
struct routenavit_get_route (struct navit *this_)
struct navigationnavit_get_navigation (struct navit *this_)
struct displaylistnavit_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)
void navit_destroy (struct navit *this_)
struct navitnavit_ref (struct navit *this_)
void navit_unref (struct navit *this_)

Variables

struct guimain_loop_gui
struct object_func navit_func
struct navitglobal_navit
GListcmd_int_var_stack = NULL

Function Documentation

int navit_check_route ( struct navit this_)

Checks if a route is calculated.

This function checks if a route is calculated.

Parameters:
this_The navit struct whose route should be checked.
Returns:
True if the route is set, false otherwise.

References route_get_path_set().

char* navit_get_user_data_directory ( int  create)

Get the user data directory.

Parameters:
[in]create- create the directory if it does not exist
Returns:
char * to the data directory string.

returns the directory used to store user data files (center.txt, destination.txt, bookmark.txt, ...)

void navit_set_center ( struct navit this_,
struct pcoord center,
int  set_timeout 
)

Change the current zoom level

Parameters:
navitThe navit instance
centerThe point where to center the map, including its projection
Returns:
nothing

References pcoord::x, coord::x, pcoord::y, and coord::y.

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

Parameters:
navitThe navit instance
cThe coordinate to start routing to
descriptionA label which allows the user to later identify this destination in the former destinations selection
Returns:
nothing

References route_append_destination(), route_get_destination_count(), route_set_destination(), pcoord::x, and pcoord::y.

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

Parameters:
navitThe navit instance
cThe coordinate to start routing to
descriptionA label which allows the user to later identify this destination in the former destinations selection
Returns:
nothing

References route_set_destinations().

void navit_set_position ( struct navit this_,
struct pcoord c 
)

Set the position of the vehicle

Parameters:
navitThe navit instance
cThe coordinate to set as position
Returns:
nothing

References route_set_position().

void navit_zoom_in ( struct navit this_,
int  factor,
struct point p 
)

Change the current zoom level, zooming closer to the ground

Parameters:
navitThe navit instance
factorThe zoom factor, usually 2
pThe invariant point (if set to NULL, default to center)
Returns:
nothing
void navit_zoom_out ( struct navit this_,
int  factor,
struct point p 
)

Change the current zoom level

Parameters:
navitThe navit instance
factorThe zoom factor, usually 2
pThe invariant point (if set to NULL, default to center)
Returns:
nothing

Variable Documentation

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.

struct object_func navit_func
Initial value:
 {
        attr_navit,
        (object_func_new)navit_new,
        (object_func_get_attr)navit_get_attr,
        (object_func_iter_new)navit_attr_iter_new,
        (object_func_iter_destroy)navit_attr_iter_destroy,
        (object_func_set_attr)navit_set_attr,
        (object_func_add_attr)navit_add_attr,
        (object_func_remove_attr)navit_remove_attr,
        (object_func_init)navit_init,
        (object_func_destroy)navit_destroy,
        (object_func_dup)NULL,
        (object_func_ref)navit_ref,
        (object_func_unref)navit_unref,
}