From 19477d0b435db049ac805385822398004157f6b0 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 10 Jan 2018 16:52:15 +0900 Subject: [PATCH] EFL_UPGRADE: remove ecore-wayland dependency Change-Id: I2409c6ceedc34e46df591d2986058aa541512c3a Signed-off-by: Hwankyu Jhun --- CMakeLists.txt | 2 +- packaging/ui-gadget-1.spec | 4 +++- src/manager.c | 26 +++++++++++++++++--------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d56859e..63fb2f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(FindPkgConfig) AUX_SOURCE_DIRECTORY(src SRCS) ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) -SET(PKGS_CHECK_MODULES "glib-2.0 bundle dlog capi-appfw-application appsvc capi-appfw-app-manager ecore dbus-glib-1 elementary pkgmgr-info libtzplatform-config") +SET(PKGS_CHECK_MODULES "glib-2.0 bundle dlog capi-appfw-application appsvc capi-appfw-app-manager ecore dbus-glib-1 elementary pkgmgr-info libtzplatform-config ecore-wl2") PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES}) FOREACH(flag ${PKGS_CFLAGS}) SET(CFLAGS "${CFLAGS} ${flag}") diff --git a/packaging/ui-gadget-1.spec b/packaging/ui-gadget-1.spec index 7ea06fa..6255a12 100644 --- a/packaging/ui-gadget-1.spec +++ b/packaging/ui-gadget-1.spec @@ -21,7 +21,8 @@ BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(pkgmgr-info) BuildRequires: cmake BuildRequires: edje-bin -BuildRequires: pkgconfig(libtzplatform-config) +BuildRequires: pkgconfig(libtzplatform-config) +BuildRequires: pkgconfig(ecore-wl2) %description UI gadget library (development headers) @@ -39,6 +40,7 @@ Development files for %{name} cp %{SOURCE1001} . %build +export CFLAGS+=" -DEFL_BETA_API_SUPPORT " MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake -DFULLVER=%{version} \ -DMAJORVER=${MAJORVER} \ diff --git a/src/manager.c b/src/manager.c index 5ee7416..daf2914 100644 --- a/src/manager.c +++ b/src/manager.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "ug.h" @@ -392,24 +392,32 @@ static int ugman_ug_resume(void *data) static void _ugman_enable_indicator(Evas_Object *win, int enable) { - Ecore_Wl_Window *wlwin = elm_win_wl_window_get(win); + /* + * Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(win)); + * Ecore_Wl2_Window *wlwin = ecore_evas_wayland2_window_get(ee); + */ + Ecore_Wl2_Window *wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(win); if (enable == 1) - ecore_wl_window_indicator_state_set(wlwin, ECORE_WL_INDICATOR_STATE_ON); + ecore_wl2_window_indicator_state_set(wlwin, ECORE_WL2_INDICATOR_STATE_ON); else - ecore_wl_window_indicator_state_set(wlwin, ECORE_WL_INDICATOR_STATE_OFF); + ecore_wl2_window_indicator_state_set(wlwin, ECORE_WL2_INDICATOR_STATE_OFF); } static int _ugman_get_indicator_state(Evas_Object *win) { - Ecore_Wl_Window *wlwin = elm_win_wl_window_get(win); - Ecore_Wl_Indicator_State state; + /* + * Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(win)); + * Ecore_Wl2_Window *wlwin = ecore_evas_wayland2_window_get(ee); + */ + Ecore_Wl2_Window *wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(win); + Ecore_Wl2_Indicator_State state; int ret; - state = ecore_wl_window_indicator_state_get(wlwin); - if (state == ECORE_WL_INDICATOR_STATE_OFF) + state = ecore_wl2_window_indicator_state_get(wlwin); + if (state == ECORE_WL2_INDICATOR_STATE_OFF) ret = 0; - else if (state == ECORE_WL_INDICATOR_STATE_ON) + else if (state == ECORE_WL2_INDICATOR_STATE_ON) ret = 1; else ret = -1; -- 2.7.4