Note wayland gets priority over x11 when both available
Change-Id: Id38c66dc7a2f6c10975779523a76205c4d11d687
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
IF(X11_SUPPORT)
ADD_DEFINITIONS("-DHAVE_X11")
ENDIF(X11_SUPPORT)
IF(X11_SUPPORT)
ADD_DEFINITIONS("-DHAVE_X11")
ENDIF(X11_SUPPORT)
+IF(WAYLAND_SUPPORT)
+ ADD_DEFINITIONS("-DHAVE_WAYLAND")
+ENDIF(WAYLAND_SUPPORT)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall")
INCLUDE(FindPkgConfig)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall")
INCLUDE(FindPkgConfig)
Name: efl-assist
Summary: EFL assist library
Name: efl-assist
Summary: EFL assist library
%if %{with x}
BuildRequires: pkgconfig(ecore-x)
%endif
%if %{with x}
BuildRequires: pkgconfig(ecore-x)
%endif
+%if %{with wayland}
+BuildRequires: pkgconfig(ecore-wayland)
+%endif
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
-DCMAKE_INSTALL_PREFIX=/usr \
%if %{with x}
-DX11_SUPPORT=On \
-DCMAKE_INSTALL_PREFIX=/usr \
%if %{with x}
-DX11_SUPPORT=On \
+%else
+ -DX11_SUPPORT=Off \
+%endif
+%if %{with wayland}
+ -DWAYLAND_SUPPORT=On \
+%else
+ -DWAYLAND_SUPPORT=Off \
#include "efl_assist.h"
#include "efl_assist_private.h"
#include "efl_assist.h"
#include "efl_assist_private.h"
#ifdef HAVE_X
#include <Ecore_X.h>
#endif
#ifdef HAVE_X
#include <Ecore_X.h>
#endif
+#ifdef HAVE_WAYLAND
+#include <Ecore_Wayland.h>
+#endif
#include <vconf.h>
#include <tts.h>
#include <vconf.h>
#include <tts.h>
static void _timeout_cb(void *data, Evas_Object *obj, void *event_info)
{
static void _timeout_cb(void *data, Evas_Object *obj, void *event_info)
{
-#ifdef HAVE_X
- Ecore_X_Window xwin;
+#ifdef HAVE_WAYLAND
+ Ecore_Wl_Window *w;
+#elif HAVE_X
+ Ecore_X_Window w;
+#endif
+
- xwin = elm_win_xwindow_get(data);
- if (!xwin) return;
+#ifdef HAVE_WAYLAND
+ w = elm_win_wl_window_get(data);
+#elif HAVE_X
+ w = elm_win_xwindow_get(data);
+#endif
+ if (!w) return;
val = 2;
ecore_x_window_prop_card32_set
val = 2;
ecore_x_window_prop_card32_set
- (xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
-
- _tts_shutdown();
+ (win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
- fprintf(stderr, "TODO: workaround: disabled code from " __FILE__ );
+ fprintf(stderr, "TODO: workaround: disabled code from "
+ __FILE__ ":%d:", __LINE__);
}
EAPI Eina_Bool
ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support)
{
}
EAPI Eina_Bool
ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support)
{
-#ifdef HAVE_X
- Ecore_X_Window xwin;
+#ifdef HAVE_WAYLAND
+ Ecore_Wl_Window *w;
+#elif HAVE_X
+ Ecore_X_Window w;
+#endif
unsigned int val;
int tts_val;
Evas_Object *base;
unsigned int val;
int tts_val;
Evas_Object *base;
if (!win) return EINA_FALSE;
if (!win) return EINA_FALSE;
- xwin = elm_win_xwindow_get(win);
- if (!xwin) return EINA_FALSE;
+#ifdef HAVE_WAYLAND
+ w = elm_win_wl_window_get(win);
+#elif HAVE_X
+ w = elm_win_xwindow_get(win);
+#endif
+
+ if (!w) return EINA_FALSE;
if (support)
{
val = 0;
elm_config_access_set(EINA_TRUE);
if (support)
{
val = 0;
elm_config_access_set(EINA_TRUE);
ecore_x_window_prop_card32_set
ecore_x_window_prop_card32_set
- (xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
+ (w, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
+#else
+ fprintf(stderr, "TODO: workaround: disabled code from "
+ __FILE__ ":%d:", __LINE__);
+#endif
-#else
- fprintf(stderr, "TODO: workaround: disabled code from " __FILE__ );
-#endif