]> Pileus Git - grits/blob - src/gis-viewer.h
Merging GisWorld and GisView into GisViewer
[grits] / src / gis-viewer.h
1 /*
2  * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #ifndef __GIS_VIEW_H__
19 #define __GIS_VIEW_H__
20
21 #include <glib-object.h>
22
23 /* Type macros */
24 #define GIS_TYPE_VIEW            (gis_view_get_type())
25 #define GIS_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   GIS_TYPE_VIEW, GisView))
26 #define GIS_IS_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   GIS_TYPE_VIEW))
27 #define GIS_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), GIS_TYPE_VIEW, GisViewClass))
28 #define GIS_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), GIS_TYPE_VIEW))
29 #define GIS_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   GIS_TYPE_VIEW, GisViewClass))
30
31 typedef struct _GisView      GisView;
32 typedef struct _GisViewClass GisViewClass;
33
34 struct _GisView {
35         GObject parent_instance;
36
37         /* instance members */
38         gchar   *time;
39         gchar   *site;
40         gdouble  location[3];
41         gdouble  rotation[3];
42         gboolean offline;
43 };
44
45 struct _GisViewClass {
46         GObjectClass parent_class;
47
48         /* class members */
49 };
50
51 GType gis_view_get_type(void);
52
53 /* Methods */
54 GisView *gis_view_new();
55
56 void gis_view_set_time(GisView *view, const gchar *time);
57 gchar *gis_view_get_time(GisView *view);
58
59 void gis_view_set_location(GisView *view, gdouble  lat, gdouble  lon, gdouble  elev);
60 void gis_view_get_location(GisView *view, gdouble *lat, gdouble *lon, gdouble *elev);
61 void gis_view_pan         (GisView *view, gdouble  lat, gdouble  lon, gdouble  elev);
62 void gis_view_zoom        (GisView *view, gdouble  scale);
63
64 void gis_view_set_rotation(GisView *view, gdouble  x, gdouble  y, gdouble  z);
65 void gis_view_get_rotation(GisView *view, gdouble *x, gdouble *y, gdouble *z);
66 void gis_view_rotate      (GisView *view, gdouble  x, gdouble  y, gdouble  z);
67
68 /* To be deprecated, use {get,set}_location */
69 void gis_view_set_site(GisView *view, const gchar *site);
70 gchar *gis_view_get_site(GisView *view);
71
72 void gis_world_refresh(GisWorld *world);
73
74 void gis_world_set_offline(GisWorld *world, gboolean offline);
75 gboolean gis_world_get_offline(GisWorld *world);
76
77 #endif