navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
osd.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_OSD_H
21 #define NAVIT_OSD_H
22 
23 struct osd_priv;
24 struct attr;
25 
26 struct osd_methods {
27  void (*osd_destroy)(struct osd_priv *osd);
28  int (*set_attr)(struct osd_priv *osd, struct attr* attr);
29  void (*destroy)(struct osd_priv *osd);
30  int (*get_attr)(struct osd_priv *osd, enum attr_type type, struct attr* attr);
31 };
32 
33 #define osd_draw_cast(x) (void (*)(struct osd_priv *osd, struct navit *navit, struct vehicle *v))(x)
34 
36  void (*draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v);
37 };
38 
39 struct osd_item {
40  struct point p;
44  struct color color_bg, color_fg, text_color;
45  struct navit *navit;
46  struct graphics *gr;
49  char *font_name;
50  struct callback *cb;
54  int pressed;
55  char *command;
57  char *accesskey;
58  int do_draw;
59 };
60 
61 /* prototypes */
62 struct attr;
63 struct navit;
64 struct osd;
65 struct osd *osd_new(struct attr *parent, struct attr **attrs);
66 int osd_set_methods(struct osd_methods *in, int in_size, struct osd_methods *out);
67 void osd_wrap_point(struct point *p, struct navit *nav);
68 void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p);
69 void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags);
70 void osd_std_config(struct osd_item *item, struct navit *navit);
71 void osd_set_keypress(struct navit *nav, struct osd_item *item);
72 void osd_set_std_config(struct navit *nav, struct osd_item *item);
73 void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv);
74 void osd_std_resize(struct osd_item *item);
75 void osd_std_calculate_sizes(struct osd_item *item, int w, int h);
76 void osd_fill_with_bgcolor(struct osd_item *item);
77 int osd_set_attr(struct osd *osd, struct attr* attr);
78 int osd_get_attr(struct osd *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
79 /* end of prototypes */
80 
81 #endif
82 
void osd_fill_with_bgcolor(struct osd_item *item)
Definition: osd.c:492
attr_type
Definition: attr.h:34
int osd_configuration
Definition: osd.h:42
unsigned char p[5]
Definition: mg.h:48
Definition: osd.h:35
tuple iter
Definition: eval.py:8
Definition: gpx2navit_txt.h:51
struct navit * navit
Definition: osd.h:45
int do_draw
Definition: osd.h:58
Definition: item.h:99
int(* set_attr)(struct osd_priv *osd, struct attr *attr)
Definition: osd.h:28
Definition: color.h:23
graphics context A graphics context encapsulates a set of drawing parameters, such as linewidth and d...
Definition: graphics.h:179
struct osd * osd_new(struct attr *parent, struct attr **attrs)
Definition: osd.c:47
int rel_w
Definition: osd.h:43
void(* osd_destroy)(struct osd_priv *osd)
Definition: osd.h:27
struct graphics_gc * graphic_fg_text
Definition: osd.h:47
Definition: vehicle.c:58
int osd_get_attr(struct osd *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: osd.c:80
int flags
Definition: osd.h:42
void osd_std_resize(struct osd_item *item)
Definition: osd.c:161
int rel_h
Definition: osd.h:43
char * font_name
Definition: osd.h:49
struct osd_item_methods meth
Definition: osd.h:41
struct callback * cb
Definition: osd.h:50
Definition: graphics.h:161
struct color color_bg color_fg text_color
Definition: osd.h:44
void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p)
Definition: osd.c:139
char * command
Definition: osd.h:55
void(* draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v)
Definition: osd.h:36
struct graphics_font * font
Definition: osd.h:48
graphics object A graphics object serves as the target for drawing operations. It encapsulates variou...
Definition: graphics.c:70
Definition: config_.c:48
struct command_saved * enable_cs
Definition: osd.h:56
int osd_set_attr(struct osd *osd, struct attr *attr)
Definition: osd.c:94
struct graphics * gr
Definition: osd.h:46
Definition: osd.h:26
Definition: attr.h:156
struct callback * keypress_cb
Definition: osd.h:53
void(* destroy)(struct osd_priv *osd)
Definition: osd.h:29
struct callback * resize_cb
Definition: osd.h:51
int(* get_attr)(struct osd_priv *osd, enum attr_type type, struct attr *attr)
Definition: osd.h:30
void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags)
Definition: osd.c:305
void osd_set_std_config(struct navit *nav, struct osd_item *item)
Definition: osd.c:412
Definition: callback.c:26
int osd_set_methods(struct osd_methods *in, int in_size, struct osd_methods *out)
Definition: osd.c:41
char * accesskey
Definition: osd.h:57
struct graphics_gc * graphic_bg
Definition: osd.h:47
int w
Definition: osd.h:42
Definition: point.h:23
struct graphics_gc * graphic_fg
Definition: osd.h:47
Definition: osd.h:39
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:188
Definition: osd.c:34
int pressed
Definition: osd.h:54
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:442
int rel_x
Definition: osd.h:43
int font_size
Definition: osd.h:42
struct osd_priv * priv
Definition: osd.c:37
typedef int(WINAPI *FP_SetStretchBltMode)(HDC dc
struct callback * reconfig_cb
Definition: osd.h:52
char type[3]
Definition: garmin_img.c:130
struct point p
Definition: osd.h:40
Definition: navit.c:111
int rel_y
Definition: osd.h:43
tuple navit
Definition: eval.py:9
int h
Definition: osd.h:42
void osd_wrap_point(struct point *p, struct navit *nav)
Definition: osd.c:119
void osd_std_config(struct osd_item *item, struct navit *navit)
Definition: osd.c:385
Definition: command.c:76
void osd_set_keypress(struct navit *nav, struct osd_item *item)
Definition: osd.c:421
flags
Definition: gui_internal.h:26
int configured
Definition: osd.h:42
int fg_line_width
Definition: osd.h:42