2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiImeIInputMethodListener.h
20 * @brief This is the header file for the %IInputMethodListener interface.
22 * This header file contains the declarations of the %IInputMethodListener interface.
25 #ifndef _FUI_IME_IINPUT_METHOD_LISTENER_H_
26 #define _FUI_IME_IINPUT_METHOD_LISTENER_H_
28 #include <FBaseRtIEventListener.h>
29 #include <FBaseString.h>
30 #include <FGrpRectangle.h>
31 #include <FOspConfig.h>
32 #include <FUiInputConnectionTypes.h>
34 namespace Tizen { namespace Ui { namespace Ime {
38 * @interface IInputMethodListener
39 * @brief This interface provides a listener for the InputMethod class to receive asynchronous callbacks from the input service.
42 * @remarks IME application developers can implement a class that is derived from %IInputMethodListener and use it to receive asynchronous callbacks
43 * from the input service.
46 * @privilege http://tizen.org/privilege/ime
48 * The %IInputMethodListener provides a listener for the %InputMethod class to receive asynchronous callbacks from the input service.
50 * The following example demonstrates how to use the %IInputMethodListener interface.
55 * : public IInputMethodListener
58 * virtual void OnCursorPositionChanged(int position);
65 class _OSP_EXPORT_ IInputMethodListener
66 : virtual public Tizen::Base::Runtime::IEventListener
71 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this
72 * interface is called.
76 * @privilege http://tizen.org/privilege/ime
79 virtual ~IInputMethodListener(void) {}
83 * Called when the position of the cursor in an associated text input UI control changes.
87 * @privilege http://tizen.org/privilege/ime
89 * @param[in] position The position of the cursor
92 virtual void OnCursorPositionChanged(int position) {}
96 * Called when an associated text input UI control responds to a request with the surrounding text.
100 * @privilege http://tizen.org/privilege/ime
102 * @param[in] text The surrounding text
103 * @param[in] cursorPosition The position of the cursor
104 * @remarks The surrounding text can be requested by the Tizen::Ui::Ime::InputMethod::RequestSurroundingText() method. The length of the
105 * surrounding text can be less than that requested by the user.
108 virtual void OnSurroundingTextReceived(const Tizen::Base::String& text, int cursorPosition) {}
112 // This method is for internal use only. Using this method can cause behavioral, security-related,
113 // and consistency-related issues in the application.
115 // Following method is reserved and may change its name at any time without
120 virtual void IInputMethodListener_Reserved1(void) {}
123 // This method is for internal use only. Using this method can cause behavioral, security-related,
124 // and consistency-related issues in the application.
126 // Following method is reserved and may change its name at any time without
131 virtual void IInputMethodListener_Reserved2(void) {}
134 // This method is for internal use only. Using this method can cause behavioral, security-related,
135 // and consistency-related issues in the application.
137 // Following method is reserved and may change its name at any time without
142 virtual void IInputMethodListener_Reserved3(void) {}
145 // This method is for internal use only. Using this method can cause behavioral, security-related,
146 // and consistency-related issues in the application.
148 // Following method is reserved and may change its name at any time without
153 virtual void IInputMethodListener_Reserved4(void) {}
156 // This method is for internal use only. Using this method can cause behavioral, security-related,
157 // and consistency-related issues in the application.
159 // Following method is reserved and may change its name at any time without
164 virtual void IInputMethodListener_Reserved5(void) {}
167 }}} // Tizen::Ui::Ime
169 #endif // _FUI_IME_IINPUT_METHOD_LISTENER_H_