Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/etox

Dir     : e17/libs/etox/src


Modified Files:
        etox.c etox_selection.c 


Log Message:
Add a missing API for mapping a coordinate to a character index.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- etox.c      6 May 2004 05:17:52 -0000       1.73
+++ etox.c      13 May 2004 04:47:35 -0000      1.74
@@ -819,6 +819,20 @@
 }
 
 /**
+ * etox_coord_to_index - retrieve the index of a character at a coordinate
+ * @et: the etox to map coordinates to a character index
+ * @x: the x coordinate to find the matching character
+ * @y: the y coordinate to find the matching character
+ *
+ * Returns the index in the text of the found character.
+ */
+int etox_coord_to_index(Evas_Object *et, Evas_Coord x, Evas_Coord y)
+{
+       CHECK_PARAM_POINTER_RETURN("et", et, 0);
+       return etox_coord_to_geometry(et, x, y, NULL, NULL, NULL, NULL);
+}
+
+/**
  * etox_coord_to_geometry - retrieve information about a letters geometry
  * @et: the etox to inquire the geometry
  * @x: a pointer to an int to store the x coordinate of the etox
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_selection.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- etox_selection.c    6 May 2004 05:17:52 -0000       1.15
+++ etox_selection.c    13 May 2004 04:47:35 -0000      1.16
@@ -410,7 +410,7 @@
   rects->w = x + w - rects->x;
   rects->h = y + h - rects->y;
 
-  printf("(%f, %f) %f x %f\n", rects->x, rects->y, rects->w, rects->h);
+  printf("(%d, %d) %d x %d\n", rects->x, rects->y, rects->w, rects->h);
   cur = rects;
   /* printf("cur1: %d\n", cur); */
   for (l = midlines; l; l = l->next)




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to