[cairo-commit] goocanvas/docs creating-items.xml, 1.2, 1.3 goocanvas-sections.txt, 1.23, 1.24

Damon Chaplin commit at pdx.freedesktop.org
Mon Feb 26 17:01:45 PST 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/docs
In directory kemper:/tmp/cvs-serv19936/docs

Modified Files:
	creating-items.xml goocanvas-sections.txt 
Log Message:
2007-02-27  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasitem.[hc]: changed get_item_at method to get_items_at
	which returns a list of found items rather than a single found item.

	* src/goocanvasitemsimple.[hc]: changed get_item_at() method to
	is_item_at() which just returns a boolean, and updated to new API.

	* src/goocanvas.c (goo_canvas_get_item_at): updated to use new API.
	(goo_canvas_get_items_at): new function to return list of found items.

	* src/goocanvastable.c (goo_canvas_table_get_items_at): 
	* src/goocanvasgroup.c (goo_canvas_group_get_items_at):
	* src/goocanvasimage.c (goo_canvas_image_is_item_at): 
	* src/goocanvaspolyline.c (goo_canvas_polyline_is_item_at): 
	* src/goocanvastext.c (goo_canvas_text_is_item_at): 
	* src/goocanvaswidget.c (goo_canvas_widget_is_item_at): 
	* docs/creating-items.xml: 
	* demo/demo-item.c (goo_demo_item_is_item_at): updated for new API.



Index: creating-items.xml
===================================================================
RCS file: /cvs/cairo/goocanvas/docs/creating-items.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- creating-items.xml	9 Feb 2007 13:41:03 -0000	1.2
+++ creating-items.xml	27 Feb 2007 01:01:38 -0000	1.3
@@ -192,27 +192,27 @@
   
   
   /&ast; Hit detection. This should check if the given coordinate (in the item's
-     coordinate space) is within the item. If it is it should return the item,
-     otherwise it should return NULL. &ast;/
-  static GooCanvasItem*
-  goo_demo_item_get_item_at (GooCanvasItemSimple *simple,
-                             gdouble              x,
-                             gdouble              y,
-                             cairo_t             *cr,
-                             gboolean             is_pointer_event)
+     coordinate space) is within the item. If it is it should return TRUE,
+     otherwise it should return FALSE. &ast;/
+  static gboolean
+  goo_demo_item_is_item_at (GooCanvasItemSimple *simple,
+                            gdouble              x,
+                            gdouble              y,
+                            cairo_t             *cr,
+                            gboolean             is_pointer_event)
   {
     GooDemoItem *demo_item = (GooDemoItem*) simple;
   
     if (x &lt; demo_item-&gt;x || (x &gt; demo_item-&gt;x + demo_item-&gt;width)
         || y &lt; demo_item-&gt;y || (y &gt; demo_item-&gt;y + demo_item-&gt;height))
-      return NULL;
+      return FALSE;
   
-    return (GooCanvasItem*) simple;
+    return TRUE;
   }
   
   
   /&ast; The class initialization function. Here we set the class' update(), paint()
-     and get_item_at() methods. &ast;/
+     and is_item_at() methods. &ast;/
   static void
   goo_demo_item_class_init (GooDemoItemClass *klass)
   {
@@ -220,7 +220,7 @@
   
     simple_class-&gt;update        = goo_demo_item_update;
     simple_class-&gt;paint         = goo_demo_item_paint;
-    simple_class-&gt;get_item_at   = goo_demo_item_get_item_at;
+    simple_class-&gt;is_item_at    = goo_demo_item_is_item_at;
   }
   
   

Index: goocanvas-sections.txt
===================================================================
RCS file: /cvs/cairo/goocanvas/docs/goocanvas-sections.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- goocanvas-sections.txt	25 Feb 2007 17:37:57 -0000	1.23
+++ goocanvas-sections.txt	27 Feb 2007 01:01:38 -0000	1.24
@@ -137,6 +137,7 @@
 <SUBSECTION>
 goo_canvas_item_get_bounds
 goo_canvas_item_get_item_at
+goo_canvas_item_get_items_at
 goo_canvas_item_is_visible
 goo_canvas_item_paint
 
@@ -353,6 +354,7 @@
 <SUBSECTION>
 goo_canvas_get_item
 goo_canvas_get_item_at
+goo_canvas_get_items_at
 
 <SUBSECTION>
 goo_canvas_scroll_to
@@ -609,6 +611,7 @@
 goo_canvas_style_fill_pattern_id
 goo_canvas_style_fill_rule_id
 goo_canvas_style_font_desc_id
+goo_canvas_style_hint_metrics_id
 goo_canvas_style_line_cap_id
 goo_canvas_style_line_dash_id
 goo_canvas_style_line_join_id
@@ -692,6 +695,8 @@
 goo_cairo_line_join_get_type
 goo_cairo_operator_get_type
 goo_canvas_animate_type_get_type
+GOO_TYPE_CAIRO_HINT_METRICS
+goo_cairo_hint_metrics_get_type
 
 goo_canvas_accessible_factory_get_type
 goo_canvas_item_accessible_factory_get_type



More information about the cairo-commit mailing list