Parent Directory | Revision Log
Asynchronous network io
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 | /* and the ability to zoom */ |
73 | GtkWidget *fullscreen_menu_item; |
74 | #else |
75 | GtkWidget *window; |
76 | #endif |
77 | |
78 | GtkWidget *vbox; |
79 | struct map_s *map; |
80 | osm_t *osm; |
81 | |
82 | struct statusbar_s *statusbar; |
83 | struct settings_s *settings; |
84 | struct project_s *project; |
85 | struct iconbar_s *iconbar; |
86 | struct icon_s *icon; |
87 | struct presets_item_s *presets; |
88 | |
89 | /* menu items to be enabled and disabled every now and then */ |
90 | gboolean gps_enabled; |
91 | struct gps_state_s *gps_state; |
92 | |
93 | #ifdef USE_HILDON |
94 | dbus_mm_pos_t mmpos; |
95 | #endif |
96 | |
97 | /* flags used to prevent re-appearence of dialogs */ |
98 | struct { |
99 | gulong not; /* bit is set if dialog is not to be displayed again */ |
100 | gulong reply; /* reply to be assumed if "not" bit is set */ |
101 | } dialog_again; |
102 | |
103 | struct { |
104 | char *import_path; |
105 | GtkWidget *menu_track; |
106 | GtkWidget *menu_item_import; |
107 | GtkWidget *menu_item_export; |
108 | GtkWidget *menu_item_clear; |
109 | GtkWidget *menu_item_gps; |
110 | struct track_s *track; |
111 | guint handler_id; |
112 | canvas_item_t *gps_item; // the purple curcle |
113 | } track; |
114 | |
115 | GtkWidget *menu_item_project_close; |
116 | |
117 | GtkWidget *menu_view; |
118 | |
119 | GtkWidget *menu_osm; |
120 | GtkWidget *menu_item_osm_upload; |
121 | GtkWidget *menu_item_osm_diff; |
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 | |
131 | } appdata_t; |
132 | |
133 | #include "map.h" |
134 | #include "map_hl.h" |
135 | #include "osm_api.h" |
136 | #include "statusbar.h" |
137 | #include "area_edit.h" |
138 | #include "project.h" |
139 | #include "settings.h" |
140 | #include "diff.h" |
141 | #include "iconbar.h" |
142 | #include "icon.h" |
143 | #include "info.h" |
144 | #include "track.h" |
145 | #include "gps.h" |
146 | #include "wms.h" |
147 | #include "josm_presets.h" |
148 | #include "relation_edit.h" |
149 | #include "misc.h" |
150 | #include "map_edit.h" |
151 | #include "josm_elemstyles.h" |
152 | #include "style.h" |
153 | #include "net_io.h" |
154 | |
155 | #endif // APPDATA_H |