navit 0.5.3-trunk
Loading...
Searching...
No Matches
osd.h
Go to the documentation of this file.
1
20#ifndef NAVIT_OSD_H
21#define NAVIT_OSD_H
22
23#include "attr_type_def.h" // for attr_type
24#include "color.h" // for color
25#include "point.h" // for point
26struct attr;
27struct attr_iter;
28struct navit;
29struct osd;
30struct osd_priv;
31struct vehicle;
32
33#define TRANSPARENT_BG 1
34#define ITEM_HAS_TEXT 2
35#define DISABLE_OVERLAY 4
36
38 void (*osd_destroy)(struct osd_priv *osd);
39 int (*set_attr)(struct osd_priv *osd, struct attr *attr);
40 void (*destroy)(struct osd_priv *osd);
41 int (*get_attr)(struct osd_priv *osd, enum attr_type type, struct attr *attr);
42};
43
44#define osd_draw_cast(x) (void (*)(struct osd_priv * osd, struct navit * navit, struct vehicle * v))(x)
45
47 void (*draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v);
48};
49
71
72/* prototypes */
73struct osd *osd_new(struct attr *parent, struct attr **attrs);
74int osd_set_methods(struct osd_methods *in, int in_size, struct osd_methods *out);
75void osd_wrap_point(struct point *p, struct navit *nav);
76void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p);
77void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags);
78void osd_std_config(struct osd_item *item, struct navit *navit);
79void osd_set_keypress(struct navit *nav, struct osd_item *item);
80void osd_set_std_config(struct navit *nav, struct osd_item *item);
81void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv);
82void osd_std_resize(struct osd_item *item);
83void osd_std_calculate_sizes(struct osd_item *item, int w, int h);
85int osd_set_attr(struct osd *osd, struct attr *attr);
86int osd_get_attr(struct osd *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
87/* end of prototypes */
88
89#endif
attr_type
Definition attr_type_def.h:11
char type[3]
Definition garmin_img.c:2
flags
Definition gui_internal.h:26
unsigned char p[5]
Definition mg.h:2
int osd_set_methods(struct osd_methods *in, int in_size, struct osd_methods *out)
Definition osd.c:40
void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p)
Definition osd.c:125
void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags)
Definition osd.c:279
void osd_std_resize(struct osd_item *item)
Definition osd.c:145
struct osd * osd_new(struct attr *parent, struct attr **attrs)
Definition osd.c:45
void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv)
Sets up the graphics for an item.
Definition osd.c:409
void osd_std_config(struct osd_item *item, struct navit *navit)
Definition osd.c:357
int osd_get_attr(struct osd *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition osd.c:76
void osd_std_calculate_sizes(struct osd_item *item, int w, int h)
Calculates the size and position of an OSD item.
Definition osd.c:170
void osd_fill_with_bgcolor(struct osd_item *item)
Definition osd.c:457
void osd_wrap_point(struct point *p, struct navit *nav)
Definition osd.c:109
int osd_set_attr(struct osd *osd, struct attr *attr)
Definition osd.c:88
void osd_set_std_config(struct navit *nav, struct osd_item *item)
Definition osd.c:383
void osd_set_keypress(struct navit *nav, struct osd_item *item)
Definition osd.c:390
struct navit struct traffic_methods struct attr ** attrs
Definition plugin_def.h:36
struct navit * nav
Definition plugin_def.h:36
Definition config_.c:47
Definition attr.h:138
Definition callback.c:27
Definition color.h:23
Definition command.c:75
Definition graphics.h:166
graphics context A graphics context encapsulates a set of drawing parameters, such as linewidth and d...
Definition graphics.h:185
graphics object A graphics object serves as the target for drawing operations. It encapsulates variou...
Definition graphics.c:78
Represents an object on a map.
Definition item.h:122
Definition navit.c:111
Definition osd.h:46
void(* draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v)
Definition osd.h:47
Definition osd.h:50
struct osd_item_methods meth
Definition osd.h:52
struct graphics_font * font
Definition osd.h:59
struct callback * keypress_cb
Definition osd.h:64
int flags
Definition osd.h:53
int do_draw
Definition osd.h:69
struct navit * navit
Definition osd.h:56
struct command_saved * enable_cs
Definition osd.h:67
struct callback * reconfig_cb
Definition osd.h:63
struct graphics_gc * graphic_fg
Definition osd.h:58
int rel_w
Definition osd.h:54
int rel_y
Definition osd.h:54
char * font_name
Definition osd.h:60
int w
Definition osd.h:53
struct point p
Definition osd.h:51
struct graphics_gc * graphic_bg
Definition osd.h:58
int pressed
Definition osd.h:65
int font_size
Definition osd.h:53
int fg_line_width
Definition osd.h:53
int osd_configuration
Definition osd.h:53
struct callback * cb
Definition osd.h:61
char * accesskey
Definition osd.h:68
char * command
Definition osd.h:66
struct callback * resize_cb
Definition osd.h:62
int configured
Definition osd.h:53
struct graphics * gr
Definition osd.h:57
struct color color_bg color_fg text_color
Definition osd.h:55
int rel_h
Definition osd.h:54
struct graphics_gc * graphic_fg_text
Definition osd.h:58
int rel_x
Definition osd.h:54
int h
Definition osd.h:53
Definition osd.h:37
void(* destroy)(struct osd_priv *osd)
Definition osd.h:40
int(* get_attr)(struct osd_priv *osd, enum attr_type type, struct attr *attr)
Definition osd.h:41
int(* set_attr)(struct osd_priv *osd, struct attr *attr)
Definition osd.h:39
void(* osd_destroy)(struct osd_priv *osd)
Definition osd.h:38
Definition osd.c:34
struct osd_priv * priv
Definition osd.c:37
Definition gpx2navit_txt.h:50
Definition point.h:23
Definition vehicle.c:56