IME rotation sync related works.
authorBum-Sung Cho <bs0111.cho@samsung.com>
Fri, 12 Apr 2013 07:59:25 +0000 (16:59 +0900)
committerBum-Sung Cho <bs0111.cho@samsung.com>
Fri, 12 Apr 2013 07:59:25 +0000 (16:59 +0900)
Change-Id: I28ff16f36b270800c42e83a7973cc62faaa3208d
Signed-off-by: Bum-Sung Cho <bs0111.cho@samsung.com>
14 files changed:
inc/FUiIme.h
inc/FUiImeIInputMethodProviderF.h [new file with mode: 0644]
inc/FUiImeInputMethod.h
inc/FUiImeInputMethodManager.h
src/FUiImeInputMethod.cpp
src/FUiIme_EcoreEventHandler.cpp
src/FUiIme_InputMethodImpl.cpp
src/FUiIme_InputMethodImpl.h
src/FUiIme_InputServiceSignalListener.cpp
src/FUiIme_InputServiceSignalListener.h
src/FUiIme_ScimDataConverter.cpp
src/FUiIme_ScimDataConverter.h
src/FUiIme_TargetWindowAgent.cpp
src/FUiIme_TargetWindowAgent.h

index b614c94..19d98a9 100644 (file)
@@ -27,6 +27,7 @@
 \r
 #include <FUiImeIInputMethodListener.h>\r
 #include <FUiImeIInputMethodProvider.h>\r
+#include <FUiImeIInputMethodProviderF.h>\r
 #include <FUiImeInputMethod.h>\r
 #include <FUiImeInputMethodInfo.h>\r
 #include <FUiImeInputMethodManager.h>\r
