evas: Provide loop from Evas.Canvas

And indirectly also Efl.Canvas.Object.

I believe those two classes should even inherit from Efl.Loop.User.
Right now this patch relies on the new dependence of Evas over Ecore,
and is maybe a bit ugly as is.

Ping @cedric

See T4686
This commit is contained in:
Jean-Philippe Andre 2016-10-05 19:51:42 +09:00
parent 9a2e14faad
commit a9eb2303fb
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,8 @@
#include "evas_polygon_private.h"
#include "evas_vg_private.h"
#include <Ecore.h>
#define MY_CLASS EVAS_CANVAS_CLASS
#ifdef LKDEBUG
@ -613,6 +615,8 @@ _evas_canvas_efl_object_provider_find(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED,
{
if (klass == EVAS_CANVAS_CLASS)
return eo_e;
else if (klass == EFL_LOOP_CLASS)
return ecore_main_loop_get();
return efl_provider_find(efl_super(eo_e, MY_CLASS), klass);
}