Remove unnecessary build configuration 28/166428/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 10 Jan 2018 07:29:38 +0000 (16:29 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 10 Jan 2018 07:29:38 +0000 (16:29 +0900)
Tizen only supports wayland.

Change-Id: I05530f238faca0dad84d8dac84f53f2d5d47f4b8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
CMakeLists.txt
client/CMakeLists.txt
include/ug-manager.h
packaging/ui-gadget-1.spec
src/manager.c
src/ug.c
ug-efl-engine/CMakeLists.txt

index 69662f00c80b19fc06f1581ddb3db3aa26930777..d56859e381e380bb40ba7ec86f73144cfa08e503 100644 (file)
@@ -23,17 +23,7 @@ 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")
-IF (with_x)
-       PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES} x11)
-       SET(UG_FLAG "")
-ENDIF(with_x)
-
-IF (with_wayland)
-       ADD_DEFINITIONS("-DUG_WAYLAND")
-       PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES})
-       SET(UG_FLAG "-DUG_WAYLAND")
-ENDIF (with_wayland)
-
+PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES})
 FOREACH(flag ${PKGS_CFLAGS})
        SET(CFLAGS "${CFLAGS} ${flag}")
 ENDFOREACH(flag)
index 7f507fbe440de4116df76dac6ea884a4c247df8e..da22dbfd4ff4fc3878eab9202519f6dc6cbe6ebf 100644 (file)
@@ -9,13 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
 INCLUDE(FindPkgConfig)
 SET(CLIENT_PKGS_CHECK_MODULES "capi-appfw-application appcore-efl appsvc bundle edje dlog elementary evas vconf")
 
-IF (with_x)
-       PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES} ecore-x x11)
-ENDIF(with_x)
-
-IF (with_wayland)
-       PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES})
-ENDIF(with_wayland)
+PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES})
 
 FOREACH(flag ${CLIENT_PKGS_CFLAGS})
        SET(CLIENT_CFLAGS "${CLIENT_CFLAGS} ${flag} -fPIE")
index 27126e712d08ae0788894c78c719bae2ea1a4bf6..0f75183335e0f9fc615e9f13818621b1bd2f8e02 100644 (file)
 #ifndef __UG_MANAGER_H__
 #define __UG_MANAGER_H__
 
-#ifndef UG_WAYLAND
-#include <X11/Xlib.h>
-#endif
-
 #include <Evas.h>
 #include "ug.h"
 
@@ -38,12 +34,7 @@ ui_gadget_h ugman_ug_load(ui_gadget_h parent,
 int ugman_ug_del(ui_gadget_h ug);
 int ugman_ug_del_all(void);
 
-#ifndef UG_WAYLAND
-int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt);
-#else
 int ugman_init(void *win, enum ug_option opt);
-#endif
-
 int ugman_init_efl(Evas_Object *win, enum ug_option opt);
 
 int ugman_resume(void);
index 0c44937bacd1fde433e5e8998cceeef3eddf1fa7..7ea06faeeb299d4a88655fff437f46fef2df393a 100644 (file)
@@ -1,6 +1,3 @@
-%bcond_with x
-%bcond_with wayland
-
 Name:       ui-gadget-1
 Summary:    UI Gadget Library
 Version:    0.2.5
@@ -15,9 +12,6 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(dlog)
-%if %{with x}
-BuildRequires:  pkgconfig(x11)
-%endif
 BuildRequires:  pkgconfig(appsvc)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(capi-appfw-application)
@@ -36,9 +30,6 @@ UI gadget library (development headers)
 Summary:    Development files for %{name}
 Group:      Development/Libraries
 Requires:   %{name} = %{version}-%{release}
-%if %{with x}
-Requires:  pkgconfig(x11)
-%endif
 
 %description devel
 Development files for %{name}
@@ -49,13 +40,10 @@ cp %{SOURCE1001} .
 
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
--DTZ_SYS_ETC=%TZ_SYS_ETC \
-%if %{with wayland} && !%{with x}
--Dwith_wayland=TRUE
-%else
--Dwith_x=TRUE
-%endif
+%cmake -DFULLVER=%{version} \
+       -DMAJORVER=${MAJORVER} \
+       -DTZ_SYS_ETC=%TZ_SYS_ETC \
+       .
 
 make %{?jobs:-j%jobs}
 
index e7b7f4187bb1618e5300a9c8530c279f966d3cac..5ee741673002afcd78bbe0ff33d675472fad4d26 100644 (file)
 #include <errno.h>
 #include <glib.h>
 #include <Elementary.h>
-
-#ifndef UG_WAYLAND
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-#include <Ecore_X.h>
-#else
 #include <Ecore_Wayland.h>