diff --git a/inc/FUiImeIInputMethodProviderF.h b/inc/FUiImeIInputMethodProviderF.h
new file mode 100644 (file)
index 0000000..b8b2960
--- /dev/null
@@ -0,0 +1,260 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUiImeIInputMethodProviderF.h
+ * @brief This is the header file for the %IInputMethodProviderF interface.
+ *
+ * This header file contains the declarations of the %IInputMethodProviderF interface.
+ */
+
+#ifndef _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_
+#define _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_
+
+#include <FGrpFloatRectangle.h>
+#include <FLclLocale.h>
+#include <FOspConfig.h>
+#include <FUiInputConnectionTypes.h>
+
+namespace Tizen { namespace Ui { namespace Ime {
+
+/**
+ * @interface  IInputMethodProviderF
+ * @brief      This interface is for the InputMethod class that interacts with the associated text input UI control.
+ * @since      2.1
+ *
+ * @remarks The IME application developers can implement a class derived from %IInputMethodProviderF and set it as the provider of the InputMethod class.
+ * The IME application can then provide attributes for the soft input panel and operate according to the commands of the associated text input UI control. For
+ * example, when ShowInputPanel() or HideInputPanel() are called, the IME application's frame should either be hidden or made visible.
+ *
+ * The %IInputMethodProviderF interface is for the InputMethod class that interacts with the associated text input UI control.
+ *
+ * The following example demonstrates how to use the %IInputMethodProviderF interface.
+ * @code
+ * #include <FUi.h>
+ *
+ * class MyProvider
+ *     : public IInputMethodProviderF
+ * {
+ *     //...
+ *     virtual Tizen::Graphics::FloatRectangle GetInputPanelBounds(void); 
+ *     virtual void HideInputPanel(void); 
+ *     virtual void ShowInputPanel(void); 
+ *     //...
+ * };
+ * @endcode
+ *
+ */
+class _OSP_EXPORT_ IInputMethodProviderF
+{
+public:
+       /**
+       * This polymorphic destructor should be overridden if required. @n This way, the destructors of the derived classes are called when the destructor of this
+       * interface is called.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       */
+       virtual ~IInputMethodProviderF(void) {}
+
+       /**
+       * Called when an associated text input UI control requests the enter key action of the input panel.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return The enter key action of the input panel
+       */
+       virtual Tizen::Ui::InputPanelAction GetEnterKeyAction(void)
+       {
+               return Tizen::Ui::INPUT_PANEL_ACTION_ENTER;
+       }
+
+       /**
+       * Called when an associated text input UI control requests the position and size of the input panel.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return The position and size of the input panel
+       * @remarks The associated text input UI control can change its position on the screen to avoid becoming positioned behind the input panel.
+       */
+       virtual Tizen::Graphics::FloatRectangle GetInputPanelBounds(void) = 0;
+
+       /**
+       * Called when an associated text input UI control requests the style of the input panel.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return A style of the input panel
+       */
+       virtual Tizen::Ui::InputPanelStyle GetInputPanelStyle(void)
+       {
+               return Tizen::Ui::INPUT_PANEL_STYLE_NORMAL;
+       }
+
+       /**
+       * Called when the associated text input UI control requests the language of the input method.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return A language of the input method
+       */
+       virtual Tizen::Locales::Locale GetLanguage(void)
+       {
+               return Tizen::Locales::Locale(Tizen::Locales::LANGUAGE_ENG, Tizen::Locales::COUNTRY_US);
+       }
+
+       /**
+       * Called when an associated text input UI control requests the input panel to enable or disable the caps mode.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @param[in] enable The state of the caps mode
+       */
+       virtual void SetCapsModeEnabled(bool enable) {}
+
+       /**
+       * Called when an associated text input UI control requests the input panel to set the enter key action. @n
+       * The input panel can show text on the enter button according to the enter key action.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @param[in] action The enter key action
+       */
+       virtual void SetEnterKeyAction(Tizen::Ui::InputPanelAction action) {}
+
+       /**
+       * Called when an associated text input UI control requests the input panel to enable or disable the enter key action.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @param[in] enable The state of the enter key action
+       */
+       virtual void SetEnterKeyActionEnabled(bool enable) {}
+
+       /**
+       * Called when an associated text input UI control requests the input panel to set its style.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @param[in] style The style of the input panel
+       */
+       virtual void SetInputPanelStyle(Tizen::Ui::InputPanelStyle style) {}
+
+       /**
+       * Called when an associated text input UI control requests the input panel to hide itself.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       */
+       virtual void HideInputPanel(void) = 0;
+
+       /**
+       * Called when an associated text input UI control checks whether the enter key action is enabled or not.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return The state of the enter key action
+       */
+       virtual bool IsEnterKeyActionEnabled(void)
+       {
+               return false;
+       }
+
+       /**
+       * Called when an associated text input UI control requests the input panel to show itself.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       */
+       virtual void ShowInputPanel(void) = 0;
+
+protected:
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // This method is reserved and may change its name at any time without prior notice.
+       //
+       // @since 2.1
+       //
+       virtual void IInputMethodProviderF_Reserved1(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // This method is reserved and may change its name at any time without prior notice.
+       //
+       // @since 2.1
+       //
+       virtual void IInputMethodProviderF_Reserved2(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // This method is reserved and may change its name at any time without prior notice.
+       //
+       // @since 2.1
+       //
+       virtual void IInputMethodProviderF_Reserved3(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // This method is reserved and may change its name at any time without prior notice.
+       //
+       // @since 2.1
+       //
+       virtual void IInputMethodProviderF_Reserved4(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // This method is reserved and may change its name at any time without prior notice.
+       //
+       // @since 2.1
+       //
+       virtual void IInputMethodProviderF_Reserved5(void) {}
+};
+
+}}} // Tizen::Ui::Ime
+
+#endif // _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_
\ No newline at end of file
index 771ab9a..5e7b9ad 100644 (file)
 #include <FBaseDataType.h>
 #include <FBaseObject.h>
 #include <FBaseString.h>
+#include <FGrpFloatRectangle.h>
 #include <FOspConfig.h>
 #include <FUiIKeyEventListener.h>
 #include <FUiImeIInputMethodListener.h>
 #include <FUiImeIInputMethodProvider.h>
+#include <FUiImeIInputMethodProviderF.h>
 
 namespace Tizen { namespace Ui { namespace Ime {
 
@@ -111,8 +113,8 @@ public:
        * @exception E_SYSTEM A failure occurs from the underlying system.
        * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
        * @remarks 
-       *                       - The specific error code can be accessed using the GetLastResult() method.
-       *                       - There is a high probability for an occurrence of an out-of-memory exception. @n If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+       * - The specific error code can be accessed using the GetLastResult() method.
+       * - There is a high probability for an occurrence of an out-of-memory exception. @n If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
        */
        static InputMethod* GetInstance(void);
 
@@ -128,11 +130,31 @@ public:
        * @param[in] pProvider An instance of IInputMethodProvider
        * @exception E_SUCCESS The method is successful.
        * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
-       * @remarks      The specific error code can be accessed using the GetLastResult() method.
+       * @remarks 
+       * - The specific error code can be accessed using the GetLastResult() method.
+       * - The platform will call only the provider set by the SetInputMethodProviderF() method, if both IInputMethodProvider and IInputMethodProviderF are set.
        */
        void SetInputMethodProvider(IInputMethodProvider* pProvider);
 
        /**
+       * Sets an instance of IInputMethodProviderF. @n
+       * The %InputMethod instance accepts only one provider. So users must unregister the provider by setting the specified @c pProvider as @c null before deallocating
+       * an instance of the provider.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @param[in] pProvider An instance of IInputMethodProviderF
+       * @exception E_SUCCESS The method is successful.
+       * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+       * @remarks 
+       * - The specific error code can be accessed using the GetLastResult() method.
+       * - The platform will call only the provider set by the SetInputMethodProviderF() method, if both IInputMethodProvider and IInputMethodProviderF are set.
+       */
+       void SetInputMethodProviderF(IInputMethodProviderF* pProvider);
+
+       /**
        * Sets an instance of IInputMethodListener. @n
        * The %InputMethod instance accepts only one listener. So users must unregister the listener by setting the specified @c pListener as @c null before deallocating an
        * instance of the listener.
@@ -165,6 +187,21 @@ public:
        result DeleteText(int cursorOffset, int length);
 
        /**
+       * Notifies the position and the size of the input panel at both the portrait and the landscape orientation.
+       *
+       * @since 2.1
+       * @privlevel partner
+       * @privilege %http://tizen.org/privilege/ime
+       *
+       * @return An error code
+       * @param[in] portraitBounds The position and size of the input panel at the portrait orientation
+       * @param[in] landscapeBounds The position and size of the input panel at the landscape orientation
+       * @exception E_SUCCESS The method is successful.
+       * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+       */
+       result NotifyInputPanelBounds(const Tizen::Graphics::FloatRectangle& portraitBounds, const Tizen::Graphics::FloatRectangle& landscapeBounds);
+
+       /**
        * Notifies the state of the input panel to the associated text input UI control when the state of an input panel changes.
        *
        * @since 2.1
index 0636ef2..07d2b67 100644 (file)
@@ -62,8 +62,8 @@ public:
         * @exception E_SUCCESS The method is successful.\r
         * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
         * @remarks \r
-        *                      - The specific error code can be accessed using the GetLastResult() method.\r
-        *                      - There is a high probability for an occurrence of an out-of-memory exception. @n If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.\r
+        * - The specific error code can be accessed using the GetLastResult() method.\r
+        * - There is a high probability for an occurrence of an out-of-memory exception. @n If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.\r
         */\r
        static InputMethodManager* GetInstance(void);\r
 \r
index 7a30733..96ca0fa 100644 (file)
@@ -31,6 +31,7 @@
 #include "FUiIme_InputMethodImpl.h"\r
 \r
 using namespace Tizen::Base;\r
+using namespace Tizen::Graphics;\r
 using namespace Tizen::Security;\r
 using namespace Tizen::Ui;\r
 \r
@@ -103,6 +104,12 @@ InputMethod::SetInputMethodProvider(IInputMethodProvider* pProvider)
 }\r
 \r
 void\r
+InputMethod::SetInputMethodProviderF(IInputMethodProviderF* pProvider)\r
+{\r
+       __pInputMethodImpl->SetInputMethodProviderF(pProvider);\r
+}\r
+\r
+void\r
 InputMethod::SetInputMethodListener(IInputMethodListener* pListener)\r
 {\r
        __pInputMethodImpl->SetInputMethodListener(pListener);\r
@@ -115,6 +122,12 @@ InputMethod::DeleteText(int cursorOffset, int length)
 }\r
 \r
 result\r
+InputMethod::NotifyInputPanelBounds(const FloatRectangle& portraitBounds, const FloatRectangle& landscapeBounds)\r
+{\r
+       return __pInputMethodImpl->NotifyInputPanelBounds(portraitBounds, landscapeBounds);\r
+}\r
+\r
+result\r
 InputMethod::NotifyInputPanelState(InputPanelShowState state)\r
 {\r
        return __pInputMethodImpl->NotifyInputPanelState(state);\r
index fc67991..3008ab8 100644 (file)
@@ -111,26 +111,27 @@ _EcoreEventHandler::ClientMessageCallback(void* pData, int type, void* pEvent)
 {\r
        SysLog(NID_UI_IME, "The client message callback has been called.");\r
 \r
-       result r = E_SUCCESS;\r
-\r
        Ecore_X_Event_Client_Message* pMessage = null;\r
        pMessage = static_cast<Ecore_X_Event_Client_Message*>(pEvent);\r
        SysTryReturn(NID_UI_IME, pMessage, ECORE_CALLBACK_CANCEL, E_SYSTEM, "[E_SYSTEM] A failure occurs from the underlying system.");\r
 \r
-    if (pMessage->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE)\r
+/* set orientation of the input panel\r
+       result r = E_SUCCESS;\r
+\r
+    if (pMessage->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE)\r
        {\r
                Evas_Object* pEvasObject = null;\r
                pEvasObject = reinterpret_cast<Evas_Object*>(pData);\r
                SysTryReturn(NID_UI_IME, pEvasObject, ECORE_CALLBACK_CANCEL, E_SYSTEM, "[E_SYSTEM] A failure occurs from the underlying system.");\r
 \r
-               Ecore_X_Window keyboardWindow = elm_win_xwindow_get(pEvasObject);\r
+               Ecore_X_Window inputPanelWindow = elm_win_xwindow_get(pEvasObject);\r
                Ecore_X_Window activeWindow = pMessage->data.l[1];\r
 \r
                _TargetWindowAgent* pTargetWindowAgent = _TargetWindowAgent::GetInstance();\r
                r = GetLastResult();\r
                SysTryReturn(NID_UI_IME, pTargetWindowAgent, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r));\r
 \r
-               if (pTargetWindowAgent->IsActive(keyboardWindow, activeWindow))\r
+               if (pTargetWindowAgent->IsActive(inputPanelWindow, activeWindow))\r
                {\r
                        int angle = pMessage->data.l[0];\r
 \r
@@ -138,6 +139,34 @@ _EcoreEventHandler::ClientMessageCallback(void* pData, int type, void* pEvent)
                        SysTryReturn(NID_UI_IME, r == E_SUCCESS, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r));\r
                }\r
        }\r
+*/\r
+       if (pMessage->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST)\r
+       {\r
+               SysLog(NID_UI_IME, "The client message callback related to the ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST has been called.");\r
+\r
+               _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();\r
+               SysTryReturn(NID_UI_IME, pEcoreEvasMgr, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+               _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();\r
+               SysTryReturn(NID_UI_IME, pEcoreEvas, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+               Evas_Object* pEvasObject = pEcoreEvas->GetWindowObject();\r
+               SysTryReturn(NID_UI_IME, pEvasObject, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+               Ecore_X_Window inputPanelWindow = elm_win_xwindow_get(pEvasObject);\r
+\r
+               SysLog(NID_UI_IME, "The handle of the window which is requested to rotate is %x and that of the input panel window is %x.", pMessage->win, inputPanelWindow);\r
+               if (pMessage->win == inputPanelWindow)\r
+               {\r
+/* set orientation of the input panel\r
+                       int angle = pMessage->data.l[1];\r
+\r
+                       _TargetWindowAgent* pTargetWindowAgent = _TargetWindowAgent::GetInstance();\r
+                       r = GetLastResult();\r
+                       SysTryReturn(NID_UI_IME, pTargetWindowAgent, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+                       r = pTargetWindowAgent->SetOrientation(angle);\r
+                       SysTryReturn(NID_UI_IME, r == E_SUCCESS, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r));\r
+*/\r
+               }\r
+       }\r
 \r
        return ECORE_CALLBACK_RENEW;\r
 }\r
index 831a6de..e2a3cb2 100644 (file)
@@ -30,6 +30,8 @@
 #include <Elementary.h> // elm_win_keyboard_win_set
 
 #include <FBaseSysLog.h>
+#include <FGrpCoordinateSystem.h>
+
 #include <FBase_StringConverter.h>
 
 #include "FUi_EcoreEvas.h"
@@ -97,7 +99,7 @@ _InputMethodImpl::Construct(void)
 
        SetInputServiceSignalCallback();
 
-       r = SetEcoreEvasAttribute();
+       r = SetInputPanelWindowAttribute();
        SysTryCatch(NID_UI_IME, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pEcoreEventHandler = _EcoreEventHandler::GetInstance();
@@ -150,6 +152,12 @@ _InputMethodImpl::SetInputMethodProvider(IInputMethodProvider* pProvider)
 }
 
 void
+_InputMethodImpl::SetInputMethodProviderF(IInputMethodProviderF* pProvider)
+{
+       _InputServiceSignalListener::SetInputMethodProviderF(pProvider);
+}
+
+void
 _InputMethodImpl::SetInputMethodListener(IInputMethodListener* pListener)
 {
        _InputServiceSignalListener::SetInputMethodListener(pListener);
@@ -168,6 +176,37 @@ _InputMethodImpl::DeleteText(int cursorOffset, int length)
 }
 
 result
+_InputMethodImpl::NotifyInputPanelBounds(const Tizen::Graphics::FloatRectangle& portraitBounds, const Tizen::Graphics::FloatRectangle& landscapeBounds)
+{
+       result r = E_SUCCESS;
+
+       _EcoreEvasMgr* pEcoreEvasMgr = null;
+       pEcoreEvasMgr = GetEcoreEvasMgr();
+       r = GetLastResult();
+       SysTryReturnResult(NID_UI_IME, pEcoreEvasMgr, r, "Propagating.");
+
+       _EcoreEvas* pEcoreEvas = null;
+       pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
+       r = GetLastResult();
+       SysTryReturnResult(NID_UI_IME, pEcoreEvas, r, "Propagating.");
+
+       Ecore_X_Window inputPanelWindow = pEcoreEvas->GetXWindow();
+
+       float width = CoordinateSystem::ConvertToPhysicalX(portraitBounds.width);
+       float height = CoordinateSystem::ConvertToPhysicalY(portraitBounds.height);
+       ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 0, 0, 0, static_cast<int>(width), static_cast<int>(height));
+       ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 180, 0, 0, static_cast<int>(width), static_cast<int>(height));
+
+       // give the size information according to the screen coordinates; the width should be replaced with the height and the reverse should be done in the same way
+       width = CoordinateSystem::ConvertToPhysicalX(landscapeBounds.width);
+       height = CoordinateSystem::ConvertToPhysicalY(landscapeBounds.height);
+       ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 90, 0, 0, static_cast<int>(height), static_cast<int>(width));
+       ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 270, 0, 0, static_cast<int>(height), static_cast<int>(width));
+
+       return r;
+}
+
+result
 _InputMethodImpl::NotifyInputPanelState(InputPanelShowState state)
 {
        SysTryReturnResult(NID_UI_IME, (state == INPUT_PANEL_SHOW_STATE_SHOW) || (state == INPUT_PANEL_SHOW_STATE_HIDE), E_INVALID_ARG,
@@ -269,7 +308,7 @@ _InputMethodImpl::SendText(const String& text)
 }
 
 result
-_InputMethodImpl::SetEcoreEvasAttribute(void)
+_InputMethodImpl::SetInputPanelWindowAttribute(void)
 {
        result r = E_SUCCESS;
 
@@ -285,6 +324,26 @@ _InputMethodImpl::SetEcoreEvasAttribute(void)
 
        elm_win_keyboard_win_set(pEcoreEvas->GetWindowObject(), EINA_TRUE);
 
+       // for supporting rotation sync
+       Ecore_X_Window inputPanelWindow = elm_win_xwindow_get(pEcoreEvas->GetWindowObject());
+       SysLog(NID_UI_IME, "The handle of the input panel window is %x.", inputPanelWindow);
+       unsigned int value = 1;
+       ecore_x_window_prop_card32_set(inputPanelWindow, ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED, &value, 1);
+
+       // set x window id
+       const int _MAX_BUFFER_SIZE = 256;
+       char xId[_MAX_BUFFER_SIZE];
+       memset(xId, '\0', _MAX_BUFFER_SIZE);
+       snprintf(xId, _MAX_BUFFER_SIZE, "%d", inputPanelWindow);
+       scim::Property property(xId, "XID", "", "");
+       scim::PropertyList propertyList;
+       propertyList.push_back(property);
+       __pHelperAgent->register_properties(propertyList);
+
+       // set x window class name
+       ecore_x_icccm_name_class_set(inputPanelWindow, "Virtual Keyboard", "ISF");
+
+       // set hints in order not to get window focus
        Eina_Bool accepts_focus = EINA_TRUE;
        Ecore_X_Window_State_Hint initial_state = ECORE_X_WINDOW_STATE_HINT_NONE;
        Ecore_X_Pixmap icon_pixmap = 0;
index 0aebe15..b42c9a5 100644 (file)
 #include <FBaseDataType.h>\r
 #include <FBaseObject.h>\r
 #include <FBaseString.h>\r
-#include <FGrpRectangle.h>\r
+#include <FGrpFloatRectangle.h>\r
 #include <FUiImeIInputMethodListener.h>\r
 #include <FUiImeIInputMethodProvider.h>\r
+#include <FUiImeIInputMethodProviderF.h>\r
 #include <FUiImeInputMethod.h>\r
 #include <FUiKeyTypes.h>\r
 \r
@@ -63,9 +64,11 @@ public:
        static _InputMethodImpl* GetInstance(InputMethod& inputMethod);\r
 \r
        void SetInputMethodProvider(IInputMethodProvider* pProvider);\r
+       void SetInputMethodProviderF(IInputMethodProviderF* pProvider);\r
        void SetInputMethodListener(IInputMethodListener* pListener);\r
 \r
        result DeleteText(int cursorOffset, int length);\r
+       result NotifyInputPanelBounds(const Tizen::Graphics::FloatRectangle& portraitBounds, const Tizen::Graphics::FloatRectangle& landscapeBounds);\r
        result NotifyInputPanelState(Tizen::Ui::InputPanelShowState state);\r
        result NotifyLanguageChanged(void);\r
        result RequestSurroundingText(int lengthBeforeCursor, int lengthAfterCursor);\r
@@ -82,7 +85,7 @@ private:
 \r
        result Construct(void);\r
 \r
-       result SetEcoreEvasAttribute(void);\r
+       result SetInputPanelWindowAttribute(void);\r
        void SetInputServiceSignalCallback(void);\r
 \r
        void HideInputPanel(void);\r
index 3133bd3..d1f69c7 100644 (file)
@@ -35,6 +35,7 @@
 #include <FBaseString.h>\r
 #include <FBaseSysLog.h>\r
 #include <FGrpRectangle.h>\r
+#include <FGrpFloatRectangle.h>\r
 #include <FLclLocale.h>\r
 #include <FUiInputConnectionTypes.h>\r
 #include <FUiIOrientationEventListener.h>\r
@@ -59,6 +60,7 @@ using namespace Tizen::Ui::Controls;
 namespace Tizen { namespace Ui { namespace Ime {\r
 \r
 IInputMethodProvider* _InputServiceSignalListener::__pIInputMethodProvider = null;\r
+IInputMethodProviderF* _InputServiceSignalListener::__pIInputMethodProviderF = null;\r
 IInputMethodListener* _InputServiceSignalListener::__pIInputMethodListener = null;\r
 \r
 _InputServiceSignalListener::_InputServiceSignalListener()\r
@@ -68,6 +70,7 @@ _InputServiceSignalListener::_InputServiceSignalListener()
 _InputServiceSignalListener::~_InputServiceSignalListener()\r
 {\r
        __pIInputMethodProvider = null;\r
+       __pIInputMethodProviderF = null;\r
        __pIInputMethodListener = null;\r
 }\r
 \r
@@ -78,6 +81,12 @@ _InputServiceSignalListener::SetInputMethodProvider(IInputMethodProvider* pProvi
 }\r
 \r
 void\r
+_InputServiceSignalListener::SetInputMethodProviderF(IInputMethodProviderF* pProvider)\r
+{\r
+       __pIInputMethodProviderF = pProvider;\r
+}\r
+\r
+void\r
 _InputServiceSignalListener::SetInputMethodListener(IInputMethodListener* pListener)\r
 {\r
        __pIInputMethodListener = pListener;\r
@@ -86,9 +95,17 @@ _InputServiceSignalListener::SetInputMethodListener(IInputMethodListener* pListe
 void\r
 _InputServiceSignalListener::GetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
-       InputPanelAction inputPanelAction = __pIInputMethodProvider->GetEnterKeyAction();\r
+       InputPanelAction inputPanelAction = INPUT_PANEL_ACTION_ENTER;\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               inputPanelAction = __pIInputMethodProviderF->GetEnterKeyAction();\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               inputPanelAction = __pIInputMethodProvider->GetEnterKeyAction();\r
+       }\r
        SysTryReturnVoidResult(NID_UI_IME, (inputPanelAction >= INPUT_PANEL_ACTION_ENTER) && (inputPanelAction <= INPUT_PANEL_ACTION_DONE), E_INVALID_DATA, "[E_INVALID_DATA] A requested data is invalid.");\r
 \r
        switch (inputPanelAction)\r
@@ -126,21 +143,38 @@ _InputServiceSignalListener::GetEnterKeyAction(const scim::HelperAgent* pHelperA
 void\r
 _InputServiceSignalListener::GetInputPanelBounds(const scim::HelperAgent* pHelperAgent, struct scim::rectinfo& bounds)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        SysLog(NID_UI_IME, "The bounds of the input panel have been requested.");\r
 \r
-       Rectangle inputPanelBounds = __pIInputMethodProvider->GetInputPanelBounds();\r
-\r
-       _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               FloatRectangle inputPanelBounds;\r
+               inputPanelBounds = __pIInputMethodProviderF->GetInputPanelBounds();\r
+               _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds);\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               Rectangle inputPanelBounds;\r
+               inputPanelBounds = __pIInputMethodProvider->GetInputPanelBounds();\r
+               _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds);\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::GetInputPanelStyle(const scim::HelperAgent* pHelperAgent, scim::uint32& style)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
-       InputPanelStyle inputPanelStyle = __pIInputMethodProvider->GetInputPanelStyle();\r
+       InputPanelStyle inputPanelStyle = INPUT_PANEL_STYLE_NORMAL;\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               inputPanelStyle = __pIInputMethodProviderF->GetInputPanelStyle();\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               inputPanelStyle = __pIInputMethodProvider->GetInputPanelStyle();\r
+       }\r
        SysTryReturnVoidResult(NID_UI_IME, (inputPanelStyle >= INPUT_PANEL_STYLE_NORMAL) && (inputPanelStyle <= INPUT_PANEL_STYLE_IP), E_INVALID_DATA, "[E_INVALID_DATA] A requested data is invalid.");\r
 \r
        switch (inputPanelStyle)\r
@@ -172,9 +206,17 @@ _InputServiceSignalListener::GetInputPanelStyle(const scim::HelperAgent* pHelper
 void\r
 _InputServiceSignalListener::GetLanguage(const scim::HelperAgent* pHelperAgent, int inputContext, char** pLocale)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
-       Locale language = __pIInputMethodProvider->GetLanguage();\r
+       Locale language(LANGUAGE_ENG, COUNTRY_US);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               language = __pIInputMethodProviderF->GetLanguage();\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               language = __pIInputMethodProvider->GetLanguage();\r
+       }\r
        std::unique_ptr<char[]> pLanguage(_ScimDataConverter::ConvertLanguageN(language));\r
 \r
        *pLocale = strdup(pLanguage.get());\r
@@ -183,17 +225,24 @@ _InputServiceSignalListener::GetLanguage(const scim::HelperAgent* pHelperAgent,
 void\r
 _InputServiceSignalListener::SetCapsModeEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& mode)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        bool enable = (mode != 0 ? true : false);\r
 \r
-       __pIInputMethodProvider->SetCapsModeEnabled(enable);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->SetCapsModeEnabled(enable);\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->SetCapsModeEnabled(enable);\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::SetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
        SysTryReturnVoidResult(NID_UI_IME, action <= ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND, E_INVALID_ARG,\r
                                                "[E_INVALID_ARG] Invalid argument(s) is used. The enter key action is beyond the scope.");\r
 \r
@@ -230,23 +279,37 @@ _InputServiceSignalListener::SetEnterKeyAction(const scim::HelperAgent* pHelperA
                break;\r
        }\r
 \r
-       __pIInputMethodProvider->SetEnterKeyAction(inputPanelAction);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->SetEnterKeyAction(inputPanelAction);\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->SetEnterKeyAction(inputPanelAction);\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::SetEnterKeyActionEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& disable)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        bool enable = (disable != 0 ? false : true);\r
 \r
-       __pIInputMethodProvider->SetEnterKeyActionEnabled(enable);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->SetEnterKeyActionEnabled(enable);\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->SetEnterKeyActionEnabled(enable);\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::SetInputPanelStyle(const scim::HelperAgent* pHelperAgent, scim::uint32& style)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
        SysTryReturnVoidResult(NID_UI_IME, style < ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID, E_INVALID_ARG,\r
                                                "[E_INVALID_ARG] Invalid argument(s) is used. The input panel style is beyond the scope.");\r
 \r
@@ -277,13 +340,20 @@ _InputServiceSignalListener::SetInputPanelStyle(const scim::HelperAgent* pHelper
                break;\r
        }       \r
 \r
-       __pIInputMethodProvider->SetInputPanelStyle(inputPanelStyle);\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->SetInputPanelStyle(inputPanelStyle);\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->SetInputPanelStyle(inputPanelStyle);\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::SetLanguage(const scim::HelperAgent* pHelperAgent, scim::uint32& language)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        LanguageCode languageCode = (language == ECORE_IMF_INPUT_PANEL_LANG_ALPHABET ? LANGUAGE_ENG : LANGUAGE_INVALID);\r
 \r
@@ -298,12 +368,19 @@ _InputServiceSignalListener::SetLanguage(const scim::HelperAgent* pHelperAgent,
 void\r
 _InputServiceSignalListener::HideInputPanel(const scim::HelperAgent* pHelperAgent, int inputContext, const scim::String& uuid)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        SysLog(NID_UI_IME, "Hiding the input panel has been requested.");\r
 \r
-       __pIInputMethodProvider->HideInputPanel();\r
-\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->HideInputPanel();\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->HideInputPanel();\r
+       }\r
+/* unset the target window\r
        result r = E_SUCCESS;\r
 \r
        _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();\r
@@ -320,25 +397,40 @@ _InputServiceSignalListener::HideInputPanel(const scim::HelperAgent* pHelperAgen
        SysTryReturnVoidResult(NID_UI_IME, pTargetWindowAgent, r, "[%s] Propagating.", GetErrorMessage(r));\r
 \r
        pTargetWindowAgent->UnsetTargetWindow(keyboardWindow);\r
+*/\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::IsEnterKeyActionEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& enable)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
-       enable = static_cast<scim::uint32>(__pIInputMethodProvider->IsEnterKeyActionEnabled());\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               enable = static_cast<scim::uint32>(__pIInputMethodProviderF->IsEnterKeyActionEnabled());\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               enable = static_cast<scim::uint32>(__pIInputMethodProvider->IsEnterKeyActionEnabled());\r
+       }\r
 }\r
 \r
 void\r
 _InputServiceSignalListener::ShowInputPanel(const scim::HelperAgent* pHelperAgent, int inputContext, char* pBuffer, size_t& length)\r
 {\r
-       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        SysLog(NID_UI_IME, "Showing the input panel has been requested.");\r
 \r
-       __pIInputMethodProvider->ShowInputPanel();\r
-\r
+       if (__pIInputMethodProviderF)\r
+       {\r
+               __pIInputMethodProviderF->ShowInputPanel();\r
+       }\r
+       else if (__pIInputMethodProvider)\r
+       {\r
+               __pIInputMethodProvider->ShowInputPanel();\r
+       }\r
+/* set the target window and orientation\r
        result r = E_SUCCESS;\r
 \r
        _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();\r
@@ -361,6 +453,7 @@ _InputServiceSignalListener::ShowInputPanel(const scim::HelperAgent* pHelperAgen
        SysTryReturnVoidResult(NID_UI_IME, angle != -1, r, "[%s] Propagating.", GetErrorMessage(r));\r
 \r
        pTargetWindowAgent->SetOrientation(angle);\r
+*/\r
 }\r
 \r
 void\r
index 9bc6d25..6c0183e 100644 (file)
@@ -33,6 +33,7 @@
 \r
 #include <FUiImeIInputMethodListener.h>\r
 #include <FUiImeIInputMethodProvider.h>\r
+#include <FUiImeIInputMethodProviderF.h>\r
 \r
 namespace Tizen { namespace Ui { namespace Ime {\r
 \r
@@ -46,6 +47,7 @@ class _InputServiceSignalListener
 {\r
 public:\r
        static void SetInputMethodProvider(IInputMethodProvider* pProvider);\r
+       static void SetInputMethodProviderF(IInputMethodProviderF* pProvider);\r
        static void SetInputMethodListener(IInputMethodListener* pListener);\r
 \r
        static void GetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action);\r
@@ -79,6 +81,7 @@ private:
 \r
 private:\r
        static IInputMethodProvider* __pIInputMethodProvider;\r
+       static IInputMethodProviderF* __pIInputMethodProviderF;\r
        static IInputMethodListener* __pIInputMethodListener;\r
 };\r
 \r
index 5817392..24c2b7d 100644 (file)
@@ -142,6 +142,15 @@ _ScimDataConverter::ConvertRectangle(const Rectangle& src, scim::rectinfo& dest)
        dest.height = src.height;\r
 }\r
 \r
+void\r
+_ScimDataConverter::ConvertRectangle(const Tizen::Graphics::FloatRectangle& src, scim::rectinfo& dest)\r
+{\r
+       dest.pos_x = static_cast<int>(src.x);\r
+       dest.pos_y = static_cast<int>(src.y);\r
+       dest.width = static_cast<int>(src.width);\r
+       dest.height = static_cast<int>(src.height);\r
+}\r
+\r
 result\r
 _ScimDataConverter::ConvertString(const String& src, scim::String& dest)\r
 {\r
index 6f2cf5b..49f584e 100644 (file)
@@ -37,6 +37,7 @@
 #include <FBaseDataType.h>\r
 #include <FBaseString.h>\r
 #include <FGrpRectangle.h>\r
+#include <FGrpFloatRectangle.h>\r
 #include <FLclLocale.h>\r
 #include <FUiIKeyEventListener.h>\r
 #include <FUiImeTypes.h>\r
@@ -59,6 +60,7 @@ public:
        static char* ConvertLanguageN(const Tizen::Locales::Locale& language);\r
 \r
        static void ConvertRectangle(const Tizen::Graphics::Rectangle& src, scim::rectinfo& dest);\r
+       static void ConvertRectangle(const Tizen::Graphics::FloatRectangle& src, scim::rectinfo& dest);\r
 \r
        static result ConvertString(const Tizen::Base::String& src, scim::String& dest);\r
        static result ConvertString(const Tizen::Base::String& src, scim::WideString& dest);\r
index af47445..e63316f 100644 (file)
@@ -46,7 +46,7 @@ namespace Tizen { namespace Ui { namespace Ime {
 _TargetWindowAgent* _TargetWindowAgent::__pTargetWindowAgent = null;\r
 \r
 _TargetWindowAgent::_TargetWindowAgent(void)\r
-       :__keyboardWindow(0)\r
+       :__inputPanelWindow(0)\r
 {\r
 }\r
 \r
@@ -54,7 +54,7 @@ _TargetWindowAgent::~_TargetWindowAgent(void)
 {\r
        __pTargetWindowAgent = null;\r
 \r
-       __keyboardWindow = 0;\r
+       __inputPanelWindow = 0;\r
 }\r
 \r
 _TargetWindowAgent*\r
@@ -70,19 +70,19 @@ _TargetWindowAgent::GetInstance(void)
 }\r
 \r
 result\r
-_TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow)\r
+_TargetWindowAgent::SetTargetWindow(Ecore_X_Window inputPanelWindow)\r
 {\r
-       SysLog(NID_UI_IME, "The handle of the keyboard window is %x.", keyboardWindow);\r
-       SysTryReturnResult(NID_UI_IME, keyboardWindow > 0, E_INVALID_ARG, "Invalid argument(s) is used.");\r
+       SysLog(NID_UI_IME, "The handle of the input panel window is %x.", inputPanelWindow);\r
+       SysTryReturnResult(NID_UI_IME, inputPanelWindow > 0, E_INVALID_ARG, "Invalid argument(s) is used.");\r
 \r
        result r = E_SUCCESS;\r
 \r
-       if (__keyboardWindow)\r
+       if (__inputPanelWindow)\r
        {\r
-               UnsetTargetWindow(__keyboardWindow);\r
+               UnsetTargetWindow(__inputPanelWindow);\r
        }\r
 \r
-       __keyboardWindow = keyboardWindow;\r
+       __inputPanelWindow = inputPanelWindow;\r
 \r
        Atom actualTypeReturn;\r
        int actualFormatReturn;\r
@@ -92,7 +92,7 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow)
 \r
     gint ret = 0;\r
     ret = XGetWindowProperty(static_cast<Display*>(ecore_x_display_get()),\r
-                                                       ecore_x_window_root_get(__keyboardWindow),\r
+                                                       ecore_x_window_root_get(__inputPanelWindow),\r
                                                        ecore_x_atom_get("_ISF_ACTIVE_WINDOW"),\r
                                                        0,\r
                                                        G_MAXLONG,\r
@@ -112,7 +112,7 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow)
                        Ecore_X_Window targetWindow = *(reinterpret_cast<Ecore_X_Window*>(pPropReturn));\r
                        SysLog(NID_UI_IME, "The handle of the target window is %x.", targetWindow);\r
 \r
-                       ecore_x_icccm_transient_for_set(__keyboardWindow, targetWindow);\r
+                       ecore_x_icccm_transient_for_set(__inputPanelWindow, targetWindow);\r
                }\r
 \r
                XFree(pPropReturn);\r
@@ -122,16 +122,16 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow)
 }\r
 \r
 result\r
-_TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window keyboardWindow)\r
+_TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window inputPanelWindow)\r
 {\r
-       SysTryReturnResult(NID_UI_IME, (keyboardWindow > 0) && (keyboardWindow == __keyboardWindow), E_INVALID_ARG,\r
-                               "Invalid argument(s) is used. The handle of the keyboard window is %x.", keyboardWindow);\r
+       SysTryReturnResult(NID_UI_IME, (inputPanelWindow > 0) && (inputPanelWindow == __inputPanelWindow), E_INVALID_ARG,\r
+                               "Invalid argument(s) is used. The handle of the input panel window is %x.", inputPanelWindow);\r
 \r
        result r = E_SUCCESS;\r
 \r
-       ecore_x_icccm_transient_for_unset(keyboardWindow);\r
+       ecore_x_icccm_transient_for_unset(inputPanelWindow);\r
 \r
-       __keyboardWindow = 0;\r
+       __inputPanelWindow = 0;\r
 \r
        return r;\r
 }\r
@@ -139,7 +139,7 @@ _TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window keyboardWindow)
 int\r
 _TargetWindowAgent::GetOrientation(void)\r
 {\r
-       SysTryReturn(NID_UI_IME, __keyboardWindow != 0, -1, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
+       SysTryReturn(NID_UI_IME, __inputPanelWindow != 0, -1, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist.");\r
 \r
        Atom actualTypeReturn;\r
        int actualFormatReturn;\r
@@ -149,7 +149,7 @@ _TargetWindowAgent::GetOrientation(void)
 \r
     gint ret = 0;\r
        ret = XGetWindowProperty(static_cast<Display*>(ecore_x_display_get()),\r
-                                                       ecore_x_window_root_get(__keyboardWindow),\r
+                                                       ecore_x_window_root_get(__inputPanelWindow),\r
                                                        ecore_x_atom_get("_E_ILLUME_ROTATE_ROOT_ANGLE"),\r
                                                        0,\r
                                                        G_MAXLONG,\r
@@ -176,7 +176,7 @@ _TargetWindowAgent::GetOrientation(void)
 result\r
 _TargetWindowAgent::SetOrientation(int angle)\r
 {\r
-       SysTryReturnResult(NID_UI_IME, __keyboardWindow != 0, E_OBJ_NOT_FOUND, "The required instance does not exist.");\r
+       SysTryReturnResult(NID_UI_IME, __inputPanelWindow != 0, E_OBJ_NOT_FOUND, "The required instance does not exist.");\r
 \r
        result r = E_SUCCESS;\r
 \r
@@ -216,14 +216,14 @@ _TargetWindowAgent::SetOrientation(int angle)
 }\r
 \r
 bool\r
-_TargetWindowAgent::IsActive(Ecore_X_Window keyboardWindow, Ecore_X_Window activeWindow)\r
+_TargetWindowAgent::IsActive(Ecore_X_Window inputPanelWindow, Ecore_X_Window activeWindow)\r
 {\r
-       SysLog(NID_UI_IME, "The handle of the keyboard window is %x and that of the active window is %x.", keyboardWindow, activeWindow);\r
-       SysTryReturn(NID_UI_IME, (keyboardWindow > 0) && (activeWindow > 0), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used.");\r
+       SysLog(NID_UI_IME, "The handle of the input panel window is %x and that of the active window is %x.", inputPanelWindow, activeWindow);\r
+       SysTryReturn(NID_UI_IME, (inputPanelWindow > 0) && (activeWindow > 0), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used.");\r
 \r
        bool active = false;\r
 \r
-       Ecore_X_Window transientWindow = keyboardWindow;\r
+       Ecore_X_Window transientWindow = inputPanelWindow;\r
 \r
        const int MAX_LOOP_COUNT = 100;\r
        int count = 0;\r
index 164b092..d8d0b2b 100644 (file)
@@ -44,13 +44,13 @@ class _TargetWindowAgent
 public:\r
        static _TargetWindowAgent* GetInstance(void);\r
 \r
-       result SetTargetWindow(Ecore_X_Window keyboardWindow);\r
-       result UnsetTargetWindow(Ecore_X_Window keyboardWindow);\r
+       result SetTargetWindow(Ecore_X_Window inputPanelWindow);\r
+       result UnsetTargetWindow(Ecore_X_Window inputPanelWindow);\r
 \r
        int GetOrientation(void);\r
        result SetOrientation(int angle);\r
 \r
-       bool IsActive(Ecore_X_Window keyboardWindow, Ecore_X_Window activeWindow);\r
+       bool IsActive(Ecore_X_Window inputPanelWindow, Ecore_X_Window activeWindow);\r
 \r
 private:\r
        _TargetWindowAgent();\r
@@ -62,7 +62,7 @@ private:
 private:\r
        static _TargetWindowAgent* __pTargetWindowAgent;\r
 \r
-       Ecore_X_Window __keyboardWindow;\r
+       Ecore_X_Window __inputPanelWindow;\r
 };\r
 \r
 }}} // Tizen::Ui::Ime\r