Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/etox

Dir     : e17/libs/etox/src


Modified Files:
        Etox.h Etox_private.h etox.c etox_line.c etox_line.h 
        etox_obstacle.c etox_obstacle.h etox_selection.c 


Log Message:
Convert etox to use the Evas_Coord typedef.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/Etox.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- Etox.h      12 Sep 2003 22:02:30 -0000      1.43
+++ Etox.h      18 Oct 2003 16:43:37 -0000      1.44
@@ -81,8 +81,8 @@
 typedef struct _etox_rect Etox_Rect;
 struct _etox_rect
 {
-       double x, y;
-       double w, h;
+       Evas_Coord x, y;
+       Evas_Coord w, h;
 };
 
 typedef struct _etox_obstacle Etox_Obstacle;
@@ -92,8 +92,8 @@
  * Etox creation and deletion functions
  */
 Evas_Object *etox_new(Evas *evas);
-Evas_Object *etox_new_all(Evas *evas, double x, double y, double w, double h,
-               int alpha, Etox_Alignment align);
+Evas_Object *etox_new_all(Evas *evas, Evas_Coord x, Evas_Coord y, Evas_Coord w,
+                         Evas_Coord h, int alpha, Etox_Alignment align);
 
 /*
  * Context management functions
@@ -159,11 +159,12 @@
 /*
  * Geometry retrieval functions
  */
