02f9ad61c3af6db80ef63e06114d02f6061922ed
[framework/osp/web.git] / inc / FWebCtrlIWebKeypadEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 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                FWebCtrlIWebKeypadEventListener.h
20  * @brief               This is the header file for the %IWebKeypadEventListener interface.
21  *
22  * This header file contains the declarations of the %IWebKeypadEventListener interface.
23  */
24 #ifndef _FWEB_CTRL_IWEB_KEYPAD_EVENT_LISTENER_H_
25 #define _FWEB_CTRL_IWEB_KEYPAD_EVENT_LISTENER_H_
26
27 #include <FBaseRtIEventListener.h>
28
29 namespace Tizen { namespace Web { namespace Controls
30 {
31 class Web;
32 }}} // Tizen::Web::Controls
33
34 namespace Tizen { namespace Web { namespace Controls
35 {
36
37 /**
38  * @interface   IWebKeypadEventListener
39  * @brief               This interface provides a listener for keypad events invoked by the <textarea> or <input> tag, which has "text" or "password" value as its attribute.
40  *
41  * @since               2.0
42  *
43  * The %IWebKeypadEventListener interface provides a listener for keypad events invoked by the <textarea> or <input> tag, which has "text" or "password" value as its attribute.
44  * It also enables the implementer class to receive the overlay keypad related events.
45  */
46 class _OSP_EXPORT_ IWebKeypadEventListener
47         : public virtual Tizen::Base::Runtime::IEventListener
48 {
49 public:
50         /**
51          * 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.
52          *
53          * @since               2.0
54          */
55         virtual ~IWebKeypadEventListener(void) {}
56
57         /**
58          * Called when the keypad is about to be shown on the screen.
59          *
60          * @since               2.0
61          *
62          * @param[in]   source                  The source of the event
63          * @remarks             When the overlay keypad appears on the screen, the current Form's
64          *                      area is adjusted to account for the space that is taken up by the overlay keypad.
65          * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
66          */
67         virtual void OnWebKeypadWillOpen(Tizen::Web::Controls::Web& source) = 0;
68
69         /**
70          * Called when the keypad is shown on the screen.
71          *
72          * @since               2.0
73          *
74          * @param[in]   source                  The source of the event
75          * @remarks             When the overlay keypad appears on the screen, the current Form's
76          *                      area is adjusted to account for the space that is taken up by the overlay keypad.
77          * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
78          */
79         virtual void OnWebKeypadOpened(Tizen::Web::Controls::Web& source) = 0;
80
81         /**
82          * Called when the keypad is hidden from the screen.
83          *
84          * @since               2.0
85          *
86          * @param[in]   source                  The source of the event
87          * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
88          */
89         virtual void OnWebKeypadClosed(Tizen::Web::Controls::Web& source) = 0;
90
91         /**
92          * 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.
93          *
94          * @since               2.0
95          *
96          * @param[in]   source                  The source of the event
97          * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
98          */
99         virtual void OnWebKeypadBoundsChanged(Tizen::Web::Controls::Web& source) {};
100
101 protected:
102         //
103         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
104         //
105         // Gets the Impl instance.
106         //
107         // @since               2.0
108         //
109         virtual void IWebKeypadEventListener_Reserved1(void) {}
110
111         //
112         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
113         //
114         // Gets the Impl instance.
115         //
116         // @since               2.0
117         //
118         virtual void IWebKeypadEventListener_Reserved2(void) {}
119
120         //
121         // This method is for internal use only.
122         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
123         //
124         // @since               2.0
125         //
126         virtual void IWebKeypadEventListener_Reserved3(void) {}
127
128         //
129         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
130         //
131         // Gets the Impl instance.
132         //
133         // @since               2.0
134         //
135         virtual void IWebKeypadEventListener_Reserved4(void) {}
136
137         //
138         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
139         //
140         // Gets the Impl instance.
141         //
142         // @since               2.0
143         //
144         virtual void IWebKeypadEventListener_Reserved5(void) {}
145 }; // IWebKeypadEventListener
146
147 }}} // Tizen::Web::Controls
148 #endif // _FWEB_CTRL_IWEB_KEYPAD_EVENT_LISTENER_H_