Parent Directory
|
Revision Log
Added osm-gps-map
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 "osm-gps-map.h" |
30 | |
31 | #define TILESIZE 256 |
32 | #define MAX_ZOOM 20 |
33 | #define MIN_ZOOM 0 |
34 | |
35 | #define URI_MARKER_X "#X" |
36 | #define URI_MARKER_Y "#Y" |
37 | #define URI_MARKER_Z "#Z" |
38 | #define URI_MARKER_S "#S" |
39 | #define URI_MARKER_Q "#Q" |
40 | #define URI_MARKER_Q0 "#W" |
41 | #define URI_MARKER_YS "#U" |
42 | #define URI_MARKER_R "#R" |
43 | |
44 | #define URI_HAS_X (1 << 0) |
45 | #define URI_HAS_Y (1 << 1) |
46 | #define URI_HAS_Z (1 << 2) |
47 | #define URI_HAS_S (1 << 3) |
48 | #define URI_HAS_Q (1 << 4) |
49 | #define URI_HAS_Q0 (1 << 5) |
50 | #define URI_HAS_YS (1 << 6) |
51 | #define URI_HAS_R (1 << 7) |
52 | //.... |
53 | #define URI_FLAG_END (1 << 8) |
54 | |
55 | typedef struct { |
56 | int x1; |
57 | int y1; |
58 | int x2; |
59 | int y2; |
60 | } bbox_pixel_t; |
61 | |
62 | typedef struct { |
63 | /* The details of the tile to download */ |
64 | char *uri; |
65 | char *folder; |
66 | char *filename; |
67 | OsmGpsMap *map; |
68 | /* whether to redraw the map when the tile arrives */ |
69 | gboolean redraw; |
70 | } tile_download_t; |
71 | |
72 | typedef struct { |
73 | int x; |
74 | int y; |
75 | int zoom; |
76 | } tile_t; |
77 | |
78 | typedef struct { |
79 | coord_t pt; |
80 | GdkPixbuf *image; |
81 | int w; |
82 | int h; |
83 | } image_t; |
84 | |
85 | #endif /* _OSM_GPS_MAP_TYPES_H_ */ |