Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IKeypadEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
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  * @file                FUiCtrl_IKeypadEventListener.h
19  * @brief               This is the header file for the _IKeypadEventListener interface.
20  *
21  * This header file contains the declarations of the _IKeypadEventListener interface.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_
24 #define _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_
25
26 // includes
27 #include <FBaseRtIEventListener.h>
28 #include <FUiCtrlEditTypes.h>
29
30 namespace Tizen { namespace Graphics
31 {
32 class Dimension;
33 }} // Tizen::Graphics
34
35 namespace Tizen { namespace Ui
36 {
37 class _Control;
38 }} // Tizen::Ui
39
40 // namespace declaration
41 namespace Tizen { namespace Ui { namespace Controls
42 {
43
44 enum CoreKeypadAction
45 {
46         CORE_KEYPAD_ACTION_ENTER,   /**< The enter key */
47         CORE_KEYPAD_ACTION_GO,      /**< The Go key */
48         CORE_KEYPAD_ACTION_NEXT,        /**< The Next key */
49         CORE_KEYPAD_ACTION_SEND,        /**< The Send key */
50         CORE_KEYPAD_ACTION_SEARCH,   /**< The Search key */
51         CORE_KEYPAD_ACTION_LOGIN,    /**< The Login key */
52         CORE_KEYPAD_ACTION_SIGN_IN,  /**< The Sign-In key */
53         CORE_KEYPAD_ACTION_JOIN,        /**< The Join key */
54         CORE_KEYPAD_ACTION_DONE     /**< The Done key */
55 };
56 /**
57  * @interface   _IKeypadEventListener
58  * @brief           This interface implements the listener for keypad events.
59  * @since           2.0
60  *
61  * The _IKeypadEventListener interface enables the implementer to receive the
62  * software keypad related events.
63  */
64 class _IKeypadEventListener
65         : virtual public Tizen::Base::Runtime::IEventListener
66 {
67 // Lifecycle
68 public:
69         /**
70          * This is the destructor for this class.
71          * @since       2.0
72          */
73         virtual ~_IKeypadEventListener(void) {}
74
75
76 // Operation
77 public:
78         /**
79          * Notifies that the keypad is about to be shown on the screen.
80          *
81          * @since               2.0
82          * @param[in]   source  The source of the event
83          * @remarks                     When the software keypad appears on screen, the current Form's
84          *              client area is adjusted to account for the space that is taken
85          *              up by the software keypad.
86          * @see       Tizen::Ui::Controls::Form::GetClientAreaBounds()
87          */
88         virtual void OnKeypadWillOpen(void) = 0;
89
90         /**
91          * Notifies that the keypad is shown on the screen.
92          *
93          * @since               2.0
94          * @param[in]   source  The source of the event
95          * @remarks                     When the software keypad appears on screen, the current Form's
96          *              client area is adjusted to account for the space that is taken
97          *              up by the software keypad.
98          * @see       Tizen::Ui::Controls::Form::GetClientAreaBounds()
99          */
100         virtual void OnKeypadOpened(void) = 0;
101
102         /**
103          * Notifies that the keypad is hidden from the screen.
104          *
105          * @since               2.0
106          * @param[in]   source  The source of the event
107          * @see         Tizen::Ui::Controls::Form::GetClientAreaBounds()
108          */
109         virtual void OnKeypadClosed(void) = 0;
110
111         /**
112          * Notifies that  the keypad bounds is changed, for instance when the predictive text@n
113          * which is located in the upper side of the keypad is shown.
114          *
115          * @since 2.0
116          *
117          * @param[in]   source          The source of the event
118          * @see                 Tizen::Ui::Controls::Form::GetClientAreaBounds()
119          */
120         virtual void OnKeypadBoundsChanged(void) = 0;
121
122         /**
123          * Notifies that the keypad action button is pressed.
124          *
125          * @since             2.0
126          * @param[in]   source          The source of the event
127          * @param[in]   keypadAction    The keypad action
128          * @see         KeypadAction
129          */
130         virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction) = 0;
131 }; // _IKeypadEventListener
132
133 }}} // Tizen::Ui::Controls
134
135 #endif // _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_