Contents of /trunk/src/osm-gps-map-types.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations)
Tue Jul 28 13:21:22 2009 UTC (14 years, 9 months ago) by harbaum
File MIME type: text/plain
File size: 2246 byte(s)
osm-gps-map integration
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*- */
2 /* vim:set et sw=4 ts=4 cino=t0,(0: */
3 /*
4 * osm-gps-map-types.h
5 * Copyright (C) Marcus Bauer 2008 <marcus.bauer@gmail.com>
6 * Copyright (C) John Stowers 2009 <john.stowers@gmail.com>
7 *
8 * Contributions by
9 * Everaldo Canuto 2009 <everaldo.canuto@gmail.com>
10 *
11 * osm-gps-map.c is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * osm-gps-map.c is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 * See the GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25 #ifndef _OSM_GPS_MAP_TYPES_H_
26 #define _OSM_GPS_MAP_TYPES_H_
27
28 #include <gdk/gdk.h>
29 #include <libsoup/soup.h>
30 #include "osm-gps-map.h"
31
32 #define TILESIZE 256
33 #define MAX_ZOOM 20
34 #define MIN_ZOOM 0
35
36 #define URI_MARKER_X "#X"
37 #define URI_MARKER_Y "#Y"
38 #define URI_MARKER_Z "#Z"
39 #define URI_MARKER_S "#S"
40 #define URI_MARKER_Q "#Q"
41 #define URI_MARKER_Q0 "#W"
42 #define URI_MARKER_YS "#U"
43 #define URI_MARKER_R "#R"
44
45 #define URI_HAS_X (1 << 0)
46 #define URI_HAS_Y (1 << 1)
47 #define URI_HAS_Z (1 << 2)
48 #define URI_HAS_S (1 << 3)
49 #define URI_HAS_Q (1 << 4)
50 #define URI_HAS_Q0 (1 << 5)
51 #define URI_HAS_YS (1 << 6)
52 #define URI_HAS_R (1 << 7)
53 //....
54 #define URI_FLAG_END (1 << 8)
55
56 typedef struct {
57 int x1;
58 int y1;
59 int x2;
60 int y2;
61 } bbox_pixel_t;
62
63 typedef struct {
64 /* The details of the tile to download */
65 char *uri;
66 char *folder;
67 char *filename;
68 OsmGpsMap *map;
69 /* whether to redraw the map when the tile arrives */
70 gboolean redraw;
71 #ifdef LIBSOUP22
72 SoupSession *session;
73 #endif
74 } tile_download_t;
75
76 typedef struct {
77 int x;
78 int y;
79 int zoom;
80 } tile_t;
81
82 typedef struct {
83 coord_t pt;
84 GdkPixbuf *image;
85 int w;
86 int h;
87 } image_t;
88
89 #endif /* _OSM_GPS_MAP_TYPES_H_ */