From 490827dedd73655f2420c790376bf629a8b86403 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 8 Feb 2010 22:42:07 +0000 Subject: [PATCH] Libgis updates --- src/plugins/level2.c | 6 ++---- src/plugins/level2.h | 15 ++++++++++----- src/plugins/radar.c | 6 ++---- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/plugins/level2.c b/src/plugins/level2.c index 3fa7d4e..50e500e 100644 --- a/src/plugins/level2.c +++ b/src/plugins/level2.c @@ -121,11 +121,11 @@ static gboolean _decompress_radar(const gchar *file, const gchar *raw) /********************* * Drawing functions * *********************/ -static gpointer _draw_radar(GisCallback *_self, gpointer _viewer) +static void _draw_radar(GisCallback *_self, gpointer _viewer) { AWeatherLevel2 *self = AWEATHER_LEVEL2(_self); if (!self->sweep || !self->sweep_tex) - return NULL; + return; /* Draw wsr88d */ Sweep *sweep = self->sweep; @@ -186,8 +186,6 @@ static gpointer _draw_radar(GisCallback *_self, gpointer _viewer) //glTexCoord2d( 1., 1.); glVertex3f( 0., 500., 3.); // top right //glTexCoord2d( 1., 0.); glVertex3f( 0., 0., 3.); // bot right //glEnd(); - - return NULL; } diff --git a/src/plugins/level2.h b/src/plugins/level2.h index 3577ed5..15e079c 100644 --- a/src/plugins/level2.h +++ b/src/plugins/level2.h @@ -22,12 +22,15 @@ #include "aweather-colormap.h" /* Level2 */ -#define AWEATHER_TYPE_LEVEL2 (aweather_level2_get_type()) +#define AWEATHER_TYPE_LEVEL2 (aweather_level2_get_type()) +#define AWEATHER_LEVEL2(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AWEATHER_TYPE_LEVEL2, AWeatherLevel2)) +#define AWEATHER_IS_LEVEL2(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AWEATHER_TYPE_LEVEL2)) +#define AWEATHER_LEVEL2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AWEATHER_TYPE_LEVEL2, AWeatherLevel2Class)) +#define AWEATHER_IS_LEVEL2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AWEATHER_TYPE_LEVEL2)) +#define AWEATHER_LEVEL2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AWEATHER_TYPE_LEVEL2, AWeatherLevel2Class)) -GOBJECT_HEAD( - AWEATHER, LEVEL2, - AWeather, Level2, - aweather, level2); +typedef struct _AWeatherLevel2 AWeatherLevel2; +typedef struct _AWeatherLevel2Class AWeatherLevel2Class; struct _AWeatherLevel2 { GisCallback parent; @@ -45,6 +48,8 @@ struct _AWeatherLevel2Class { GisCallbackClass parent_class; }; +GType aweather_level2_get_type(void); + AWeatherLevel2 *aweather_level2_new(GisViewer *viewer, AWeatherColormap *colormap, Radar *radar); diff --git a/src/plugins/radar.c b/src/plugins/radar.c index 7a1bf45..62d6dc0 100644 --- a/src/plugins/radar.c +++ b/src/plugins/radar.c @@ -31,11 +31,11 @@ #include "../aweather-location.h" /* Drawing functions */ -static gpointer _draw_hud(GisCallback *callback, gpointer _self) +static void _draw_hud(GisCallback *callback, gpointer _self) { GisPluginRadar *self = GIS_PLUGIN_RADAR(_self); if (!self->colormap) - return NULL; + return; g_debug("GisPluginRadar: _draw_hud"); /* Print the color table */ @@ -56,8 +56,6 @@ static gpointer _draw_hud(GisCallback *callback, gpointer _self) glVertex3f(-0.9, (float)((i ) - 256/2)/(256/2), 0.0); // bot right } glEnd(); - - return NULL; } -- 2.43.2