[ 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 ========================================================================
-%bcond_with x
-%bcond_with wayland
-
Name: e-mod-tizen-effect
Version: 0.0.3
Release: 1
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}
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
{
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;
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*
efc = E_NEW(E_Effect_Client, 1);
efc->ec = ec;
efc->animating = 0;
-#ifndef HAVE_WAYLAND
- efc->ep = NULL;
-#endif
return efc;
}
efc->animating ++;
e_object_ref(E_OBJECT(ec));
-#ifndef HAVE_WAYLAND
- efc->ep = e_pixmap_ref(ec->pixmap);
-#endif
}
static void
while(efc->animating)
{
-#ifndef HAVE_WAYLAND
- e_pixmap_free(efc->ep);
-#endif
if (!e_object_unref(E_OBJECT(ec)))
{
efc = NULL;
efc->animating --;
}
-
-#ifndef HAVE_WAYLAND
- if (efc)
- efc->ep = NULL;
-#endif
}
static void
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)
{
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);
}
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);
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);
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);