navit
0.5.3-trunk
|
#include "config.h"
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <glib.h>
#include <time.h>
#include <string.h>
#include "item.h"
#include "xmlconfig.h"
#include "point.h"
#include "coord.h"
#include "graphics.h"
#include "transform.h"
#include "route.h"
#include "navit.h"
#include "plugin.h"
#include "debug.h"
#include "callback.h"
#include "color.h"
#include "vehicle.h"
#include "navigation.h"
#include "track.h"
#include "map.h"
#include "file.h"
#include "attr.h"
#include "command.h"
#include "navit_nls.h"
#include "messages.h"
#include "vehicleprofile.h"
#include "roadprofile.h"
#include "osd.h"
#include "speech.h"
#include "event.h"
#include "mapset.h"
#include "util.h"
Data Structures | |
struct | osd_priv_common |
struct | compass |
struct | route_guard |
struct | odometer |
struct | cmd_interface |
struct | stopwatch |
struct | osd_button |
struct | navigation_status |
struct | nav_next_turn |
struct | nav_toggle_announcer |
struct | osd_speed_cam_entry |
struct | osd_speed_cam |
struct | osd_speed_warner |
struct | osd_text_item |
struct | osd_text |
struct | gps_status |
struct | volume |
struct | osd_scale |
struct | auxmap |
Enumerations | |
enum | osd_speed_warner_eAnnounceState { eNoWarn =0 , eWarningTold =1 } |
enum | camera_t { CAM_FIXED =1 , CAM_TRAFFIC_LAMP , CAM_RED , CAM_SECTION , CAM_MOBILE , CAM_RAIL , CAM_TRAFFIPAX } |
enum | cam_dir_t { CAMDIR_ALL =0 , CAMDIR_ONE , CAMDIR_TWO } |
Functions | |
int | set_std_osd_attr (struct osd_priv *priv, struct attr *the_attr) |
static void | osd_odometer_reset (struct osd_priv_common *opc, int flags) |
static int | osd_cmd_odometer_reset (struct navit *this, char *function, struct attr **in, struct attr ***out) |
static void | osd_odometer_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *v) |
static struct osd_text_item * | oti_new (struct osd_text_item *parent) |
Creates a new osd_text_item and inserts it into a linked list. More... | |
int | osd_button_set_attr (struct osd_priv_common *opc, struct attr *attr) |
static void | transform_rotate (struct point *center, int angle, struct point *p, int count) |
Rotate a group of points around a center . More... | |
static void | transform_move (int dx, int dy, struct point *p, int count) |
Move a group of points in a direction (adding dx and dy to their x and y coordinates) More... | |
static void | draw_compass (struct graphics *gr, struct graphics_gc *gc_n, struct graphics_gc *gc_s, struct point *p, int r, int dir) |
Draw a compass handle of length r , centered at point p , pointing to direction dir . More... | |
static void | draw_handle (struct graphics *gr, struct graphics_gc *gc, struct point *p, int r, int dir) |
Draw an arrow of length r , centered at point p , with color gc , pointing to direction dir . More... | |
static char * | format_distance (double distance, char *sep, int imperial) |
static char * | format_time (struct tm *tm, int days) |
static char * | format_speed (double speed, char *sep, char *format, int imperial) |
static char * | format_float_0 (double num) |
static void | osd_route_guard_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *v) |
static void | osd_route_guard_init (struct osd_priv_common *opc, struct navit *nav) |
static void | osd_route_guard_destroy (struct osd_priv_common *opc) |
static struct osd_priv * | osd_route_guard_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static char * | str_replace (char *output, char *input, char *pattern, char *replacement) |
static char * | osd_odometer_to_string (struct odometer *this_) |
static void | osd_odometer_from_string (struct odometer *this_, char *str) |
static void | draw_multiline_osd_text (char *buffer, struct osd_item *osd_item, struct graphics_gc *curr_color) |
static void | draw_aligned_osd_text (char *buffer, int align, struct osd_item *osd_item, struct graphics_gc *curr_color) |
static void | osd_odometer_click (struct osd_priv_common *opc, struct navit *nav, int pressed, int button, struct point *p) |
static int | osd_odometer_save (struct navit *nav) |
static void | osd_odometer_init (struct osd_priv_common *opc, struct navit *nav) |
static void | osd_odometer_destroy (struct navit *nav) |
static struct osd_priv * | osd_odometer_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_cmd_interface_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *v) |
static void | osd_cmd_interface_init (struct osd_priv_common *opc, struct navit *nav) |
static int | osd_cmd_interface_set_attr (struct osd_priv_common *opc, struct attr *attr) |
static struct osd_priv * | osd_cmd_interface_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_stopwatch_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *v) |
static void | osd_stopwatch_click (struct osd_priv_common *opc, struct navit *nav, int pressed, int button, struct point *p) |
static void | osd_stopwatch_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_stopwatch_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_compass_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *v) |
Draw the compass on the OSD (includes north and destination direction) More... | |
static void | osd_compass_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_compass_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_button_adjust_sizes (struct osd_priv_common *opc, struct graphics_image *img) |
Adjusts width and height of an OSD item to fit the image it displays. More... | |
static void | osd_button_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *unused) |
static void | osd_button_init (struct osd_priv_common *opc, struct navit *nav) |
static char * | osd_button_icon_path (struct osd_button *this_, char *src) |
static struct osd_priv * | osd_button_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_image_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_image_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_navigation_status_draw_do (struct osd_priv_common *opc, int status) |
Draws a navigation_status OSD. More... | |
static void | osd_navigation_status_draw (struct osd_priv *osd, struct navit *navit, struct vehicle *v) |
Draws a navigation_status OSD. More... | |
static void | osd_navigation_status_init (struct osd_priv_common *opc, struct navit *navit) |
Initializes a new. More... | |
static struct osd_priv * | osd_navigation_status_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
Creates a new. More... | |
static void | osd_nav_next_turn_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_nav_next_turn_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_nav_next_turn_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_nav_toggle_announcer_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_nav_toggle_announcer_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_nav_toggle_announcer_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static double | angle_diff (int firstAngle, int secondAngle) |
static void | osd_speed_cam_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_speed_cam_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_speed_cam_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_speed_warner_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_speed_warner_click (struct osd_priv_common *opc, struct navit *nav, int pressed, int button, struct point *p) |
static void | osd_speed_warner_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_speed_warner_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static char * | osd_text_format_attr (struct attr *attr, char *format, int imperial) |
Formats a text attribute. More... | |
static char * | osd_text_split (char *in, char **index) |
Parses a string of the form key.subkey or key[index].subkey into its components, where subkey can itself have its own index and further subkeys. More... | |
static void | osd_text_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_text_prepare (struct osd_priv_common *opc, struct navit *nav) |
Prepares a text type OSD element. More... | |
static void | osd_text_init (struct osd_priv_common *opc, struct navit *nav) |
static int | osd_text_set_attr (struct osd_priv_common *opc, struct attr *attr) |
static struct osd_priv * | osd_text_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_gps_status_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *v) |
static void | osd_gps_status_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_gps_status_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_volume_draw (struct osd_priv_common *opc, struct navit *navit, struct vehicle *unused) |
static void | osd_volume_click (struct osd_priv_common *opc, struct navit *nav, int pressed, int button, struct point *p) |
static void | osd_volume_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_volume_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static int | round_to_nice_value (double value) |
static void | osd_scale_draw (struct osd_priv_common *opc, struct navit *nav, struct vehicle *unused) |
static void | osd_scale_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_scale_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static void | osd_auxmap_draw (struct osd_priv_common *opc) |
static void | osd_auxmap_init (struct osd_priv_common *opc, struct navit *nav) |
static struct osd_priv * | osd_auxmap_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
void | plugin_init (void) |
Variables | |
static int | b_commandtable_added = 0 |
static int | odometers_saved = 0 |
static GList * | odometer_list = NULL |
static struct command_table | commands [] |
char * | camera_t_strs [] = {"None","Fix","Traffic lamp","Red detect","Section","Mobile","Rail","Traffipax(non persistent)"} |
char * | camdir_t_strs [] = {"All dir.","UNI-dir","BI-dir"} |
enum cam_dir_t |
enum camera_t |
|
static |
Referenced by osd_speed_cam_draw().
|
static |
buffer | pointer to a string containing the text to be displayed |
align | alignment setting (to be taken form the osd attribute) |
osd_item | the osd item to work on |
curr_color | the color in which the osd text should be visible (defaults to osd_items foreground color) |
References dbg, do_draw(), osd_item::do_draw, draw_mode_end, osd_item::font, osd_item::font_size, osd_item::gr, osd_item::graphic_fg_text, graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, height, lvl_debug, next, osd_fill_with_bgcolor(), osd_std_resize(), p, osd_item::w, and point::x.
Referenced by osd_odometer_draw().
|
static |
Draw a compass handle of length r
, centered at point p
, pointing to direction dir
.
gr | The graphics instance on which to draw |
gc_n | The color to use for the north half of the compass |
gc_s | The color to use for the south half of the compass |
p | The center of the compass |
r | The radius of the compass (around the center point p ) |
dir | The direction the compass points to (0 being up, value is in degrees counter-clockwise) |
References graphics_draw_polygon_clipped(), graphics_draw_polyline_clipped(), p, transform_rotate(), point::x, and point::y.
Referenced by osd_compass_draw().
|
static |
Draw an arrow of length r
, centered at point p
, with color gc
, pointing to direction dir
.
gr | The graphics instance on which to draw |
gc | The color to draw the arrow |
p | The center of the compass |
r | The radius of the compass (around the center point p ) |
dir | The direction the arrow points to (0 being up, value is in degrees counter-clockwise) |
References graphics_draw_lines(), p, transform_move(), transform_rotate(), point::x, and point::y.
Referenced by osd_compass_draw().
|
static |
References bbox(), osd_item::font, osd_item::gr, graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, p, and osd_item::w.
Referenced by osd_cmd_interface_draw(), and osd_speed_cam_draw().
|
static |
distance | distance in meters |
sep | separator character to be inserted between distance value and unit |
References FEET_PER_METER, and FEET_PER_MILE.
Referenced by osd_compass_draw(), osd_odometer_draw(), osd_route_guard_draw(), osd_scale_draw(), osd_speed_cam_draw(), and osd_text_format_attr().
|
static |
Referenced by osd_text_format_attr().
|
static |
speed | speed in km/h |
sep | separator character to be inserted between speed value and unit |
References FEET_PER_METER, and FEET_PER_MILE.
Referenced by osd_odometer_draw(), osd_speed_warner_draw(), osd_text_draw(), and osd_text_format_attr().
|
static |
tm | pointer to a tm structure specifying the time |
days | days |
Referenced by osd_text_format_attr().
|
static |
References osd_item::configured, osd_priv_common::data, dbg, draw_mode_end, osd_item::gr, graphics_displaylist_draw(), graphics_draw(), graphics_draw_circle(), graphics_draw_mode(), graphics_set_rect(), osd_item::h, lvl_debug, auxmap::nav, navit_get_attr(), osd_priv_common::osd_item, p, map_selection::p_rect, osd_item::rel_h, osd_item::rel_w, point_rect::rl, transform_get_center(), transform_get_projection(), transform_get_yaw(), transform_set_center(), transform_set_projection(), transform_set_scale(), transform_set_screen_selection(), transform_set_yaw(), transform_setup_source_rect(), map_selection::u, osd_item::w, point::x, and point::y.
|
static |
References center, osd_priv_common::data, and projection_mg.
Referenced by osd_auxmap_new().
|
static |
|
static |
Adjusts width and height of an OSD item to fit the image it displays.
A width or height of 0%, stored in relative attributes as
, is used as a flag indicating that the respective dimension is unset, i.e. determined by the dimensions of its image.
If this is the case for height and/or width, the respective dimension will be updated to fit the image.
Note that this method is used by several OSD items, notably
,
and
.
opc | The OSD item |
img | The image displayed by the item |
References ATTR_REL_RELSHIFT, osd_item::h, graphics_image::height, osd_priv_common::osd_item, osd_item::rel_h, osd_item::rel_w, osd_item::w, and graphics_image::width.
Referenced by osd_button_draw(), osd_button_init(), and osd_image_init().
|
static |
References osd_item::configured, osd_priv_common::data, dbg, osd_item::gr, osd_item::graphic_bg, graphics_draw_image(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, graphics_image::height, lvl_warning, navit_get_blocked(), navit_get_graphics(), navit_get_height(), navit_get_width(), osd_button_adjust_sizes(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, osd_std_calculate_sizes(), p, osd_item::p, osd_item::w, and graphics_image::width.
Referenced by osd_button_init(), osd_button_new(), osd_button_set_attr(), osd_image_init(), and osd_image_new().
|
static |
References graphics_icon_path(), and osd_button::src_dir.
Referenced by osd_button_new(), and osd_button_set_attr().
|
static |
References callback_cast, callback_new_attr_1, callback_new_attr_2, osd_priv_common::data, dbg, draw_mode_end, osd_item::gr, osd_item::graphic_bg, graphics_add_callback(), graphics_draw_image(), graphics_draw_mode(), graphics_gc_new(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, graphics_image::height, osd_button::img, lvl_debug, lvl_warning, navit_add_callback(), navit_get_graphics(), navit_get_height(), navit_get_width(), osd_button_adjust_sizes(), osd_button_draw(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, osd_set_keypress(), osd_set_std_config(), osd_set_std_graphic(), osd_std_calculate_sizes(), osd_std_click(), p, osd_item::rel_h, osd_item::rel_w, osd_button::src, osd_button::use_overlay, osd_item::w, and graphics_image::width.
Referenced by osd_button_new().
|
static |
References ATTR_REL_RELSHIFT, attr_search(), attr::attrs, b_commandtable_added, callback_cast, callback_new_attr_1, osd_item::command, commands, osd_priv_common::data, dbg, DISABLE_OVERLAY, osd_item_methods::draw, graphics_icon_path(), lvl_error, osd_item::meth, osd_item::navit, navit_add_callback(), navit_command_add_table(), attr::num, osd_button_draw(), osd_button_icon_path(), osd_button_init(), osd_button_set_attr(), osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_methods::set_attr, set_std_osd_attr(), osd_priv_common::spec_set_attr_func, attr::str, TRANSPARENT_BG, and attr::u.
int osd_button_set_attr | ( | struct osd_priv_common * | opc, |
struct attr * | attr | ||
) |
References osd_priv_common::data, dbg, graphics_image_new_scaled(), osd_item::h, osd_button::img, lvl_warning, osd_item::navit, navit_draw(), navit_get_blocked(), navit_get_graphics(), osd_button_draw(), osd_button_icon_path(), osd_priv_common::osd_item, osd_button::src, attr::str, attr::type, attr::u, and osd_item::w.
Referenced by osd_button_new(), and osd_image_new().
|
static |
References bbox(), cmd_interface::bReserved, command(), command_evaluate(), osd_priv_common::data, draw_mode_end, draw_multiline_osd_text(), osd_item::font, osd_item::gr, osd_item::graphic_bg, osd_item::graphic_fg, graphics_draw_image(), graphics_draw_mode(), graphics_get_text_bbox(), osd_item::h, cmd_interface::img, osd_item::navit, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, cmd_interface::text, and osd_item::w.
Referenced by osd_cmd_interface_init(), and osd_cmd_interface_new().
|
static |
References callback_cast, callback_new_1, callback_new_attr_1, osd_priv_common::data, event_add_timeout(), osd_item::gr, osd_item::graphic_fg, graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), navit_add_callback(), osd_cmd_interface_draw(), osd_priv_common::osd_item, osd_set_std_graphic(), osd_std_click(), cmd_interface::text, osd_item::text_color, and cmd_interface::update_period.
Referenced by osd_cmd_interface_new().
|
static |
References attr_search(), attr::attrs, b_commandtable_added, callback_cast, callback_new_attr_1, command(), commands, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), navit_command_add_table(), attr::num, osd_cmd_interface_draw(), osd_cmd_interface_init(), osd_cmd_interface_set_attr(), osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), osd_priv_common::spec_set_attr_func, attr::str, attr::u, and width.
|
static |
|
static |
References ATTR_IS_STRING, odometer_list, osd_odometer_draw(), osd_odometer_reset(), attr::str, type, and attr::u.
|
static |
Draw the compass on the OSD (includes north and destination direction)
opc | A contextual private data pointer (see struct osd_priv_common) |
nav | The global navit object |
v | The current vehicle |
References bbox(), c1, c2, osd_priv_common::data, draw_compass(), draw_handle(), draw_mode_end, osd_item::font, format_distance(), osd_item::gr, osd_item::graphic_fg, graphics_draw_circle(), graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, M_PI, navit_get_attr(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, transform_distance(), transform_from_geo(), vehicle_get_attr(), and osd_item::w.
Referenced by osd_compass_init(), and osd_compass_new().
|
static |
References callback_cast, callback_new_attr_1, compass::click_cb, osd_item::command, osd_priv_common::data, compass::destination_dir_color, compass::destination_dir_gc, osd_item::gr, osd_item::graphic_fg, graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), navit_add_callback(), compass::north_color, compass::north_gc, osd_compass_draw(), osd_priv_common::osd_item, osd_set_std_graphic(), osd_std_click(), osd_item::text_color, and width.
Referenced by osd_compass_new().
|
static |
References attr_search(), callback_cast, callback_new_attr_1, attr::color, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_compass_draw(), osd_compass_init(), osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::u, and width.
|
static |
References active, osd_priv_common::data, dbg, do_draw(), osd_item::do_draw, draw_mode_end, osd_item::gr, osd_item::graphic_fg, graphics_draw_image(), graphics_draw_mode(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, gps_status::icon_src, lvl_debug, navit_get_attr(), attr::num, attr::numd, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, gps_status::strength, attr::u, vehicle_get_attr(), and osd_item::w.
Referenced by osd_gps_status_init(), and osd_gps_status_new().
|
static |
References callback_cast, callback_new_attr_1, navit_add_callback(), osd_gps_status_draw(), osd_priv_common::osd_item, and osd_set_std_graphic().
Referenced by osd_gps_status_new().
|
static |
References active, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), osd_item::font_size, graphics_icon_path(), osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_gps_status_draw(), osd_gps_status_init(), osd_priv_common::osd_item, osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and file_wordexp::we.
|
static |
References callback_cast, callback_new_attr_2, osd_priv_common::data, dbg, draw_mode_end, osd_item::gr, osd_item::graphic_bg, graphics_add_callback(), graphics_draw_image(), graphics_draw_mode(), graphics_gc_new(), graphics_image_free(), graphics_image_new(), graphics_image::height, osd_button::img, lvl_debug, lvl_warning, navit_get_graphics(), osd_button_adjust_sizes(), osd_button_draw(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, osd_set_std_config(), osd_set_std_graphic(), p, osd_button::src, osd_button::use_overlay, and graphics_image::width.
Referenced by osd_image_new().
|
static |
References ATTR_REL_RELSHIFT, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, dbg, DISABLE_OVERLAY, osd_item_methods::draw, graphics_icon_path(), lvl_error, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_button_draw(), osd_button_set_attr(), osd_draw_cast, osd_image_init(), osd_priv_common::osd_item, osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_methods::set_attr, set_std_osd_attr(), osd_priv_common::spec_set_attr_func, attr::str, TRANSPARENT_BG, and attr::u.
|
static |
References active, osd_priv_common::data, dbg, do_draw(), osd_item::do_draw, draw_mode_end, osd_item::gr, graphics_draw_image(), graphics_draw_mode(), graphics_icon_path(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, nav_next_turn::icon_h, nav_next_turn::icon_src, nav_next_turn::icon_w, item_to_name(), nav_next_turn::last_name, lvl_debug, lvl_error, map_rect_destroy(), map_rect_get_item(), map_rect_new(), name, navigation_get_map(), navit_get_navigation(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, item::type, and osd_item::w.
Referenced by osd_nav_next_turn_init(), and osd_nav_next_turn_new().
|
static |
References callback_cast, callback_new_attr_1, navit_add_callback(), osd_priv_common::osd_item, osd_nav_next_turn_draw(), osd_set_std_graphic(), and osd_std_click().
Referenced by osd_nav_next_turn_new().
|
static |
References active, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), osd_item::font_size, graphics_icon_path(), osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_nav_next_turn_draw(), osd_nav_next_turn_init(), osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and file_wordexp::we.
|
static |
References active, osd_priv_common::data, dbg, do_draw(), osd_item::do_draw, draw_mode_begin, draw_mode_end, osd_item::gr, osd_item::graphic_bg, osd_item::graphic_fg, graphics_draw_image(), graphics_draw_mode(), graphics_draw_rectangle(), graphics_icon_path(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, nav_toggle_announcer::icon_src, nav_toggle_announcer::last_state, lvl_debug, lvl_error, navit_get_attr(), attr::num, osd_priv_common::osd_item, p, speech_get_attr(), attr::u, and osd_item::w.
Referenced by osd_nav_toggle_announcer_init(), and osd_nav_toggle_announcer_new().
|
static |
|
static |
References attr_search(), attr::attrs, callback_cast, callback_new_attr_1, command(), osd_item::command, osd_priv_common::data, osd_item_methods::draw, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), graphics_icon_path(), osd_item::meth, osd_item::navit, navit_add_callback(), osd_draw_cast, osd_priv_common::osd_item, osd_nav_toggle_announcer_draw(), osd_nav_toggle_announcer_init(), osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and file_wordexp::we.
|
static |
Draws a navigation_status
OSD.
This is the draw method for the OSD. It exposes the standard signature for the draw
method and acts as a wrapper around osd_navigation_status_draw_do()
.
osd | The OSD to draw. |
navit | The navit instance |
v | The vehicle (not used but part of the prototype) |
References navigation_get_attr(), navit_get_navigation(), attr::num, osd_navigation_status_draw_do(), and attr::u.
Referenced by osd_navigation_status_new().
|
static |
Draws a navigation_status
OSD.
This method performs the actual operation of selecting and drawing the image. It can be called directly as a callback method for the navigation.nav_status
attribute, or indirectly through the draw method.
opc | The OSD to draw |
status | The status of the navigation engine (the value of the attribute) |
References osd_priv_common::data, dbg, do_draw(), osd_item::do_draw, draw_mode_end, osd_item::gr, graphics_draw_image(), graphics_draw_mode(), graphics_icon_path(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, navigation_status::icon_h, navigation_status::icon_src, navigation_status::icon_w, navigation_status::last_status, lvl_debug, lvl_error, nav_status_to_text(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, status_invalid, and osd_item::w.
Referenced by osd_navigation_status_draw(), and osd_navigation_status_init().
|
static |
Initializes a new.
OSD.
This function is registered as a callback function in osd_navigation_status_new(struct navit *, struct osd_methods *, struct attr **). It is called after graphics initialization has finished and can be used for any initialization tasks which rely on a functional graphics system.
opc | The OSD to initialize |
navit | The navit instance |
References callback_cast, callback_new_attr_1, dbg, lvl_debug, lvl_error, navigation_get_attr(), navigation_register_callback(), navit_get_navigation(), attr::num, osd_priv_common::osd_item, osd_navigation_status_draw_do(), osd_set_std_graphic(), and attr::u.
Referenced by osd_navigation_status_new().
|
static |
Creates a new.
OSD.
This initializes the data structures and registers osd_navigation_status_init(struct osd_priv_common *, struct navit *) as a callback.
Note that this function runs before the graphics system has been initialized. Therefore, code that requires a functional graphics system must be placed in osd_navigation_status_init(struct osd_priv_common *, struct navit *).
nav | The navit instance |
meth | The methods for the new OSD |
attrs | The attributes for the new OSD |
References attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), osd_item::font_size, graphics_icon_path(), osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_navigation_status_draw(), osd_navigation_status_init(), osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), status_invalid, attr::str, attr::u, and file_wordexp::we.
|
static |
References odometer::bActive, osd_item::configured, osd_priv_common::data, osd_item::h, odometer::last_click_time, odometer::last_coord, navit_ignore_button(), osd_priv_common::osd_item, osd_odometer_draw(), osd_odometer_reset(), osd_wrap_point(), p, osd_item::p, osd_item::pressed, odometer::sum_time, osd_item::w, coord::x, and coord::y.
Referenced by osd_odometer_init().
|
static |
References odometers_saved, and osd_odometer_save().
Referenced by osd_odometer_new().
|
static |
References odometer::bActive, attr::coord_geo, osd_priv_common::data, draw_aligned_osd_text(), draw_mode_end, format_distance(), format_speed(), osd_item::gr, osd_item::graphic_fg, graphics_draw_mode(), odometer::last_coord, navit_get_attr(), osd_fill_with_bgcolor(), osd_priv_common::osd_item, projection_mg, str_replace(), transform_distance(), transform_from_geo(), attr::u, vehicle_get_attr(), and coord::x.
Referenced by osd_cmd_odometer_reset(), osd_odometer_click(), osd_odometer_init(), and osd_odometer_new().
|
static |
References odometer::bActive, odometer::last_coord, odometer::max_speed, odometer::name, odometer::sum_dist, odometer::sum_time, and coord::x.
Referenced by osd_odometer_new().
|
static |
References odometer::autosave_period, odometer::bActive, odometer::bAutoStart, callback_cast, callback_new_1, callback_new_attr_1, odometer::click_cb, osd_priv_common::data, event_add_timeout(), osd_item::gr, osd_item::graphic_fg, graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), odometer::idle_color, navit_add_callback(), odometer::orange, osd_priv_common::osd_item, osd_odometer_click(), osd_odometer_draw(), osd_odometer_save(), osd_set_std_graphic(), osd_item::text_color, and width.
Referenced by osd_odometer_new().
|
static |
References attr_search(), b_commandtable_added, callback_cast, callback_new_attr_1, attr::color, commands, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, name, osd_item::navit, navit_add_callback(), navit_command_add_table(), navit_get_user_data_directory(), attr::num, odometer_list, osd_draw_cast, osd_priv_common::osd_item, osd_odometer_destroy(), osd_odometer_draw(), osd_odometer_from_string(), osd_odometer_init(), osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and width.
|
static |
References odometer::bActive, osd_priv_common::data, odometer::last_coord, odometer::last_start_time, odometer::max_speed, odometer::sum_dist, odometer::sum_time, coord::x, and coord::y.
Referenced by osd_cmd_odometer_reset(), and osd_odometer_click().
|
static |
References navit_get_user_data_directory(), odometer_list, and osd_odometer_to_string().
Referenced by osd_odometer_destroy(), and osd_odometer_init().
|
static |
References odometer::bActive, odometer::max_speed, odometer::name, odometer::sum_dist, and odometer::time_all.
Referenced by osd_odometer_save().
|
static |
References route_guard::coords, and osd_priv_common::data.
Referenced by osd_route_guard_new().
|
static |
References _, bbox(), attr::coord_geo, route_guard::coord_num, osd_priv_common::data, draw_mode_end, osd_item::font, format_distance(), osd_item::gr, osd_item::graphic_fg, graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, route_guard::last_time, route_guard::min_dist, navit_get_attr(), navit_say(), attr::num, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, projection_mg, transform_distance(), transform_distance_line_sq(), transform_from_geo(), transform_scale(), attr::u, route_guard::update_period, attr::vehicle, vehicle_get_attr(), osd_item::w, and coord::y.
Referenced by osd_route_guard_init(), and osd_route_guard_new().
|
static |
References c, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item::gr, osd_item::graphic_fg, graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), item_attr_get(), item_coord_get(), map_get_attr(), route_guard::map_name, map_rect_get_item(), map_rect_new(), mapset_close(), mapset_next(), mapset_open(), navit_add_callback(), navit_get_mapset(), osd_priv_common::osd_item, osd_route_guard_draw(), osd_set_std_graphic(), attr::str, osd_item::text_color, attr::u, and width.
Referenced by osd_route_guard_new().
|
static |
References attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_route_guard_destroy(), osd_route_guard_draw(), osd_route_guard_init(), osd_set_std_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and width.
|
static |
References bbox(), osd_priv_common::data, draw_mode_begin, draw_mode_end, osd_item::font, format_distance(), osd_item::gr, osd_item::graphic_bg, osd_item::graphic_fg, osd_item::graphic_fg_text, graphics_draw_lines(), graphics_draw_mode(), graphics_draw_rectangle(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, navit_get_attr(), navit_get_height(), navit_get_width(), osd_priv_common::osd_item, osd_std_calculate_sizes(), p, round_to_nice_value(), transform_pixels_to_map_distance(), osd_scale::use_overlay, osd_item::w, point::x, and point::y.
Referenced by osd_scale_init(), and osd_scale_new().
|
static |
References color::a, color::b, callback_cast, callback_new_attr_2, COLOR_IS_SAME, osd_priv_common::data, color::g, graphics_add_callback(), navit_get_graphics(), navit_get_ready(), osd_priv_common::osd_item, osd_scale_draw(), osd_set_std_graphic(), color::r, and osd_item::text_color.
Referenced by osd_scale_new().
|
static |
References callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), osd_draw_cast, osd_priv_common::osd_item, osd_scale_draw(), osd_scale_init(), osd_set_std_attr(), osd_methods::set_attr, set_std_osd_attr(), and TRANSPARENT_BG.
|
static |
References _, angle_diff(), osd_speed_cam::announce_on, osd_speed_cam::announce_state, bbox(), CAM_TRAFFIPAX, CAMDIR_ONE, camdir_t_strs, CAMDIR_TWO, camera_t_strs, osd_item::configured, attr::coord_geo, osd_priv_common::data, draw_mode_end, draw_multiline_osd_text(), eNoWarn, eWarningTold, osd_speed_cam::flags, osd_item::font, format_distance(), osd_item::gr, graphics_draw_mode(), graphics_get_text_bbox(), graphics_overlay_disable(), item_attr_get(), item_coord_get(), map_get_attr(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), mapset_close(), mapset_next(), mapset_open(), navit_get_attr(), navit_get_mapset(), navit_say(), attr::num, osd_speed_cam::orange, osd_fill_with_bgcolor(), osd_priv_common::osd_item, projection_mg, osd_speed_cam::red, attr::str, str_replace(), osd_speed_cam::text, transform_distance(), transform_distance_sq(), transform_from_geo(), item::type, attr::u, and vehicle_get_attr().
Referenced by osd_speed_cam_new().
|
static |
References osd_priv_common::data.
Referenced by osd_speed_cam_new().
|
static |
References attr_search(), attr::attrs, callback_cast, callback_new_attr_1, attr::color, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, osd_item::h, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_speed_cam_draw(), osd_speed_cam_init(), osd_item::p, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::text, attr::u, osd_item::w, width, point::x, and point::y.
|
static |
|
static |
References _, active, AF_SPEED_LIMIT, bbox(), osd_speed_warner::d, osd_priv_common::data, draw_mode_end, eNoWarn, eWarningTold, osd_item::font, format_speed(), osd_item::gr, osd_item::graphic_bg, graphics_draw_circle(), graphics_draw_image(), graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, item, roadprofile::maxspeed, navit_get_attr(), navit_get_tracking(), navit_get_vehicleprofile(), navit_say(), attr::num, attr::numd, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, tracking_get_attr(), tracking_get_current_flags(), tracking_get_current_item(), item::type, attr::u, vehicleprofile_get_roadprofile(), osd_item::w, point::x, and point::y.
Referenced by osd_speed_warner_click(), and osd_speed_warner_new().
|
static |
References osd_priv_common::data.
Referenced by osd_speed_warner_new().
|
static |
References active, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_speed_warner_draw(), osd_speed_warner_init(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, and attr::u.
|
static |
References stopwatch::bActive, stopwatch::bDisableReset, osd_item::configured, stopwatch::current_base_time, osd_priv_common::data, osd_item::h, stopwatch::last_click_time, navit_ignore_button(), osd_priv_common::osd_item, osd_stopwatch_draw(), osd_wrap_point(), p, osd_item::p, osd_item::pressed, stopwatch::sum_time, and osd_item::w.
Referenced by osd_stopwatch_init().
|
static |
References stopwatch::bActive, bbox(), stopwatch::current_base_time, osd_priv_common::data, draw_mode_end, osd_item::font, osd_item::gr, osd_item::graphic_fg, graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, stopwatch::orange, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, and osd_item::w.
Referenced by osd_stopwatch_click(), osd_stopwatch_init(), and osd_stopwatch_new().
|
static |
References callback_cast, callback_new_1, callback_new_attr_1, stopwatch::click_cb, osd_priv_common::data, event_add_timeout(), osd_item::gr, osd_item::graphic_fg, graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), stopwatch::idle_color, navit_add_callback(), stopwatch::orange, osd_priv_common::osd_item, osd_set_std_graphic(), osd_stopwatch_click(), osd_stopwatch_draw(), osd_item::text_color, and width.
Referenced by osd_stopwatch_new().
|
static |
References attr_search(), callback_cast, callback_new_attr_1, attr::color, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_stopwatch_draw(), osd_stopwatch_init(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::u, and width.
|
static |
References AF_SPEED_LIMIT, attr_to_name(), osd_priv_common::data, dbg, do_draw(), osd_item::do_draw, draw_mode_end, osd_item::font, osd_item::font_size, format_speed(), osd_item::gr, osd_item::graphic_fg_text, graphics_draw_mode(), graphics_draw_text(), graphics_get_text_bbox(), osd_item::h, height, item_attr_get(), item_to_name(), osd_text::last, lvl_debug, map_rect_destroy(), map_rect_get_item(), map_rect_new(), navigation_get_map(), navit_get_attr(), navit_get_messages(), navit_get_navigation(), navit_get_tracking(), navit_get_vehicleprofile(), next, message::next, offset, osd_fill_with_bgcolor(), osd_priv_common::osd_item, osd_std_resize(), osd_text_format_attr(), p, roadprofile::speed, message::text, tracking_get_attr(), tracking_get_current_flags(), tracking_get_current_item(), item::type, value, navit::vehicle, vehicle_get_attr(), vehicleprofile_get_roadprofile(), and osd_item::w.
Referenced by osd_text_init(), osd_text_new(), osd_text_prepare(), and osd_text_set_attr().
|
static |
Formats a text attribute.
Returns the formatted current value of an attribute as a string
attr | The attribute to be formatted |
format | A string specifying how to format the attribute. Allowed format strings depend on the attribute; this member can be NULL. |
imperial | True to convert values to imperial, false to return metric values |
johnk 8/13/2020 if format is "feet" then return feet else if format is "imperial" return meters or feet as controlled by "imperial" return meters
References attr_to_text(), attr::coord_geo, DEGREES_DECIMAL, DEGREES_MINUTES, DEGREES_MINUTES_SECONDS, FEET_PER_METER, format_distance(), format_float_0(), format_speed(), format_time(), iso8601_to_secs(), coord_geo::lat, coord_geo::lng, attr::num, attr::numd, startup::pos, attr::str, attr::type, and attr::u.
Referenced by osd_text_draw().
|
static |
References callback_cast, callback_new_attr_1, navit_add_callback(), osd_priv_common::osd_item, osd_set_std_graphic(), osd_std_click(), osd_text_draw(), and osd_text_prepare().
Referenced by osd_text_new().
|
static |
References active, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, osd_item::font_size, ITEM_HAS_TEXT, osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_text_draw(), osd_text_init(), osd_text_set_attr(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), osd_priv_common::spec_set_attr_func, attr::str, attr::text, and attr::u.
|
static |
Prepares a text type OSD element.
This function parses the label string (as specified in the XML file) for a text type OSD element into attributes and static text.
opc | The struct osd_priv_common
Definition: osd_core.c:75 opc->data->items
Definition: osd_core.c:2863 |
nav | The navit structure |
References attr_from_name(), callback_cast, callback_new_attr_1, osd_priv_common::data, osd_text::items, key, navit_add_callback(), osd_text_draw(), osd_text_split(), oti_new(), osd_text_item::root, and osd_text::text.
Referenced by osd_text_init(), and osd_text_set_attr().
|
static |
References osd_priv_common::data, osd_item::navit, navit_draw(), navit_get_blocked(), osd_priv_common::osd_item, osd_text_draw(), osd_text_prepare(), attr::str, osd_text::text, attr::type, and attr::u.
Referenced by osd_text_new().
|
static |
Parses a string of the form key.subkey or key[index].subkey into its components, where subkey can itself have its own index and further subkeys.
in | String to parse (the part before subkey will be modified by the function); upon returning this pointer will point to a string containing key |
index | Pointer to an address that will receive a pointer to a string containing index or NULL if key does not have an index |
References startup::pos.
Referenced by osd_text_prepare().
|
static |
References osd_priv_common::data, osd_item::h, navit_ignore_button(), osd_priv_common::osd_item, osd_volume_draw(), p, osd_item::p, osd_item::pressed, volume::strength, and osd_item::w.
Referenced by osd_volume_init().
|
static |
References active, osd_priv_common::data, draw_mode_end, osd_item::gr, osd_item::graphic_fg, graphics_draw_image(), graphics_draw_mode(), graphics_image_free(), graphics_image_new_scaled(), osd_item::h, volume::icon_src, osd_fill_with_bgcolor(), osd_priv_common::osd_item, p, volume::strength, and osd_item::w.
Referenced by osd_volume_click(), osd_volume_init(), and osd_volume_new().
|
static |
References callback_cast, callback_new_attr_1, volume::click_cb, osd_priv_common::data, navit_add_callback(), osd_priv_common::osd_item, osd_set_std_graphic(), osd_volume_click(), and osd_volume_draw().
Referenced by osd_volume_new().
|
static |
References active, attr_search(), attr::attrs, callback_cast, callback_new_attr_1, osd_priv_common::data, osd_item_methods::draw, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), osd_item::font_size, graphics_icon_path(), osd_item::meth, osd_item::navit, navit_add_callback(), attr::num, osd_draw_cast, osd_priv_common::osd_item, osd_set_std_attr(), osd_volume_draw(), osd_volume_init(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_methods::set_attr, set_std_osd_attr(), attr::str, attr::u, and file_wordexp::we.
|
static |
Creates a new osd_text_item and inserts it into a linked list.
parent | The preceding in the list. If NULL, the new item becomes the root element of a new list |
References osd_text_item::next, osd_text_item::prev, and osd_text_item::root.
Referenced by osd_text_prepare().
void plugin_init | ( | void | ) |
|
static |
References value.
Referenced by osd_scale_draw().
int set_std_osd_attr | ( | struct osd_priv * | priv, |
struct attr * | the_attr | ||
) |
References ATTR_IS_INT, osd_item::font_size, osd_item::gr, osd_item::navit, navit_get_height(), navit_get_width(), attr::num, osd_priv_common::osd_item, osd_std_calculate_sizes(), osd_std_resize(), osd_item::rel_h, osd_item::rel_w, osd_item::rel_x, osd_item::rel_y, osd_priv_common::spec_set_attr_func, attr::type, and attr::u.
Referenced by osd_auxmap_new(), osd_button_new(), osd_cmd_interface_new(), osd_compass_new(), osd_gps_status_new(), osd_image_new(), osd_nav_next_turn_new(), osd_nav_toggle_announcer_new(), osd_navigation_status_new(), osd_odometer_new(), osd_route_guard_new(), osd_scale_new(), osd_speed_cam_new(), osd_speed_warner_new(), osd_stopwatch_new(), osd_text_new(), and osd_volume_new().
|
static |
References startup::pos.
Referenced by osd_odometer_draw(), and osd_speed_cam_draw().
|
static |
Move a group of points in a direction (adding dx
and dy
to their x and y coordinates)
dx | The shift to perform to the x axis | |
dy | The shift to perform to the y axis | |
[in,out] | p | An array of points to move |
count | The number of points stored inside p |
References p.
Referenced by draw_handle().
|
static |
Rotate a group of points around a center
.
center | The coordinates of the center of the rotation to apply | |
angle | The angle of the rotation | |
[in,out] | p | An array of points to rotate |
count | The number of points stored inside p |
References center, M_PI, and p.
Referenced by draw_compass(), and draw_handle().
|
static |
Referenced by osd_button_new(), osd_cmd_interface_new(), and osd_odometer_new().
char* camdir_t_strs[] = {"All dir.","UNI-dir","BI-dir"} |
Referenced by osd_speed_cam_draw().
char* camera_t_strs[] = {"None","Fix","Traffic lamp","Red detect","Section","Mobile","Rail","Traffipax(non persistent)"} |
Referenced by osd_speed_cam_draw().
|
static |
Referenced by osd_button_new(), osd_cmd_interface_new(), and osd_odometer_new().
|
static |
Referenced by osd_cmd_odometer_reset(), osd_odometer_new(), and osd_odometer_save().
|
static |
Referenced by osd_odometer_destroy().