Enlightenment CVS committal
Author : rephorm
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
Edje.h edje_util.c
Log Message:
Edje part geometry querying added.
Only does something if part geom has been calculated.
Maybe this should return an int as to whether or not its actually giving the geometry
values?
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/Edje.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Edje.h 21 Jun 2003 02:51:01 -0000 1.4
+++ Edje.h 26 Jun 2003 21:14:48 -0000 1.5
@@ -19,6 +19,8 @@
void edje_signal_callback_add(Evas_Object *o, const char *emission, const
char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const
char *source), void *data);
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);
#ifdef __cplusplus
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_util.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- edje_util.c 24 Jun 2003 02:33:04 -0000 1.1
+++ edje_util.c 26 Jun 2003 21:14:48 -0000 1.2
@@ -36,3 +36,26 @@
_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;
+ }
+ }
+}
-------------------------------------------------------
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