* fix conffiles
[navit-package] / navit / osd.h
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
25 struct osd_methods {
26         void (*osd_destroy)(struct osd_priv *osd);
27 };
28
29 #define osd_draw_cast(x) (void (*)(struct osd_priv *osd, struct navit *navit, struct vehicle *v))(x)
30
31 struct osd_item_methods {
32         void (*draw)(struct osd_priv *osd, struct navit *navit, struct vehicle *v);
33 };
34
35 struct osd_item {
36         struct point p;
37         struct osd_item_methods meth;
38         int flags, attr_flags, w, h, fg_line_width, font_size, osd_configuration, configured;
39         int rel_w, rel_h, rel_x, rel_y;
40         struct color color_bg, color_white, text_color;
41         struct navit *navit;
42         struct graphics *gr;
43         struct graphics_gc *graphic_bg, *graphic_fg_white, *graphic_fg_text;
44         struct graphics_font *font;
45         struct callback *cb;
46         struct callback *resize_cb;
47         struct callback *reconfig_cb;
48         int pressed;
49         char *command;
50         struct command_saved *enable_cs;
51 };
52
53 /* prototypes */
54 struct attr;
55 struct navit;
56 struct osd;
57 struct osd *osd_new(struct attr *parent, struct attr **attrs);
58 void osd_wrap_point(struct point *p, struct navit *nav);
59 void osd_std_click(struct osd_item *this, struct navit *nav, int pressed, int button, struct point *p);
60 void osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags);
61 void osd_std_config(struct osd_item *item, struct navit *navit);
62 void osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *priv);
63 void osd_std_resize(struct osd_item *item);
64 void osd_std_draw(struct osd_item *item);
65 /* end of prototypes */
66
67 #endif
68