Contents of /trunk/src/appdata.h

Parent Directory Parent Directory | Revision Log Revision Log


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