ADD_DEFINITIONS("-DVERSION=\"${VERSION}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
ADD_DEFINITIONS("-DPLUGINDIR=\"${PLUGINDIR}\"")
+IF(X11_SUPPORT)
+ ADD_DEFINITIONS("-DHAVE_X11")
+ENDIF(X11_SUPPORT)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall")
INCLUDE(FindPkgConfig)
+%bcond_with x
+
Name: efl-assist
Summary: EFL assist library
Version: 0.1.18r02
BuildRequires: pkgconfig(tts)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-appfw-application)
+%if %{with x}
BuildRequires: pkgconfig(ecore-x)
+%endif
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%build
export CFLAGS+=" -fvisibility=hidden"
export LDFLAGS+=" -fvisibility=hidden"
-%cmake . -DCMAKE_INSTALL_PREFIX=/usr
+
+%cmake . \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+%if %{with x}
+ -DX11_SUPPORT=On \
+%endif
+ #eol
+
make %{?jobs:-j%jobs}
#include "efl_assist.h"
#include "efl_assist_private.h"
+
+#ifdef HAVE_X
#include <Ecore_X.h>
+#endif
+
#include <vconf.h>
#include <tts.h>
#define UNAVAILABLE_TEXT "Screen reader is unavailable during using this application. You can press home or back key to go back to home screen."
static void _timeout_cb(void *data, Evas_Object *obj, void *event_info)
{
+#ifdef HAVE_X
Ecore_X_Window xwin;
unsigned int val;
(xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
_tts_shutdown();
+#else
+ fprintf(stderr, "TODO: workaround: disabled code from " __FILE__ );
+#endif
}
EAPI Eina_Bool
ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support)
{
+#ifdef HAVE_X
Ecore_X_Window xwin;
unsigned int val;
int tts_val;
}
return EINA_TRUE;
+#else
+ fprintf(stderr, "TODO: workaround: disabled code from " __FILE__ );
+#endif
}
EAPI Eina_Bool