Parent Directory | Revision Log
Various fremantle ui adoptions
1 | harbaum | 1 | /* |
2 | * Copyright (C) 2008 Till Harbaum <till@harbaum.org>. | ||
3 | * | ||
4 | * This file is part of OSM2Go. | ||
5 | * | ||
6 | * OSM2Go is free software: you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation, either version 3 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * OSM2Go is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with OSM2Go. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef STYLE_H | ||
21 | #define STYLE_H | ||
22 | |||
23 | typedef struct style_s { | ||
24 | icon_t **iconP; // pointer to global list of icons | ||
25 | char *name; | ||
26 | |||
27 | struct { | ||
28 | gboolean enable; | ||
29 | float scale; // how big the icon is drawn | ||
30 | char *path_prefix; | ||
31 | } icon; | ||
32 | |||
33 | struct { | ||
34 | elemstyle_color_t color; | ||
35 | elemstyle_color_t gps_color; | ||
36 | harbaum | 314 | char *gps_icon_name; |
37 | GdkPixbuf *gps_icon; | ||
38 | harbaum | 1 | float width; |
39 | } track; | ||
40 | |||
41 | struct { | ||
42 | elemstyle_color_t color; | ||
43 | float width; | ||
44 | float zoom_max; | ||
45 | } way; | ||
46 | |||
47 | struct { | ||
48 | gboolean has_border_color; | ||
49 | elemstyle_color_t border_color; | ||
50 | float border_width; | ||
51 | harbaum | 22 | elemstyle_color_t color; |
52 | harbaum | 1 | float zoom_max; |
53 | } area; | ||
54 | |||
55 | struct { | ||
56 | float mult; | ||
57 | harbaum | 22 | elemstyle_color_t color; |
58 | harbaum | 1 | |
59 | struct { | ||
60 | gboolean present; | ||
61 | float width; | ||
62 | elemstyle_color_t color; | ||
63 | } border; | ||
64 | } frisket; | ||
65 | |||
66 | struct { | ||
67 | float radius, border_radius; | ||
68 | elemstyle_color_t fill_color, color; | ||
69 | gboolean show_untagged; | ||
70 | float zoom_max; | ||
71 | } node; | ||
72 | |||
73 | struct { | ||
74 | elemstyle_color_t color, node_color, touch_color, arrow_color; | ||
75 | float width, arrow_limit; | ||
76 | } highlight; | ||
77 | |||
78 | struct { | ||
79 | elemstyle_color_t color; | ||
80 | } background; | ||
81 | |||
82 | union { | ||
83 | char *elemstyles_filename; | ||
84 | elemstyle_t *elemstyles; | ||
85 | }; | ||
86 | } style_t; | ||
87 | |||
88 | style_t *style_load(appdata_t *appdata, char *name); | ||
89 | void style_free(style_t *style); | ||
90 | harbaum | 317 | |
91 | #ifndef FREMANTLE | ||
92 | harbaum | 1 | void style_select(GtkWidget *parent, appdata_t *appdata); |
93 | harbaum | 317 | #else |
94 | GtkWidget *style_select_widget(appdata_t *appdata); | ||
95 | void style_change(appdata_t *appdata, const char *name); | ||
96 | #endif | ||
97 | harbaum | 1 | |
98 | #endif // STYLE_H |