]> Pileus Git - aweather/blob - src/plugins/level2.h
e0c5783ebf3d9a4f25015f1940d894c7db81c9e4
[aweather] / src / plugins / level2.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_LEVEL2_H__
19 #define __AWEATHER_LEVEL2_H__
20
21 #include <gis.h>
22 #include "aweather-colormap.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         GisObject         parent;
37         GisViewer        *viewer;
38         Radar            *radar;
39         AWeatherColormap *colormap;
40
41         /* Private */
42         Sweep            *sweep;
43         AWeatherColormap *sweep_colors;
44         gdouble           sweep_coords[2];
45         guint             sweep_tex;
46 };
47
48 struct _AWeatherLevel2Class {
49         GisObjectClass parent_class;
50 };
51
52 GType aweather_level2_get_type(void);
53
54 AWeatherLevel2 *aweather_level2_new(GisViewer *viewer,
55                 AWeatherColormap *colormap, Radar *radar);
56
57 AWeatherLevel2 *aweather_level2_new_from_file(GisViewer *viewer,
58                 AWeatherColormap *colormap,
59                 const gchar *file, const gchar *site);
60
61 void aweather_level2_set_sweep(AWeatherLevel2 *level2,
62                 int type, float elev);
63
64 GtkWidget *aweather_level2_get_config(AWeatherLevel2 *level2);
65
66 #endif