Enabled screen reader feature 57/17257/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 31 May 2013 14:12:24 +0000 (23:12 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 6 Mar 2014 06:52:09 +0000 (15:52 +0900)
Change-Id: I2baf1b1b346985f9d53de4631acf58dd9a69adb5

packaging/ise-default.spec
src/common.cpp
src/include/common.h
src/include/ise.h
src/ise.cpp
src/main.cpp

index bd95f82..71ba316 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ise-default
 Summary:    Tizen keyboard
-Version:    0.9.0
+Version:    0.9.1
 Release:    1
 Group:      TO BE / FILLED IN
 License:    TO BE / FILLED IN
index 9755ffc..43baa0c 100644 (file)
@@ -161,6 +161,21 @@ void theme_changed_cb(keynode_t *key, void* data)
     }
 }
 
+void accessibility_changed_cb(keynode_t *key, void* data)
+{
+    int vconf_value = 0;
+    if(vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &vconf_value) == 0) {
+        LOGD("accessbility state : %d\n", vconf_value);
+
+        CISECommon *impl = CISECommon::get_instance();
+        if (impl) {
+            IISECommonEventCallback *callback = impl->get_core_event_callback();
+            if (callback) {
+                callback->set_accessibility_state(vconf_value);
+            }
+        }
+    }
+}
 
 static Eina_Bool _client_message_cb (void *data, int type, void *event)
 {
@@ -287,10 +302,12 @@ void CISECommon::run(const sclchar *uuid, const scim::ConfigPointer &config, con
 
     vconf_notify_key_changed(VCONFKEY_LANGSET, language_changed_cb, NULL);
     vconf_notify_key_changed(VCONFKEY_SETAPPL_WIDGET_THEME_STR, theme_changed_cb, NULL);
+    vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb, NULL);
 
     /* Should we call these callback functions here? */
     language_changed_cb(NULL, NULL);
     theme_changed_cb(NULL, NULL);
+    accessibility_changed_cb(NULL, NULL);
 
     register_slot_functions();
 
@@ -320,6 +337,7 @@ void CISECommon::run(const sclchar *uuid, const scim::ConfigPointer &config, con
 
     vconf_ignore_key_changed (VCONFKEY_LANGSET, language_changed_cb);
     vconf_ignore_key_changed (VCONFKEY_SETAPPL_WIDGET_THEME_STR, theme_changed_cb);
+    vconf_ignore_key_changed (VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb);
 
     ecore_event_handler_del (XClientMsgHandler);
 
index 059af95..1d24327 100644 (file)
@@ -78,6 +78,7 @@ struct IISECommonEventCallback {
     virtual void set_display_language(const sclchar *language) {}
     virtual void set_theme_name(const sclchar *name) {}
     virtual void set_rotation_degree(sclint degree) {}
+    virtual void set_accessibility_state(sclboolean state) {}
 };
 
 /**
index e0734ae..db0bbfb 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "languages.h"
 
-#define ISE_VERSION "0.9.0-1"
+#define ISE_VERSION "0.9.1-1"
 #define LOCALEDIR "/usr/share/locale"
 
 #define PRIMARY_LATIN_LANGUAGE "English"
@@ -117,6 +117,7 @@ void ise_reset_context();
 void ise_reset_input_context();
 void ise_set_layout(sclu32 layout);
 void ise_set_screen_rotation(int degree);
+void ise_set_accessibility_state(bool state);
 void ise_set_caps_mode(unsigned int mode);
 void ise_update_cursor_position(int position);
 void ise_set_return_key_type(unsigned int type);
index 67ce27b..a03879c 100644 (file)
@@ -456,6 +456,14 @@ ise_set_screen_rotation(int degree)
 }
 
 void
+ise_set_accessibility_state(bool state)
+{
+    if (gSCLUI) {
+        gSCLUI->enable_tts(state);
+    }
+}
+
+void
 ise_hide()
 {
     if (gSCLUI && g_ise_common) {
index 877e2d9..75f3323 100644 (file)
@@ -53,6 +53,7 @@ class CCoreEventCallback : public IISECommonEventCallback
     void reset_input_context(sclint ic, const sclchar *uuid);
 
     void set_display_language(const sclchar *language);
+    void set_accessibility_state(const sclboolean state);
     void set_rotation_degree(sclint degree);
 
     void set_caps_mode(sclu32 mode);
@@ -136,6 +137,11 @@ void CCoreEventCallback::set_display_language(const sclchar *language)
     LOGD("Language : %s\n", (language ? language : "NULL"));
 }
 
+void CCoreEventCallback::set_accessibility_state(const sclboolean state)
+{
+    ise_set_accessibility_state(state);
+}
+
 void CCoreEventCallback::set_rotation_degree(sclint degree)
 {
     ise_set_screen_rotation(degree);