]> Pileus Git - grits/blob - src/plugins/test.c
Add support for GisMarker to Gis{Viewer,OpenGL}
[grits] / src / plugins / test.c
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 #include <gtk/gtkgl.h>
19 #include <GL/gl.h>
20 #include <GL/glu.h>
21
22 #include <gis.h>
23
24 #include "test.h"
25
26 /***********
27  * Methods *
28  ***********/
29 GisPluginTest *gis_plugin_test_new(GisViewer *viewer)
30 {
31         g_debug("GisPluginTest: new");
32         GisPluginTest *self = g_object_new(GIS_TYPE_PLUGIN_TEST, NULL);
33         self->viewer = viewer;
34
35         GisMarker *marker = gis_marker_new("St. Charles");
36         gis_point_set_lle(gis_object_center(marker), 38.841847, -90.491982, 0);
37         gis_viewer_add_object(self->viewer, GIS_OBJECT(marker));
38
39         return self;
40 }
41
42
43 /****************
44  * GObject code *
45  ****************/
46 /* Plugin init */
47 static void gis_plugin_test_plugin_init(GisPluginInterface *iface);
48 G_DEFINE_TYPE_WITH_CODE(GisPluginTest, gis_plugin_test, G_TYPE_OBJECT,
49                 G_IMPLEMENT_INTERFACE(GIS_TYPE_PLUGIN,
50                         gis_plugin_test_plugin_init));
51 static void gis_plugin_test_plugin_init(GisPluginInterface *iface)
52 {
53         g_debug("GisPluginTest: plugin_init");
54         /* Add methods to the interface */
55 }
56 /* Class/Object init */
57 static void gis_plugin_test_init(GisPluginTest *self)
58 {
59         g_debug("GisPluginTest: init");
60 }
61 static void gis_plugin_test_class_init(GisPluginTestClass *klass)
62 {
63         g_debug("GisPluginTest: class_init");
64 }