Contents of /trunk/src/appdata.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (show annotations)
Wed Dec 17 16:43:46 2008 UTC (15 years, 4 months ago) by harbaum
File MIME type: text/plain
File size: 3711 byte(s)
Color system cleaned up, desktop fullscreen
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 APPDATA_H
21 #define APPDATA_H
22
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26
27 #include <locale.h>
28 #include <libintl.h>
29
30 #include "version.h"
31
32 #define LOCALEDIR "/usr/share/locale"
33
34 #define _(String) gettext(String)
35 #define N_(String) (String)
36
37 #ifdef USE_HILDON
38 #include <hildon/hildon-program.h>
39 #include <hildon/hildon-file-chooser-dialog.h>
40 #include <hildon/hildon-file-system-model.h>
41 #include <libosso.h> /* required for screen saver timeout */
42 #define GTK_FM_OK GTK_RESPONSE_OK
43 #define HILDON_ENTRY_NO_AUTOCAP(a) \
44 hildon_gtk_entry_set_input_mode(GTK_ENTRY(a),HILDON_GTK_INPUT_MODE_FULL)
45 #else
46 #define GTK_FM_OK GTK_RESPONSE_ACCEPT
47 #define HILDON_ENTRY_NO_AUTOCAP(a)
48 #endif
49
50
51 #include <gtk/gtk.h>
52 #include <glib/gstdio.h>
53
54 #include <libgnomevfs/gnome-vfs.h>
55 #include <libgnomevfs/gnome-vfs-inet-connection.h>
56
57 #include "pos.h"
58 #include "osm.h"
59
60 #include "canvas.h"
61
62 #ifdef USE_HILDON
63 #include "dbus.h"
64 #endif
65
66 typedef struct appdata_s {
67 #ifdef USE_HILDON
68 HildonProgram *program;
69 HildonWindow *window;
70 osso_context_t *osso_context;
71
72 #else
73 GtkWidget *window;
74 #endif
75
76 GtkWidget *vbox;
77 struct map_s *map;
78 osm_t *osm;
79
80 struct statusbar_s *statusbar;
81 struct settings_s *settings;
82 struct project_s *project;
83 struct iconbar_s *iconbar;
84 struct icon_s *icon;
85 struct presets_item_s *presets;
86
87 /* menu items to be enabled and disabled every now and then */
88 gboolean gps_enabled;
89 struct gps_state_s *gps_state;
90
91 #ifdef USE_HILDON
92 dbus_mm_pos_t mmpos;
93 #endif
94
95 /* flags used to prevent re-appearence of dialogs */
96 struct {
97 gulong not; /* bit is set if dialog is not to be displayed again */
98 gulong reply; /* reply to be assumed if "not" bit is set */
99 } dialog_again;
100
101 struct {
102 char *import_path;
103 GtkWidget *menu_track;
104 GtkWidget *menu_item_import;
105 GtkWidget *menu_item_export;
106 GtkWidget *menu_item_clear;
107 GtkWidget *menu_item_gps;
108 struct track_s *track;
109 guint handler_id;
110 canvas_item_t *gps_item; // the purple curcle
111 } track;
112
113 GtkWidget *menu_item_project_close;
114 GtkWidget *menu_item_view_fullscreen;
115
116 GtkWidget *menu_view;
117
118 GtkWidget *menu_osm;
119 GtkWidget *menu_item_osm_upload;
120 GtkWidget *menu_item_osm_diff;
121 GtkWidget *menu_item_osm_undo_changes;
122
123 GtkWidget *menu_wms;
124 GtkWidget *menu_item_wms_clear;
125 GtkWidget *menu_item_wms_adjust;
126
127 GtkWidget *menu_map;
128 GtkWidget *menu_item_map_hide_sel;
129 GtkWidget *menu_item_map_show_all;
130 GtkWidget *menu_item_map_no_icons;
131
132 } appdata_t;
133
134 #include "map.h"
135 #include "map_hl.h"
136 #include "osm_api.h"
137 #include "statusbar.h"
138 #include "area_edit.h"
139 #include "project.h"
140 #include "settings.h"
141 #include "diff.h"
142 #include "iconbar.h"
143 #include "icon.h"
144 #include "info.h"
145 #include "track.h"
146 #include "gps.h"
147 #include "wms.h"
148 #include "josm_presets.h"
149 #include "relation_edit.h"
150 #include "misc.h"
151 #include "map_edit.h"
152 #include "josm_elemstyles.h"
153 #include "style.h"
154 #include "net_io.h"
155
156 #endif // APPDATA_H