]> err.no Git - mapper/blobdiff - src/mapper-types.h
Move some variables around
[mapper] / src / mapper-types.h
index 5e005ac4129864ae90557fa933a151b324cfeda1..914290bb30cd58c119d878ef07cc795e10c203ee 100644 (file)
@@ -1,12 +1,27 @@
 #include "config.h"
 
-#define _GNU_SOURCE
+#ifndef _MAPPER_TYPES_H
+#define _MAPPER_TYPES_H
 
 #include <math.h>
 #include <gtk/gtk.h>
+#include <curl/multi.h>
 
-#ifndef _MAPPER_TYPES_H
-#define _MAPPER_TYPES_H
+/** Generic search item list indexes */
+typedef enum {
+       ITEM_ID,
+       ITEM_CATID,
+       ITEM_LAT,
+       ITEM_LON,
+       ITEM_DIST,
+       ITEM_LATLON,
+       ITEM_LABEL,
+       ITEM_DESC,
+       ITEM_CATLAB,
+       ITEM_ICON,
+       ITEM_COLOR,
+       ITEM_NUM_COLUMNS
+} item_list_id;
 
 /** This enumerated type defines the supported types of repositories. */
 typedef enum {
@@ -18,43 +33,13 @@ typedef enum {
        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;
 
@@ -65,35 +50,10 @@ typedef enum {
        CAT_LABEL,
        CAT_DESC,
        CAT_POI_CNT,
+       CAT_ICON,
        CAT_NUM_COLUMNS
 } CategoryList;
 
-/** POI list **/
-typedef enum {
-       POI_POIID,
-       POI_CATID,
-       POI_LAT,
-       POI_LON,
-       POI_LATLON,
-       POI_LABEL,
-       POI_DESC,
-       POI_CATLAB,
-       POI_NUM_COLUMNS
-} POIList;
-
-/** 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,
@@ -167,17 +127,6 @@ typedef enum {
 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,
@@ -187,53 +136,6 @@ typedef enum {
 } 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 {
@@ -284,9 +186,4 @@ struct _BrowseInfo {
        GtkWidget *txt;
 };
 
-Point _point_null;
-
-Position _home;
-Position _dest;
-
 #endif