]> Pileus Git - aweather/blob - src/plugins/level2.h
Convert GtkBox and GtkScale to GTK 3 version
[aweather] / src / plugins / level2.h
1 /*
2  * Copyright (C) 2009-2011 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_LEVEL2_H__
19 #define __AWEATHER_LEVEL2_H__
20
21 #include <grits.h>
22 #include "radar-info.h"
23
24 /* Level2 */
25 #define AWEATHER_TYPE_LEVEL2            (aweather_level2_get_type())
26 #define AWEATHER_LEVEL2(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),   AWEATHER_TYPE_LEVEL2, AWeatherLevel2))
27 #define AWEATHER_IS_LEVEL2(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),   AWEATHER_TYPE_LEVEL2))
28 #define AWEATHER_LEVEL2_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST   ((klass), AWEATHER_TYPE_LEVEL2, AWeatherLevel2Class))
29 #define AWEATHER_IS_LEVEL2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE   ((klass), AWEATHER_TYPE_LEVEL2))
30 #define AWEATHER_LEVEL2_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),   AWEATHER_TYPE_LEVEL2, AWeatherLevel2Class))
31
32 typedef struct _AWeatherLevel2      AWeatherLevel2;
33 typedef struct _AWeatherLevel2Class AWeatherLevel2Class;
34
35 struct _AWeatherLevel2 {
36         GritsObject       parent;
37         Radar            *radar;
38         AWeatherColormap *colormap;
39
40         /* Private */
41         GritsVolume      *volume;
42         Sweep            *sweep;
43         AWeatherColormap *sweep_colors;
44         gdouble           sweep_coords[2];
45         guint             sweep_tex;
46 };
47
48 struct _AWeatherLevel2Class {
49         GritsObjectClass parent_class;
50 };
51
52 GType aweather_level2_get_type(void);
53
54 AWeatherLevel2 *aweather_level2_new(Radar *radar, AWeatherColormap *colormap);
55
56 AWeatherLevel2 *aweather_level2_new_from_file(const gchar *file, const gchar *site,
57                 AWeatherColormap *colormap);
58
59 void aweather_level2_set_sweep(AWeatherLevel2 *level2,
60                 int type, gfloat elev);
61
62 void aweather_level2_set_iso(AWeatherLevel2 *level2, gfloat level);
63
64 GtkWidget *aweather_level2_get_config(AWeatherLevel2 *level2);
65
66 #endif