]> Pileus Git - grits/blob - src/aweather-gui.h
Adding a prefs dialog (which needs a lot more work)
[grits] / src / aweather-gui.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 __AWEATHER_GUI_H__
19 #define __AWEATHER_GUI_H__
20
21 #include <gtk/gtk.h>
22 #include <glib-object.h>
23 #include "gis-opengl.h"
24 #include "gis-world.h"
25 #include "gis-view.h"
26 #include "aweather-plugin.h"
27
28 /* Type macros */
29 #define AWEATHER_TYPE_GUI            (aweather_gui_get_type())
30 #define AWEATHER_GUI(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   AWEATHER_TYPE_GUI, AWeatherGui))
31 #define AWEATHER_IS_GUI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   AWEATHER_TYPE_GUI))
32 #define AWEATHER_GUI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), AWEATHER_TYPE_GUI, AWeatherGuiClass))
33 #define AWEATHER_IS_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), AWEATHER_TYPE_GUI))
34 #define AWEATHER_GUI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   AWEATHER_TYPE_GUI, AWeatherGuiClass))
35
36 typedef struct _AWeatherGui      AWeatherGui;
37 typedef struct _AWeatherGuiClass AWeatherGuiClass;
38
39 struct _AWeatherGui {
40         GtkWindow parent_instance;
41
42         /* instance members */
43         GtkBuilder *builder;
44         GisWorld   *world;
45         GisView    *view;
46         GisOpenGL  *opengl;
47         GList      *plugins;
48         GKeyFile   *prefs;
49         GtkListStore *gtk_plugins;
50 };
51
52 struct _AWeatherGuiClass {
53         GtkWindowClass parent_class;
54         
55         /* class members */
56 };
57
58 GType aweather_gui_get_type(void);
59
60 /* Methods */
61 AWeatherGui *aweather_gui_new();
62
63 GisWorld    *aweather_gui_get_world(AWeatherGui *gui);
64 GisOpenGL   *aweather_gui_get_opengl(AWeatherGui *gui);
65 GisView     *aweather_gui_get_view(AWeatherGui *gui);
66
67 GtkWidget   *aweather_gui_get_widget(AWeatherGui *gui, const gchar *name);
68 GObject     *aweather_gui_get_object(AWeatherGui *gui, const gchar *name);
69
70 gboolean     aweather_gui_load_plugin(AWeatherGui *gui, const gchar *name);
71 gboolean     aweather_gui_unload_plugin(AWeatherGui *gui, const gchar *name);
72
73 #endif