diff options
author | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-03-10 10:38:18 +0100 |
---|---|---|
committer | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-03-11 10:40:41 +0100 |
commit | 2659fedd5554aa32ddc72c3ff4c7a11c759cfd36 (patch) | |
tree | 3a10f72c9d804e4726969037f609cb021eb826c8 | |
parent | 7a128ea063137fabe7ab3b199b8945627a01f51c (diff) | |
download | efl-assist-tizen_3.0.m1_mobile.tar.gz efl-assist-tizen_3.0.m1_mobile.tar.bz2 efl-assist-tizen_3.0.m1_mobile.zip |
dynamically test x11 and wl at runtimetizen_3.0_ivi_releasetizen_3.0.m2.a1_tv_releasetizen_3.0.m2.a1_mobile_releasetizen_3.0.m1_tv_releasetizen_3.0.m1_mobile_releasetizen_3.0.m14.3_ivi_releasetizen_3.0.m14.2_ivi_releasetizen_3.0.2014.q3_common_releasesubmit/tizen_mobile/20141120.000000submit/tizen_ivi_release/20140315.014853submit/tizen_ivi/20160217.000004submit/tizen_ivi/20160217.000000submit/tizen_common/20151026.085049submit/tizen_common/20151023.083358submit/tizen_common/20140522.140947submit/tizen_common/20140521.232441submit/tizen/20140315.014643submit/tizen/20140315.013821submit/tizen/20140311.103042accepted/tizen/mobile/20141021.084046accepted/tizen/ivi/release/20140315.014623accepted/tizen/ivi/panda/20140318.013558accepted/tizen/ivi/20160218.024428accepted/tizen/ivi/20140315.023303accepted/tizen/ivi/20140315.014420accepted/tizen/ivi/20140315.014154accepted/tizen/ivi/20140311.165537accepted/tizen/generic/20140317.083629accepted/tizen/generic/20140311.124319tizen_ivi_releasetizen_3.0_ivitizen_3.0.m1_tvtizen_3.0.m1_mobiletizen_3.0.m14.3_ivitizen_3.0.m14.2_ivitizen_3.0.2015.q2_commontizen_3.0.2015.q1_commontizen_3.0.2014.q4_commontizen_3.0.2014.q3_commonsandbox/pcoval/tizenaccepted/tizen_ivi_releaseaccepted/tizen_ivi_pandaaccepted/tizen_genericaccepted/tizen_3.0.m14.3_iviaccepted/tizen_3.0.2014.q3_common
This version builds on x11, wl and xwl
Change-Id: I0d237bd9fffa9dc42bda767c3c32c9073a80f72a
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
-rw-r--r-- | src/lib/efl_assist_screen_reader.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/lib/efl_assist_screen_reader.c b/src/lib/efl_assist_screen_reader.c index 76f8fc8..0c2efa5 100644 --- a/src/lib/efl_assist_screen_reader.c +++ b/src/lib/efl_assist_screen_reader.c @@ -3,7 +3,7 @@ #include <Ecore.h> -#ifdef HAVE_X +#ifdef HAVE_X11 #include <Ecore_X.h> #endif #ifdef HAVE_WAYLAND @@ -121,42 +121,44 @@ static void _tts_init(void) static void _timeout_cb(void *data, Evas_Object *obj, void *event_info) { -#ifdef HAVE_X - Ecore_X_Window w; -#elif defined HAVE_WAYLAND - Ecore_Wl_Window *w; +#ifdef HAVE_X11 + Ecore_X_Window xwin=0; +#endif +#ifdef HAVE_WAYLAND + Ecore_Wl_Window *wwin=0; #endif - unsigned int val; -#ifdef HAVE_X - w = elm_win_xwindow_get(data); -#elif defined HAVE_WAYLAND - w = elm_win_wl_window_get(data); +#ifdef HAVE_X11 + xwin = elm_win_xwindow_get(data); + if (xwin>0) { + evas_object_del(obj); obj=0; + val = 2; + ecore_x_window_prop_card32_set + (xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1); + } else #endif - if (!w) return; - - evas_object_del(obj); + { +#ifdef HAVE_WAYLAND + wwin = elm_win_wl_window_get(data); + if (wwin != NULL) { + evas_object_del(obj); obj=0; -#ifdef HAVE_X - val = 2; - ecore_x_window_prop_card32_set - (win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1); -#else - fprintf(stderr, "TODO: workaround: disabled code from " - __FILE__ ":%d:", __LINE__); + fprintf(stderr, "TODO: workaround: disabled code from " + __FILE__ ":%d:", __LINE__); + } #endif + } _tts_shutdown(); - } EAPI Eina_Bool ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support) { -#ifdef HAVE_X - Ecore_X_Window w; +#ifdef HAVE_X11 + Ecore_X_Window w=0; #elif defined HAVE_WAYLAND - Ecore_Wl_Window *w; + Ecore_Wl_Window *w=0; #endif unsigned int val; int tts_val; @@ -173,7 +175,7 @@ ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support) #ifdef HAVE_WAYLAND w = elm_win_wl_window_get(win); -#elif HAVE_X +#elif HAVE_X11 w = elm_win_xwindow_get(win); #endif @@ -183,7 +185,7 @@ ea_screen_reader_support_set(Evas_Object *win, Eina_Bool support) { val = 0; elm_config_access_set(EINA_TRUE); -#ifdef HAVE_X +#ifdef HAVE_X11 ecore_x_window_prop_card32_set (w, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1); #else |