Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
Edje.h edje_calc.c edje_private.h edje_util.c
Log Message:
you can query the state of a part now
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/Edje.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- Edje.h 16 Jul 2003 05:15:14 -0000 1.13
+++ Edje.h 16 Jul 2003 13:50:28 -0000 1.14
@@ -27,6 +27,7 @@
int edje_object_thaw (Evas_Object *o);
void edje_object_color_class_set (Evas_Object *o, const char
*color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int
g3, int b3, int a3);
void edje_object_text_class_set (Evas_Object *o, const char
*text_class, const char *font, double size);
+ void edje_object_size_min_get (Evas_Object *o, double *minw, double
*minh);
int edje_object_part_exists (Evas_Object *o, const char *part);
void edje_object_part_geometry_get (Evas_Object *o, const char *part,
double *x, double *y, double *w, double *h);
void edje_object_part_text_set (Evas_Object *o, const char *part,
const char *text);
@@ -34,7 +35,7 @@
void edje_object_part_swallow (Evas_Object *o, const char *part,
Evas_Object *o_swallow);
void edje_object_part_unswallow (Evas_Object *o, Evas_Object
*o_swallow);
Evas_Object *edje_object_part_swallow_get (Evas_Object *o, const char *part);
- void edje_object_size_min_get (Evas_Object *o, double *minw, double
*minh);
+ const char *edje_object_part_state_get (Evas_Object *o, const char *part,
double *val_ret);
#ifdef __cplusplus
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_calc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- edje_calc.c 15 Jul 2003 08:26:06 -0000 1.6
+++ edje_calc.c 16 Jul 2003 13:50:28 -0000 1.7
@@ -508,6 +508,7 @@
else
chosen_desc = ep->param2.description;
+ ep->chosen_description = chosen_desc;
if (ep->param1.description)
_edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc,
ep->param1.rel1_to, ep->param1.rel2_to, ep->param1.confine_to, &p1);
if (ep->param2.description)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_private.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- edje_private.h 16 Jul 2003 05:15:15 -0000 1.31
+++ edje_private.h 16 Jul 2003 13:50:28 -0000 1.32
@@ -24,9 +24,7 @@
* drag needs to have signals with relative pos as arg.
* drag vals should be 0.0 -> 1.0 if drag is confined. "rest" pos = 0.0.
* query dragable for its relative pos value
- *
- * need to be able to query "state" of an edje part
- * need to be able to set callback on part state change
+ * dragable needs to be able to affext rel/abs values of other parts
*
* swallowed objects need to be able to advertise min/max size
*
@@ -379,6 +377,7 @@
} cache;
} text;
double description_pos;
+ Edje_Part_Description *chosen_description;
struct {
Edje_Part_Description *description;
Edje_Real_Part *rel1_to;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_util.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- edje_util.c 16 Jul 2003 05:15:15 -0000 1.11
+++ edje_util.c 16 Jul 2003 13:50:28 -0000 1.12
@@ -360,6 +360,44 @@
ed->calc_only = 0;
}
+const char *
+edje_object_part_state_get(Evas_Object *obj, const char *part, double *val_ret)
+{
+ Edje *ed;
+ Edje_Real_Part *rp;
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part))
+ {
+ if (val_ret) *val_ret = 0;
+ return "";
+ }
+ rp = _edje_real_part_get(ed, (char *)part);
+ if (!rp)
+ {
+ if (val_ret) *val_ret = 0;
+ return "";
+ }
+ if (!rp->chosen_description)
+ {
+ if (val_ret) *val_ret = rp->chosen_description->state.value;
+ if (rp->chosen_description->state.name)
+ return rp->chosen_description->state.name;
+ return "default";
+ }
+ else
+ {
+ if (rp->param1.description)
+ {
+ if (val_ret) *val_ret = rp->param1.description->state.value;
+ if (rp->param1.description->state.name)
+ return rp->param1.description->state.name;
+ return "default";
+ }
+ }
+ if (val_ret) *val_ret = 0;
+ return "";
+}
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs