]> Pileus Git - grits/blob - src/aweather-view.h
(no commit message)
[grits] / src / aweather-view.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_VIEW_H__
19 #define __AWEATHER_VIEW_H__
20
21 #include <glib-object.h>
22
23 /* Type macros */
24 #define AWEATHER_TYPE_VIEW            (aweather_view_get_type())
25 #define AWEATHER_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   AWEATHER_TYPE_VIEW, AWeatherView))
26 #define AWEATHER_IS_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   AWEATHER_TYPE_VIEW))
27 #define AWEATHER_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), AWEATHER_TYPE_VIEW, AWeatherViewClass))
28 #define AWEATHER_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), AWEATHER_TYPE_VIEW))
29 #define AWEATHER_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   AWEATHER_TYPE_VIEW, AWeatherViewClass))
30
31 typedef struct _AWeatherView      AWeatherView;
32 typedef struct _AWeatherViewClass AWeatherViewClass;
33
34 struct _AWeatherView {
35         GObject parent_instance;
36
37         /* instance members */
38         gchar  *time;
39         gchar  *site;
40         gdouble location[3];
41 };
42
43 struct _AWeatherViewClass {
44         GObjectClass parent_class;
45         
46         /* class members */
47 };
48
49 GType aweather_view_get_type(void);
50
51 /* Methods */
52 AWeatherView *aweather_view_new();
53 void aweather_view_set_time(AWeatherView *view, const gchar *time);
54 gchar *aweather_view_get_time(AWeatherView *view);
55
56 void aweather_view_get_location(AWeatherView *view, gdouble *x, gdouble *y, gdouble *z);
57 void aweather_view_set_location(AWeatherView *view, gdouble  x, gdouble  y, gdouble  z);
58 void aweather_view_pan         (AWeatherView *view, gdouble  x, gdouble  y, gdouble  z);
59 void aweather_view_zoom        (AWeatherView *view, gdouble  scale);
60
61 void aweather_view_refresh(AWeatherView *view);
62
63 /* To be deprecated, use {get,set}_location */
64 void aweather_view_set_site(AWeatherView *view, const gchar *site);
65 gchar *aweather_view_get_site(AWeatherView *view);
66
67 #endif