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 FUiImeIInputMethodProviderF.h
20 * @brief This is the header file for the %IInputMethodProviderF interface.
22 * This header file contains the declarations of the %IInputMethodProviderF interface.
25 #ifndef _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_
26 #define _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_
28 #include <FGrpFloatRectangle.h>
29 #include <FLclLocale.h>
30 #include <FOspConfig.h>
31 #include <FUiInputConnectionTypes.h>
33 namespace Tizen { namespace Ui { namespace Ime {
36 * @interface IInputMethodProviderF
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 %IInputMethodProviderF 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.
44 * The %IInputMethodProviderF interface is for the InputMethod class that interacts with the associated text input UI control.
46 * The following example demonstrates how to use the %IInputMethodProviderF interface.
51 * : public IInputMethodProviderF
54 * virtual Tizen::Graphics::FloatRectangle GetInputPanelBounds(void);
55 * virtual void HideInputPanel(void);
56 * virtual void ShowInputPanel(void);
62 class _OSP_EXPORT_ IInputMethodProviderF
66 * This polymorphic destructor should be overridden if required. @n This way, the destructors of the derived classes are called when the destructor of this
67 * interface is called.
71 * @privilege %http://tizen.org/privilege/ime
73 virtual ~IInputMethodProviderF(void) {}
76 * Called when an associated text input UI control requests the enter key action of the input panel.
80 * @privilege %http://tizen.org/privilege/ime
82 * @return The enter key action of the input panel
84 virtual Tizen::Ui::InputPanelAction GetEnterKeyAction(void)
86 return Tizen::Ui::INPUT_PANEL_ACTION_ENTER;
90 * Called when an associated text input UI control requests the position and size of the input panel.
94 * @privilege %http://tizen.org/privilege/ime
96 * @return The position and size of the input panel
97 * @remarks The associated text input UI control can change its position on the screen to avoid becoming positioned behind the input panel.
99 virtual Tizen::Graphics::FloatRectangle GetInputPanelBounds(void) = 0;
102 * Called when an associated text input UI control requests the style of the input panel.
106 * @privilege %http://tizen.org/privilege/ime
108 * @return A style of the input panel
110 virtual Tizen::Ui::InputPanelStyle GetInputPanelStyle(void)
112 return Tizen::Ui::INPUT_PANEL_STYLE_NORMAL;
116 * Called when the associated text input UI control requests the language of the input method.
120 * @privilege %http://tizen.org/privilege/ime
122 * @return A language of the input method
124 virtual Tizen::Locales::Locale GetLanguage(void)
126 return Tizen::Locales::Locale(Tizen::Locales::LANGUAGE_ENG, Tizen::Locales::COUNTRY_US);
130 * Called when an associated text input UI control requests the input panel to enable or disable the caps mode.
134 * @privilege %http://tizen.org/privilege/ime
136 * @param[in] enable The state of the caps mode
138 virtual void SetCapsModeEnabled(bool enable) {}
141 * Called when an associated text input UI control requests the input panel to set the enter key action. @n
142 * The input panel can show text on the enter button according to the enter key action.
146 * @privilege %http://tizen.org/privilege/ime
148 * @param[in] action The enter key action
150 virtual void SetEnterKeyAction(Tizen::Ui::InputPanelAction action) {}
153 * Called when an associated text input UI control requests the input panel to enable or disable the enter key action.
157 * @privilege %http://tizen.org/privilege/ime
159 * @param[in] enable The state of the enter key action
161 virtual void SetEnterKeyActionEnabled(bool enable) {}
164 * Called when an associated text input UI control requests the input panel to set its style.
168 * @privilege %http://tizen.org/privilege/ime
170 * @param[in] style The style of the input panel
172 virtual void SetInputPanelStyle(Tizen::Ui::InputPanelStyle style) {}
175 * Called when an associated text input UI control requests the input panel to hide itself.
179 * @privilege %http://tizen.org/privilege/ime
181 virtual void HideInputPanel(void) = 0;
184 * Called when an associated text input UI control checks whether the enter key action is enabled or not.
188 * @privilege %http://tizen.org/privilege/ime
190 * @return The state of the enter key action
192 virtual bool IsEnterKeyActionEnabled(void)
198 * Called when an associated text input UI control requests the input panel to show itself.
202 * @privilege %http://tizen.org/privilege/ime
204 virtual void ShowInputPanel(void) = 0;
208 // This method is for internal use only. Using this method can cause behavioral, security-related,
209 // and consistency-related issues in the application.
211 // This method is reserved and may change its name at any time without prior notice.
215 virtual void IInputMethodProviderF_Reserved1(void) {}
218 // This method is for internal use only. Using this method can cause behavioral, security-related,
219 // and consistency-related issues in the application.
221 // This method is reserved and may change its name at any time without prior notice.
225 virtual void IInputMethodProviderF_Reserved2(void) {}
228 // This method is for internal use only. Using this method can cause behavioral, security-related,
229 // and consistency-related issues in the application.
231 // This method is reserved and may change its name at any time without prior notice.
235 virtual void IInputMethodProviderF_Reserved3(void) {}
238 // This method is for internal use only. Using this method can cause behavioral, security-related,
239 // and consistency-related issues in the application.
241 // This method is reserved and may change its name at any time without prior notice.
245 virtual void IInputMethodProviderF_Reserved4(void) {}
248 // This method is for internal use only. Using this method can cause behavioral, security-related,
249 // and consistency-related issues in the application.
251 // This method is reserved and may change its name at any time without prior notice.
255 virtual void IInputMethodProviderF_Reserved5(void) {}
258 }}} // Tizen::Ui::Ime
260 #endif // _FUI_IME_IINPUT_METHOD_PROVIDER_F_H_