7 #ifndef _MAPPER_TYPES_H
8 #define _MAPPER_TYPES_H
10 /** This enumerated type defines the supported types of repositories. */
12 REPOTYPE_NONE, /* No URL set. */
13 REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
14 REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
15 REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
16 REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
17 REPOTYPE_WMS /* "service=wms" */
20 /** Possible center modes. The "WAS" modes imply no current center mode;
21 * they only hint at what the last center mode was, so that it can be
24 CENTER_WAS_LATLON = -2,
31 /** This enum defines the states of the SAX parsing state machine. */
38 INSIDE_PATH_POINT_ELE,
39 INSIDE_PATH_POINT_TIME,
40 INSIDE_PATH_POINT_DESC,
46 /** POI dialog action **/
75 /** This enum defines the possible units we can use. */
82 gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
84 /* UNITS_CONVERTS, when multiplied, converts from NM. */
85 #define EARTH_RADIUS (3440.06479f)
86 gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
88 /** This enum defines the possible font sizes. */
99 gchar *INFO_FONT_TEXT[INFO_FONT_ENUM_COUNT];
101 /** This enum defines all of the key-customizable actions. */
103 CUSTOM_ACTION_PAN_NORTH,
104 CUSTOM_ACTION_PAN_WEST,
105 CUSTOM_ACTION_PAN_SOUTH,
106 CUSTOM_ACTION_PAN_EAST,
107 CUSTOM_ACTION_TOGGLE_AUTOCENTER,
108 CUSTOM_ACTION_ZOOM_IN,
109 CUSTOM_ACTION_ZOOM_OUT,
110 CUSTOM_ACTION_TOGGLE_FULLSCREEN,
111 CUSTOM_ACTION_TOGGLE_TRACKS,
112 CUSTOM_ACTION_TOGGLE_SCALE,
113 CUSTOM_ACTION_TOGGLE_POI,
114 CUSTOM_ACTION_CHANGE_REPO,
115 CUSTOM_ACTION_ROUTE_DISTNEXT,
116 CUSTOM_ACTION_ROUTE_DISTLAST,
117 CUSTOM_ACTION_TRACK_BREAK,
118 CUSTOM_ACTION_TRACK_DISTLAST,
119 CUSTOM_ACTION_TRACK_DISTFIRST,
120 CUSTOM_ACTION_TOGGLE_GPS,
121 CUSTOM_ACTION_TOGGLE_GPSINFO,
122 CUSTOM_ACTION_TOGGLE_SPEEDLIMIT,
123 CUSTOM_ACTION_ENUM_COUNT
125 gchar *CUSTOM_ACTION_TEXT[CUSTOM_ACTION_ENUM_COUNT];
127 /** This enum defines all of the customizable keys. */
136 CUSTOM_KEY_FULLSCREEN,
138 CUSTOM_KEY_ENUM_COUNT
140 gchar *CUSTOM_KEY_GCONF[CUSTOM_KEY_ENUM_COUNT];
141 gchar *CUSTOM_KEY_ICON[CUSTOM_KEY_ENUM_COUNT];
142 CustomAction CUSTOM_KEY_DEFAULT[CUSTOM_KEY_ENUM_COUNT];
144 /** This enum defines all of the colorable objects. */
147 COLORABLE_MARK_VELOCITY,
150 COLORABLE_TRACK_MARK,
151 COLORABLE_TRACK_BREAK,
154 COLORABLE_ROUTE_BREAK,
158 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
159 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
168 DEG_FORMAT_ENUM_COUNT
170 gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
173 SPEED_LOCATION_TOP_LEFT,
174 SPEED_LOCATION_TOP_RIGHT,
175 SPEED_LOCATION_BOTTOM_RIGHT,
176 SPEED_LOCATION_BOTTOM_LEFT,
177 SPEED_LOCATION_ENUM_COUNT
179 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
181 /** A lat/lon/alt position */
182 typedef struct _Position Position;
190 /** A general definition of a point in the Mapper unit system. */
191 typedef struct _Point Point;
199 /** A WayPoint, which is a Point with a description. */
200 typedef struct _WayPoint WayPoint;
206 /** A Path is a set of PathPoints and WayPoints. */
207 typedef struct _Path Path;
209 Point *head; /* points to first element in array; NULL if empty. */
210 Point *tail; /* points to last element in array. */
211 Point *cap; /* points after last slot in array. */
212 WayPoint *whead; /* points to first element in array; NULL if empty. */
213 WayPoint *wtail; /* points to last element in array. */
214 WayPoint *wcap; /* points after last slot in array. */
217 /** Data used during the SAX parsing operation. */
218 typedef struct _SaxData SaxData;
224 gboolean at_least_one_trkpt;
228 /** Data regarding a map repository. */
229 typedef struct _RepoData RepoData;
235 guint view_zoom_steps;
236 gboolean double_size;
239 GtkWidget *menu_item;
242 /** Data used during the asynchronous progress update phase of automatic map
244 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
245 struct _ProgressUpdateInfo {
249 guint tilex, tiley, zoom; /* for refresh. */
250 gint retries; /* if equal to zero, it means we're DELETING maps. */
255 typedef struct _RouteDownloadData RouteDownloadData;
256 struct _RouteDownloadData {
261 /** Data used during the asynchronous automatic route downloading operation. */
262 typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
263 struct _AutoRouteDownloadData {
265 gboolean in_progress;
269 RouteDownloadData rdl_data;
272 typedef struct _BrowseInfo BrowseInfo;