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 **/
84 /** This enum defines the possible units we can use. */
91 gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
93 /* UNITS_CONVERTS, when multiplied, converts from NM. */
94 #define EARTH_RADIUS (3440.06479f)
95 gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
97 /** This enum defines the possible font sizes. */
108 gchar *INFO_FONT_TEXT[INFO_FONT_ENUM_COUNT];
110 /** This enum defines all of the key-customizable actions. */
112 CUSTOM_ACTION_PAN_NORTH,
113 CUSTOM_ACTION_PAN_WEST,
114 CUSTOM_ACTION_PAN_SOUTH,
115 CUSTOM_ACTION_PAN_EAST,
116 CUSTOM_ACTION_TOGGLE_AUTOCENTER,
117 CUSTOM_ACTION_ZOOM_IN,
118 CUSTOM_ACTION_ZOOM_OUT,
119 CUSTOM_ACTION_TOGGLE_FULLSCREEN,
120 CUSTOM_ACTION_TOGGLE_TRACKS,
121 CUSTOM_ACTION_TOGGLE_SCALE,
122 CUSTOM_ACTION_TOGGLE_POI,
123 CUSTOM_ACTION_CHANGE_REPO,
124 CUSTOM_ACTION_ROUTE_DISTNEXT,
125 CUSTOM_ACTION_ROUTE_DISTLAST,
126 CUSTOM_ACTION_TRACK_BREAK,
127 CUSTOM_ACTION_TRACK_DISTLAST,
128 CUSTOM_ACTION_TRACK_DISTFIRST,
129 CUSTOM_ACTION_TOGGLE_GPS,
130 CUSTOM_ACTION_TOGGLE_GPSINFO,
131 CUSTOM_ACTION_TOGGLE_SPEEDLIMIT,
132 CUSTOM_ACTION_ENUM_COUNT
134 gchar *CUSTOM_ACTION_TEXT[CUSTOM_ACTION_ENUM_COUNT];
136 /** This enum defines all of the customizable keys. */
145 CUSTOM_KEY_FULLSCREEN,
147 CUSTOM_KEY_ENUM_COUNT
149 gchar *CUSTOM_KEY_GCONF[CUSTOM_KEY_ENUM_COUNT];
150 gchar *CUSTOM_KEY_ICON[CUSTOM_KEY_ENUM_COUNT];
151 CustomAction CUSTOM_KEY_DEFAULT[CUSTOM_KEY_ENUM_COUNT];
153 /** This enum defines all of the colorable objects. */
156 COLORABLE_MARK_VELOCITY,
159 COLORABLE_TRACK_MARK,
160 COLORABLE_TRACK_BREAK,
163 COLORABLE_ROUTE_BREAK,
167 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
168 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
177 DEG_FORMAT_ENUM_COUNT
179 gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
182 SPEED_LOCATION_TOP_LEFT,
183 SPEED_LOCATION_TOP_RIGHT,
184 SPEED_LOCATION_BOTTOM_RIGHT,
185 SPEED_LOCATION_BOTTOM_LEFT,
186 SPEED_LOCATION_ENUM_COUNT
188 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
190 /** A lat/lon/alt position */
191 typedef struct _Position Position;
199 /** A general definition of a point in the Mapper unit system. */
200 typedef struct _Point Point;
208 /** A WayPoint, which is a Point with a description. */
209 typedef struct _WayPoint WayPoint;
215 /** A Path is a set of PathPoints and WayPoints. */
216 typedef struct _Path Path;
218 Point *head; /* points to first element in array; NULL if empty. */
219 Point *tail; /* points to last element in array. */
220 Point *cap; /* points after last slot in array. */
221 WayPoint *whead; /* points to first element in array; NULL if empty. */
222 WayPoint *wtail; /* points to last element in array. */
223 WayPoint *wcap; /* points after last slot in array. */
226 /** Data used during the SAX parsing operation. */
227 typedef struct _SaxData SaxData;
233 gboolean at_least_one_trkpt;
237 /** Data regarding a map repository. */
238 typedef struct _RepoData RepoData;
244 guint view_zoom_steps;
245 gboolean double_size;
248 GtkWidget *menu_item;
251 /** Data used during the asynchronous progress update phase of automatic map
253 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
254 struct _ProgressUpdateInfo {
258 guint tilex, tiley, zoom; /* for refresh. */
259 gint retries; /* if equal to zero, it means we're DELETING maps. */
264 typedef struct _RouteDownloadData RouteDownloadData;
265 struct _RouteDownloadData {
270 /** Data used during the asynchronous automatic route downloading operation. */
271 typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
272 struct _AutoRouteDownloadData {
274 gboolean in_progress;
278 RouteDownloadData rdl_data;
281 typedef struct _BrowseInfo BrowseInfo;