-#endif
-
 #include <Ecore.h>
 
 #include "ug.h"
@@ -58,12 +50,6 @@ struct ug_manager {
        GSList *fv_list;
 
        void *win;
-
-#ifndef UG_WAYLAND
-       Window win_id;
-       Display *disp;
-#endif
-
        enum ug_option base_opt;
        enum ug_event last_rotate_evt;
 
@@ -135,102 +121,6 @@ static int ug_fvlist_del(ui_gadget_h c)
        return 0;
 }
 
-#ifndef UG_WAYLAND
-static int __ug_x_get_window_property(Display *dpy, Window win, Atom atom,
-                                         Atom type, unsigned int *val,
-                                         unsigned int len)
-{
-       unsigned char *prop_ret;
-       Atom type_ret;
-       unsigned long bytes_after;
-       unsigned long  num_ret;
-       int format_ret;
-       unsigned int i;
-       int num;
-
-       prop_ret = NULL;
-       if (XGetWindowProperty(dpy, win, atom, 0, 0x7fffffff, False,
-                              type, &type_ret, &format_ret, &num_ret,
-                              &bytes_after, &prop_ret) != Success)
-               return -1;
-
-       if (type_ret != type || format_ret != 32)
-               num = -1;
-       else if (num_ret == 0 || !prop_ret)
-               num = 0;
-       else {
-               if (num_ret < len)
-                       len = num_ret;
-               for (i = 0; i < len; i++)
-                       val[i] = ((unsigned long *)prop_ret)[i];
-               num = len;
-       }
-
-       if (prop_ret)
-               XFree(prop_ret);
-
-       return num;
-}
-#endif
-
-#ifndef UG_WAYLAND
-static enum ug_event __ug_x_rotation_get(Display *dpy, Window win)
-{
-       Window active_win;
-       Window root_win;
-       int rotation = -1;
-       int ret = -1;
-       enum ug_event func_ret;
-
-       Atom atom_active_win;
-       Atom atom_win_rotate_angle;
-
-       root_win = XDefaultRootWindow(dpy);
-
-       atom_active_win = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
-       ret = __ug_x_get_window_property(dpy, root_win, atom_active_win,
-                                            XA_WINDOW,
-                                            (unsigned int *)&active_win, 1);
-       if (ret < 0) {
-               func_ret = UG_EVENT_ROTATE_PORTRAIT;
-               goto func_out;
-       }
-
-       atom_win_rotate_angle =
-               XInternAtom(dpy, "_E_ILLUME_ROTATE_ROOT_ANGLE", False);
-       ret = __ug_x_get_window_property(dpy, root_win,
-                                         atom_win_rotate_angle, XA_CARDINAL,
-                                         (unsigned int *)&rotation, 1);
-
-       _DBG("x_rotation_get / ret(%d),degree(%d)", ret, rotation);
-
-       if (ret == -1)
-               func_ret = UG_EVENT_ROTATE_PORTRAIT;
-       else {
-               switch (rotation) {
-               case 0:
-                       func_ret = UG_EVENT_ROTATE_PORTRAIT;
-                       break;
-               case 90:
-                       func_ret = UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN;
-                       break;
-               case 180:
-                       func_ret = UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN;
-                       break;
-               case 270:
-                       func_ret = UG_EVENT_ROTATE_LANDSCAPE;
-                       break;
-               default:
-                       func_ret = UG_EVENT_ROTATE_PORTRAIT;
-                       break;
-               }
-       }
-
-func_out:
-       return func_ret;
-}
-#endif
-
 static enum ug_event __ug_evas_rotation_get(Evas_Object *win)
 {
 
@@ -500,7 +390,6 @@ static int ugman_ug_resume(void *data)
        return 0;
 }
 
-#ifdef UG_WAYLAND
 static void _ugman_enable_indicator(Evas_Object *win, int enable)
 {
        Ecore_Wl_Window *wlwin = elm_win_wl_window_get(win);
@@ -527,13 +416,9 @@ static int _ugman_get_indicator_state(Evas_Object *win)
 
        return ret;
 }
-#endif
 
 static int ugman_indicator_update(enum ug_option opt, enum ug_event event)
 {
-#ifndef UG_WAYLAND
-       _ERR("controlling indicator is disabled");
-#else
        int enable;
        int cur_state;
 
@@ -578,7 +463,6 @@ static int ugman_indicator_update(enum ug_option opt, enum ug_event event)
                _ugman_enable_indicator(ug_man.win, enable);
        }
 
-#endif
        return 0;
 }
 
@@ -774,13 +658,8 @@ static int ugman_ug_create(void *data)
                ugman_indicator_update(ug->opt, UG_EVENT_NONE);
        }
 
