X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fgis-viewer.h;h=76a2d117c098dcd4843aa1c8f6448794f6580329;hp=ba92b494c5f9db93475c6e02b8adfe7c7c066029;hb=02d47fe228b984375a98b87d3c2b3b69f75e8b1e;hpb=b87064909e6d20e1ee2995adae0c1ce5cb692d7e diff --git a/src/gis-viewer.h b/src/gis-viewer.h index ba92b49..76a2d11 100644 --- a/src/gis-viewer.h +++ b/src/gis-viewer.h @@ -22,9 +22,37 @@ #include /* Rendering levels */ +/** + * GIS_LEVEL_BACKGROUND: + * + * The level used to draw background objects (stars, atmosphere, etc). + */ #define GIS_LEVEL_BACKGROUND -100 + +/** + * GIS_LEVEL_WORLD: + * + * The level used to draw world objects. This is for both surface data as well + * as things in the air or underground. Most objects should use + * %GIS_LEVEL_WORLD; + */ #define GIS_LEVEL_WORLD 0 + +/** + * GIS_LEVEL_OVERLAY: + * + * The level used to draw screen overlays. These will be drawn in front of most + * of ther objects. Text and markers should use %GIS_LEVEL_OVERLAY. + */ #define GIS_LEVEL_OVERLAY 100 + +/** + * GIS_LEVEL_HUD: + * + * The level used to draw the Heads Up Display. This is for things that are not + * anchored at all the the world. They should be drawn in front of everything + * else. + */ #define GIS_LEVEL_HUD 200 /* Type macros */ @@ -38,6 +66,16 @@ typedef struct _GisViewer GisViewer; typedef struct _GisViewerClass GisViewerClass; +/** + * GisHeightFunc: + * @lat: the target latitude + * @lon: the target longitude + * @user_data: user data passed to the function + * + * Determine the surface elevation (ground level) at a given point. + * + * Returns: the elevation in meters above sea level + */ typedef gdouble (*GisHeightFunc)(gdouble lat, gdouble lon, gpointer user_data); #include "gis-plugin.h" @@ -51,7 +89,7 @@ struct _GisViewer { /* instance members */ GisPlugins *plugins; GisPrefs *prefs; - gchar *time; + time_t time; gdouble location[3]; gdouble rotation[3]; gboolean offline; @@ -87,8 +125,8 @@ GType gis_viewer_get_type(void); /* Methods */ void gis_viewer_setup(GisViewer *viewer, GisPlugins *plugins, GisPrefs *prefs); -void gis_viewer_set_time(GisViewer *viewer, const gchar *time); -gchar *gis_viewer_get_time(GisViewer *viewer); +void gis_viewer_set_time(GisViewer *viewer, time_t time); +time_t gis_viewer_get_time(GisViewer *viewer); void gis_viewer_set_location(GisViewer *viewer, gdouble lat, gdouble lon, gdouble elev); void gis_viewer_get_location(GisViewer *viewer, gdouble *lat, gdouble *lon, gdouble *elev);