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 2a32322d17fd8ec0723cdfd9aaeef381845eb9ca..a35abb218c4551926aafc0790b8e9f40816e3aa9 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 9a3f020b02838d84ba8b0ed58e11d66f5a0104ff..2ef0605c1f711dd4b3737a700b2d9bf28f737da5 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 c8bb36d5b2bfd2c8af9f646aca34e20c9c457487..b1ddef3263c31e7b4358cf567bcd9794c0e561a4 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 efadd1eee194b3992a559f507f520a7649ed23ba..24905d1073fbf2fd39ac785ba65854d8ca4fb33f 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 1e5f5ff540d0de766db9033643283a4d4fada45f..64f7c1bb1202b96707bd95d39ab3c070509275f7 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 7c446d2e6335511792f149618e1d2d5b87dcb01f..bc5be666216e809126f0f3e1c34a69553f961468 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 99c4a77f50991d07e6ade2a9dd7fcc77f758ab4f..d705522bf942559eadebf33a6cf62bdcfa0c31f2 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 62d2c563f051956f057e66bc1171daddd380fab7..933b84d544a4e982f2a6f44ee212d07d13f4babe 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;