From: Bum-Sung Cho Date: Fri, 12 Apr 2013 07:59:25 +0000 (+0900) Subject: IME rotation sync related works. X-Git-Tag: 2.1b_release~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=de79f108ac2eaa999c3ca626595feb245768638d;p=framework%2Fosp%2Fime.git IME rotation sync related works. Change-Id: I28ff16f36b270800c42e83a7973cc62faaa3208d Signed-off-by: Bum-Sung Cho --- diff --git a/inc/FUiIme.h b/inc/FUiIme.h index b614c94..19d98a9 100644 --- a/inc/FUiIme.h +++ b/inc/FUiIme.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/inc/FUiImeIInputMethodProviderF.h b/inc/FUiImeIInputMethodProviderF.h new file mode 100644 index 0000000..b8b2960 --- /dev/null +++ b/inc/FUiImeIInputMethodProviderF.h @@ -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 +#include +#include +#include + +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 + * + * 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 diff --git a/inc/FUiImeInputMethod.h b/inc/FUiImeInputMethod.h index 771ab9a..5e7b9ad 100644 --- a/inc/FUiImeInputMethod.h +++ b/inc/FUiImeInputMethod.h @@ -28,10 +28,12 @@ #include #include #include +#include #include #include #include #include +#include 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 here. + * - 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 here. */ 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 diff --git a/inc/FUiImeInputMethodManager.h b/inc/FUiImeInputMethodManager.h index 0636ef2..07d2b67 100644 --- a/inc/FUiImeInputMethodManager.h +++ b/inc/FUiImeInputMethodManager.h @@ -62,8 +62,8 @@ public: * @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. - * - 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 here. + * - 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 here. */ static InputMethodManager* GetInstance(void); diff --git a/src/FUiImeInputMethod.cpp b/src/FUiImeInputMethod.cpp index 7a30733..96ca0fa 100644 --- a/src/FUiImeInputMethod.cpp +++ b/src/FUiImeInputMethod.cpp @@ -31,6 +31,7 @@ #include "FUiIme_InputMethodImpl.h" using namespace Tizen::Base; +using namespace Tizen::Graphics; using namespace Tizen::Security; using namespace Tizen::Ui; @@ -103,6 +104,12 @@ InputMethod::SetInputMethodProvider(IInputMethodProvider* pProvider) } void +InputMethod::SetInputMethodProviderF(IInputMethodProviderF* pProvider) +{ + __pInputMethodImpl->SetInputMethodProviderF(pProvider); +} + +void InputMethod::SetInputMethodListener(IInputMethodListener* pListener) { __pInputMethodImpl->SetInputMethodListener(pListener); @@ -115,6 +122,12 @@ InputMethod::DeleteText(int cursorOffset, int length) } result +InputMethod::NotifyInputPanelBounds(const FloatRectangle& portraitBounds, const FloatRectangle& landscapeBounds) +{ + return __pInputMethodImpl->NotifyInputPanelBounds(portraitBounds, landscapeBounds); +} + +result InputMethod::NotifyInputPanelState(InputPanelShowState state) { return __pInputMethodImpl->NotifyInputPanelState(state); diff --git a/src/FUiIme_EcoreEventHandler.cpp b/src/FUiIme_EcoreEventHandler.cpp index fc67991..3008ab8 100644 --- a/src/FUiIme_EcoreEventHandler.cpp +++ b/src/FUiIme_EcoreEventHandler.cpp @@ -111,26 +111,27 @@ _EcoreEventHandler::ClientMessageCallback(void* pData, int type, void* pEvent) { SysLog(NID_UI_IME, "The client message callback has been called."); - result r = E_SUCCESS; - Ecore_X_Event_Client_Message* pMessage = null; pMessage = static_cast(pEvent); SysTryReturn(NID_UI_IME, pMessage, ECORE_CALLBACK_CANCEL, E_SYSTEM, "[E_SYSTEM] A failure occurs from the underlying system."); - if (pMessage->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE) +/* set orientation of the input panel + result r = E_SUCCESS; + + if (pMessage->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) { Evas_Object* pEvasObject = null; pEvasObject = reinterpret_cast(pData); SysTryReturn(NID_UI_IME, pEvasObject, ECORE_CALLBACK_CANCEL, E_SYSTEM, "[E_SYSTEM] A failure occurs from the underlying system."); - Ecore_X_Window keyboardWindow = elm_win_xwindow_get(pEvasObject); + Ecore_X_Window inputPanelWindow = elm_win_xwindow_get(pEvasObject); Ecore_X_Window activeWindow = pMessage->data.l[1]; _TargetWindowAgent* pTargetWindowAgent = _TargetWindowAgent::GetInstance(); r = GetLastResult(); SysTryReturn(NID_UI_IME, pTargetWindowAgent, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r)); - if (pTargetWindowAgent->IsActive(keyboardWindow, activeWindow)) + if (pTargetWindowAgent->IsActive(inputPanelWindow, activeWindow)) { int angle = pMessage->data.l[0]; @@ -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)); } } +*/ + if (pMessage->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST) + { + SysLog(NID_UI_IME, "The client message callback related to the ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST has been called."); + + _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); + SysTryReturn(NID_UI_IME, pEcoreEvasMgr, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas(); + SysTryReturn(NID_UI_IME, pEcoreEvas, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + Evas_Object* pEvasObject = pEcoreEvas->GetWindowObject(); + SysTryReturn(NID_UI_IME, pEvasObject, ECORE_CALLBACK_CANCEL, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + Ecore_X_Window inputPanelWindow = elm_win_xwindow_get(pEvasObject); + + 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); + if (pMessage->win == inputPanelWindow) + { +/* set orientation of the input panel + int angle = pMessage->data.l[1]; + + _TargetWindowAgent* pTargetWindowAgent = _TargetWindowAgent::GetInstance(); + r = GetLastResult(); + SysTryReturn(NID_UI_IME, pTargetWindowAgent, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTargetWindowAgent->SetOrientation(angle); + SysTryReturn(NID_UI_IME, r == E_SUCCESS, ECORE_CALLBACK_CANCEL, r, "[%s] Propagating.", GetErrorMessage(r)); +*/ + } + } return ECORE_CALLBACK_RENEW; } diff --git a/src/FUiIme_InputMethodImpl.cpp b/src/FUiIme_InputMethodImpl.cpp index 831a6de..e2a3cb2 100644 --- a/src/FUiIme_InputMethodImpl.cpp +++ b/src/FUiIme_InputMethodImpl.cpp @@ -30,6 +30,8 @@ #include // elm_win_keyboard_win_set #include +#include + #include #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(width), static_cast(height)); + ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 180, 0, 0, static_cast(width), static_cast(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(height), static_cast(width)); + ecore_x_e_window_rotation_geometry_set(inputPanelWindow, 270, 0, 0, static_cast(height), static_cast(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; diff --git a/src/FUiIme_InputMethodImpl.h b/src/FUiIme_InputMethodImpl.h index 0aebe15..b42c9a5 100644 --- a/src/FUiIme_InputMethodImpl.h +++ b/src/FUiIme_InputMethodImpl.h @@ -37,9 +37,10 @@ #include #include #include -#include +#include #include #include +#include #include #include @@ -63,9 +64,11 @@ public: static _InputMethodImpl* GetInstance(InputMethod& inputMethod); void SetInputMethodProvider(IInputMethodProvider* pProvider); + void SetInputMethodProviderF(IInputMethodProviderF* pProvider); void SetInputMethodListener(IInputMethodListener* pListener); result DeleteText(int cursorOffset, int length); + result NotifyInputPanelBounds(const Tizen::Graphics::FloatRectangle& portraitBounds, const Tizen::Graphics::FloatRectangle& landscapeBounds); result NotifyInputPanelState(Tizen::Ui::InputPanelShowState state); result NotifyLanguageChanged(void); result RequestSurroundingText(int lengthBeforeCursor, int lengthAfterCursor); @@ -82,7 +85,7 @@ private: result Construct(void); - result SetEcoreEvasAttribute(void); + result SetInputPanelWindowAttribute(void); void SetInputServiceSignalCallback(void); void HideInputPanel(void); diff --git a/src/FUiIme_InputServiceSignalListener.cpp b/src/FUiIme_InputServiceSignalListener.cpp index 3133bd3..d1f69c7 100644 --- a/src/FUiIme_InputServiceSignalListener.cpp +++ b/src/FUiIme_InputServiceSignalListener.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ using namespace Tizen::Ui::Controls; namespace Tizen { namespace Ui { namespace Ime { IInputMethodProvider* _InputServiceSignalListener::__pIInputMethodProvider = null; +IInputMethodProviderF* _InputServiceSignalListener::__pIInputMethodProviderF = null; IInputMethodListener* _InputServiceSignalListener::__pIInputMethodListener = null; _InputServiceSignalListener::_InputServiceSignalListener() @@ -68,6 +70,7 @@ _InputServiceSignalListener::_InputServiceSignalListener() _InputServiceSignalListener::~_InputServiceSignalListener() { __pIInputMethodProvider = null; + __pIInputMethodProviderF = null; __pIInputMethodListener = null; } @@ -78,6 +81,12 @@ _InputServiceSignalListener::SetInputMethodProvider(IInputMethodProvider* pProvi } void +_InputServiceSignalListener::SetInputMethodProviderF(IInputMethodProviderF* pProvider) +{ + __pIInputMethodProviderF = pProvider; +} + +void _InputServiceSignalListener::SetInputMethodListener(IInputMethodListener* pListener) { __pIInputMethodListener = pListener; @@ -86,9 +95,17 @@ _InputServiceSignalListener::SetInputMethodListener(IInputMethodListener* pListe void _InputServiceSignalListener::GetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); - InputPanelAction inputPanelAction = __pIInputMethodProvider->GetEnterKeyAction(); + InputPanelAction inputPanelAction = INPUT_PANEL_ACTION_ENTER; + if (__pIInputMethodProviderF) + { + inputPanelAction = __pIInputMethodProviderF->GetEnterKeyAction(); + } + else if (__pIInputMethodProvider) + { + inputPanelAction = __pIInputMethodProvider->GetEnterKeyAction(); + } 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."); switch (inputPanelAction) @@ -126,21 +143,38 @@ _InputServiceSignalListener::GetEnterKeyAction(const scim::HelperAgent* pHelperA void _InputServiceSignalListener::GetInputPanelBounds(const scim::HelperAgent* pHelperAgent, struct scim::rectinfo& bounds) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); SysLog(NID_UI_IME, "The bounds of the input panel have been requested."); - Rectangle inputPanelBounds = __pIInputMethodProvider->GetInputPanelBounds(); - - _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds); + if (__pIInputMethodProviderF) + { + FloatRectangle inputPanelBounds; + inputPanelBounds = __pIInputMethodProviderF->GetInputPanelBounds(); + _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds); + } + else if (__pIInputMethodProvider) + { + Rectangle inputPanelBounds; + inputPanelBounds = __pIInputMethodProvider->GetInputPanelBounds(); + _ScimDataConverter::ConvertRectangle(inputPanelBounds, bounds); + } } void _InputServiceSignalListener::GetInputPanelStyle(const scim::HelperAgent* pHelperAgent, scim::uint32& style) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); - InputPanelStyle inputPanelStyle = __pIInputMethodProvider->GetInputPanelStyle(); + InputPanelStyle inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + if (__pIInputMethodProviderF) + { + inputPanelStyle = __pIInputMethodProviderF->GetInputPanelStyle(); + } + else if (__pIInputMethodProvider) + { + inputPanelStyle = __pIInputMethodProvider->GetInputPanelStyle(); + } 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."); switch (inputPanelStyle) @@ -172,9 +206,17 @@ _InputServiceSignalListener::GetInputPanelStyle(const scim::HelperAgent* pHelper void _InputServiceSignalListener::GetLanguage(const scim::HelperAgent* pHelperAgent, int inputContext, char** pLocale) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); - Locale language = __pIInputMethodProvider->GetLanguage(); + Locale language(LANGUAGE_ENG, COUNTRY_US); + if (__pIInputMethodProviderF) + { + language = __pIInputMethodProviderF->GetLanguage(); + } + else if (__pIInputMethodProvider) + { + language = __pIInputMethodProvider->GetLanguage(); + } std::unique_ptr pLanguage(_ScimDataConverter::ConvertLanguageN(language)); *pLocale = strdup(pLanguage.get()); @@ -183,17 +225,24 @@ _InputServiceSignalListener::GetLanguage(const scim::HelperAgent* pHelperAgent, void _InputServiceSignalListener::SetCapsModeEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& mode) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); bool enable = (mode != 0 ? true : false); - __pIInputMethodProvider->SetCapsModeEnabled(enable); + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->SetCapsModeEnabled(enable); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->SetCapsModeEnabled(enable); + } } void _InputServiceSignalListener::SetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); SysTryReturnVoidResult(NID_UI_IME, action <= ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The enter key action is beyond the scope."); @@ -230,23 +279,37 @@ _InputServiceSignalListener::SetEnterKeyAction(const scim::HelperAgent* pHelperA break; } - __pIInputMethodProvider->SetEnterKeyAction(inputPanelAction); + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->SetEnterKeyAction(inputPanelAction); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->SetEnterKeyAction(inputPanelAction); + } } void _InputServiceSignalListener::SetEnterKeyActionEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& disable) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); bool enable = (disable != 0 ? false : true); - __pIInputMethodProvider->SetEnterKeyActionEnabled(enable); + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->SetEnterKeyActionEnabled(enable); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->SetEnterKeyActionEnabled(enable); + } } void _InputServiceSignalListener::SetInputPanelStyle(const scim::HelperAgent* pHelperAgent, scim::uint32& style) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); SysTryReturnVoidResult(NID_UI_IME, style < ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The input panel style is beyond the scope."); @@ -277,13 +340,20 @@ _InputServiceSignalListener::SetInputPanelStyle(const scim::HelperAgent* pHelper break; } - __pIInputMethodProvider->SetInputPanelStyle(inputPanelStyle); + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->SetInputPanelStyle(inputPanelStyle); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->SetInputPanelStyle(inputPanelStyle); + } } void _InputServiceSignalListener::SetLanguage(const scim::HelperAgent* pHelperAgent, scim::uint32& language) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); LanguageCode languageCode = (language == ECORE_IMF_INPUT_PANEL_LANG_ALPHABET ? LANGUAGE_ENG : LANGUAGE_INVALID); @@ -298,12 +368,19 @@ _InputServiceSignalListener::SetLanguage(const scim::HelperAgent* pHelperAgent, void _InputServiceSignalListener::HideInputPanel(const scim::HelperAgent* pHelperAgent, int inputContext, const scim::String& uuid) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); SysLog(NID_UI_IME, "Hiding the input panel has been requested."); - __pIInputMethodProvider->HideInputPanel(); - + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->HideInputPanel(); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->HideInputPanel(); + } +/* unset the target window result r = E_SUCCESS; _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); @@ -320,25 +397,40 @@ _InputServiceSignalListener::HideInputPanel(const scim::HelperAgent* pHelperAgen SysTryReturnVoidResult(NID_UI_IME, pTargetWindowAgent, r, "[%s] Propagating.", GetErrorMessage(r)); pTargetWindowAgent->UnsetTargetWindow(keyboardWindow); +*/ } void _InputServiceSignalListener::IsEnterKeyActionEnabled(const scim::HelperAgent* pHelperAgent, scim::uint32& enable) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); - enable = static_cast(__pIInputMethodProvider->IsEnterKeyActionEnabled()); + if (__pIInputMethodProviderF) + { + enable = static_cast(__pIInputMethodProviderF->IsEnterKeyActionEnabled()); + } + else if (__pIInputMethodProvider) + { + enable = static_cast(__pIInputMethodProvider->IsEnterKeyActionEnabled()); + } } void _InputServiceSignalListener::ShowInputPanel(const scim::HelperAgent* pHelperAgent, int inputContext, char* pBuffer, size_t& length) { - SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturnVoidResult(NID_UI_IME, __pIInputMethodProvider || __pIInputMethodProviderF, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); SysLog(NID_UI_IME, "Showing the input panel has been requested."); - __pIInputMethodProvider->ShowInputPanel(); - + if (__pIInputMethodProviderF) + { + __pIInputMethodProviderF->ShowInputPanel(); + } + else if (__pIInputMethodProvider) + { + __pIInputMethodProvider->ShowInputPanel(); + } +/* set the target window and orientation result r = E_SUCCESS; _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); @@ -361,6 +453,7 @@ _InputServiceSignalListener::ShowInputPanel(const scim::HelperAgent* pHelperAgen SysTryReturnVoidResult(NID_UI_IME, angle != -1, r, "[%s] Propagating.", GetErrorMessage(r)); pTargetWindowAgent->SetOrientation(angle); +*/ } void diff --git a/src/FUiIme_InputServiceSignalListener.h b/src/FUiIme_InputServiceSignalListener.h index 9bc6d25..6c0183e 100644 --- a/src/FUiIme_InputServiceSignalListener.h +++ b/src/FUiIme_InputServiceSignalListener.h @@ -33,6 +33,7 @@ #include #include +#include namespace Tizen { namespace Ui { namespace Ime { @@ -46,6 +47,7 @@ class _InputServiceSignalListener { public: static void SetInputMethodProvider(IInputMethodProvider* pProvider); + static void SetInputMethodProviderF(IInputMethodProviderF* pProvider); static void SetInputMethodListener(IInputMethodListener* pListener); static void GetEnterKeyAction(const scim::HelperAgent* pHelperAgent, scim::uint32& action); @@ -79,6 +81,7 @@ private: private: static IInputMethodProvider* __pIInputMethodProvider; + static IInputMethodProviderF* __pIInputMethodProviderF; static IInputMethodListener* __pIInputMethodListener; }; diff --git a/src/FUiIme_ScimDataConverter.cpp b/src/FUiIme_ScimDataConverter.cpp index 5817392..24c2b7d 100644 --- a/src/FUiIme_ScimDataConverter.cpp +++ b/src/FUiIme_ScimDataConverter.cpp @@ -142,6 +142,15 @@ _ScimDataConverter::ConvertRectangle(const Rectangle& src, scim::rectinfo& dest) dest.height = src.height; } +void +_ScimDataConverter::ConvertRectangle(const Tizen::Graphics::FloatRectangle& src, scim::rectinfo& dest) +{ + dest.pos_x = static_cast(src.x); + dest.pos_y = static_cast(src.y); + dest.width = static_cast(src.width); + dest.height = static_cast(src.height); +} + result _ScimDataConverter::ConvertString(const String& src, scim::String& dest) { diff --git a/src/FUiIme_ScimDataConverter.h b/src/FUiIme_ScimDataConverter.h index 6f2cf5b..49f584e 100644 --- a/src/FUiIme_ScimDataConverter.h +++ b/src/FUiIme_ScimDataConverter.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ public: static char* ConvertLanguageN(const Tizen::Locales::Locale& language); static void ConvertRectangle(const Tizen::Graphics::Rectangle& src, scim::rectinfo& dest); + static void ConvertRectangle(const Tizen::Graphics::FloatRectangle& src, scim::rectinfo& dest); static result ConvertString(const Tizen::Base::String& src, scim::String& dest); static result ConvertString(const Tizen::Base::String& src, scim::WideString& dest); diff --git a/src/FUiIme_TargetWindowAgent.cpp b/src/FUiIme_TargetWindowAgent.cpp index af47445..e63316f 100644 --- a/src/FUiIme_TargetWindowAgent.cpp +++ b/src/FUiIme_TargetWindowAgent.cpp @@ -46,7 +46,7 @@ namespace Tizen { namespace Ui { namespace Ime { _TargetWindowAgent* _TargetWindowAgent::__pTargetWindowAgent = null; _TargetWindowAgent::_TargetWindowAgent(void) - :__keyboardWindow(0) + :__inputPanelWindow(0) { } @@ -54,7 +54,7 @@ _TargetWindowAgent::~_TargetWindowAgent(void) { __pTargetWindowAgent = null; - __keyboardWindow = 0; + __inputPanelWindow = 0; } _TargetWindowAgent* @@ -70,19 +70,19 @@ _TargetWindowAgent::GetInstance(void) } result -_TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow) +_TargetWindowAgent::SetTargetWindow(Ecore_X_Window inputPanelWindow) { - SysLog(NID_UI_IME, "The handle of the keyboard window is %x.", keyboardWindow); - SysTryReturnResult(NID_UI_IME, keyboardWindow > 0, E_INVALID_ARG, "Invalid argument(s) is used."); + SysLog(NID_UI_IME, "The handle of the input panel window is %x.", inputPanelWindow); + SysTryReturnResult(NID_UI_IME, inputPanelWindow > 0, E_INVALID_ARG, "Invalid argument(s) is used."); result r = E_SUCCESS; - if (__keyboardWindow) + if (__inputPanelWindow) { - UnsetTargetWindow(__keyboardWindow); + UnsetTargetWindow(__inputPanelWindow); } - __keyboardWindow = keyboardWindow; + __inputPanelWindow = inputPanelWindow; Atom actualTypeReturn; int actualFormatReturn; @@ -92,7 +92,7 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow) gint ret = 0; ret = XGetWindowProperty(static_cast(ecore_x_display_get()), - ecore_x_window_root_get(__keyboardWindow), + ecore_x_window_root_get(__inputPanelWindow), ecore_x_atom_get("_ISF_ACTIVE_WINDOW"), 0, G_MAXLONG, @@ -112,7 +112,7 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow) Ecore_X_Window targetWindow = *(reinterpret_cast(pPropReturn)); SysLog(NID_UI_IME, "The handle of the target window is %x.", targetWindow); - ecore_x_icccm_transient_for_set(__keyboardWindow, targetWindow); + ecore_x_icccm_transient_for_set(__inputPanelWindow, targetWindow); } XFree(pPropReturn); @@ -122,16 +122,16 @@ _TargetWindowAgent::SetTargetWindow(Ecore_X_Window keyboardWindow) } result -_TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window keyboardWindow) +_TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window inputPanelWindow) { - SysTryReturnResult(NID_UI_IME, (keyboardWindow > 0) && (keyboardWindow == __keyboardWindow), E_INVALID_ARG, - "Invalid argument(s) is used. The handle of the keyboard window is %x.", keyboardWindow); + SysTryReturnResult(NID_UI_IME, (inputPanelWindow > 0) && (inputPanelWindow == __inputPanelWindow), E_INVALID_ARG, + "Invalid argument(s) is used. The handle of the input panel window is %x.", inputPanelWindow); result r = E_SUCCESS; - ecore_x_icccm_transient_for_unset(keyboardWindow); + ecore_x_icccm_transient_for_unset(inputPanelWindow); - __keyboardWindow = 0; + __inputPanelWindow = 0; return r; } @@ -139,7 +139,7 @@ _TargetWindowAgent::UnsetTargetWindow(Ecore_X_Window keyboardWindow) int _TargetWindowAgent::GetOrientation(void) { - SysTryReturn(NID_UI_IME, __keyboardWindow != 0, -1, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); + SysTryReturn(NID_UI_IME, __inputPanelWindow != 0, -1, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The required instance does not exist."); Atom actualTypeReturn; int actualFormatReturn; @@ -149,7 +149,7 @@ _TargetWindowAgent::GetOrientation(void) gint ret = 0; ret = XGetWindowProperty(static_cast(ecore_x_display_get()), - ecore_x_window_root_get(__keyboardWindow), + ecore_x_window_root_get(__inputPanelWindow), ecore_x_atom_get("_E_ILLUME_ROTATE_ROOT_ANGLE"), 0, G_MAXLONG, @@ -176,7 +176,7 @@ _TargetWindowAgent::GetOrientation(void) result _TargetWindowAgent::SetOrientation(int angle) { - SysTryReturnResult(NID_UI_IME, __keyboardWindow != 0, E_OBJ_NOT_FOUND, "The required instance does not exist."); + SysTryReturnResult(NID_UI_IME, __inputPanelWindow != 0, E_OBJ_NOT_FOUND, "The required instance does not exist."); result r = E_SUCCESS; @@ -216,14 +216,14 @@ _TargetWindowAgent::SetOrientation(int angle) } bool -_TargetWindowAgent::IsActive(Ecore_X_Window keyboardWindow, Ecore_X_Window activeWindow) +_TargetWindowAgent::IsActive(Ecore_X_Window inputPanelWindow, Ecore_X_Window activeWindow) { - SysLog(NID_UI_IME, "The handle of the keyboard window is %x and that of the active window is %x.", keyboardWindow, activeWindow); - SysTryReturn(NID_UI_IME, (keyboardWindow > 0) && (activeWindow > 0), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used."); + SysLog(NID_UI_IME, "The handle of the input panel window is %x and that of the active window is %x.", inputPanelWindow, activeWindow); + SysTryReturn(NID_UI_IME, (inputPanelWindow > 0) && (activeWindow > 0), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used."); bool active = false; - Ecore_X_Window transientWindow = keyboardWindow; + Ecore_X_Window transientWindow = inputPanelWindow; const int MAX_LOOP_COUNT = 100; int count = 0; diff --git a/src/FUiIme_TargetWindowAgent.h b/src/FUiIme_TargetWindowAgent.h index 164b092..d8d0b2b 100644 --- a/src/FUiIme_TargetWindowAgent.h +++ b/src/FUiIme_TargetWindowAgent.h @@ -44,13 +44,13 @@ class _TargetWindowAgent public: static _TargetWindowAgent* GetInstance(void); - result SetTargetWindow(Ecore_X_Window keyboardWindow); - result UnsetTargetWindow(Ecore_X_Window keyboardWindow); + result SetTargetWindow(Ecore_X_Window inputPanelWindow); + result UnsetTargetWindow(Ecore_X_Window inputPanelWindow); int GetOrientation(void); result SetOrientation(int angle); - bool IsActive(Ecore_X_Window keyboardWindow, Ecore_X_Window activeWindow); + bool IsActive(Ecore_X_Window inputPanelWindow, Ecore_X_Window activeWindow); private: _TargetWindowAgent(); @@ -62,7 +62,7 @@ private: private: static _TargetWindowAgent* __pTargetWindowAgent; - Ecore_X_Window __keyboardWindow; + Ecore_X_Window __inputPanelWindow; }; }}} // Tizen::Ui::Ime