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 FUiImeIInputMethodProvider.h
20 * @brief This is the header file for the %IInputMethodProvider interface.
22 * This header file contains the declarations of the %IInputMethodProvider interface.
25 #ifndef _FUI_IME_IINPUT_METHOD_PROVIDER_H_
26 #define _FUI_IME_IINPUT_METHOD_PROVIDER_H_
28 #include <FGrpRectangle.h>
29 #include <FLclLocale.h>
30 #include <FOspConfig.h>
31 #include <FUiInputConnectionTypes.h>
33 namespace Tizen { namespace Ui { namespace Ime {
36 * @interface IInputMethodProvider
37 * @brief This interface is for the InputMethod class that interacts with the associated text input UI control.
40 * @remarks The IME application developers can implement a class derived from %IInputMethodProvider and set it as the provider of the InputMethod class.
41 * 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
42 * example, when ShowInputPanel() or HideInputPanel() are called, the IME application's frame should either be hidden or made visible.
45 * @privilege %http://tizen.org/privilege/ime
47 * The %IInputMethodProvider interface is for the InputMethod class that interacts with the associated text input UI control.
49 * The following example demonstrates how to use the %IInputMethodProvider interface.
54 * : public IInputMethodProvider
57 * virtual Tizen::Ui::InputPanelAction GetEnterKeyAction(void);
58 * virtual Tizen::Graphics::Rectangle GetInputPanelBounds(void);
64 class _OSP_EXPORT_ IInputMethodProvider
68 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this
69 * interface is called.
73 * @privilege %http://tizen.org/privilege/ime
75 virtual ~IInputMethodProvider(void) {}
78 * Called when an associated text input UI control requests the enter key action of the input panel.
82 * @privilege %http://tizen.org/privilege/ime
84 * @return The enter key action of the input panel
86 virtual Tizen::Ui::InputPanelAction GetEnterKeyAction(void)
88 return Tizen::Ui::INPUT_PANEL_ACTION_ENTER;
92 * Called when an associated text input UI control requests the position and size of the input panel.
96 * @privilege %http://tizen.org/privilege/ime
98 * @return The position and size of the input panel
99 * @remarks The associated text input UI control can change its position on the screen to avoid becoming positioned behind the input panel.
101 virtual Tizen::Graphics::Rectangle GetInputPanelBounds(void) = 0;
104 * Called when an associated text input UI control requests the style of the input panel.
108 * @privilege %http://tizen.org/privilege/ime
110 * @return A style of the input panel
112 virtual Tizen::Ui::InputPanelStyle GetInputPanelStyle(void)
114 return Tizen::Ui::INPUT_PANEL_STYLE_NORMAL;
118 * Called when the associated text input UI control requests the language of the input method.
122 * @privilege %http://tizen.org/privilege/ime
124 * @return A language of the input method
126 virtual Tizen::Locales::Locale GetLanguage(void)
128 return Tizen::Locales::Locale(Tizen::Locales::LANGUAGE_ENG, Tizen::Locales::COUNTRY_US);
132 * Called when an associated text input UI control requests the input panel to enable or disable the caps mode.
136 * @privilege %http://tizen.org/privilege/ime
138 * @param[in] enable The state of the caps mode
140 virtual void SetCapsModeEnabled(bool enable) {}
143 * Called when an associated text input UI control requests the input panel to set the enter key action.
147 * @privilege %http://tizen.org/privilege/ime
149 * @param[in] action The enter key action
150 * @remarks The input panel can show text on the enter button according to the enter key action.
152 virtual void SetEnterKeyAction(Tizen::Ui::InputPanelAction action) {}
155 * Called when an associated text input UI control requests the input panel to enable or disable the enter key action.
159 * @privilege %http://tizen.org/privilege/ime
161 * @param[in] enable The state of the enter key action
163 virtual void SetEnterKeyActionEnabled(bool enable) {}
166 * Called when an associated text input UI control requests the input panel to set its style.
170 * @privilege %http://tizen.org/privilege/ime
172 * @param[in] style The style of the input panel
174 virtual void SetInputPanelStyle(Tizen::Ui::InputPanelStyle style) {}
177 * Called when an associated text input UI control requests the input panel to hide itself.
181 * @privilege %http://tizen.org/privilege/ime
183 * @remarks The IME application developer should implement this interface.
185 virtual void HideInputPanel(void) = 0;
188 * Called when an associated text input UI control checks whether the enter key action is enabled or not.
192 * @privilege %http://tizen.org/privilege/ime
194 * @return The state of the enter key action
196 virtual bool IsEnterKeyActionEnabled(void)
202 * Called when an associated text input UI control requests the input panel to show itself.
206 * @privilege %http://tizen.org/privilege/ime
208 * @remarks The IME application developer should implement this interface.
210 virtual void ShowInputPanel(void) = 0;
214 // This method is for internal use only. Using this method can cause behavioral, security-related,
215 // and consistency-related issues in the application.
217 // This method is reserved and may change its name at any time without prior notice.
221 virtual void IInputMethodProvider_Reserved1(void) {}
224 // This method is for internal use only. Using this method can cause behavioral, security-related,
225 // and consistency-related issues in the application.
227 // This method is reserved and may change its name at any time without prior notice.
231 virtual void IInputMethodProvider_Reserved2(void) {}
234 // This method is for internal use only. Using this method can cause behavioral, security-related,
235 // and consistency-related issues in the application.
237 // This method is reserved and may change its name at any time without prior notice.
241 virtual void IInputMethodProvider_Reserved3(void) {}
244 // This method is for internal use only. Using this method can cause behavioral, security-related,
245 // and consistency-related issues in the application.
247 // This method is reserved and may change its name at any time without prior notice.
251 virtual void IInputMethodProvider_Reserved4(void) {}
254 }}} // Tizen::Ui::Ime
256 #endif // _FUI_IME_IINPUT_METHOD_PROVIDER_H_