Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
edje_main.c edje_private.h
Log Message:
fixed bug where instant changes didnt happen if no animation was happening.
forgot a call to recalc. also added "Ckiecked" signals... working thru the
todo list.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- edje_main.c 21 Jun 2003 04:54:15 -0000 1.14
+++ edje_main.c 22 Jun 2003 07:58:54 -0000 1.15
@@ -1,8 +1,6 @@
#include "Edje.h"
#include "edje_private.h"
-/* FIXME: sub objects need to be added to smart object */
-/* FIXME: add clicked signal for a mouse up thats a real clicked */
/* FIXME: free stuff - no more leaks */
/* FIXME: dragables have to work */
/* FIXME: drag start/top signals etc. */
@@ -10,6 +8,8 @@
/* FIXME: need to be able to calculate min & max size of a whole edje */
/* FIXME: on load don't segv on errors */
/* FIXME: add code to list collections in an eet */
+/* FIXME: part replacement with objec t+callbacks */
+/* FIXME: part queries for geometry etc. */
/* FIXME: ? somehow handle double click? */
/* FIXME: ? add numeric params to conditions for progs (ranges etc.) */
@@ -169,6 +169,7 @@
rp->object = evas_object_image_add(ed->evas);
else if (ep->type == EDJE_PART_TYPE_TEXT)
rp->object = evas_object_text_add(ed->evas);
+ evas_object_smart_member_add(rp->object, ed->obj);
if (ep->mouse_events)
{
evas_object_event_callback_add(rp->object,
@@ -483,6 +484,11 @@
rp = evas_object_data_get(obj, "real_part");
if (!rp) return;
snprintf(buf, sizeof(buf), "mouse,down,%i", ev->button);
+ if (rp->clicked_button == 0)
+ {
+ rp->clicked_button = ev->button;
+ rp->still_in = 1;
+ }
_edje_emit(ed, buf, rp->part->name);
}
@@ -500,6 +506,13 @@
if (!rp) return;
snprintf(buf, sizeof(buf), "mouse,up,%i", ev->button);
_edje_emit(ed, buf, rp->part->name);
+ if ((rp->still_in) && (rp->clicked_button == ev->button))
+ {
+ rp->clicked_button = 0;
+ rp->still_in = 0;
+ snprintf(buf, sizeof(buf), "mouse,clicked,%i", ev->button);
+ _edje_emit(ed, buf, rp->part->name);
+ }
}
static void
@@ -514,6 +527,15 @@
rp = evas_object_data_get(obj, "real_part");
if (!rp) return;
_edje_emit(ed, "mouse,move", rp->part->name);
+ if (rp->still_in)
+ {
+ double x, y, w, h;
+
+ evas_object_geometry_get(obj, &x, &y, &w, &h);
+ if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) ||
+ (ev->cur.canvas.x >= (x + w)) || (ev->cur.canvas.y >= (y + h)))
+ rp->still_in = 0;
+ }
}
static void
@@ -545,12 +567,12 @@
while (animl)
{
Edje *ed;
- Evas_List *ll, *newl = NULL;
+ Evas_List *newl = NULL;
ed = animl->data;
animl = evas_list_remove(animl, animl->data);
- for (ll = ed->actions; ll; ll = ll->next)
- newl = evas_list_append(newl, ll->data);
+ for (l = ed->actions; l; l = l->next)
+ newl = evas_list_append(newl, l->data);
while (newl)
{
Edje_Running_Program *runp;
@@ -715,14 +737,17 @@
rp = evas_list_nth(ed->parts, pt->id);
if (rp)
{
+ if (rp->program)
+ _edje_program_end(ed, rp->program);
_edje_part_description_apply(ed, rp,
pr->state,
pr->value,
NULL,
- 0.0);
+ 0.0);
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
}
}
+ _edje_recalc(ed);
}
}
else if (pr->action == EDJE_ACTION_TYPE_ACTION_STOP)
@@ -774,7 +799,6 @@
while (emissions)
{
ee = emissions->data;
- printf(" emission \"%s\" \"%s\"\n", ee->signal, ee->source);
emissions = evas_list_remove(emissions, ee);
for (l = ed->collection->programs; l; l = l->next)
{
@@ -1627,6 +1651,7 @@
if (!ed) return;
evas_object_smart_data_set(obj, ed);
ed->obj = obj;
+ evas_object_smart_member_add(ed->clipper, ed->obj);
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_private.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- edje_private.h 21 Jun 2003 02:51:01 -0000 1.14
+++ edje_private.h 22 Jun 2003 07:58:54 -0000 1.15
@@ -321,6 +321,8 @@
Evas_Object *object;
unsigned char calculated : 1;
unsigned char dirty : 1;
+ unsigned char still_in : 1;
+ int clicked_button;
Edje_Part *part;
struct {
int x, y;
-------------------------------------------------------
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