Navit SVN

/work/compile/navit/src/navit/osd.h

00001 
00020 #ifndef NAVIT_OSD_H
00021 #define NAVIT_OSD_H
00022 
00023 struct osd_priv;
00024 struct attr;
00025 
00026 struct osd_methods {
00027         void (*osd_destroy)(struct osd_priv *osd);
00028         void (*set_attr)(struct osd_priv *osd, struct attr* attr);
00029 };
00030 
00031 #define osd_draw_cast(x) (void (*)(struct osd_priv *osd, struct navit *navit, struct vehicle *v))(x)
00032 
00033 struct osd_item_methods {
00034         void (*draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v);
00035 };
00036 
00037 struct osd_item {
00038         struct point p;
00039         struct osd_item_methods meth;
00040         int flags, attr_flags, w, h, fg_line_width, font_size, osd_configuration, configured;
00041         int rel_w, rel_h, rel_x, rel_y;
00042         struct color color_bg, color_white, text_color;
00043         struct navit *navit;
00044         struct graphics *gr;
00045         struct graphics_gc *graphic_bg, *graphic_fg_white, *graphic_fg_text;
00046         struct graphics_font *font;
00047         char *font_name;
00048         struct callback *cb;
00049         struct callback *resize_cb;
00050         struct callback *reconfig_cb;
00051         struct callback *keypress_cb;
00052         int pressed;
00053         char *command;
00054         struct command_saved *enable_cs;
00055         char *accesskey;
00056 };
00057 
00058 /* prototypes */
00059 struct attr;
00060 struct navit;
00061 struct osd;
00062 struct osd *osd_new(struct attr *parent, struct attr **attrs);
00063 void osd_wrap_point(struct point *p, struct navit *nav);
00064 void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p);
00065 void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags);
00066 void osd_std_config(struct osd_item *item, struct navit *navit);
00067 void osd_set_std_config(struct navit *nav, struct osd_item *item);
00068 void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv);
00069 void osd_std_resize(struct osd_item *item);
00070 void osd_std_draw(struct osd_item *item);
00071 int osd_set_attr(struct osd *osd, struct attr* attr);
00072 int osd_get_attr(struct osd *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
00073 /* end of prototypes */
00074 
00075 #endif
00076