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

Contents of /navit/navit/osd.h

Parent Directory Parent Directory | Revision Log Revision Log


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

   
Visit the ZANavi Wiki