Contents of /src/project.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Tue Dec 9 20:06:06 2008 UTC (15 years, 6 months ago) by harbaum
File MIME type: text/plain
File size: 1712 byte(s)
Initial import
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 PROJECT_H
21     #define PROJECT_H
22    
23     typedef struct project_s {
24     char *name;
25     char *path;
26    
27     char *desc;
28     char *server;
29     char *osm;
30    
31     char *wms_server;
32     char *wms_path;
33     struct { gint x, y; } wms_offset;
34    
35     map_state_t *map_state;
36    
37     pos_t min, max;
38    
39     gboolean data_dirty; /* needs to download new data */
40     gboolean dirty; /* project file needs to be written */
41    
42     struct project_s *next; /* for chaining projects (e.g. during scan) */
43     } project_t;
44    
45     char *project_select(appdata_t *appdata);
46     gboolean project_open(appdata_t *appdata, char *name);
47     gboolean project_save(GtkWidget *parent, project_t *project);
48     gboolean project_load(appdata_t *appdata, char *name);
49     gboolean project_close(appdata_t *appdata);
50    
51     #ifdef USE_HILDON
52     #define POS_PARM ,dbus_mm_pos_t *mmpos, osso_context_t *osso_context
53     #else
54     #define POS_PARM
55     #endif
56    
57     gboolean project_edit(GtkWidget *parent, project_t *project POS_PARM);
58    
59     void project_free(project_t *project);
60    
61     #endif // PROJECT_H