2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 * @file FUiIKeypadEventListener.h
19 * @brief This is the header file for the %IKeypadEventListener interface.
21 * This header file contains the declarations of the %IKeypadEventListener interface.
23 #ifndef _FUI_IKEYPAD_EVENT_LISTENER_H_
24 #define _FUI_IKEYPAD_EVENT_LISTENER_H_
27 #include <FBaseRtIEventListener.h>
28 #include <FUiCtrlEditTypes.h>
30 namespace Tizen { namespace Graphics
35 // Namespace declaration
36 namespace Tizen { namespace Ui
44 * Defines the possible keypad action types.
50 KEYPAD_ACTION_ENTER, /**< The Enter key */
51 KEYPAD_ACTION_GO, /**< The Go key */
52 KEYPAD_ACTION_NEXT, /**< The Next key */
53 KEYPAD_ACTION_SEND, /**< The Send key */
54 KEYPAD_ACTION_SEARCH, /**< The Search key */
55 KEYPAD_ACTION_LOGIN, /**< The Login key */
56 KEYPAD_ACTION_SIGN_IN, /**< The Sign-In key */
57 KEYPAD_ACTION_JOIN, /**< The Join key */
58 KEYPAD_ACTION_DONE /**< The Done key */
62 * @interface IKeypadEventListener
63 * @brief This interface implements the listener for the keypad events.
67 * The %IKeypadEventListener interface is the listener interface for receiving software keypad events.
68 * The class that processes a software keypad event implements this interface, and the instance created with that class is
69 * registered with a UI control, using the control's AddKeypadEventListener() method. When the software keypad event occurs, a
70 * method of that instance is invoked.
72 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_editfield_editarea.htm">EditArea and EditField</a>, <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_searchbar.htm">SearchBar</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>.
75 class _OSP_EXPORT_ IKeypadEventListener
76 : public Tizen::Base::Runtime::IEventListener
81 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
85 virtual ~IKeypadEventListener(void) {}
91 * Called when the keypad is about to be shown on the screen.
95 * @param[in] source The source of the event
96 * @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken
97 * up by the software keypad.
98 * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
100 virtual void OnKeypadWillOpen(Tizen::Ui::Control& source) = 0;
103 * Called when the keypad is shown on the screen.
107 * @param[in] source The source of the event
108 * @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken
109 * up by the software keypad.
110 * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
112 virtual void OnKeypadOpened(Tizen::Ui::Control& source) = 0;
115 * Called when the keypad is hidden from the screen.
119 * @param[in] source The source of the event
120 * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
122 virtual void OnKeypadClosed(Tizen::Ui::Control& source) = 0;
125 * Called when the keypad action button is pressed.
129 * @param[in] source The source of the event
130 * @param[in] keypadAction The keypad action
133 virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction) = 0;
136 * Called when the keypad bounds are changed, for instance when the predictive text window which is located in the upper side of the keypad is shown.
140 * @param[in] source The source of the event
141 * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
143 virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source) {};
148 // This method is for internal use only. Using this method can cause behavioral,
149 // security-related, and consistency-related issues in the application.
151 // This method is reserved and may change its name at any time without prior notice.
153 virtual void IKeypadEventListener_Reserved1(void) { }
156 // This method is for internal use only. Using this method can cause behavioral,
157 // security-related, and consistency-related issues in the application.
159 // This method is reserved and may change its name at any time without prior notice.
161 virtual void IKeypadEventListener_Reserved2(void) { }
164 // This method is for internal use only. Using this method can cause behavioral,
165 // security-related, and consistency-related issues in the application.
167 // This method is reserved and may change its name at any time without prior notice.
169 virtual void IKeypadEventListener_Reserved3(void) { }
172 // This method is for internal use only. Using this method can cause behavioral,
173 // security-related, and consistency-related issues in the application.
175 // This method is reserved and may change its name at any time without prior notice.
177 virtual void IKeypadEventListener_Reserved4(void) { }
178 }; // IKeypadEventListener
181 #endif // _FUI_IKEYPAD_EVENT_LISTENER_H_