3dd03efff98eeaad091147bf431db40712b27bdb
[framework/osp/web.git] / inc / FWebCtrlIWebUiEventListenerF.h
1 //\r
2 // Open Service Platform\r
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Apache License, Version 2.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 /**\r
19 * @file            FWebCtrlIWebUiEventListenerF.h\r
20 * @brief                     This is the header file for the %IWebUiEventListenerF interface.\r
21 *\r
22 * This header file contains the declarations of the %IWebUiEventListenerF interface.\r
23 */\r
24 #ifndef _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_F_H_\r
25 #define _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_F_H_\r
26 \r
27 #include <FBaseRtIEventListener.h>\r
28 #include <FWebCtrlWeb.h>\r
29 #include <FGrpPoint.h>\r
30 \r
31 namespace Tizen { namespace Web { namespace Controls\r
32 {\r
33 \r
34 /**\r
35 * @interface    IWebUiEventListenerF\r
36 * @brief                This interface is used for receiving user interface (UI) related events caused by the layout changes of a control.\r
37 *\r
38 * @since                2.1\r
39 *\r
40 * The %IWebUiEventListenerF interface is used for receiving user interface (UI) related events caused by the layout changes of a control.\r
41 * The browser engine requests a screen update through this interface when the layout of a page is changed.\r
42 */\r
43 class _OSP_EXPORT_ IWebUiEventListenerF\r
44            : public virtual Tizen::Base::Runtime::IEventListener\r
45 {\r
46 public:\r
47         /**\r
48          * 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.\r
49          *\r
50          * @since               2.1\r
51          */\r
52         virtual ~IWebUiEventListenerF (void) {}\r
53 \r
54         /**\r
55          * Called when the layout of a page is updated. @n\r
56          * The application must call Tizen::Ui::Control::Show() if the screen needs to be updated.\r
57          *\r
58          * @since               2.1\r
59          *\r
60          * @param[in]   source          The source of the event\r
61          */\r
62         virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source) = 0;\r
63 \r
64         /**\r
65          * Called when a request for creating a new window is received. @n\r
66          * The returned %Web control instance must be constructed by using a child window's Construct() method.\r
67          *\r
68          * @since               2.1\r
69          *\r
70          * @return              A pointer to the new WebWindow instance\r
71          */\r
72         virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void) = 0;\r
73 \r
74         /**\r
75          * Called when a request for closing the window is received. @n\r
76          * This event is called from the parent window's listener that invoked the child window. @n\r
77          * The application must free the resource allocated for the %Web control.\r
78          *\r
79          * @since               2.1\r
80          *\r
81          * @param[in]   source          The source of the closing event\r
82          */\r
83         virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) = 0;\r
84 \r
85         /**\r
86          * Called when the selected block of a page is updated.\r
87          *\r
88          * @since               2.1\r
89          *\r
90          * @param[in]   source          The source of the event\r
91          * @param[in]   startPoint              The starting point of the selected block\r
92          * @param[in]   endPoint                The ending point of the selected block\r
93          */\r
94         virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::FloatPoint& startPoint, Tizen::Graphics::FloatPoint& endPoint) = 0;\r
95 \r
96         /**\r
97          * Called just after the touch move event to determine whether the preventDefault() method is triggered or not. @n\r
98          * The application that wants to support W3C preventDefault() feature is recommended to use this callback and delay to handle the touch move event until this callback is received.\r
99          *\r
100          * @since               2.1\r
101          *\r
102          * @param[in]   source          The source of the event\r
103          * @param[in]   trigger         Set to @c true if the preventDefault() method is triggered, @n\r
104          *                                              else @c false\r
105          * @remarks                             This callback is always called just after the touch move event and returns @c true when preventDefault() is triggered on the touch start or touch move event.\r
106          */\r
107         virtual void OnWebPreventDefaultTriggered(Tizen::Web::Controls::Web& source, bool trigger) {};\r
108 \r
109 protected:\r
110         //\r
111         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.\r
112         //\r
113         // Gets the Impl instance.\r
114         //\r
115         // @since               2.1\r
116         //\r
117         virtual void IWebUiEventListenerF_Reserved1(void) {};\r
118 \r
119         //\r
120         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.\r
121         //\r
122         // Gets the Impl instance.\r
123         //\r
124         // @since               2.1\r
125         //\r
126         virtual void IWebUiEventListenerF_Reserved2(void) {};\r
127 \r
128         //\r
129         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.\r
130         //\r
131         // Gets the Impl instance.\r
132         //\r
133         // @since               2.1\r
134         //\r
135         virtual void IWebUiEventListenerF_Reserved3(void) {};\r
136 \r
137         //\r
138         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.\r
139         //\r
140         // Gets the Impl instance.\r
141         //\r
142         // @since               2.1\r
143         //\r
144         virtual void IWebUiEventListenerF_Reserved4(void) {};\r
145 }; // IWebUiEventListenerF\r
146 \r
147 }}} // Tizen::Web::Controls\r
148 #endif // _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_F_H_\r