[grits] Add grits_object_queue_draw function



commit f753ec2d6f1e9ae40a650d4cda0d188d6a5f1be0
Author: Andy Spencer <andy753421 gmail com>
Date:   Sat Jan 22 20:11:13 2011 +0000

    Add grits_object_queue_draw function

 src/objects/grits-object.c |    6 ++++++
 src/objects/grits-object.h |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/objects/grits-object.c b/src/objects/grits-object.c
index 455723d..12b4f8d 100644
--- a/src/objects/grits-object.c
+++ b/src/objects/grits-object.c
@@ -92,6 +92,12 @@ void grits_object_draw(GritsObject *object, GritsOpenGL *opengl)
 	g_mutex_unlock(opengl->sphere_lock);
 }
 
+void grits_object_queue_draw(GritsObject *object)
+{
+	if (object->viewer)
+		gtk_widget_queue_draw(GTK_WIDGET(object->viewer));
+}
+
 /* GObject stuff */
 G_DEFINE_ABSTRACT_TYPE(GritsObject, grits_object, G_TYPE_OBJECT);
 static void grits_object_init(GritsObject *object)
diff --git a/src/objects/grits-object.h b/src/objects/grits-object.h
index 7ed49aa..848319a 100644
--- a/src/objects/grits-object.h
+++ b/src/objects/grits-object.h
@@ -56,6 +56,14 @@ GType grits_object_get_type(void);
 void grits_object_draw(GritsObject *object, GritsOpenGL *opengl);
 
 /**
+ * grits_object_queue_draw:
+ * @object: The #GritsObject that needs drawing
+ * 
+ * Cause the widget to be redrawn on the screen at some later point
+ */
+void grits_object_queue_draw(GritsObject *object);
+
+/**
  * grits_object_center:
  * @object: The #GritsObject to get the center of
  * 



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