[grits] Add debugging to GritsCallback



commit 647a2a3f7145c664b4527fc234e3864335aaeb97
Author: Andy Spencer <andy753421 gmail com>
Date:   Sat Jan 22 19:51:10 2011 +0000

    Add debugging to GritsCallback

 src/objects/grits-callback.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/objects/grits-callback.c b/src/objects/grits-callback.c
index 8bc97c4..043ec87 100644
--- a/src/objects/grits-callback.c
+++ b/src/objects/grits-callback.c
@@ -57,12 +57,19 @@ static void proxy_draw(GritsObject *_cb, GritsOpenGL *opengl)
 
 /* GritsCallback */
 G_DEFINE_TYPE(GritsCallback, grits_callback, GRITS_TYPE_OBJECT);
+static void grits_callback_finalize(GObject *cb)
+{
+	g_debug("GritsCallback: finalize");
+}
 static void grits_callback_init(GritsCallback *cb)
 {
+	g_debug("GritsCallback: init");
 }
 
 static void grits_callback_class_init(GritsCallbackClass *klass)
 {
-	GritsObjectClass *object_class = GRITS_OBJECT_CLASS(klass);
-	object_class->draw = proxy_draw;
+	GritsObjectClass *grits_class  = GRITS_OBJECT_CLASS(klass);
+	GObjectClass     *object_class = G_OBJECT_CLASS(klass);
+	grits_class->draw      = proxy_draw;
+	object_class->finalize = grits_callback_finalize;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]