r7022 - hippo-canvas/trunk/python



Author: hp
Date: 2007-12-11 15:03:08 -0600 (Tue, 11 Dec 2007)
New Revision: 7022

Modified:
   hippo-canvas/trunk/python/canvas-box-child.c
   hippo-canvas/trunk/python/canvas-box-child.h
   hippo-canvas/trunk/python/hippo.defs
Log:
support BoxChild::visible and overriding Box::paint_children

Modified: hippo-canvas/trunk/python/canvas-box-child.c
===================================================================
--- hippo-canvas/trunk/python/canvas-box-child.c	2007-12-11 20:08:15 UTC (rev 7021)
+++ hippo-canvas/trunk/python/canvas-box-child.c	2007-12-11 21:03:08 UTC (rev 7022)
@@ -1,3 +1,4 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
 #include "canvas-box-child.h"
 
 typedef struct {
@@ -113,8 +114,19 @@
     return pygobject_new((GObject *)ret);
 }
 
+static PyObject *
+_wrap_hippo_canvas_box_child__get_visible(PyObject *self, void *closure)
+{
+    gboolean ret;
+    
+    ret = HIPPO_CANVAS_BOX_CHILD(pygobject_get(self))->item;
+
+    return PyBool_FromLong(ret);
+}
+
 static const PyGetSetDef hippo_canvas_box_child_getsets[] = {
-    { "item", (getter)_wrap_hippo_canvas_box_child__get_item, (setter)0 },
+    { "item",    (getter)_wrap_hippo_canvas_box_child__get_item, (setter)0 },
+    { "visible", (getter)_wrap_hippo_canvas_box_child__get_visible, (setter)0 },    
     { NULL, (getter)0, (setter)0 },
 };
 

Modified: hippo-canvas/trunk/python/canvas-box-child.h
===================================================================
--- hippo-canvas/trunk/python/canvas-box-child.h	2007-12-11 20:08:15 UTC (rev 7021)
+++ hippo-canvas/trunk/python/canvas-box-child.h	2007-12-11 21:03:08 UTC (rev 7022)
@@ -1,3 +1,4 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
 #ifndef __CANVAS_BOX_CHILD_H__
 #define __CANVAS_BOX_CHILD_H__
 

Modified: hippo-canvas/trunk/python/hippo.defs
===================================================================
--- hippo-canvas/trunk/python/hippo.defs	2007-12-11 20:08:15 UTC (rev 7021)
+++ hippo-canvas/trunk/python/hippo.defs	2007-12-11 21:03:08 UTC (rev 7022)
@@ -614,6 +614,16 @@
   )
 )
 
+(define-virtual paint_children
+  (of-object "HippoCanvasBox")
+  (c-name "hippo_canvas_box_paint_children")
+  (return-type "none")
+  (parameters
+    '("cairo_t*" "cr")
+    '("HippoRectangle*" "damaged_box")
+  )
+)
+
 (define-method get_position
   (of-object "HippoCanvasBox")
   (c-name "hippo_canvas_box_get_position")



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