]> Pileus Git - grits/blob - src/gis-opengl.h
80e866ee8fb3920b2bd718d7cc50a81f254b5270
[grits] / src / gis-opengl.h
1 /*
2  * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
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_OPENGL_H__
19 #define __GIS_OPENGL_H__
20
21 #include <glib-object.h>
22
23 /* Type macros */
24 #define GIS_TYPE_OPENGL            (gis_opengl_get_type())
25 #define GIS_OPENGL(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   GIS_TYPE_OPENGL, GisOpenGL))
26 #define GIS_IS_OPENGL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   GIS_TYPE_OPENGL))
27 #define GIS_OPENGL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), GIS_TYPE_OPENGL, GisOpenGLClass))
28 #define GIS_IS_OPENGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), GIS_TYPE_OPENGL))
29 #define GIS_OPENGL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   GIS_TYPE_OPENGL, GisOpenGLClass))
30
31 typedef struct _GisOpenGL      GisOpenGL;
32 typedef struct _GisOpenGLClass GisOpenGLClass;
33
34 #include "gis-viewer.h"
35 #include "roam.h"
36
37 struct _GisOpenGL {
38         GisViewer parent_instance;
39
40         /* instance members */
41         GTree      *objects;
42         RoamSphere *sphere;
43         GMutex     *sphere_lock;
44         guint       sm_source[2];
45         guint       ue_source;
46
47         /* for testing */
48         gboolean    wireframe;
49 };
50
51 struct _GisOpenGLClass {
52         GisViewerClass parent_class;
53
54         /* class members */
55 };
56
57 GType gis_opengl_get_type(void);
58
59 /* Methods */
60 GisViewer *gis_opengl_new(GisPlugins *plugins, GisPrefs *prefs);
61
62 #endif