]> Pileus Git - grits/blob - src/aweather-gui.h
70e03a6885e1d9a867e5b102e4c372dd8b55162a
[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 "aweather-view.h"
24
25 /* Type macros */
26 #define AWEATHER_TYPE_GUI            (aweather_gui_get_type())
27 #define AWEATHER_GUI(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   AWEATHER_TYPE_GUI, AWeatherGui))
28 #define AWEATHER_IS_GUI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   AWEATHER_TYPE_GUI))
29 #define AWEATHER_GUI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), AWEATHER_TYPE_GUI, AWeatherGuiClass))
30 #define AWEATHER_IS_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), AWEATHER_TYPE_GUI))
31 #define AWEATHER_GUI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   AWEATHER_TYPE_GUI, AWeatherGuiClass))
32
33 typedef struct _AWeatherGui      AWeatherGui;
34 typedef struct _AWeatherGuiClass AWeatherGuiClass;
35
36 struct _AWeatherGui {
37         GObject parent_instance;
38
39         /* instance members */
40         AWeatherView   *view;
41         GtkBuilder     *builder;
42         GtkWindow      *window;
43         GtkNotebook    *tabs;
44         GtkDrawingArea *drawing;
45 };
46
47 struct _AWeatherGuiClass {
48         GObjectClass parent_class;
49         
50         /* class members */
51 };
52
53 GType aweather_gui_get_type(void);
54
55 /* Methods */
56 AWeatherGui    *aweather_gui_new();
57 AWeatherView   *aweather_gui_get_view(AWeatherGui *gui);
58 GtkWidget      *aweather_gui_get_widget(AWeatherGui *gui, const gchar *name);
59 void            aweather_gui_gl_redraw(AWeatherGui *gui);
60 void            aweather_gui_gl_begin(AWeatherGui *gui);
61 void            aweather_gui_gl_end(AWeatherGui *gui);
62 void            aweather_gui_gl_flush(AWeatherGui *gui);
63
64 //void aweather_gui_register_plugin(AWeatherGui *gui, AWeatherPlugin *plugin);
65
66 #endif