gnomemm r1325 - in goocanvasmm/trunk: . goocanvas/src



Author: jjongsma
Date: Thu Feb  7 22:34:45 2008
New Revision: 1325
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1325&view=rev

Log:
	* goocanvas/src/libgoocanvas_vfuncs.defs: added vfunc definitions for
	ItemSimple
	* goocanvas/src/itemsimple.hg: added _MEMBER_GET/SET for bounds, attempted
	to wrap the vfuncs, but there seems to be a ref-counting issue -- needs
	investigation.



Modified:
   goocanvasmm/trunk/ChangeLog
   goocanvasmm/trunk/goocanvas/src/itemsimple.hg
   goocanvasmm/trunk/goocanvas/src/libgoocanvas_vfuncs.defs

Modified: goocanvasmm/trunk/goocanvas/src/itemsimple.hg
==============================================================================
--- goocanvasmm/trunk/goocanvas/src/itemsimple.hg	(original)
+++ goocanvasmm/trunk/goocanvas/src/itemsimple.hg	Thu Feb  7 22:34:45 2008
@@ -84,6 +84,21 @@
   _WRAP_PROPERTY("can-focus", bool)
   _WRAP_PROPERTY("clip-path", Glib::ustring)
   _WRAP_PROPERTY("clip-path-fill-rule", Cairo::FillRule)
+
+#m4 _CONVERSION(`Bounds',`GooCanvasBounds',*($3).gobj())
+#m4 _CONVERSION(`GooCanvasBounds',`Bounds',`Glib::wrap(&$3)')
+  _MEMBER_GET(bounds, bounds, Bounds, GooCanvasBounds);
+  _MEMBER_SET(bounds, bounds, Bounds, GooCanvasBounds);
+
+protected:
+#m4 _CONVERSION(`cairo_t*',`const Cairo::RefPtr<Cairo::Context>&',`Cairo::RefPtr<Cairo::Context>(new Cairo::Context($3, false /* has reference */))')
+#m4 _CONVERSION(`const GooCanvasBounds*',`const Bounds&',`Glib::wrap($3)')
+  // TODO: wrapping these vfuncs causes classes that inherit from ItemSimple to
+  // stop working (e.g. Ellipse, Rect).  Ref-counting issue??
+  //_WRAP_VFUNC(void simple_create_path(const Cairo::RefPtr<Cairo::Context>& cr), "simple_create_path")
+  //_WRAP_VFUNC(void simple_update(const Cairo::RefPtr<Cairo::Context>& cr), "simple_update")
+  //_WRAP_VFUNC(void simple_paint(const Cairo::RefPtr<Cairo::Context>& cr, const Bounds& bounds), "simple_paint")
+  //_WRAP_VFUNC(bool simple_is_item_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& cr, bool is_pointer_event), "simple_is_item_at")
 };
 
 } //namespace Goocanvas

Modified: goocanvasmm/trunk/goocanvas/src/libgoocanvas_vfuncs.defs
==============================================================================
--- goocanvasmm/trunk/goocanvas/src/libgoocanvas_vfuncs.defs	(original)
+++ goocanvasmm/trunk/goocanvas/src/libgoocanvas_vfuncs.defs	Thu Feb  7 22:34:45 2008
@@ -235,8 +235,44 @@
 	)
 )
 
+; GooCanvasItemSimple
 
-; //TODO: And the rest. murrayc
+(define-vfunc simple_create_path
+ (of-object "GooCanvasItemSimple")
+ (return-type "void")
+ (parameters
+  '("cairo_t*" "cr")
+ )
+)
 
+(define-vfunc simple_update
+ (of-object "GooCanvasItemSimple")
+ (return-type "void")
+ (parameters
+  '("cairo_t*" "cr")
+ )
+)
+
+(define-vfunc simple_paint
+    (of-object "GooCanvasItemSimple")
+    (return-type "void")
+    (parameters
+        '("cairo_t*" "cr")
+        '("const-GooCanvasBounds*" "bounds")
+    )
+)
 
+(define-vfunc simple_is_item_at
+    (of-object "GooCanvasItemSimple")
+    (return-type "gboolean")
+    (parameters
+        '("gdouble" "x")
+        '("gdouble" "y")
+        '("cairo_t*" "cr")
+        '("gboolean" "is_pointer_event")
+    )
+)
+
+
+; //TODO: And the rest. murrayc
 



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