]> Pileus Git - aweather/blob - src/aweather-gui.h
Save the http object between sites
[aweather] / src / aweather-gui.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 __AWEATHER_GUI_H__
19 #define __AWEATHER_GUI_H__
20
21 #include <gtk/gtk.h>
22 #include <glib-object.h>
23
24 #include <gis.h>
25
26 /* Type macros */
27 #define AWEATHER_TYPE_GUI            (aweather_gui_get_type())
28 #define AWEATHER_GUI(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   AWEATHER_TYPE_GUI, AWeatherGui))
29 #define AWEATHER_IS_GUI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   AWEATHER_TYPE_GUI))
30 #define AWEATHER_GUI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), AWEATHER_TYPE_GUI, AWeatherGuiClass))
31 #define AWEATHER_IS_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), AWEATHER_TYPE_GUI))
32 #define AWEATHER_GUI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   AWEATHER_TYPE_GUI, AWeatherGuiClass))
33
34 typedef struct _AWeatherGui      AWeatherGui;
35 typedef struct _AWeatherGuiClass AWeatherGuiClass;
36
37 struct _AWeatherGui {
38         GtkWindow parent_instance;
39
40         /* instance members */
41         GtkBuilder   *builder;
42         GisViewer    *viewer;
43         GisPlugins   *plugins;
44         GisPrefs     *prefs;
45         GtkListStore *gtk_plugins;
46
47         /* Deprecated */
48         GisHttp *http;
49 };
50
51 struct _AWeatherGuiClass {
52         GtkWindowClass parent_class;
53         
54         /* class members */
55 };
56
57 GType aweather_gui_get_type(void);
58
59 /* Methods */
60 AWeatherGui *aweather_gui_new();
61
62 GisViewer   *aweather_gui_get_viewer(AWeatherGui *gui);
63
64 GtkWidget   *aweather_gui_get_widget(AWeatherGui *gui, const gchar *name);
65 GObject     *aweather_gui_get_object(AWeatherGui *gui, const gchar *name);
66
67 void         aweather_gui_attach_plugin(AWeatherGui *self, const gchar *name);
68 void         aweather_gui_deattach_plugin(AWeatherGui *self, const gchar *name);
69
70 #endif