3 #ifndef _MAPPER_TYPES_H
4 #define _MAPPER_TYPES_H
8 #include <curl/multi.h>
10 /** Generic search item list indexes */
26 /** This enumerated type defines the supported types of repositories. */
28 REPOTYPE_NONE, /* No URL set. */
29 REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
30 REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
31 REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
32 REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
33 REPOTYPE_WMS /* "service=wms" */
36 /** Possible center modes. The "WAS" modes imply no current center mode;
37 * they only hint at what the last center mode was, so that it can be
40 CENTER_WAS_LATLON = -2,
66 /** This enum defines the possible units we can use. */
73 gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
75 /* UNITS_CONVERTS, when multiplied, converts from NM. */
76 #define EARTH_RADIUS (3440.06479f)
77 gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
79 /** This enum defines the possible font sizes. */
90 gchar *INFO_FONT_TEXT[INFO_FONT_ENUM_COUNT];
92 /** This enum defines all of the key-customizable actions. */
94 CUSTOM_ACTION_PAN_NORTH,
95 CUSTOM_ACTION_PAN_WEST,
96 CUSTOM_ACTION_PAN_SOUTH,
97 CUSTOM_ACTION_PAN_EAST,
98 CUSTOM_ACTION_TOGGLE_AUTOCENTER,
99 CUSTOM_ACTION_ZOOM_IN,
100 CUSTOM_ACTION_ZOOM_OUT,
101 CUSTOM_ACTION_TOGGLE_FULLSCREEN,
102 CUSTOM_ACTION_TOGGLE_TRACKS,
103 CUSTOM_ACTION_TOGGLE_SCALE,
104 CUSTOM_ACTION_TOGGLE_POI,
105 CUSTOM_ACTION_CHANGE_REPO,
106 CUSTOM_ACTION_ROUTE_DISTNEXT,
107 CUSTOM_ACTION_ROUTE_DISTLAST,
108 CUSTOM_ACTION_TRACK_BREAK,
109 CUSTOM_ACTION_TRACK_DISTLAST,
110 CUSTOM_ACTION_TRACK_DISTFIRST,
111 CUSTOM_ACTION_TOGGLE_GPS,
112 CUSTOM_ACTION_TOGGLE_GPSINFO,
113 CUSTOM_ACTION_TOGGLE_SPEEDLIMIT,
114 CUSTOM_ACTION_ENUM_COUNT
116 gchar *CUSTOM_ACTION_TEXT[CUSTOM_ACTION_ENUM_COUNT];
118 /** This enum defines all of the customizable keys. */
127 CUSTOM_KEY_FULLSCREEN,
129 CUSTOM_KEY_ENUM_COUNT
131 gchar *CUSTOM_KEY_GCONF[CUSTOM_KEY_ENUM_COUNT];
132 gchar *CUSTOM_KEY_ICON[CUSTOM_KEY_ENUM_COUNT];
133 CustomAction CUSTOM_KEY_DEFAULT[CUSTOM_KEY_ENUM_COUNT];
135 /** This enum defines all of the colorable objects. */
138 COLORABLE_MARK_VELOCITY,
141 COLORABLE_TRACK_MARK,
142 COLORABLE_TRACK_BREAK,
145 COLORABLE_ROUTE_BREAK,
149 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
150 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
153 SPEED_LOCATION_TOP_LEFT,
154 SPEED_LOCATION_TOP_RIGHT,
155 SPEED_LOCATION_BOTTOM_RIGHT,
156 SPEED_LOCATION_BOTTOM_LEFT,
157 SPEED_LOCATION_ENUM_COUNT
159 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
161 /** Data regarding a map repository. */
162 typedef struct _RepoData RepoData;
168 guint view_zoom_steps;
169 gboolean double_size;
172 GtkWidget *menu_item;
175 /** Data used during the asynchronous progress update phase of automatic map
177 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
178 struct _ProgressUpdateInfo {
182 guint tilex, tiley, zoom; /* for refresh. */
183 gint retries; /* if equal to zero, it means we're DELETING maps. */
188 typedef struct _RouteDownloadData RouteDownloadData;
189 struct _RouteDownloadData {
194 /** Data used during the asynchronous automatic route downloading operation. */
195 typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
196 struct _AutoRouteDownloadData {
198 gboolean in_progress;
202 RouteDownloadData rdl_data;
205 typedef struct _BrowseInfo BrowseInfo;