#include "config.h"
-#define _GNU_SOURCE
+#ifndef _MAPPER_TYPES_H
+#define _MAPPER_TYPES_H
#include <math.h>
#include <gtk/gtk.h>
-
-#ifndef _MAPPER_TYPES_H
-#define _MAPPER_TYPES_H
+#include <curl/multi.h>
/** Generic search item list indexes */
typedef enum {
ITEM_LABEL,
ITEM_DESC,
ITEM_CATLAB,
+ ITEM_ICON,
+ ITEM_COLOR,
ITEM_NUM_COLUMNS
} item_list_id;
REPOTYPE_WMS /* "service=wms" */
} RepoType;
-/** Possible center modes. The "WAS" modes imply no current center mode;
- * they only hint at what the last center mode was, so that it can be
- * recalled. */
-typedef enum {
- CENTER_WAS_LATLON = -2,
- CENTER_WAS_LEAD = -1,
- CENTER_MANUAL =0,
- CENTER_LEAD = 1,
- CENTER_LATLON = 2
-} CenterMode;
-
-/** This enum defines the states of the SAX parsing state machine. */
-typedef enum {
- START,
- INSIDE_GPX,
- INSIDE_PATH,
- INSIDE_PATH_SEGMENT,
- INSIDE_PATH_POINT,
- INSIDE_PATH_POINT_ELE,
- INSIDE_PATH_POINT_TIME,
- INSIDE_PATH_POINT_DESC,
- FINISH,
- UNKNOWN,
- ERROR,
-} SaxState;
-
-/** POI dialog action **/
-typedef enum {
- ACTION_ADD_POI,
- ACTION_EDIT_POI,
-} POIAction;
-
/* Route list */
typedef enum {
ROUTE_LATLON,
ROUTE_DISTANCE,
ROUTE_WAYPOINT,
+ ROUTE_LAT,
+ ROUTE_LON,
ROUTE_NUM_COLUMNS
} RouteList;
CAT_LABEL,
CAT_DESC,
CAT_POI_CNT,
+ CAT_ICON,
CAT_NUM_COLUMNS
} CategoryList;
-/** This enum defines the possible units we can use. */
-typedef enum {
- UNITS_KM,
- UNITS_MI,
- UNITS_NM,
- UNITS_ENUM_COUNT
-} UnitType;
-gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
-
-/* UNITS_CONVERTS, when multiplied, converts from NM. */
-#define EARTH_RADIUS (3440.06479f)
-gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
-
/** This enum defines the possible font sizes. */
typedef enum {
INFO_FONT_XXSMALL,
gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
-typedef enum {
- DDPDDDDD,
- DD_MMPMMM,
- DD_MM_SSPS,
- DDPDDDDD_NSEW,
- DD_MMPMMM_NSEW,
- DD_MM_SSPS_NSEW,
- DEG_FORMAT_ENUM_COUNT
-} DegFormat;
-gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
-
typedef enum {
SPEED_LOCATION_TOP_LEFT,
SPEED_LOCATION_TOP_RIGHT,
} SpeedLocation;
gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
-/** A lat/lon/alt position */
-typedef struct _Position Position;
-struct _Position {
- gdouble lat;
- gdouble lon;
- gfloat altitude;
- gboolean valid;
-};
-
-/** A general definition of a point in the Mapper unit system. */
-typedef struct _Point Point;
-struct _Point {
- guint unitx;
- guint unity;
- time_t time;
- gfloat altitude;
-};
-
-/** A WayPoint, which is a Point with a description. */
-typedef struct _WayPoint WayPoint;
-struct _WayPoint {
- Point *point;
- gchar *desc;
-};
-
-/** A Path is a set of PathPoints and WayPoints. */
-typedef struct _Path Path;
-struct _Path {
- Point *head; /* points to first element in array; NULL if empty. */
- Point *tail; /* points to last element in array. */
- Point *cap; /* points after last slot in array. */
- WayPoint *whead; /* points to first element in array; NULL if empty. */
- WayPoint *wtail; /* points to last element in array. */
- WayPoint *wcap; /* points after last slot in array. */
-};
-
-/** Data used during the SAX parsing operation. */
-typedef struct _SaxData SaxData;
-struct _SaxData {
- Path path;
- SaxState state;
- SaxState prev_state;
- guint unknown_depth;
- gboolean at_least_one_trkpt;
- GString *chars;
-};
-
/** Data regarding a map repository. */
typedef struct _RepoData RepoData;
struct _RepoData {
GtkWidget *txt;
};
-Point _point_null;
-
-Position _home;
-Position _dest;
-
#endif