gps->height=300;
gps->size=300;
gps->esid=0;
+gps->context=gtk_widget_get_pango_context(GTK_WIDGET(gps));
+gps->layout=pango_layout_new(gps->context);
+gps->fontdesc=pango_font_description_new();
+pango_font_description_set_family(gps->fontdesc, "Sans Serif");
+pango_font_description_set_size(gps->fontdesc, 10*PANGO_SCALE);
+pango_layout_set_font_description(gps->layout, gps->fontdesc);
+pango_layout_set_alignment(gps->layout, PANGO_ALIGN_CENTER);
}
static gboolean
GtkGps *gps;
GtkWidget *widget;
-gps=gtk_type_new(gtk_gps_get_type ());
+gps=g_object_new(GTK_GPS_TYPE, NULL);
gps->display_mode=display_mode;
gps->data=data;
widget=GTK_WIDGET(gps);
display_mode=GTK_GPS_MODE_SKY;
}
-gps->context=gtk_widget_get_pango_context(widget);
-gps->layout=pango_layout_new(gps->context);
-gps->fontdesc=pango_font_description_new();
-pango_font_description_set_family(gps->fontdesc, "Sans Serif");
-pango_font_description_set_size(gps->fontdesc, 10*PANGO_SCALE);
-pango_layout_set_font_description(gps->layout, gps->fontdesc);
-pango_layout_set_alignment(gps->layout, PANGO_ALIGN_CENTER);
-
-gps->esid=g_timeout_add(1000,(GSourceFunc)gtk_gps_refresh_cb, gps);
-
return GTK_WIDGET(gps);
}
gps->gc_w=gdk_gc_new(widget->window);
gdk_gc_set_rgb_fg_color(gps->gc_w, &color);
}
+
+gps->esid=g_timeout_add(1000,(GSourceFunc)gtk_gps_refresh_cb, gps);
}
static void