-       if (ug_man.last_rotate_evt == UG_EVENT_NONE) {
-#ifndef UG_WAYLAND
-               ug_man.last_rotate_evt = __ug_x_rotation_get(ug_man.disp, ug_man.win_id);
-#else
+       if (ug_man.last_rotate_evt == UG_EVENT_NONE)
                ug_man.last_rotate_evt = __ug_evas_rotation_get((Evas_Object *)ug_man.win);
-#endif
-       }
        ugman_ug_event(ug, ug_man.last_rotate_evt);
 
        if (ug->mode == UG_MODE_FRAMEVIEW)
@@ -1107,23 +986,6 @@ int ugman_ug_del_all(void)
        return 0;
 }
 
-#ifndef UG_WAYLAND
-int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt)
-{
-       ug_man.win = win;
-       ug_man.disp = disp;
-       ug_man.win_id = xid;
-       ug_man.base_opt = opt;
-       ug_man.last_rotate_evt = UG_EVENT_NONE;
-
-       if (!ug_man.is_initted)
-               ug_man.engine = ug_engine_load();
-
-       ug_man.is_initted = 1;
-
-       return 0;
-}
-#else
 int ugman_init(void *win, enum ug_option opt)
 {
        ug_man.win = win;
@@ -1137,18 +999,10 @@ int ugman_init(void *win, enum ug_option opt)
 
        return 0;
 }
-#endif
 
 int ugman_init_efl(Evas_Object *win, enum ug_option opt)
 {
-#ifndef UG_WAYLAND
-       Ecore_X_Window xwin = elm_win_xwindow_get(win);
-       if (xwin)
-               return ugman_init((Display *)ecore_x_display_get(), xwin, win, opt);
-#else
        return ugman_init(win, opt);
-#endif
-       return -1;
 }
 
 int ugman_resume(void)
index 8f2fb9f1c3f4225ca1070f54f235efe35a89b33a..a32f75287965a0c21d84af20327ae5a7b6cc17b1 100644 (file)
--- a/src/ug.c
+++ b/src/ug.c
@@ -97,23 +97,6 @@ UG_API ui_gadget_h ug_create(ui_gadget_h parent,
        return ugman_ug_load(parent, name, mode, app_control, cbs);
 }
 
-#ifndef UG_WAYLAND
-UG_API int ug_init(void *disp, unsigned long xid, void *win, enum ug_option opt)
-{
-       if (!win || !xid || !disp) {
-               _ERR("ug_init() failed: Invalid arguments");
-               return -1;
-       }
-
-       if (opt < UG_OPT_INDICATOR_ENABLE || opt >= UG_OPT_MAX) {
-               _ERR("ug_init() failed: Invalid option");
-               return -1;
-       }
-
-       return ugman_init((Display *)disp, (Window)xid, win, opt);
-}
-#else
-
 /* LCOV_EXCL_START */
 UG_API int ug_init(void *disp, unsigned long xid, void *win, enum ug_option opt)
 {
@@ -125,7 +108,6 @@ UG_API int ug_init(void *disp, unsigned long xid, void *win, enum ug_option opt)
        return ugman_init(win, opt);
 }
 /* LCOV_EXCL_STOP */
-#endif
 
 /* LCOV_EXCL_START */
 UG_API int UG_INIT_EFL(void *win, enum ug_option opt)
index cff47ad7172d5ad361b897c1aa8f5e018d581146..857ea77072eb99b4f540a1608cb866ae43463b9b 100644 (file)
@@ -3,16 +3,7 @@ SET(UG_EFL_ENGINE_SRCS ug-efl-engine.c)
 SET(UG_ENGINE_EDJ_DIR "${CMAKE_INSTALL_PREFIX}/share/edje")
 SET(UG_EFL_ENGINE_PKGS_CHECK_MODULES "dlog elementary ecore edje capi-appfw-application evas")
 
-IF (with_x)
-        PKG_CHECK_MODULES(UG_EFL_ENGINE_PKGS REQUIRED
-       ${UG_EFL_ENGINE_PKGS_CHECK_MODULES}
-       ecore-x)
-ENDIF(with_x)
-
-IF (with_wayland)
-        PKG_CHECK_MODULES(UG_EFL_ENGINE_PKGS REQUIRED
-       ${UG_EFL_ENGINE_PKGS_CHECK_MODULES})
-ENDIF(with_wayland)
+PKG_CHECK_MODULES(UG_EFL_ENGINE_PKGS REQUIRED ${UG_EFL_ENGINE_PKGS_CHECK_MODULES})
 
 FOREACH(flag ${UG_EFL_ENGINE_PKGS_CFLAGS})
        SET(UG_EFL_ENGINE_CFLAGS "${UG_EFL_ENGINE_CFLAGS} ${flag}")