Contents of /trunk/src/settings.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (show annotations)
Mon Dec 15 19:45:38 2008 UTC (15 years, 4 months ago) by harbaum
File MIME type: text/plain
File size: 1737 byte(s)
WMS server selection redone, other small changes and bugfixes
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 SETTINGS_H
21 #define SETTINGS_H
22
23 /* define this for a vertical UI layout */
24 #undef PORTRAIT
25
26 /* these size defaults are used in the non-hildonized version only */
27 #ifndef PORTRAIT
28 #define DEFAULT_WIDTH 640
29 #define DEFAULT_HEIGHT 480
30 #else
31 /* about the size of the openmoko screen */
32 #define DEFAULT_WIDTH 480
33 #define DEFAULT_HEIGHT 620
34 #endif
35
36 /* default working directory */
37 #ifndef USE_HILDON
38 #define BASE_DIR ".osm2go/"
39 #else
40 #define BASE_DIR "/media/mmc2/osm2go/"
41 #endif
42
43 #define DEFAULT_STYLE "mapnik"
44
45 typedef struct settings_s {
46
47 /* never changed */
48 char *base_path;
49
50 /* changed in project.c */
51 char *project;
52
53 /* changed in osm_api.c */
54 char *server, *username, *password;
55
56 /* changed in wms.c */
57 struct wms_server_s *wms_server;
58
59 /* changed in style.c */
60 char *style;
61
62 /* changed in main.c */
63 gboolean no_icons;
64
65 } settings_t;
66
67 settings_t *settings_load(void);
68 void settings_save(settings_t *settings);
69 void settings_free(settings_t *settings);
70
71 #endif // SETTINGS_H