/[zanavi_public1]/navit/navit/osd.h
ZANavi

Contents of /navit/navit/osd.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (12 years, 5 months ago) by zoff99
File MIME type: text/plain
File size: 2574 byte(s)
import files
1 /**
2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
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 void (*set_attr)(struct osd_priv *osd, struct attr* attr);
29 };
30
31 #define osd_draw_cast(x) (void (*)(struct osd_priv *osd, struct navit *navit, struct vehicle *v))(x)
32
33 struct osd_item_methods {
34 void (*draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v);
35 };
36
37 struct osd_item {
38 struct point p;
39 struct osd_item_methods meth;
40 int flags, attr_flags, w, h, fg_line_width, font_size, osd_configuration, configured;
41 int rel_w, rel_h, rel_x, rel_y;
42 struct color color_bg, color_white, text_color;
43 struct navit *navit;
44 struct graphics *gr;
45 struct graphics_gc *graphic_bg, *graphic_fg_white, *graphic_fg_text;
46 struct graphics_font *font;
47 char *font_name;
48 struct callback *cb;
49 struct callback *resize_cb;
50 struct callback *reconfig_cb;
51 struct callback *keypress_cb;
52 int pressed;
53 char *command;
54 struct command_saved *enable_cs;
55 char *accesskey;
56 };
57
58 /* prototypes */
59 struct attr;
60 struct navit;
61 struct osd;
62 struct osd *osd_new(struct attr *parent, struct attr **attrs);
63 void osd_wrap_point(struct point *p, struct navit *nav);
64 void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p);
65 void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags);
66 void osd_std_config(struct osd_item *item, struct navit *navit);
67 void osd_set_std_config(struct navit *nav, struct osd_item *item);
68 void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv);
69 void osd_std_resize(struct osd_item *item);
70 void osd_std_draw(struct osd_item *item);
71 struct osd* osd_get_osd_by_name(char *name);
72 int osd_set_attr(struct osd *osd, struct attr* attr);
73 /* end of prototypes */
74
75 #endif
76

   
Visit the ZANavi Wiki