]> git.itanic.dy.fi Git - maemo-mapper/blob - src/maps.h
Added support for layered maps. This support is still very
[maemo-mapper] / src / maps.h
1 /*
2  * Copyright (C) 2006, 2007 John Costigan.
3  *
4  * POI and GPS-Info code originally written by Cezary Jackiewicz.
5  *
6  * Default map data provided by http://www.openstreetmap.org/
7  *
8  * This file is part of Maemo Mapper.
9  *
10  * Maemo Mapper is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * Maemo Mapper is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Maemo Mapper.  If not, see <http://www.gnu.org/licenses/>.
22  */
23
24 #ifndef MAEMO_MAPPER_MAPS_H
25 #define MAEMO_MAPPER_MAPS_H
26
27 void map_cache_init(size_t cache_size);
28 size_t map_cache_resize(size_t cache_size);
29 void map_cache_destroy(void);
30 void map_cache_clean (void);
31
32 gboolean mapdb_exists(RepoData *repo, gint zoom, gint tilex, gint tiley);
33 GdkPixbuf* mapdb_get(RepoData *repo, gint zoom, gint tilex, gint tiley);
34
35 void set_repo_type(RepoData *repo);
36 gboolean repo_set_curr(RepoData *rd);
37 gboolean repo_is_layer (RepoData* base, RepoData* layer);
38
39 gboolean mapdb_initiate_update(RepoData *repo, gint zoom, gint tilex,
40         gint tiley, gint update_type, gint batch_id, gint priority,
41         ThreadLatch *refresh_latch);
42
43 guint mut_exists_hashfunc(const MapUpdateTask *a);
44 gboolean mut_exists_equalfunc(const MapUpdateTask *a, const MapUpdateTask *b);
45 gint mut_priority_comparefunc(const MapUpdateTask *a, const MapUpdateTask *b);
46 gboolean thread_proc_mut(void);
47
48 gboolean repoman_dialog(void);
49
50 gboolean repoman_download(void);
51
52 gboolean mapman_dialog(void);
53
54 gboolean map_layer_refresh_cb (gpointer data);
55
56 void maps_toggle_visible_layers ();
57
58 /* returns amount of seconds since tile downloaded */
59 gint get_tile_age (GdkPixbuf* pixbuf);
60
61 #endif /* ifndef MAEMO_MAPPER_MAPS_H */