[cairo-commit] goocanvas/src goocanvas.c, 1.13, 1.14 goocanvas.h, 1.10, 1.11 goocanvasitem.c, 1.25, 1.26 goocanvasitem.h, 1.18, 1.19

Damon Chaplin commit at pdx.freedesktop.org
Tue Mar 6 05:39:23 PST 2007


Committed by: damon

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

Modified Files:
	goocanvas.c goocanvas.h goocanvasitem.c goocanvasitem.h 
Log Message:
2007-03-06  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasitem.c (goo_canvas_item_get_items_at): if the item
	doesn't support this method just return found_items.

	* src/goocanvas.c (goo_canvas_create_cairo_context): made this public.

2007-03-06  Damon Chaplin  <damon at gnome.org>

	* es.po: update from Rafael Villar Burke.



Index: goocanvas.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvas.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- goocanvas.c	6 Mar 2007 13:21:26 -0000	1.13
+++ goocanvas.c	6 Mar 2007 13:39:16 -0000	1.14
@@ -513,8 +513,16 @@
 }
 
 
-static cairo_t*
-goo_canvas_create_cairo (GooCanvas *canvas)
+/**
+ * goo_canvas_create_cairo_context:
+ * @canvas: a #GooCanvas.
+ * 
+ * Creates a cairo context, initialized with the default canvas settings.
+ * 
+ * Returns: a new cairo context. It should be freed with cairo_destroy().
+ **/
+cairo_t*
+goo_canvas_create_cairo_context (GooCanvas *canvas)
 {
   cairo_t *cr;
 
@@ -834,7 +842,7 @@
   if (!canvas->root_item)
     return NULL;
 
-  cr = goo_canvas_create_cairo (canvas);
+  cr = goo_canvas_create_cairo_context (canvas);
   list = goo_canvas_item_get_items_at (canvas->root_item, x, y, cr,
 				       is_pointer_event, TRUE, NULL);
   cairo_destroy (cr);
@@ -878,7 +886,7 @@
   if (!canvas->root_item)
     return NULL;
 
-  cr = goo_canvas_create_cairo (canvas);
+  cr = goo_canvas_create_cairo_context (canvas);
   result = goo_canvas_item_get_items_at (canvas->root_item, x, y, cr,
 					 is_pointer_event, TRUE, NULL);
   cairo_destroy (cr);
@@ -1867,7 +1875,7 @@
 void
 goo_canvas_update (GooCanvas *canvas)
 {
-  cairo_t *cr = goo_canvas_create_cairo (canvas);
+  cairo_t *cr = goo_canvas_create_cairo_context (canvas);
   goo_canvas_update_internal (canvas, cr);
   cairo_destroy (cr);
 }
@@ -1965,7 +1973,7 @@
   if (event->window != canvas->canvas_window)
     return FALSE;
 
-  cr = goo_canvas_create_cairo (canvas);
+  cr = goo_canvas_create_cairo_context (canvas);
 
   if (canvas->need_update)
     goo_canvas_update_internal (canvas, cr);

Index: goocanvas.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvas.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- goocanvas.h	6 Mar 2007 13:21:26 -0000	1.10
+++ goocanvas.h	6 Mar 2007 13:39:16 -0000	1.11
@@ -262,6 +262,7 @@
 /*
  * Internal functions, mainly for canvas subclasses and item implementations.
  */
+cairo_t*	goo_canvas_create_cairo_context	(GooCanvas *canvas);
 GooCanvasItem*	goo_canvas_create_item	    (GooCanvas          *canvas,
 					     GooCanvasItemModel *model);
 void		goo_canvas_unregister_item  (GooCanvas		*canvas,

Index: goocanvasitem.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitem.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- goocanvasitem.c	6 Mar 2007 13:21:26 -0000	1.25
+++ goocanvasitem.c	6 Mar 2007 13:39:16 -0000	1.26
@@ -1312,8 +1312,8 @@
  * 
  * Gets the items at the given point.
  * 
- * Returns: a list of items found at the given point, with the top item at
- *  the start of the list, or %NULL if no items were found.
+ * Returns: the @found_items list, with any more found items added onto
+ *  the start of the list, leaving the top item first.
  **/
 GList*
 goo_canvas_item_get_items_at (GooCanvasItem  *item,
@@ -1326,8 +1326,11 @@
 {
   GooCanvasItemIface *iface = GOO_CANVAS_ITEM_GET_IFACE (item);
 
-  return iface->get_items_at (item, x, y, cr, is_pointer_event,
-			      parent_is_visible, found_items);
+  if (iface->get_items_at)
+    return iface->get_items_at (item, x, y, cr, is_pointer_event,
+				parent_is_visible, found_items);
+  else
+    return found_items;
 }
 
 

Index: goocanvasitem.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitem.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- goocanvasitem.h	6 Mar 2007 13:21:26 -0000	1.18
+++ goocanvasitem.h	6 Mar 2007 13:39:16 -0000	1.19
@@ -107,8 +107,8 @@
  * @get_style: gets the item's style.
  * @set_style: sets the item's style.
  * @is_visible: returns %TRUE if the item is currently visible.
- * @get_requested_height_for_width: returns the height requested for a
- *  particular width, using the parent's coordinate space.
+ * @get_requested_height: returns the requested height of the item,
+ *  given a particular allocated width, using the parent's coordinate space.
  * @get_model: gets the model that the canvas item is viewing.
  * @set_model: sets the model that the canvas item will view.
  * @enter_notify_event: signal emitted when the mouse enters the item.



More information about the cairo-commit mailing list