EFL_UPGRADE: remove ecore-wayland dependency
authorJiyoun Park <jy0703.park@samsung.com>
Wed, 10 Jan 2018 00:56:24 +0000 (09:56 +0900)
committerhyunho <hhstark.kang@samsung.com>
Fri, 16 Mar 2018 02:14:04 +0000 (11:14 +0900)
Change-Id: Iba19a58627f2c6e58ba980f454e91db922382da3
Signed-off-by: hyunho <hhstark.kang@samsung.com>
CMakeLists.txt
appcore-multiwindow.pc.in
include/appcore_multiwindow_base.h
packaging/app-core.spec
src/multiwindow_base/appcore_multiwindow_base.c
src/multiwindow_base/appcore_multiwindow_base_class.c
src/multiwindow_base/appcore_multiwindow_base_instance.c
src/multiwindow_base/appcore_multiwindow_base_window.c
src/ui_base/appcore_ui_base.c

index 10deb6b..450daf7 100644 (file)
@@ -58,7 +58,7 @@ SET(SRCS_ui src/ui_base/appcore_ui_base.c src/ui_base/appcore_ui_plugin.c)
 SET(HEADERS_ui appcore_ui_base.h)
 
 INCLUDE(FindPkgConfig)
-SET(APPCORE_UI_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul bundle pkgmgr-info ttrace ecore-wayland tizen-extension-client wayland-client")
+SET(APPCORE_UI_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul bundle pkgmgr-info ttrace ecore-wl2 tizen-extension-client wayland-client")
 
 pkg_check_modules(pkg_ui REQUIRED ${APPCORE_UI_PKG_CHECK_MODULES})
 
@@ -122,7 +122,7 @@ SET(SRCS_mw src/multiwindow_base/appcore_multiwindow_base.c
 SET(HEADERS_mw appcore_multiwindow_base.h)
 
 INCLUDE(FindPkgConfig)
-SET(APPCORE_MULTIWINDOW_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul ecore-wayland")
+SET(APPCORE_MULTIWINDOW_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul ecore-wl2")
 
 pkg_check_modules(pkg_mw REQUIRED ${APPCORE_MULTIWINDOW_PKG_CHECK_MODULES})
 
index f04a3c4..969b779 100644 (file)
@@ -8,7 +8,7 @@ includedir=@INCLUDEDIR@
 Name: app-core-multiwindow
 Description: Tizen application core library for multiwindow
 Version: @VERSION@
-Requires.private: ecore-wayland dlog
+Requires.private: ecore-wl2 dlog
 Requires: appcore-common
 Libs: -L${libdir} -lappcore-multiwindow
 Cflags: -I${includedir} -I${includedir}/appcore
index 2c167cd..cb439a8 100644 (file)
@@ -20,7 +20,7 @@
 #include <bundle.h>
 #include <aul.h>
 #include <appcore_base.h>
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 
 typedef struct _appcore_multiwindow_base_window_ops {
        void (*show)(int type, void *event, void *data);
@@ -66,7 +66,7 @@ void appcore_multiwindow_base_window_on_hide(int type, void *event);
 void appcore_multiwindow_base_window_on_lower(int type, void *event);
 void appcore_multiwindow_base_window_on_visibility(int type, void *event);
 void appcore_multiwindow_base_window_on_pre_visibility(int type, void *event);
-void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_instance_h h, Ecore_Wl_Window *wl_win);
+void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_instance_h h, Ecore_Wl2_Window *wl_win);
 void appcore_multiwindow_base_window_unbind(appcore_multiwindow_base_instance_h h);
 
 appcore_multiwindow_base_class appcore_multiwindow_base_class_get_default(void);
index 1c39ff5..c4ec42a 100644 (file)
@@ -5,7 +5,7 @@ Release:        0
 Group:          Application Framework/Libraries
 License:        Apache-2.0
 Source0:        app-core-%{version}.tar.gz
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(tizen-extension-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
@@ -119,6 +119,7 @@ Application basics template
 cp %{SOURCE1001} .
 
 %build
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . \
        -DENABLE_GTK=OFF \
index ece1f65..dd4fee0 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include <linux/limits.h>
 
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 #include <glib-object.h>
 #include <malloc.h>
 #include <glib.h>
@@ -226,12 +226,12 @@ EXPORT_API int appcore_multiwindow_base_on_create(void)
 {
        appcore_base_on_create();
 
-       _appcore_mw_context.hshow = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_SHOW, __stub_show_cb, NULL);
-       _appcore_mw_context.hhide = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_HIDE, __stub_hide_cb, NULL);
-       _appcore_mw_context.hvchange = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE,
+       _appcore_mw_context.hshow = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_SHOW, __stub_show_cb, NULL);
+       _appcore_mw_context.hhide = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_HIDE, __stub_hide_cb, NULL);
+       _appcore_mw_context.hvchange = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE,
                        __stub_visibility_cb, NULL);
-       _appcore_mw_context.hlower = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_LOWER, __stub_lower_cb, NULL);
-       _appcore_mw_context.hpvchange = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_PRE_VISIBILITY_CHANGE,
+       _appcore_mw_context.hlower = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_LOWER, __stub_lower_cb, NULL);
+       _appcore_mw_context.hpvchange = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE,
                        __stub_pre_visibility_cb, NULL);
 
        return 0;
