[cairo-commit] goocanvas/src goocanvasgroup.c, 1.11,
1.12 goocanvasgroup.h, 1.6, 1.7 goocanvasmodelsimple.c, 1.3, 1.4
Damon Chaplin
commit at pdx.freedesktop.org
Wed Jul 26 08:45:45 PDT 2006
Committed by: damon
Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv30992/src
Modified Files:
goocanvasgroup.c goocanvasgroup.h goocanvasmodelsimple.c
Log Message:
2006-07-26 Damon Chaplin <damon at gnome.org>
* src/goocanvasgroup.[hc]: added goo_canvas_group_set_model() function,
to set the model of the root group.
* src/goocanvasmodelsimple.c (goo_canvas_model_simple_init): use the
above function.
* src/goocanvas*view.c: support an optional transformation matrix for
each view, which is combined with the underlying item's transform.
(I'm not sure if this will overcomplicate things.)
* src/goocanvasgroupview.c: support generic GooCanvasItems as the
underlying group rather than just GooCanvasGroups. This allows us to
use subclasses of GooCanvasGroupView easily.
(goo_canvas_group_view_set_group): new function to set the underlying
group item, creating child views and setting up signal handlers etc.
Index: goocanvasgroup.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasgroup.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- goocanvasgroup.c 26 Jul 2006 15:08:19 -0000 1.11
+++ goocanvasgroup.c 26 Jul 2006 15:45:43 -0000 1.12
@@ -136,6 +136,25 @@
}
+/**
+ * goo_canvas_group_set_model:
+ * @group: a #GooCanvasGroup.
+ * @model: the #GooCanvasModel of the group.
+ *
+ * Sets the model of the group.
+ *
+ * This is only intended to be used by implementors of #GooCanvasModel, to set
+ * the model of the root group.
+ **/
+void
+goo_canvas_group_set_model (GooCanvasGroup *group,
+ GooCanvasModel *model)
+{
+ /* Note that we don't ref the model, to avoid reference cycles. */
+ group->model = model;
+}
+
+
static void
goo_canvas_group_finalize (GObject *object)
{
Index: goocanvasgroup.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasgroup.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- goocanvasgroup.h 18 Apr 2006 23:40:44 -0000 1.6
+++ goocanvasgroup.h 26 Jul 2006 15:45:43 -0000 1.7
@@ -72,6 +72,11 @@
GooCanvasItem* goo_canvas_group_new (GooCanvasItem *parent);
+/* This is only intended to be used by implementors of GooCanvasModel, to set
+ the model of the root group. */
+void goo_canvas_group_set_model (GooCanvasGroup *group,
+ GooCanvasModel *model);
+
G_END_DECLS
#endif /* __GOO_CANVAS_GROUP_H__ */
Index: goocanvasmodelsimple.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasmodelsimple.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasmodelsimple.c 27 May 2006 19:31:44 -0000 1.3
+++ goocanvasmodelsimple.c 26 Jul 2006 15:45:43 -0000 1.4
@@ -76,6 +76,8 @@
goo_canvas_model_simple_init (GooCanvasModelSimple *model)
{
model->root_group = goo_canvas_group_new (NULL);
+
+ goo_canvas_group_set_model (model->root_group, GOO_CANVAS_MODEL (model));
}
More information about the cairo-commit
mailing list