From 084d912cb688c5a9257b3446b2f5f40260d16c6f Mon Sep 17 00:00:00 2001 From: Fabio Mello Date: Fri, 14 Feb 2014 10:35:57 -0200 Subject: Apps should not require ecore_x. The current UG_INIT_EFL() macro forces the applications who uses it to depend on ecore_x. This patch uses a higher level of abstraction in this macro, this approach lets ui-gadget-1 handle the display server without expose this to its dependents. Signed-off-by: Leandro Dorileo Signed-off-by: Fabio Mello Conflicts: CMakeLists.txt Change-Id: I9a1683df1ee64b2d997b0edfedc6bfc695aed9e7 --- src/manager.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/manager.c') diff --git a/src/manager.c b/src/manager.c index 015e1eb..5c9cbed 100644 --- a/src/manager.c +++ b/src/manager.c @@ -29,6 +29,7 @@ #include #include #include +#include #endif #include @@ -910,6 +911,16 @@ int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt) } #endif +int ugman_init_efl(Evas_Object *win, enum ug_option opt) +{ +#ifndef WAYLAND + Ecore_X_Window xwin = elm_win_xwindow_get(win); + if (xwin) + return ugman_init((Display *)ecore_x_display_get(), xwin, win, opt); +#endif + return -1; +} + int ugman_resume(void) { /* RESUME */ -- cgit v1.2.3