index 475de69..ad49f04 100644 (file)
@@ -22,7 +22,6 @@
 #include <malloc.h>
 #include <stdbool.h>
 
-#include <Ecore_Wayland.h>
 #include <glib-object.h>
 #include <glib.h>
 #include <gio/gio.h>
index f5c75c1..ef918f7 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdbool.h>
 #include <malloc.h>
 
-#include <Ecore_Wayland.h>
 #include <glib-object.h>
 #include <glib.h>
 #include <gio/gio.h>
index 8a980ce..2d3d010 100644 (file)
@@ -22,7 +22,7 @@
 #include <malloc.h>
 #include <stdbool.h>
 
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 #include <glib-object.h>
 #include <glib.h>
 #include <gio/gio.h>
@@ -133,7 +133,7 @@ EXPORT_API void appcore_multiwindow_base_window_on_show(int type, void *event)
 
 EXPORT_API void appcore_multiwindow_base_window_on_hide(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Hide *ev = event;
+       Ecore_Wl2_Event_Window_Hide *ev = event;
        win_context *cxt = __find_win_context_by_wid(ev->win);
 
        if (!cxt)
@@ -149,7 +149,7 @@ EXPORT_API void appcore_multiwindow_base_window_on_lower(int type, void *event)
 
 EXPORT_API void appcore_multiwindow_base_window_on_visibility(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Visibility_Change *ev = event;
+       Ecore_Wl2_Event_Window_Visibility_Change *ev = event;
        win_context *cxt = __find_win_context_by_wid(ev->win);
 
        if (!cxt)
@@ -167,19 +167,19 @@ EXPORT_API void appcore_multiwindow_base_window_on_visibility(int type, void *ev
 
 EXPORT_API void appcore_multiwindow_base_window_on_pre_visibility(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Pre_Visibility_Change *ev = event;
+       Ecore_Wl2_Event_Window_Pre_Visibility_Change *ev = event;
        win_context *cxt = __find_win_context_by_wid(ev->win);
 
        if (!cxt)
                return;
 
-       if (ev->type == ECORE_WL_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) {
+       if (ev->type == ECORE_WL2_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) {
                appcore_multiwindow_base_instance_resume(cxt->inst);
                __remove_flush_timer();
        }
 }
 
-EXPORT_API void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_instance_h h, Ecore_Wl_Window *wl_win)
+EXPORT_API void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_instance_h h, Ecore_Wl2_Window *wl_win)
 {
        win_context *cxt;
        int id;
@@ -195,7 +195,7 @@ EXPORT_API void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_in
                return;
        }
 
-       id = ecore_wl_window_id_get(wl_win);
+       id = ecore_wl2_window_id_get(wl_win);
 
        cxt = malloc(sizeof(win_context));
        if (cxt == NULL) {
index 892c433..17cce83 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include <linux/limits.h>
 
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 #include <wayland-client.h>
 #include <wayland-tbm-client.h>
 #include <tizen-extension-client-protocol.h>
@@ -431,7 +431,7 @@ static bool __update_win(unsigned int win, unsigned int surf, bool bfobscured)
 
 static void __raise_win(void)
 {
-       Ecore_Wl_Window *win;
+       Ecore_Wl2_Window *win;
        unsigned int win_id;
 
        if (!(__context.hint & APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL))
@@ -440,13 +440,13 @@ static void __raise_win(void)
        win_id = __get_main_window();
 
        _DBG("Raise window: %d", win_id);
-       win = ecore_wl_window_find(win_id);
-       ecore_wl_window_activate(win);
+       win = ecore_wl2_display_window_find(ecore_wl2_connected_display_get(NULL), win_id);
+       ecore_wl2_window_activate(win);
 }
 
 static void __pause_win(void)
 {
-       Ecore_Wl_Window *win;
+       Ecore_Wl2_Window *win;
        GSList *wlist = g_winnode_list;
        struct win_node *entry = NULL;
 
@@ -459,8 +459,8 @@ static void __pause_win(void)
                entry = wlist->data;
 
                _DBG("Pause window: %d", entry->win);
-               win = ecore_wl_window_find(entry->win);
-               ecore_wl_window_iconified_set(win, EINA_TRUE);
+               win = ecore_wl2_display_window_find(ecore_wl2_connected_display_get(NULL), entry->win);
+               ecore_wl2_window_iconified_set(win, EINA_TRUE);
 
                wlist = wlist->next;
        }
@@ -647,27 +647,27 @@ EXPORT_API int appcore_ui_base_on_receive(aul_type type, bundle *b)
 
 static void __add_ecore_events(void)
 {
-       __context.hshow = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_SHOW,
+       __context.hshow = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_SHOW,
                        __stub_show_cb, NULL);
        if (!__context.hshow)
                _ERR("Failed to add ECORE_WL_EVENT_WINDOW_SHOW event");
 
-       __context.hhide = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_HIDE,
+       __context.hhide = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_HIDE,
                        __stub_hide_cb, NULL);
        if (!__context.hhide)
                _ERR("Failed to add ECORE_WL_EVENT_WINDOW_HIDE event");
 
-       __context.hvchange = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE,
+       __context.hvchange = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE,
                        __stub_visibility_cb, NULL);
        if (!__context.hvchange)
                _ERR("Failed to add ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE event");
 
-       __context.hlower = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_LOWER,
+       __context.hlower = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_LOWER,
                        __stub_lower_cb, NULL);
        if (!__context.hlower)
                _ERR("Failed to add ECORE_WL_EVENT_WINDOW_LOWER event");
 
