monkey-bubble r317 - in trunk: . src/view
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r317 - in trunk: . src/view
- Date: Sat, 9 Feb 2008 14:45:23 +0000 (GMT)
Author: herzi
Date: Sat Feb 9 14:45:23 2008
New Revision: 317
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=317&view=rev
Log:
2008-02-08 Sven Herzberg <sven imendio com>
* src/view/monkey-canvas.c: (monkey_canvas_init): use G_DEFINE_TYPE
Modified:
trunk/ChangeLog
trunk/src/view/monkey-canvas.c
Modified: trunk/src/view/monkey-canvas.c
==============================================================================
--- trunk/src/view/monkey-canvas.c (original)
+++ trunk/src/view/monkey-canvas.c Sat Feb 9 14:45:23 2008
@@ -70,6 +70,9 @@
gdouble x_center;
gdouble y_center;
};
+
+G_DEFINE_TYPE (MonkeyCanvas, monkey_canvas, GTK_TYPE_DRAWING_AREA);
+
static void monkey_canvas_scale_images(MonkeyCanvas * canvas);
void create_pixbuf_svg(Image * i );
@@ -112,8 +115,10 @@
gint x_size,
gint y_size);
-static void monkey_canvas_instance_init(MonkeyCanvas * monkey_canvas) {
- monkey_canvas->private =g_new0 (MonkeyCanvasPrivate, 1);
+static void
+monkey_canvas_init (MonkeyCanvas* monkey_canvas)
+{
+ monkey_canvas->private = g_new0 (MonkeyCanvasPrivate, 1);
}
static void monkey_canvas_finalize(GObject* object) {
@@ -136,34 +141,6 @@
object_class->finalize = monkey_canvas_finalize;
}
-
-GType monkey_canvas_get_type(void) {
- static GType monkey_canvas_type = 0;
-
- if (!monkey_canvas_type) {
- static const GTypeInfo monkey_canvas_info = {
- sizeof(MonkeyCanvasClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) monkey_canvas_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(MonkeyCanvas),
- 1, /* n_preallocs */
- (GInstanceInitFunc) monkey_canvas_instance_init,
- };
-
-
-
- monkey_canvas_type = g_type_register_static(gtk_drawing_area_get_type(),
- "MonkeyCanvas",
- &monkey_canvas_info,
- 0);
- }
-
- return monkey_canvas_type;
-}
-
gint monkey_canvas_expose (GtkWidget *widget, GdkEventExpose *event, gpointer data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]