remove link in brief tag
[framework/osp/ime.git] / inc / FUiImeIInputMethodListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file FUiImeIInputMethodListener.h
20  * @brief This is the header file for the %IInputMethodListener interface.
21  *
22  * This header file contains the declarations of the %IInputMethodListener interface.
23  */
24
25 #ifndef _FUI_IME_IINPUT_METHOD_LISTENER_H_
26 #define _FUI_IME_IINPUT_METHOD_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29 #include <FBaseString.h>
30 #include <FGrpRectangle.h>
31 #include <FOspConfig.h>
32 #include <FUiInputConnectionTypes.h>
33
34 namespace Tizen { namespace Ui { namespace Ime {
35
36 /**
37  * @interface   IInputMethodListener
38  * @brief       This interface provides a listener for the %InputMethod class to receive asynchronous callbacks from the input service.
39  * @since       2.1
40  *
41  * @remarks The IME application developers can implement a class that is derived from %IInputMethodListener and use it to receive asynchronous callbacks
42  * from the input service.
43  *
44  * The %IInputMethodListener interface provides a listener for the InputMethod class to receive asynchronous callbacks from the input service.
45  *
46  * The following example demonstrates how to use the %IInputMethodListener interface.
47  * @code
48  * #include <FUiIme.h>
49  *
50  * using namespace Tizen::Ui::Ime;
51  *
52  * class MyListener
53  *      : public IInputMethodListener
54  * {
55  *      virtual void OnCursorPositionChanged(int position) {}
56  *      virtual void OnOpaqueCommandReceived(const Tizen::Base::String& command) {}
57  *      virtual void OnSurroundingTextReceived(const Tizen::Base::String& text, int cursorPosition) {}
58  * };
59  * @endcode
60  *
61  */
62 class _OSP_EXPORT_ IInputMethodListener
63         : virtual public Tizen::Base::Runtime::IEventListener
64 {
65 public:
66         /**
67         * This polymorphic destructor should be overridden if required. @n This way, the destructors of the derived classes are called when the destructor of this
68         * interface is called.
69         *
70         * @since 2.1
71         * @privlevel partner
72         * @privilege %http://tizen.org/privilege/ime
73         */
74         virtual ~IInputMethodListener(void) {}
75
76         /**
77         * Called when the position of the cursor in an associated text input UI control changes.
78         *
79         * @since 2.1
80         * @privlevel partner
81         * @privilege %http://tizen.org/privilege/ime
82         *
83         * @param[in]    position The position of the cursor
84         */
85         virtual void OnCursorPositionChanged(int position) {}
86
87         /**
88         * Called when a client of the input method sends the opaque command. @n
89         * The opaque command is the engaged command between the certain input method and their clients which know opaque commands. @n
90         * It is for additional options that the input method does not provide.
91         *
92         * @since 2.1
93         * @privlevel partner
94         * @privilege %http://tizen.org/privilege/ime
95         *
96         * @param[in] command The opaque command that is a string format like "org.tizen.MyApp.OpaqueCommand=True"
97         */
98         virtual void OnOpaqueCommandReceived(const Tizen::Base::String& command) {}
99
100         /**
101         * Called when an associated text input UI control responds to a request with the surrounding text. @n
102         * The surrounding text can be requested by the Tizen::Ui::Ime::InputMethod::RequestSurroundingText() method.
103         *
104         * @since 2.1
105         * @privlevel partner
106         * @privilege %http://tizen.org/privilege/ime
107         *
108         * @param[in] text The surrounding text @n
109         *                               The length of the surrounding text can be less than that requested by the user.
110         * @param[in] cursorPosition The position of the cursor
111         */
112         virtual void OnSurroundingTextReceived(const Tizen::Base::String& text, int cursorPosition) {}
113
114 protected:
115         //
116         // This method is for internal use only. Using this method can cause behavioral, security-related,
117         // and consistency-related issues in the application.
118         //
119         // This method is reserved and may change its name at any time without prior notice.
120         //
121         // @since 2.1
122         //
123         virtual void IInputMethodListener_Reserved1(void) {}
124
125         //
126         // This method is for internal use only. Using this method can cause behavioral, security-related,
127         // and consistency-related issues in the application.
128         //
129         // This method is reserved and may change its name at any time without prior notice.
130         //
131         // @since 2.1
132         //
133         virtual void IInputMethodListener_Reserved2(void) {}
134
135         //
136         // This method is for internal use only. Using this method can cause behavioral, security-related,
137         // and consistency-related issues in the application.
138         //
139         // This method is reserved and may change its name at any time without prior notice.
140         //
141         // @since 2.1
142         //
143         virtual void IInputMethodListener_Reserved3(void) {}
144
145         //
146         // This method is for internal use only. Using this method can cause behavioral, security-related,
147         // and consistency-related issues in the application.
148         //
149         // This method is reserved and may change its name at any time without prior notice.
150         //
151         // @since 2.1
152         //
153         virtual void IInputMethodListener_Reserved4(void) {}
154 };
155
156 }}} // Tizen::Ui::Ime
157
158 #endif // _FUI_IME_IINPUT_METHOD_LISTENER_H_