[cairo-commit] goocanvas/src goocanvasitem.h, 1.21, 1.22 goocanvasutils.c, 1.14, 1.15

Damon Chaplin commit at pdx.freedesktop.org
Fri Apr 27 03:02:01 PDT 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv1101/src

Modified Files:
	goocanvasitem.h goocanvasutils.c 
Log Message:
2007-04-27  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasitem.h: 
	* src/goocanvasutils.c (goo_canvas_bounds_get_type): added type stuff
	for language bindings (patch from Murray Cumming).



Index: goocanvasitem.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitem.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- goocanvasitem.h	30 Mar 2007 11:40:28 -0000	1.21
+++ goocanvasitem.h	27 Apr 2007 10:01:51 -0000	1.22
@@ -49,6 +49,9 @@
   gdouble x1, y1, x2, y2;
 };
 
+GType goo_canvas_bounds_get_type (void) G_GNUC_CONST;
+#define GOO_TYPE_CANVAS_BOUNDS (goo_canvas_bounds_get_type ())
+
 
 #define GOO_TYPE_CANVAS_ITEM            (goo_canvas_item_get_type ())
 #define GOO_CANVAS_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_ITEM, GooCanvasItem))

Index: goocanvasutils.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasutils.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- goocanvasutils.c	30 Mar 2007 11:40:28 -0000	1.14
+++ goocanvasutils.c	27 Apr 2007 10:01:51 -0000	1.15
@@ -1168,4 +1168,27 @@
 }
 
 
+static GooCanvasBounds *
+goo_canvas_bounds_copy (const GooCanvasBounds *bounds)
+{
+  GooCanvasBounds *result = g_new (GooCanvasBounds, 1);
+  *result = *bounds;
+
+  return result;
+}
+
+GType
+goo_canvas_bounds_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static
+      ("GooCanvasBounds",
+       (GBoxedCopyFunc) goo_canvas_bounds_copy,
+       (GBoxedFreeFunc) g_free);
+
+  return our_type;
+}
+
 



More information about the cairo-commit mailing list