-int etox_coord_to_index(Evas_Object * et, double x, double y);
-void etox_index_to_geometry(Evas_Object * et, int index, double *x, double *y,
-                           double *w, double *h);
-int etox_coord_to_geometry(Evas_Object * et, double xc, double yc, double *x,
-               double *y, double *w, double *h);
+int etox_coord_to_index(Evas_Object * et, Evas_Coord x, Evas_Coord y);
+void etox_index_to_geometry(Evas_Object * et, int index, Evas_Coord *x,
+                           Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+int etox_coord_to_geometry(Evas_Object * et, Evas_Coord xc, Evas_Coord yc,
+                          Evas_Coord *x, Evas_Coord *y,
+                          Evas_Coord *w, Evas_Coord *h);
 
 void etox_set_soft_wrap(Evas_Object * et, int boolean);
 
@@ -175,17 +176,17 @@
 /*
  * Obstacle manipulation functions
  */
-Etox_Obstacle *etox_obstacle_add(Evas_Object * et, double x, double y, double w,
-               double h);
+Etox_Obstacle *etox_obstacle_add(Evas_Object * et, Evas_Coord x, Evas_Coord y,
+                                Evas_Coord w, Evas_Coord h);
 void etox_obstacle_remove(Etox_Obstacle * obstacle);
-void etox_obstacle_move(Etox_Obstacle * obstacle, double x, double y);
-void etox_obstacle_resize(Etox_Obstacle * obstacle, double w, double h);
+void etox_obstacle_move(Etox_Obstacle * obstacle, Evas_Coord x, Evas_Coord y);
+void etox_obstacle_resize(Etox_Obstacle * obstacle, Evas_Coord w, Evas_Coord h);
 
 /*
  * These functions select regions of the etox.
  */
-Etox_Selection *etox_select_coords(Evas_Object * et, double sx, double sy,
-               double ex, double ey);
+Etox_Selection *etox_select_coords(Evas_Object * et, Evas_Coord sx,
+                                  Evas_Coord sy, Evas_Coord ex, Evas_Coord ey);
 Etox_Selection *etox_select_index(Evas_Object * et, int si, int ei);
 Etox_Selection *etox_select_str(Evas_Object * et, char *match, int *index);
 
@@ -198,8 +199,8 @@
 /*
  * This function gets a rectangular bound on the selection.
  */
-void etox_selection_bounds(Etox_Selection * selected, double *x, double *y,
-                          double *w, double *h);
+void etox_selection_bounds(Etox_Selection * selected, Evas_Coord *x,
+                          Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
 
 /*
  * These methods alter the appearance of the selected region.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/Etox_private.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- Etox_private.h      10 Sep 2003 03:03:44 -0000      1.23
+++ Etox_private.h      18 Oct 2003 16:43:37 -0000      1.24
@@ -86,12 +86,12 @@
        /*
         * Geometry of the etox
         */
-       double x, y, w, h;
+       Evas_Coord x, y, w, h;
 
        /*
         * Geometry the text prefers w/o wraps.
         */
-       double tw, th;
+       Evas_Coord tw, th;
 
        /*
         * The length text in the etox
@@ -145,7 +145,7 @@
        /*
         * The dimensions of this line.
         */
-       double x, y, w, h;
+       Evas_Coord x, y, w, h;
 
        /*
         * Flags indicating alignment, or if this is a "softline", ie. etox
@@ -191,8 +191,8 @@
 void etox_free(Evas_Object * et);
 void etox_show(Evas_Object * et);
 void etox_hide(Evas_Object * et);
-void etox_move(Evas_Object * et, double x, double y);
-void etox_resize(Evas_Object * et, double w, double h);
+void etox_move(Evas_Object * et, Evas_Coord x, Evas_Coord y);
+void etox_resize(Evas_Object * et, Evas_Coord w, Evas_Coord h);
 void etox_set_layer(Evas_Object * et, int layer);
 void etox_set_clip(Evas_Object * et, Evas_Object *clip);
 void etox_unset_clip(Evas_Object * et);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- etox.c      12 Sep 2003 22:02:31 -0000      1.66
+++ etox.c      18 Oct 2003 16:43:37 -0000      1.67
@@ -61,8 +61,8 @@
  * Returns a pointer to a newly allocated etox on success, NULL on failure.
  */
 Evas_Object *
-etox_new_all(Evas *evas, double x, double y, double w, double h, int alpha,
-                  Etox_Alignment align)
+etox_new_all(Evas *evas, Evas_Coord x, Evas_Coord y, Evas_Coord w,
+            Evas_Coord h, int alpha, Etox_Alignment align)
 {
        Evas_Object *et;
         Etox_Context *ec;
@@ -140,8 +140,8 @@
         */
        if (et->lines)
                evas_object_show(et->clip);
-       evas_object_move(et->clip, (double) (et->x), (double) (et->y));
-       evas_object_resize(et->clip, (double) (et->w), (double) (et->h));
+       evas_object_move(et->clip, (et->x), (et->y));
+       evas_object_resize(et->clip, (et->w), (et->h));
 }
 
 /**
@@ -658,7 +658,7 @@
  * Returns no value. Changes the position of the etox @et to the specified
  * position.
  */
-void etox_move(Evas_Object * obj, double x, double y)
+void etox_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)
 {
        Etox *et;
 
@@ -685,8 +685,8 @@
         * do both a move and a resize in case the size has been adjusted
         * during layout.
         */
-       evas_object_move(et->clip, (double) (et->x), (double) (et->y));
-       evas_object_resize(et->clip, (double) (et->w), (double) (et->h));
+       evas_object_move(et->clip, (et->x), (et->y));
+       evas_object_resize(et->clip, (et->w), (et->h));
 }
 
 /**
@@ -698,7 +698,7 @@
  * Returns no value. Changes the dimensions of the etox to match the specified
  * dimensions.
  */
-void etox_resize(Evas_Object * obj, double w, double h)
+void etox_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h)
 {
        Etox *et;
 
@@ -723,8 +723,8 @@
         * do both a move and a resize in case the size has been adjusted
         * during layout.
         */
-       evas_object_move(et->clip, (double) (et->x), (double) (et->y));
-       evas_object_resize(et->clip, (double) (et->w), (double) (et->h));
+       evas_object_move(et->clip, (et->x), (et->y));
+       evas_object_resize(et->clip, (et->w), (et->h));
        evas_object_resize(obj, et->w, et->h);
 }
 
