Add update_geometry () 33/47833/2 accepted/tizen/mobile/20150918.025113 accepted/tizen/tv/20150918.025118 accepted/tizen/wearable/20150918.025129 submit/tizen/20150918.001611
authorHaifeng Deng <haifeng.deng@samsung.com>
Mon, 7 Sep 2015 05:48:32 +0000 (13:48 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 9 Sep 2015 12:16:38 +0000 (21:16 +0900)
Change-Id: I6f8c98e43865107ab5f1f28cf5b78b920b593579
Signed-off-by: Haifeng Deng <haifeng.deng@samsung.com>
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 199c6a2..d78ab42 100644 (file)
@@ -903,6 +903,13 @@ void CSCLConnectionISF::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLConnectionISF::update_geometry(sclint x, sclint y, sclint width, sclint height)
+{
+    if (m_initialized) {
+        m_helper_agent.update_geometry(x, y, width, height);
+    }
+}
+
 void CSCLConnectionISF::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
 {
     if (m_initialized) {
@@ -966,13 +973,6 @@ void CSCLConnectionISF::set_selection(sclint start, sclint end)
     }
 }
 
-void CSCLConnectionISF::update_geometry(int x, int y, int width, int height)
-{
-    if (m_initialized) {
-        m_helper_agent.update_geometry(x, y, width, height);
-    }
-}
-
 extern "C"
 {
     void scim_module_init (void) {
index 2432933..9a647fe 100644 (file)
@@ -73,6 +73,7 @@ public:
     void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs);
     void update_aux_string(const sclchar *str);
     void update_input_context(sclu32 type, sclu32 value);
+    void update_geometry(sclint x, sclint y, sclint width, sclint height);
     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);
@@ -81,7 +82,6 @@ public:
     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:
     sclboolean m_initialized;
index 83226a5..1607355 100644 (file)
@@ -259,6 +259,13 @@ void CSCLConnection::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLConnection::update_geometry(sclint x, sclint y, sclint width, sclint height)
+{
+    if (m_impl) {
+        m_impl->update_geometry(x, y, width, height);
+    }
+}
+
 void CSCLConnection::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
 {
     if (m_impl) {
@@ -314,11 +321,3 @@ void CSCLConnection::set_selection(sclint start, sclint end)
         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 c493078..a313607 100644 (file)
@@ -73,6 +73,7 @@ public:
     virtual void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs);
     virtual void update_aux_string(const sclchar *str);
     virtual void update_input_context(sclu32 type, sclu32 value);
+    virtual void update_geometry(sclint x, sclint y, sclint width, sclint height);
     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);
@@ -81,7 +82,6 @@ public:
     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:
     std::string m_backend_identifier;
index 839c7e3..8ebda48 100644 (file)
@@ -228,6 +228,13 @@ void CSCLCore::update_input_context(sclu32 type, sclu32 value)
     }
 }
 
+void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height)
+{
+    if (m_impl) {
+        m_impl->update_geometry(x, y, width, height);
+    }
+}
+
 void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const
 {
     if (m_impl) {
index 38ace4b..d6fe3d7 100644 (file)
@@ -238,6 +238,17 @@ public:
     void update_input_context(sclu32 type, sclu32 value);
 
     /**
+     * @ brief When the geometry of ISE is changed,
+     *         ISE can call this function to notify application
+     *
+     * @param[in] x x position of ISE geometry.
+     * @param[in] y y position of ISE geometry.
+     * @param[in] width the width of ISE geometry.
+     * @param[in] height the height of ISE geometry.
+     */
+    void update_geometry(sclint x, sclint y, sclint width, sclint height);
+
+    /**
      * @ brief Request to get surrounding text.
      *
      * @param[in] ic_uuid The helper ISE UUID.
index d6e4586..4d19821 100644 (file)
@@ -220,6 +220,11 @@ void CSCLCoreImpl::update_input_context(sclu32 type, sclu32 value)
     m_connection.update_input_context(type, value);
 }
 
+void CSCLCoreImpl::update_geometry(sclint x, sclint y, sclint width, sclint height)
+{
+    m_connection.update_geometry(x, y, width, height);
+}
+
 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);
@@ -297,11 +302,6 @@ int CSCLCoreImpl::get_screen_rotation_degree()
 
 void CSCLCoreImpl::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
 {
-    int degree = m_core_ui.get_screen_rotation_degree();
-    if (degree == 90 || degree == 270)
-        m_connection.update_geometry(0, 0, landscape.width, landscape.height);
-    else
-        m_connection.update_geometry(0, 0, portrait.width, portrait.height);
     m_core_ui.set_keyboard_size_hints(portrait, landscape);
 }
 
index 447c553..8ba540d 100644 (file)
@@ -81,6 +81,7 @@ 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 update_geometry(sclint x, sclint y, sclint width, sclint height);
     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);