Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
Edje.h edje_util.c
Log Message:
lets keep geometry of objects in the canvas in canvas units (double's) :)
(and handle incorrect inputs too) :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/Edje.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Edje.h 26 Jun 2003 21:14:48 -0000 1.5
+++ Edje.h 26 Jun 2003 23:58:58 -0000 1.6
@@ -20,7 +20,7 @@
void *edje_signal_callback_del(Evas_Object *o, const char *emission, const
char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const
char *source));
void edje_signal_emit(Evas_Object *o, const char *emission, const char
*source);
- void edje_part_geometry_get(Evas_Object *o, char *part, int *x, int *y,
int *w, int *h);
+ void edje_part_geometry_get(Evas_Object *o, char *part, double *x, double
*y, double *w, double *h);
#ifdef __cplusplus
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_util.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- edje_util.c 26 Jun 2003 21:17:57 -0000 1.3
+++ edje_util.c 26 Jun 2003 23:58:58 -0000 1.4
@@ -1,6 +1,41 @@
#include "Edje.h"
#include "edje_private.h"
+void
+edje_part_geometry_get(Evas_Object *o, char *part, double *x, double *y, double *w,
double *h )
+{
+ Evas_List *l;
+ Edje *ed;
+
+ ed = _edje_fetch(o);
+ if ((!ed) || (!part))
+ {
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+ return;
+ }
+ for (l = ed->parts; l; l = l->next)
+ {
+ Edje_Real_Part *rp;
+
+ rp = l->data;
+ if ((!strcmp(rp->part->name, part)) && (rp->calculated))
+ {
+ if (x) *x = rp->x;
+ if (y) *y = rp->y;
+ if (w) *w = rp->w;
+ if (h) *h = rp->h;
+ return;
+ }
+ }
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+}
+
Edje *
_edje_fetch(Evas_Object *obj)
{
@@ -35,29 +70,4 @@
if ((ed->freeze <= 0) && (ed->recalc))
_edje_recalc(ed);
return ed->freeze;
-}
-
-void
-edje_part_geometry_get(Evas_Object *o, char *part, int *x, int *y, int *w, int *h )
-{
- Evas_List *l;
- Edje *ed;
-
- ed = _edje_fetch(o);
-
- for (l = ed->parts; l; l = l->next)
- {
- Edje_Real_Part *rp;
- rp = l->data;
-
- if (!strcmp(rp->part->name, part) && rp->calculated)
- {
- if (x) *x = rp->x;
- if (y) *y = rp->y;
- if (w) *w = rp->w;
- if (h) *h = rp->h;
-
- return;
- }
- }
}
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs