8 #ifndef _MAPPER_TYPES_H
9 #define _MAPPER_TYPES_H
11 /** Generic search item list indexes */
27 /** This enumerated type defines the supported types of repositories. */
29 REPOTYPE_NONE, /* No URL set. */
30 REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
31 REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
32 REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
33 REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
34 REPOTYPE_WMS /* "service=wms" */
37 /** Possible center modes. The "WAS" modes imply no current center mode;
38 * they only hint at what the last center mode was, so that it can be
41 CENTER_WAS_LATLON = -2,
48 /** This enum defines the states of the SAX parsing state machine. */
55 INSIDE_PATH_POINT_ELE,
56 INSIDE_PATH_POINT_TIME,
57 INSIDE_PATH_POINT_DESC,
63 /** POI dialog action **/
87 /** This enum defines the possible units we can use. */
94 gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
96 /* UNITS_CONVERTS, when multiplied, converts from NM. */
97 #define EARTH_RADIUS (3440.06479f)
98 gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
100 /** This enum defines the possible font sizes. */
111 gchar *INFO_FONT_TEXT[INFO_FONT_ENUM_COUNT];
113 /** This enum defines all of the key-customizable actions. */
115 CUSTOM_ACTION_PAN_NORTH,
116 CUSTOM_ACTION_PAN_WEST,
117 CUSTOM_ACTION_PAN_SOUTH,
118 CUSTOM_ACTION_PAN_EAST,
119 CUSTOM_ACTION_TOGGLE_AUTOCENTER,
120 CUSTOM_ACTION_ZOOM_IN,
121 CUSTOM_ACTION_ZOOM_OUT,
122 CUSTOM_ACTION_TOGGLE_FULLSCREEN,
123 CUSTOM_ACTION_TOGGLE_TRACKS,
124 CUSTOM_ACTION_TOGGLE_SCALE,
125 CUSTOM_ACTION_TOGGLE_POI,
126 CUSTOM_ACTION_CHANGE_REPO,
127 CUSTOM_ACTION_ROUTE_DISTNEXT,
128 CUSTOM_ACTION_ROUTE_DISTLAST,
129 CUSTOM_ACTION_TRACK_BREAK,
130 CUSTOM_ACTION_TRACK_DISTLAST,
131 CUSTOM_ACTION_TRACK_DISTFIRST,
132 CUSTOM_ACTION_TOGGLE_GPS,
133 CUSTOM_ACTION_TOGGLE_GPSINFO,
134 CUSTOM_ACTION_TOGGLE_SPEEDLIMIT,
135 CUSTOM_ACTION_ENUM_COUNT
137 gchar *CUSTOM_ACTION_TEXT[CUSTOM_ACTION_ENUM_COUNT];
139 /** This enum defines all of the customizable keys. */
148 CUSTOM_KEY_FULLSCREEN,
150 CUSTOM_KEY_ENUM_COUNT
152 gchar *CUSTOM_KEY_GCONF[CUSTOM_KEY_ENUM_COUNT];
153 gchar *CUSTOM_KEY_ICON[CUSTOM_KEY_ENUM_COUNT];
154 CustomAction CUSTOM_KEY_DEFAULT[CUSTOM_KEY_ENUM_COUNT];
156 /** This enum defines all of the colorable objects. */
159 COLORABLE_MARK_VELOCITY,
162 COLORABLE_TRACK_MARK,
163 COLORABLE_TRACK_BREAK,
166 COLORABLE_ROUTE_BREAK,
170 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
171 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
180 DEG_FORMAT_ENUM_COUNT
182 gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
185 SPEED_LOCATION_TOP_LEFT,
186 SPEED_LOCATION_TOP_RIGHT,
187 SPEED_LOCATION_BOTTOM_RIGHT,
188 SPEED_LOCATION_BOTTOM_LEFT,
189 SPEED_LOCATION_ENUM_COUNT
191 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
193 /** A lat/lon/alt position */
194 typedef struct _Position Position;
202 /** A general definition of a point in the Mapper unit system. */
203 typedef struct _Point Point;
211 /** A WayPoint, which is a Point with a description. */
212 typedef struct _WayPoint WayPoint;
218 /** A Path is a set of PathPoints and WayPoints. */
219 typedef struct _Path Path;
221 Point *head; /* points to first element in array; NULL if empty. */
222 Point *tail; /* points to last element in array. */
223 Point *cap; /* points after last slot in array. */
224 WayPoint *whead; /* points to first element in array; NULL if empty. */
225 WayPoint *wtail; /* points to last element in array. */
226 WayPoint *wcap; /* points after last slot in array. */
229 /** Data used during the SAX parsing operation. */
230 typedef struct _SaxData SaxData;
236 gboolean at_least_one_trkpt;
240 /** Data regarding a map repository. */
241 typedef struct _RepoData RepoData;
247 guint view_zoom_steps;
248 gboolean double_size;
251 GtkWidget *menu_item;
254 /** Data used during the asynchronous progress update phase of automatic map
256 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
257 struct _ProgressUpdateInfo {
261 guint tilex, tiley, zoom; /* for refresh. */
262 gint retries; /* if equal to zero, it means we're DELETING maps. */
267 typedef struct _RouteDownloadData RouteDownloadData;
268 struct _RouteDownloadData {
273 /** Data used during the asynchronous automatic route downloading operation. */
274 typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
275 struct _AutoRouteDownloadData {
277 gboolean in_progress;
281 RouteDownloadData rdl_data;
284 typedef struct _BrowseInfo BrowseInfo;