Contents of /trunk/src/appdata.h

Parent Directory Parent Directory | Revision Log Revision Log


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