removed HAVE_WAYLAND and E_COMP_WL. 15/72215/2
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 31 May 2016 07:47:35 +0000 (16:47 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 31 May 2016 08:46:36 +0000 (17:46 +0900)
make it wayland only.

Change-Id: I5c06ad8c482e35a3c76e4488086a0569bc61d125

configure.ac
packaging/e-mod-tizen-effect.spec
src/e_mod_effect.c
src/e_mod_effect.h
src/e_mod_main.c
src/e_mod_main.h

index 79f2465..d1e0713 100644 (file)
@@ -94,18 +94,6 @@ AC_ARG_ENABLE(homedir-install,
        [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ]
 )
 
-have_wayland_only=no
-AC_ARG_ENABLE([wayland-only],
-  AS_HELP_STRING([--enable-wayland-only],[enable wayland-only version of enlightenment @<:@default=disabled@:>@]),
-  [have_wayland_only=$enableval],
-  [have_wayland_only=no])
-AC_MSG_CHECKING([whether wayland-only version is enabled])
-if test "x${have_wayland_only}" != "xno"; then
-  AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
-  AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland version])
-fi
-AM_CONDITIONAL(HAVE_WAYLAND_ONLY, [test "x${have_wayland_only}" = xyes])
-
 dnl ========================================================================
 # output files
 dnl ========================================================================
index b8b6fbf..11f800f 100644 (file)
@@ -1,6 +1,3 @@
-%bcond_with x
-%bcond_with wayland
-
 Name: e-mod-tizen-effect
 Version: 0.0.3
 Release: 1
@@ -15,16 +12,8 @@ BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(edje)
 BuildRequires:  gettext
 BuildRequires:  edje-tools
-%if %{with wayland}
 BuildRequires:  pkgconfig(wayland-server)
 BuildRequires:  pkgconfig(tizen-extension-server)
-%endif
-
-## for wayland build plz remove below lines
-%if !%{with x}
-ExclusiveArch:
-%endif
-###
 
 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
 
@@ -42,11 +31,7 @@ export CFLAGS+=" -Wall -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS}"
 export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
 
 %autogen
-%configure \
-%if %{with wayland}
-      --enable-wayland-only \
-%endif
-      --prefix=%{_prefix}
+%configure --prefix=%{_prefix}
 make
 
 %install
index f994490..797a0d9 100644 (file)
@@ -6,17 +6,12 @@ typedef struct _E_Effect_Client
 {
    E_Client *ec;
    unsigned int animating;
-#ifdef HAVE_WAYLAND
    E_Comp_Wl_Buffer_Ref buffer_ref;
-#else
-   E_Pixmap *ep;
-#endif
 } E_Effect_Client;
 
 static void
 _e_mod_effect_event_send(E_Client *ec, Eina_Bool start, E_Effect_Type type)
 {
-#ifdef HAVE_WAYLAND
    struct wl_resource *surface_resource;
    struct wl_resource *effect_resource;
    struct wl_client *wc;
@@ -55,11 +50,6 @@ _e_mod_effect_event_send(E_Client *ec, Eina_Bool start, E_Effect_Type type)
      tizen_effect_send_start(effect_resource, surface_resource, tizen_effect_type);
    else
      tizen_effect_send_end(effect_resource, surface_resource, tizen_effect_type);
-#else
-   (void)ec;
-   (void)start;
-   (void)type;
-#endif
 }
 
 static E_Effect_Client*
@@ -70,9 +60,6 @@ _e_mod_effect_client_new(E_Client *ec)
    efc = E_NEW(E_Effect_Client, 1);
    efc->ec = ec;
    efc->animating = 0;
-#ifndef HAVE_WAYLAND
-   efc->ep = NULL;
-#endif
 
    return efc;
 }
@@ -107,9 +94,6 @@ _e_mod_effect_ref(E_Client *ec)
 
    efc->animating ++;
    e_object_ref(E_OBJECT(ec));
-#ifndef HAVE_WAYLAND
-   efc->ep = e_pixmap_ref(ec->pixmap);
-#endif
 }
 
 static void
