Enabled screen reader feature
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 31 May 2013 14:05:08 +0000 (23:05 +0900)
committerGerrit Code Review <gerrit2@kim11>
Mon, 3 Jun 2013 07:42:04 +0000 (16:42 +0900)
packaging/libscl-ui.spec
scl/gwes/efl/sclevents-efl.cpp
scl/include/sclversion.h
scl/scluiimpl.cpp
scl/utils/linux/sclutils-linux.cpp

index 7a4b707..6dc8394 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       libscl-ui
 Summary:    A library for developing XML-based software keyboards
-Version:    0.3.3
+Version:    0.3.4
 Release:    1
 Group:      TO BE / FILLED IN
 License:    TO BE / FILLED IN
index 2cfdf0a..41810e1 100644 (file)
@@ -54,7 +54,7 @@ CSCLEventsImplEfl::CSCLEventsImplEfl()
     m_mouse_move_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, mouse_move, NULL);
     m_mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, mouse_release, NULL);
 
-    //m_xclient_msg_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, client_message_cb, NULL);
+    m_xclient_msg_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, client_message_cb, NULL);
 }
 
 /**
@@ -564,7 +564,7 @@ client_message_cb(void *data, int type, void *event)
             }
         }
     }
-    return TRUE;
+    return ECORE_CALLBACK_PASS_ON;
 }
 
 Eina_Bool timer_event(void *data)
index 685454c..f04744e 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __SCL_VERSION_H__
 #define __SCL_VERSION_H__
 
-#define SCL_VERSION "0.3.3-1"
+#define SCL_VERSION "0.3.4-1"
 
 #endif //__SCL_VERSION_H
 
index 88b42a3..7b573c4 100644 (file)
@@ -419,14 +419,14 @@ CSCLUIImpl::set_shift_state(SCLShiftState state)
             context->set_shift_state(state);
             if (state != current_state) {
                 windows->update_window(windows->get_base_window());
-            }
-            if (context->get_tts_enabled()) {
-                if (state == SCL_SHIFT_STATE_ON) {
-                    utils->play_tts(SCL_SHIFT_STATE_ON_HINT_STRING);
-                } else if (state == SCL_SHIFT_STATE_LOCK) {
-                    utils->play_tts(SCL_SHIFT_STATE_LOCK_HINT_STRING);
-                } else {
-                    utils->play_tts(SCL_SHIFT_STATE_OFF_HINT_STRING);
+                if (context->get_tts_enabled()) {
+                    if (state == SCL_SHIFT_STATE_ON) {
+                        utils->play_tts(SCL_SHIFT_STATE_ON_HINT_STRING);
+                    } else if (state == SCL_SHIFT_STATE_LOCK) {
+                        utils->play_tts(SCL_SHIFT_STATE_LOCK_HINT_STRING);
+                    } else {
+                        utils->play_tts(SCL_SHIFT_STATE_OFF_HINT_STRING);
+                    }
                 }
             }
         }
index 6cf2fa5..cc5ebb2 100644 (file)
@@ -118,21 +118,23 @@ CSCLUtilsImplLinux::play_tts(const sclchar* str) {
 
         r = tts_get_state(tts, &current_state);
         if (TTS_ERROR_NONE != r) {
-            printf("Fail to get state from TTS : ret(%d)\n", r);
+            LOGD("Fail to get state from TTS : ret(%d)\n", r);
         }
 
         if (TTS_STATE_PLAYING == current_state)  {
             r = tts_stop(tts);
             if (TTS_ERROR_NONE != r) {
-                printf("Fail to stop TTS : ret(%d)\n", r);
+                LOGD("Fail to stop TTS : ret(%d)\n", r);
             }
         }
         r = tts_add_text(tts, str, "en_US", TTS_VOICE_TYPE_FEMALE, TTS_SPEED_NORMAL, &utt_id);
         if (TTS_ERROR_NONE == r) {
             r = tts_play(tts);
             if (TTS_ERROR_NONE != r) {
-                printf("Fail to play TTS : ret(%d)\n", r);
+                LOGD("Fail to play TTS : ret(%d)\n", r);
             }
+        } else {
+            LOGD("Fail to add text : ret(%d)\n", r);
         }
     }
 
@@ -227,14 +229,14 @@ CSCLUtilsImplLinux::open_devices() {
         LOGD("FEEDBACK INITIALIZATION SUCCESSFUL : %d\n", r);
     }
 
-    /*r = tts_create(&tts);
+    r = tts_create(&tts);
     if (TTS_ERROR_NONE != r) {
-        printf("tts_create FAILED : result(%d)", r);
+        LOGD("tts_create FAILED : result(%d)", r);
     } else {
         tts_set_mode (tts, TTS_MODE_SCREEN_READER);
     }
     if (TTS_ERROR_NONE != r) {
-        printf("tts_set_mode FAILED : result(%d)", r);
+        LOGD("tts_set_mode FAILED : result(%d)", r);
     }
 
     tts_state_e current_state;
@@ -245,7 +247,7 @@ CSCLUtilsImplLinux::open_devices() {
     }
     if (TTS_ERROR_NONE != r) {
         LOGD("tts_prepare FAILED : ret(%d)\n", r);
-    }*/
+    }
 
     return TRUE;
 }
@@ -261,16 +263,16 @@ CSCLUtilsImplLinux::close_devices() {
     } else {
         LOGD("FEEDBACK DEINITIALIZATION SUCCESSFUL : %d\n", r);
     }
-    /*
+
     r = tts_unprepare(tts);
     if (TTS_ERROR_NONE != r) {
-        printf("tts_unprepare FAILED : result(%d)", r);
+        LOGD("tts_unprepare FAILED : result(%d)", r);
     }
 
     r = tts_destroy(tts);
     if (TTS_ERROR_NONE != r) {
-        printf("tts_destroy FAILED : result(%d)", r);
-    }*/
+        LOGD("tts_destroy FAILED : result(%d)", r);
+    }
     return TRUE;
 }