On Mon, Jan 9, 2012 at 11:26 AM, Cedric BAIL <[email protected]> wrote: > On Mon, Jan 9, 2012 at 2:06 PM, Bruno Dilly <[email protected]> wrote: >> On Sun, Jan 8, 2012 at 2:32 PM, Cedric BAIL <[email protected]> wrote: >>> On Sun, Jan 8, 2012 at 3:47 PM, ChunEon Park <[email protected]> wrote: >>>> I think both are no problems if it has a documentation. >>>> But your patch may break applications already released. >>>> It will be better to apply your patch when major version is changed. >>> >>> As I say, current behaviour is undefined. If you go out of an >>> animation (defined in the edj itself) in any state (hidden, moved, >>> resized, whatever), it will stay in that state. But this is completly >>> random and not defined (as in, depend on an external file). Now I do >>> like the raster proposal with an orphaned flag as it is the only sane >>> way to detect any leak. Relying on an undefined visual artefact would >>> not help at all. >> >> It isn't documented. But it's defined, IMHO, since you can predict it. >> As you said, in an animation it will keep the state, if it was >> visible, it will stay visible. >> So applications can be considering a unswallowed object will be >> visible, since it was visible, and now it will be hidden. > > No, as it is defined in the theme, it doesn't depend on the > application. If you change the theme, the animation, anything in the > .edj, it will change the behaviour in the application itself. It's > full of race condition. There is no sane way to expect any kind of > behaviour in the app. It is definitivly an undefined behaviour, as > their is no way you could know the state of the object without > requesting it after the unswallow.
OK, my concept of application is code and theme. Anyway, a simple case is to add an rectangle to a swallow in a layout. I've attached a quick example. As you can see, no luck required. After 3 seconds the rectangle is unswallowed and displayed at 0,0. I agree that most of time people will be hiding or deleting the object, but as far as I saw we can't predict how user will use our documented API, what about not documented behaviour... > >> Despite it wasn't documented when a person tried to unswallow she >> realized it was visible, or maybe she looked at the code. >> Consequently, she didn't forced to show the object with >> evas_object_show(), what will be mandatory now. So Hermet is correct, >> it can break applications and won't be something simple to see like an >> API breakage. People will spend a good time to realize what changed. >> Sure, we can help with that warning as we can (changelog, msg to mail >> list, docs, etc). > > This is a bug in the application, that rely on luck more than anything > if it worked at any point in time. As I said, if any application rely > on it now, just let me touch the edj and it will be broken completly. > So no, this is not a big change. And I really doubt that any > application outside as this kind of bug that goes unnoticed. > -- > Cedric BAIL > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Bruno Dilly Senior Developer ProFUSION embedded systems http://profusion.mobi
#include <Ecore.h>
#include <Evas.h>
#include <Ecore_Evas.h>
#include <Edje.h>
Eina_Bool
_unswallow_cb(void *data)
{
Evas_Object *layout, *rect;
layout = data;
rect = edje_object_part_swallow_get(layout, "swallow");
edje_object_part_unswallow(layout, rect);
evas_object_move(rect, 0, 0);
return ECORE_CALLBACK_CANCEL;
}
int
main (int argc, char *argv[])
{
Ecore_Evas *ee = NULL;
Evas *evas;
Evas_Object *layout, *rect;
ecore_evas_init();
edje_init();
ee = ecore_evas_new(NULL, 0, 0, 200, 200, NULL);
ecore_evas_show(ee);
evas = ecore_evas_get(ee);
layout = edje_object_add(evas);
edje_object_file_set(layout, "test.edj", "main");
evas_object_resize(layout, 200, 200);
evas_object_show(layout);
rect = evas_object_rectangle_add(evas);
evas_object_color_set(rect, 255, 0, 0, 255);
evas_object_resize(rect, 100, 100);
edje_object_part_swallow(layout, "swallow", rect);
ecore_timer_add(3, _unswallow_cb, layout);
ecore_main_loop_begin();
return 0;
}
test.edc
Description: Binary data
------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
