monkey-bubble r341 - in trunk: . src/monkey
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r341 - in trunk: . src/monkey
- Date: Sat, 9 Feb 2008 14:48:23 +0000 (GMT)
Author: herzi
Date: Sat Feb 9 14:48:23 2008
New Revision: 341
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=341&view=rev
Log:
2008-02-09 Sven Herzberg <sven imendio com>
* src/monkey/bubble.c: (bubble_init): use G_DEFINE_TYPE
Modified:
trunk/ChangeLog
trunk/src/monkey/bubble.c
Modified: trunk/src/monkey/bubble.c
==============================================================================
--- trunk/src/monkey/bubble.c (original)
+++ trunk/src/monkey/bubble.c Sat Feb 9 14:48:23 2008
@@ -40,9 +40,12 @@
static guint32 signals[LAST_SIGNAL];
+G_DEFINE_TYPE (Bubble, bubble, G_TYPE_OBJECT);
-static void bubble_instance_init(Bubble * bubble) {
- bubble->private =g_new0 (BubblePrivate, 1);
+static void
+bubble_init (Bubble* bubble)
+{
+ bubble->private = g_new0 (BubblePrivate, 1);
}
static void bubble_finalize(GObject* object) {
@@ -76,35 +79,6 @@
NULL);
}
-
-GType bubble_get_type(void) {
- static GType bubble_type = 0;
-
- if (!bubble_type) {
- static const GTypeInfo bubble_info = {
- sizeof(BubbleClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) bubble_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(Bubble),
- 1, /* n_preallocs */
- (GInstanceInitFunc) bubble_instance_init,
- };
-
-
-
- bubble_type = g_type_register_static(G_TYPE_OBJECT,
- "Bubble",
- &bubble_info, 0);
- }
-
- return bubble_type;
-}
-
-
-
Bubble * bubble_new( Color color,gdouble x,gdouble y) {
Bubble * bubble;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]