Add set_selection () API to select text 06/45006/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 30 Jul 2015 08:24:10 +0000 (17:24 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 30 Jul 2015 10:32:38 +0000 (19:32 +0900)
Change-Id: Ic32a97b479c98ccb63f2decffb285cf318e42a43

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 2a32322..a35abb2 100644 (file)
@@ -934,6 +934,13 @@ void CSCLConnectionISF::get_keyboard_ise(const sclchar *uuid)
     }
 }
 
+void CSCLConnectionISF::set_selection(sclint start, sclint end)
+{
+    if (m_initialized) {
+       m_helper_agent.set_selection(start, end);
+    }
+}
+
 void CSCLConnectionISF::update_geometry(int x, int y, int width, int height)
 {
     if (m_initialized) {
index 9a3f020..2ef0605 100644 (file)
@@ -78,6 +78,7 @@ public:
     void candidate_hide(void);
     void set_keyboard_ise_by_uuid(const sclchar *uuid);
     void get_keyboard_ise(const sclchar *uuid);
+    void set_selection(sclint start, sclint end);
     void update_geometry(int x, int y, int width, int height);
 
 private:
index c8bb36d..b1ddef3 100644 (file)
@@ -292,9 +292,17 @@ void CSCLConnection::get_keyboard_ise(const sclchar *uuid)
     }
 }
 
+void CSCLConnection::set_selection(sclint start, sclint end)
+{
+    if (m_impl) {
+        m_impl->set_selection(start, end);
+    }
+}
+
 void CSCLConnection::update_geometry(int x, int y, int width, int height)
 {
     if (m_impl) {
         m_impl->update_geometry(x, y, width, height);
     }
 }
+
index efadd1e..24905d1 100644 (file)
@@ -78,6 +78,7 @@ public:
     virtual void candidate_hide(void);
     virtual void set_keyboard_ise_by_uuid(const sclchar *uuid);
     virtual void get_keyboard_ise(const sclchar *uuid);
+    virtual void set_selection(sclint start, sclint end);
     virtual void update_geometry(int x, int y, int width, int height);
 
 protected:
index 1e5f5ff..64f7c1b 100644 (file)
@@ -292,3 +292,10 @@ void CSCLCore::destroy_option_window(sclwindow window)
         m_impl->destroy_option_window(window);
     }
 }
+
+void CSCLCore::set_selection(sclint start, sclint end)
+{
+    if (m_impl) {
+        m_impl->set_selection(start, end);
+    }
+}
index 7c446d2..bc5be66 100644 (file)
@@ -310,6 +310,14 @@ public:
      */
     void destroy_option_window(sclwindow window);
 
+    /**
+     * @ brief Request to select text.
+     *
+     * @param[in] start The start cursor position in text.
+     * @param[in] end The end cursor position in text.
+     */
+    void set_selection(sclint start, sclint end);
+
 private:
     CSCLCoreImpl *m_impl;
 };
index 99c4a77..d705522 100644 (file)
@@ -304,3 +304,8 @@ void CSCLCoreImpl::destroy_option_window(sclwindow window)
 {
     m_core_ui.destroy_option_window(window);
 }
+
+void CSCLCoreImpl::set_selection(sclint start, sclint end)
+{
+    m_connection.set_selection(start, end);
+}
index 62d2c56..933b84d 100644 (file)
@@ -96,6 +96,8 @@ public:
     sclwindow create_option_window();
     void destroy_option_window(sclwindow window);
 
+    void set_selection(sclint start, sclint end);
+
 private:
     ISCLCoreEventCallback *m_event_callback;