]> err.no Git - mapper/blob - src/map-tile-repo.h
More map widget integration changes
[mapper] / src / map-tile-repo.h
1 #ifndef _MAP_TILE_REPO_H
2 #define _MAP_TILE_REPO_H
3
4 #include <glib.h>
5 #include <gtk/gtk.h>
6
7 /** This enumerated type defines the supported types of repositories. */
8 typedef enum {
9         REPOTYPE_NONE,          /* No URL set. */
10         REPOTYPE_XYZ,           /* x=%d, y=%d, and zoom=%d */
11         REPOTYPE_XYZ_INV,       /* zoom=%0d, x=%d, y=%d */
12         REPOTYPE_QUAD_QRST,     /* t=%s   (%s = {qrst}*) */
13         REPOTYPE_QUAD_ZERO,     /* t=%0s  (%0s = {0123}*) */
14         REPOTYPE_WMS            /* "service=wms" */
15 } RepoType;
16
17 /** Data regarding a map repository. */
18 typedef struct _RepoData RepoData;
19 struct _RepoData {
20         gchar *name;
21         gchar *url;
22         gchar *cache_dir;
23         guint dl_zoom_steps;
24         guint view_zoom_steps;
25         guint min_zoom;
26         guint max_zoom;
27         gboolean double_size;
28         gboolean nextable;
29         RepoType type;
30         GtkWidget *menu_item;
31 };
32
33 RepoData *map_tile_repo_new(void);
34 RepoData *map_tile_repo_new_from_string(gchar *str);
35 void map_tile_repo_free(RepoData *rd);
36 void map_tile_repo_set_type(RepoData *rd);
37
38 #endif