@@ -124,9 +108,6 @@ _e_mod_effect_unref(E_Client *ec)
 
    while(efc->animating)
      {
-#ifndef HAVE_WAYLAND
-        e_pixmap_free(efc->ep);
-#endif
         if (!e_object_unref(E_OBJECT(ec)))
           {
              efc = NULL;
@@ -136,11 +117,6 @@ _e_mod_effect_unref(E_Client *ec)
 
         efc->animating --;
      }
-
-#ifndef HAVE_WAYLAND
-   if (efc)
-     efc->ep = NULL;
-#endif
 }
 
 static void
@@ -434,7 +410,6 @@ _e_mod_effect_cb_client_restack(void *data, int type, void *event)
    return ECORE_CALLBACK_PASS_ON;
 }
 
-#ifdef HAVE_WAYLAND
 static Eina_Bool
 _e_mod_effect_cb_client_buffer_change(void *data, int ev_type, void *event)
 {
@@ -500,17 +475,15 @@ _e_mod_effect_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
 
    eina_hash_add(_effect->resources, &client, res);
 }
-#endif
+
 static void
 _e_mod_effect_cb_client_data_free(void *data)
 {
-#ifdef HAVE_WAYLAND
    E_Effect_Client *efc = data;
 
    if (efc->buffer_ref.buffer)
      e_comp_wl_buffer_reference(&efc->buffer_ref, NULL);
 
-#endif
    free(data);
 }
 
@@ -542,7 +515,6 @@ e_mod_effect_init(void)
    effect->clients = eina_hash_pointer_new(_e_mod_effect_cb_client_data_free);
    EINA_SAFETY_ON_NULL_GOTO(effect->clients, err);
 
-#ifdef HAVE_WAYLAND
    effect->resources = eina_hash_pointer_new(NULL);
    EINA_SAFETY_ON_NULL_GOTO(effect->resources, err);
 
@@ -555,7 +527,7 @@ e_mod_effect_init(void)
 
    E_LIST_HANDLER_APPEND(effect->event_hdlrs, E_EVENT_CLIENT_BUFFER_CHANGE,
                          _e_mod_effect_cb_client_buffer_change, effect);
-#endif
+
    E_LIST_HANDLER_APPEND(effect->event_hdlrs, E_EVENT_CLIENT_ADD,
                          _e_mod_effect_cb_client_add, effect);
 
@@ -616,12 +588,10 @@ e_mod_effect_shutdown()
    E_FREE_LIST(_effect->providers,  e_comp_object_effect_mover_del);
    E_FREE_LIST(_effect->event_hdlrs, ecore_event_handler_del);
 
-#ifdef HAVE_WAYLAND
    if (_effect->global)
      wl_global_destroy(_effect->global);
 
    E_FREE_FUNC(_effect->resources, eina_hash_free);
-#endif
    E_FREE_FUNC(_effect->clients, eina_hash_free);
 
    E_FREE(_effect);
index 00fa8cc..a312d7b 100644 (file)
@@ -2,13 +2,8 @@
 # define E_MOD_EFFECT_H
 
 # include "config.h"
-
-# ifdef HAVE_WAYLAND
-#  define E_COMP_WL
-#  include <tizen-extension-server-protocol.h>
-# endif
-
 # include <e.h>
+# include <tizen-extension-server-protocol.h>
 
 typedef struct _E_Effect E_Effect;
 typedef enum _E_Effect_Type E_Effect_Type;
@@ -26,10 +21,8 @@ enum _E_Effect_Type
 
 struct _E_Effect
 {
-# ifdef HAVE_WAYLAND
    struct wl_global *global;
    Eina_Hash *resources;
-# endif
    const char *file;
    const char *style;
 
index 60b932a..858e2e3 100644 (file)
@@ -1,4 +1,3 @@
-#include "e.h"
 #include "e_mod_main.h"
 #include "e_mod_effect.h"
 
index 474c1f2..94c197d 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef E_MOD_MAIN_H
 #define E_MOD_MAIN_H
 
+#include <e.h>
+
 /*** E Module ***/
 EAPI extern E_Module_Api e_modapi;