8 #ifndef _MAPPER_TYPES_H
9 #define _MAPPER_TYPES_H
11 /** This enumerated type defines the supported types of repositories. */
13 REPOTYPE_NONE, /* No URL set. */
14 REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
15 REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
16 REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
17 REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
18 REPOTYPE_WMS /* "service=wms" */
21 /** Possible center modes. The "WAS" modes imply no current center mode;
22 * they only hint at what the last center mode was, so that it can be
25 CENTER_WAS_LATLON = -2,
32 /** This enum defines the states of the SAX parsing state machine. */
39 INSIDE_PATH_POINT_ELE,
40 INSIDE_PATH_POINT_TIME,
41 INSIDE_PATH_POINT_DESC,
47 /** POI dialog action **/
76 /** This enum defines the possible units we can use. */
83 gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
85 /* UNITS_CONVERTS, when multiplied, converts from NM. */
86 #define EARTH_RADIUS (3440.06479f)
87 gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
89 /** This enum defines the possible font sizes. */
100 gchar *INFO_FONT_TEXT[INFO_FONT_ENUM_COUNT];
102 /** This enum defines all of the key-customizable actions. */
104 CUSTOM_ACTION_PAN_NORTH,
105 CUSTOM_ACTION_PAN_WEST,
106 CUSTOM_ACTION_PAN_SOUTH,
107 CUSTOM_ACTION_PAN_EAST,
108 CUSTOM_ACTION_TOGGLE_AUTOCENTER,
109 CUSTOM_ACTION_ZOOM_IN,
110 CUSTOM_ACTION_ZOOM_OUT,
111 CUSTOM_ACTION_TOGGLE_FULLSCREEN,
112 CUSTOM_ACTION_TOGGLE_TRACKS,
113 CUSTOM_ACTION_TOGGLE_SCALE,
114 CUSTOM_ACTION_TOGGLE_POI,
115 CUSTOM_ACTION_CHANGE_REPO,
116 CUSTOM_ACTION_ROUTE_DISTNEXT,
117 CUSTOM_ACTION_ROUTE_DISTLAST,
118 CUSTOM_ACTION_TRACK_BREAK,
119 CUSTOM_ACTION_TRACK_DISTLAST,
120 CUSTOM_ACTION_TRACK_DISTFIRST,
121 CUSTOM_ACTION_TOGGLE_GPS,
122 CUSTOM_ACTION_TOGGLE_GPSINFO,
123 CUSTOM_ACTION_TOGGLE_SPEEDLIMIT,
124 CUSTOM_ACTION_ENUM_COUNT
126 gchar *CUSTOM_ACTION_TEXT[CUSTOM_ACTION_ENUM_COUNT];
128 /** This enum defines all of the customizable keys. */
137 CUSTOM_KEY_FULLSCREEN,
139 CUSTOM_KEY_ENUM_COUNT
141 gchar *CUSTOM_KEY_GCONF[CUSTOM_KEY_ENUM_COUNT];
142 gchar *CUSTOM_KEY_ICON[CUSTOM_KEY_ENUM_COUNT];
143 CustomAction CUSTOM_KEY_DEFAULT[CUSTOM_KEY_ENUM_COUNT];
145 /** This enum defines all of the colorable objects. */
148 COLORABLE_MARK_VELOCITY,
151 COLORABLE_TRACK_MARK,
152 COLORABLE_TRACK_BREAK,
155 COLORABLE_ROUTE_BREAK,
159 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
160 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
169 DEG_FORMAT_ENUM_COUNT
171 gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
174 SPEED_LOCATION_TOP_LEFT,
175 SPEED_LOCATION_TOP_RIGHT,
176 SPEED_LOCATION_BOTTOM_RIGHT,
177 SPEED_LOCATION_BOTTOM_LEFT,
178 SPEED_LOCATION_ENUM_COUNT
180 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
182 /** A lat/lon/alt position */
183 typedef struct _Position Position;
191 /** A general definition of a point in the Mapper unit system. */
192 typedef struct _Point Point;
200 /** A WayPoint, which is a Point with a description. */
201 typedef struct _WayPoint WayPoint;
207 /** A Path is a set of PathPoints and WayPoints. */
208 typedef struct _Path Path;
210 Point *head; /* points to first element in array; NULL if empty. */
211 Point *tail; /* points to last element in array. */
212 Point *cap; /* points after last slot in array. */
213 WayPoint *whead; /* points to first element in array; NULL if empty. */
214 WayPoint *wtail; /* points to last element in array. */
215 WayPoint *wcap; /* points after last slot in array. */
218 /** Data used during the SAX parsing operation. */
219 typedef struct _SaxData SaxData;
225 gboolean at_least_one_trkpt;
229 /** Data regarding a map repository. */
230 typedef struct _RepoData RepoData;
236 guint view_zoom_steps;
237 gboolean double_size;
240 GtkWidget *menu_item;
243 /** Data used during the asynchronous progress update phase of automatic map
245 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
246 struct _ProgressUpdateInfo {
250 guint tilex, tiley, zoom; /* for refresh. */
251 gint retries; /* if equal to zero, it means we're DELETING maps. */
256 typedef struct _RouteDownloadData RouteDownloadData;
257 struct _RouteDownloadData {
262 /** Data used during the asynchronous automatic route downloading operation. */
263 typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
264 struct _AutoRouteDownloadData {
266 gboolean in_progress;
270 RouteDownloadData rdl_data;
273 typedef struct _BrowseInfo BrowseInfo;