Add get_surrounding_text and delete_surrounding_text 90/40890/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Jan 2015 02:22:45 +0000 (11:22 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Jun 2015 07:24:10 +0000 (16:24 +0900)
Change-Id: I4f16f41770421cc10a7a4940116184de3d681a3e

src/sclconnection-isf.cpp
src/sclconnection-isf.h
src/sclconnection.cpp
src/sclconnection.h
src/sclcore.cpp
src/sclcore.h
src/sclcoreimpl.cpp
src/sclcoreimpl.h

index d5053ed..3066a15 100644 (file)
@@ -847,6 +847,24 @@ void CSCLConnectionISF::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLConnectionISF::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
+{
+    if (m_initialized) {
+        scim::String uuid;
+        if (ic_uuid) {
+            uuid = scim::String(ic_uuid);
+        }
+        m_helper_agent.get_surrounding_text(uuid, maxlen_before, maxlen_after);
+    }
+}
+
+void CSCLConnectionISF::delete_surrounding_text(sclint offset, sclint len) const
+{
+    if (m_initialized) {
+        m_helper_agent.delete_surrounding_text(offset, len);
+    }
+}
+
 void CSCLConnectionISF::set_candidate_position(sclint left, sclint top)
 {
     if (m_initialized) {
index bd66e42..3a6808c 100644 (file)
@@ -71,6 +71,8 @@ public:
     void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str);
     void update_aux_string(const sclchar *str);
     void update_input_context(sclu32 type, sclu32 value);
+    void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const;
+    void delete_surrounding_text(sclint offset, sclint len) const;
     void set_candidate_position(sclint left, sclint top);
     void candidate_hide(void);
     void set_keyboard_ise_by_uuid(const sclchar *uuid);
index 8cd59aa..68464ed 100644 (file)
@@ -243,6 +243,20 @@ void CSCLConnection::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLConnection::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
+{
+    if (m_impl) {
+         m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
+     }
+}
+
+void CSCLConnection::delete_surrounding_text(sclint offset, sclint len) const
+{
+    if (m_impl) {
+         m_impl->delete_surrounding_text(offset, len);
+     }
+}
+
 void CSCLConnection::set_candidate_position(sclint left, sclint top)
 {
     if (m_impl) {
index 0179d25..5eec308 100644 (file)
@@ -68,6 +68,8 @@ public:
     virtual void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str);
     virtual void update_aux_string(const sclchar *str);
     virtual void update_input_context(sclu32 type, sclu32 value);
+    virtual void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const;
+    virtual void delete_surrounding_text(sclint offset, sclint len) const;
     virtual void set_candidate_position(sclint left, sclint top);
     virtual void candidate_hide(void);
     virtual void set_keyboard_ise_by_uuid(const sclchar *uuid);
index 9a27e93..4275f55 100644 (file)
@@ -205,6 +205,20 @@ void CSCLCore::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
+{
+    if (m_impl) {
+        m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
+    }
+}
+
+void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
+{
+    if (m_impl) {
+        m_impl->delete_surrounding_text(offset, len);
+    }
+}
+
 void CSCLCore::set_candidate_position(sclint left, sclint top)
 {
     if (m_impl) {
@@ -263,4 +277,4 @@ void CSCLCore::destroy_option_window(sclwindow window)
     if (m_impl) {
         m_impl->destroy_option_window(window);
     }
-}
\ No newline at end of file
+}
index 78dd569..a74adc2 100644 (file)
@@ -221,11 +221,11 @@ public:
     /**
      * @ brief Request to get surrounding text.
      *
-     * @param[in] uuid The helper ISE UUID.
+     * @param[in] ic_uuid The helper ISE UUID.
      * @param[in] maxlen_before The max length of before.
      * @param[in] maxlen_after The max length of after.
      */
-    void get_surrounding_text(const sclchar *uuid, sclint maxlen_before, sclint maxlen_after) const;
+    void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const;
 
     /**
      * @ brief Request to delete surrounding text.
@@ -233,7 +233,7 @@ public:
      * @param[in] offset The offset for cursor position.
      * @param[in] len The length for delete text.
      */
-    void delete_surrounding_text(int offset, int len) const;
+    void delete_surrounding_text(sclint offset, sclint len) const;
 
     /**
      * @ brief Set candidate position in screen.
index 43b1ca4..5103a16 100644 (file)
@@ -195,6 +195,16 @@ void CSCLCoreImpl::update_input_context(sclu32 type, sclu32 value)
     m_connection.update_input_context(type, value);
 }
 
+void CSCLCoreImpl::get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const
+{
+    m_connection.get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
+}
+
+void CSCLCoreImpl::delete_surrounding_text(sclint offset, sclint len) const
+{
+    m_connection.delete_surrounding_text(offset, len);
+}
+
 void CSCLCoreImpl::set_candidate_position(sclint left, sclint top)
 {
     m_connection.set_candidate_position(left, top);
@@ -249,4 +259,4 @@ sclwindow CSCLCoreImpl::create_option_window()
 void CSCLCoreImpl::destroy_option_window(sclwindow window)
 {
     m_core_ui.destroy_option_window(window);
-}
\ No newline at end of file
+}
index e11a04c..4ef1194 100644 (file)
@@ -76,11 +76,8 @@ public:
     //void update_candidate_string (const LookupTable &table) const;
     //void update_associate_string (const LookupTable &table) const;
     void update_input_context(sclu32 type, sclu32 value);
-    //void get_surrounding_text     (const String                &uuid,
-    //                               int                          maxlen_before,
-    //                               int                          maxlen_after) const;
-    //void delete_surrounding_text  (int                          offset,
-    //                               int                          len) const;
+    void get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const;
+    void delete_surrounding_text(sclint offset, sclint len) const;
     void set_candidate_position(sclint left, sclint top);
     void candidate_hide(void);
     //void get_candidate_window_geometry (const String           &uuid) const;
@@ -107,4 +104,4 @@ private:
 
 //SCL_END_DECLS
 
-#endif //__SCL_CORE_IMPL_H__
\ No newline at end of file
+#endif //__SCL_CORE_IMPL_H__