@@ -767,8 +767,9 @@
  * Returns no value. Stores the current geometry of the letter at index @index
  * in @et into the integers pointed to by @x, @y, @w, and @h.
  */
-void etox_index_to_geometry(Evas_Object * obj, int index, double *x, double *y,
-                           double *w, double *h)
+void
+etox_index_to_geometry(Evas_Object * obj, int index, Evas_Coord *x,
+                      Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
        Etox *et;
        int sum = 0;
@@ -804,14 +805,16 @@
  * of the letter at coordinates @xc, @yc in @et into the integers pointed to by
  * @x, @y, @w, and @h.
  */
-int etox_coord_to_geometry(Evas_Object * obj, double xc, double yc, double *x,
-               double *y, double *w, double *h)
+int
+etox_coord_to_geometry(Evas_Object * obj, Evas_Coord xc, Evas_Coord yc,
+                      Evas_Coord *x, Evas_Coord *y, Evas_Coord *w,
+                      Evas_Coord *h)
 {
        Etox *et;
        int sum;
        Evas_Object *bit;
        Etox_Line *line = NULL;
-       double tx, ty, tw, th;
+       Evas_Coord tx, ty, tw, th;
        Evas_List *l;
 
        CHECK_PARAM_POINTER_RETURN("obj", obj, 0);
@@ -943,7 +946,8 @@
  * Adds an obstacle to the etox @et that the text will wrap around.
  */
 Etox_Obstacle *
-etox_obstacle_add(Evas_Object * obj, double x, double y, double w, double h)
+etox_obstacle_add(Evas_Object * obj, Evas_Coord x, Evas_Coord y,
+                 Evas_Coord w, Evas_Coord h)
 {
        Etox *et;
        Etox_Obstacle *obst;
@@ -990,7 +994,7 @@
  * Returns no value. Changes the position information for @obst and updates the
  * etox to work around the new position.
  */
-void etox_obstacle_move(Etox_Obstacle * obst, double x, double y)
+void etox_obstacle_move(Etox_Obstacle * obst, Evas_Coord x, Evas_Coord y)
 {
        CHECK_PARAM_POINTER("obst", obst);
 
@@ -1009,7 +1013,7 @@
  * Returns no value. Changes the size information for @obst and updates the
  * etox to work around the new position.
  */
-void etox_obstacle_resize(Etox_Obstacle * obst, double x, double y)
+void etox_obstacle_resize(Etox_Obstacle * obst, Evas_Coord x, Evas_Coord y)
 {
        CHECK_PARAM_POINTER("obst", obst);
 
@@ -1218,7 +1222,7 @@
                 */
                ll = et->obstacles;
                while (ll) {
-                       double ox, oy, ow, oh;
+                       Evas_Coord ox, oy, ow, oh;
 
                        Etox_Obstacle *obst = ll->data;
                        evas_object_geometry_get(obst->bit, &ox, &oy, &ow, &oh);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_line.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- etox_line.c 8 Sep 2003 02:22:58 -0000       1.29
+++ etox_line.c 18 Oct 2003 16:43:37 -0000      1.30
@@ -103,7 +103,7 @@
  */
 void etox_line_append(Etox_Line * line, Evas_Object * bit)
 {
-       double x, y, w, h;
+       Evas_Coord x, y, w, h;
 
        CHECK_PARAM_POINTER("line", line);
        CHECK_PARAM_POINTER("bit", bit);
@@ -132,7 +132,7 @@
  */
 void etox_line_prepend(Etox_Line * line, Evas_Object * bit)
 {
-       double x, y, w, h;
+       Evas_Coord x, y, w, h;
 
        CHECK_PARAM_POINTER("line", line);
        CHECK_PARAM_POINTER("bit", bit);
@@ -159,7 +159,7 @@
  */
 void etox_line_remove(Etox_Line * line, Evas_Object * bit)
 {
-       double w;
+       Evas_Coord w;
 
        CHECK_PARAM_POINTER("line", line);
        CHECK_PARAM_POINTER("bit", bit);
@@ -187,7 +187,7 @@
 {
        int x;
        Evas_Object *bit;
-       double tx, ty, tw, th;
+       Evas_Coord tx, ty, tw, th;
        Evas_List *l;
 
        CHECK_PARAM_POINTER("line", line);
@@ -397,7 +397,7 @@
 {
        Evas_List *ll;
        Evas_Object *bit = NULL, *marker;
-       double x, w, y, h;
+       Evas_Coord x, w, y, h;
        int index = -1;
 
        /* iterate through the bits to find the one on the border */
@@ -553,7 +553,7 @@
 Evas_Object *
 etox_line_coord_to_bit(Etox_Line *line, int x)
 {
-       double bx;
+       Evas_Coord bx;
        Evas_List *l = NULL;
        Evas_Object *bit = NULL;
 
@@ -623,8 +623,8 @@
 }
 
 void
-etox_line_index_to_geometry(Etox_Line *line, int index, double *x, double *y,
-                            double *w, double *h)
+etox_line_index_to_geometry(Etox_Line *line, int index, Evas_Coord *x,
+                           Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
   Evas_Object *bit = NULL;
   Evas_List *l;
@@ -713,8 +713,8 @@
 }
 
 void
-etox_line_get_geometry(Etox_Line *line, double *x, double *y,
-                       double *w, double *h)
+etox_line_get_geometry(Etox_Line *line, Evas_Coord *x, Evas_Coord *y,
+                       Evas_Coord *w, Evas_Coord *h)
 {
   if (!line)
   {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_line.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- etox_line.h 4 Sep 2003 03:05:23 -0000       1.13
+++ etox_line.h 18 Oct 2003 16:43:37 -0000      1.14
@@ -17,17 +17,17 @@
 int etox_line_wrap(Etox *et, Etox_Line *line);
 void etox_line_split(Etox_Line *line, Evas_Object *bit, int index);
 void etox_line_unwrap(Etox *et, Etox_Line *line);
-void etox_line_get_geometry(Etox_Line *line, double *x, double *y,
-                            double *w, double *h);
+void etox_line_get_geometry(Etox_Line *line, Evas_Coord *x, Evas_Coord *y,
+                            Evas_Coord *w, Evas_Coord *h);
 Evas_Object *etox_line_coord_to_bit(Etox_Line *line, int x);
 Evas_Object *etox_line_index_to_bit(Etox_Line *line, int *i);
-void etox_line_index_to_geometry(Etox_Line *line, int index, double *x,
-               double *y, double *w, double *h);
+void etox_line_index_to_geometry(Etox_Line *line, int index, Evas_Coord *x,
+                                Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
 void etox_line_print_bits(Etox_Line *line);
 
 void etox_line_set_layer(Etox_Line *line, int layer);
-void etox_line_index_to_geom(Etox_Line *line, double *x, double *y, 
-                             double *w, double *h);
+void etox_line_index_to_geom(Etox_Line *line, Evas_Coord *x, Evas_Coord *y, 
+                             Evas_Coord *w, Evas_Coord *h);
 void etox_line_apply_context(Etox_Line *line, Etox_Context *context, Evas_Object 
*start, Evas_Object *end);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_obstacle.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- etox_obstacle.c     8 Sep 2003 02:22:58 -0000       1.18
+++ etox_obstacle.c     18 Oct 2003 16:43:37 -0000      1.19
@@ -55,7 +55,7 @@
 void etox_obstacle_place(Etox_Obstacle * obst)
 {
        int i = 0;
-       double x, y, w, h;
+       Evas_Coord x, y, w, h;
        Etox_Line *line;
        Evas_List *l;
 
@@ -125,7 +125,7 @@
 {
        int i;
        Evas_Object *bit;
-       double x;
+       Evas_Coord x;
 
        CHECK_PARAM_POINTER("line", line);
        CHECK_PARAM_POINTER("obst", obst);
@@ -169,8 +169,9 @@
 /*
  * etox_rect_intersect - check for intersection on two rectangles
  */
-inline int etox_rect_intersect(double x1, double y1, double w1, double h1,
-                              double x2, double y2, double w2, double h2)
+inline int
+etox_rect_intersect(Evas_Coord x1, Evas_Coord y1, Evas_Coord w1, Evas_Coord h1,
+                   Evas_Coord x2, Evas_Coord y2, Evas_Coord w2, Evas_Coord h2)
 {
        if (x1 > x2 + w2)
                return FALSE;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_obstacle.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etox_obstacle.h     16 Aug 2003 06:09:32 -0000      1.4
+++ etox_obstacle.h     18 Oct 2003 16:43:37 -0000      1.5
@@ -6,7 +6,8 @@
 void etox_obstacle_line_insert(Etox_Line * line, Etox_Obstacle * obst);
 void etox_obstacle_place(Etox_Obstacle * obst);
 void etox_obstacle_unplace(Etox_Obstacle * obst);
-inline int etox_rect_intersect(double x1, double y1, double w1, double h1,
-                              double x2, double y2, double w2, double h2);
+inline int etox_rect_intersect(Evas_Coord x1, Evas_Coord y1, Evas_Coord w1,
+                              Evas_Coord h1, Evas_Coord x2, Evas_Coord y2,
+                              Evas_Coord w2, Evas_Coord h2);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox_selection.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- etox_selection.c    4 Sep 2003 03:05:23 -0000       1.13
+++ etox_selection.c    18 Oct 2003 16:43:37 -0000      1.14
@@ -7,7 +7,7 @@
        Evas_Object *bit = NULL; \
        Etox_Line *line; \
        Evas_List *l, *bl; \
-       double w, h; \
+       Evas_Coord w, h; \
        line = selected->start.line; \
        l = evas_list_find_list(selected->etox->lines, selected->start.line); \
        bl = evas_list_find_list(line->bits, selected->start.bit); \
@@ -153,7 +153,8 @@
 /**
  */
 Etox_Selection *
-etox_select_coords(Evas_Object *obj, double sx, double sy, double ex, double ey)
+etox_select_coords(Evas_Object *obj, Evas_Coord sx, Evas_Coord sy,
+                  Evas_Coord ex, Evas_Coord ey)
 {
        int i1, i2;
        Etox *et;
@@ -283,8 +284,8 @@
 /**
  */
 void
-etox_selection_bounds(Etox_Selection *selected, double *sx, double *sy,
-               double *ex, double *ey)
+etox_selection_bounds(Etox_Selection *selected, Evas_Coord *sx, Evas_Coord *sy,
+                     Evas_Coord *ex, Evas_Coord *ey)
 {
 }
 
@@ -374,7 +375,7 @@
 {
   Etox_Rect *rects = NULL, *cur = NULL;
   Evas_List *l = NULL, *midlines = NULL;
-  double x, y, w, h;
+  Evas_Coord x, y, w, h;
   int count = 1;
 
   if (selected->start.line == selected->end.line)
@@ -411,13 +412,13 @@
 
   printf("(%f, %f) %f x %f\n", rects->x, rects->y, rects->w, rects->h);
   cur = rects;
-  printf("cur1: %d\n", cur);
+  /* printf("cur1: %d\n", cur); */
   for (l = midlines; l; l = l->next)
   {
     Etox_Line *line = l->data;
 
     cur++;
-  printf("cur2: %d\n", cur);
+    /* printf("cur2: %d\n", cur); */
     etox_line_get_geometry(line, &x, &y, &w, &h);
 
     cur->x = x;




-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to