]> Pileus Git - aweather/commitdiff
Libgis updates
authorAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:42:07 +0000 (22:42 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:42:07 +0000 (22:42 +0000)
src/plugins/level2.c
src/plugins/level2.h
src/plugins/radar.c

index 3fa7d4e627628b260b41f7851afe76d2c8171813..50e500e056f51f0681decd58fc341d893c7fc063 100644 (file)
@@ -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;
 }
 
 
index 3577ed52bab0c9f1d41d0ff5dbdd0f0b8d84a8c2..15e079c7da6fedd4a5b36c439ebc70fa9151d968 100644 (file)
 #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);
 
index 7a1bf45f2130adadf5d75ef9073050c55b633e12..62d6dc02e8af26a1bad550a6c811b8af299eacbf 100644 (file)
 #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;
 }