-       __context.hpvchange = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_PRE_VISIBILITY_CHANGE,
+       __context.hpvchange = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE,
                        __stub_pre_visibility_cb, NULL);
        if (!__context.hpvchange)
                _ERR("Failed to add ECORE_WL_EVENT_WINDOW_PRE_VISIBILITY_CHANGE event");
@@ -794,7 +794,7 @@ EXPORT_API void appcore_ui_base_group_remove()
 
 EXPORT_API void appcore_ui_base_window_on_show(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Show *ev;
+       Ecore_Wl2_Event_Window_Show *ev;
 
        ev = event;
        if (ev->parent_win != 0) {
@@ -832,7 +832,7 @@ static bool __check_visible(void)
 
 EXPORT_API void appcore_ui_base_window_on_hide(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Hide *ev;
+       Ecore_Wl2_Event_Window_Hide *ev;
        int bvisibility;
 
        ev = event;
@@ -851,18 +851,18 @@ EXPORT_API void appcore_ui_base_window_on_hide(int type, void *event)
 
 EXPORT_API void appcore_ui_base_window_on_lower(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Lower *ev;
+       Ecore_Wl2_Event_Window_Lower *ev;
 
        ev = event;
        if (!ev)
                return;
-       _DBG("ECORE_WL_EVENT_WINDOW_LOWER window id:%u\n", ev->win);
+       _DBG("ECORE_WL2_EVENT_WINDOW_LOWER window id:%u\n", ev->win);
        __group_lower();
 }
 
 EXPORT_API void appcore_ui_base_window_on_visibility(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Visibility_Change *ev;
+       Ecore_Wl2_Event_Window_Visibility_Change *ev;
        int bvisibility;
 
        ev = event;
@@ -894,10 +894,10 @@ EXPORT_API void appcore_ui_base_window_on_visibility(int type, void *event)
 
 EXPORT_API void appcore_ui_base_window_on_pre_visibility(int type, void *event)
 {
-       Ecore_Wl_Event_Window_Pre_Visibility_Change *ev = event;
+       Ecore_Wl2_Event_Window_Pre_Visibility_Change *ev = event;
        bool bvisibility;
 
-       if (ev && ev->type == ECORE_WL_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) {
+       if (ev && ev->type == ECORE_WL2_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) {
                __update_win((unsigned int)ev->win, 0, false);
                bvisibility = __check_visible();
 
@@ -918,7 +918,7 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar
        char appid[PATH_MAX] = {0, };
        int ret;
 
-       ecore_wl_init(NULL);
+       ecore_wl2_init();
 
        appcore_ui_plugin_init(&ops, argc, argv, &hint);
        ret = aul_app_get_appid_bypid(getpid(), appid, sizeof(appid));
@@ -960,7 +960,7 @@ EXPORT_API void appcore_ui_base_fini(void)
 
        appcore_base_fini();
        appcore_ui_plugin_fini();
-       ecore_wl_shutdown();
+       ecore_wl2_shutdown();
 }
 
 EXPORT_API void appcore_ui_base_pause(void)