X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fplugin-radar.h;h=33b9d32df44805f6e7693745e981b8e915ed39af;hb=13e5efb9aae0da9f9c3cc6e0c32aafae2037de18;hp=d6e85b2ddeb55511c7bf7779a233934c332037e0;hpb=f230908a4780fd954772bbc3d17658aba86baea8;p=grits diff --git a/src/plugin-radar.h b/src/plugin-radar.h index d6e85b2..33b9d32 100644 --- a/src/plugin-radar.h +++ b/src/plugin-radar.h @@ -1,6 +1,64 @@ -#ifndef RADAR_H -#define RADAR_H +/* + * Copyright (C) 2009 Andy Spencer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -gboolean radar_init(GtkDrawingArea *drawing, GtkNotebook *config); +#ifndef __RADAR_H__ +#define __RADAR_H__ + +#include +#include + +/* TODO: convert */ +typedef struct { + char *name; + guint8 data[256][4]; +} colormap_t; +extern colormap_t colormaps[]; + +#define AWEATHER_TYPE_RADAR (aweather_radar_get_type ()) +#define AWEATHER_RADAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AWEATHER_TYPE_RADAR, AWeatherRadar)) +#define AWEATHER_IS_RADAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AWEATHER_TYPE_RADAR)) +#define AWEATHER_RADAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AWEATHER_TYPE_RADAR, AWeatherRadarClass)) +#define AWEATHER_IS_RADAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AWEATHER_TYPE_RADAR)) +#define AWEATHER_RADAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AWEATHER_TYPE_RADAR, AWeatherRadarClass)) + +typedef struct _AWeatherRadar AWeatherRadar; +typedef struct _AWeatherRadarClass AWeatherRadarClass; + +struct _AWeatherRadar { + GObject parent_instance; + + /* instance members */ + AWeatherGui *gui; + GtkWidget *config_body; + + /* Private data for loading radars */ + Radar *cur_radar; + Sweep *cur_sweep; + colormap_t *cur_colormap; + guint cur_sweep_tex; +}; + +struct _AWeatherRadarClass { + GObjectClass parent_class; +}; + +GType aweather_radar_get_type(); + +/* Methods */ +AWeatherRadar *aweather_radar_new(AWeatherGui *gui); #endif