Tizen 2.0 Release
[framework/osp/web.git] / inc / FWebCtrlIWebUiEventListener.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                FWebCtrlIWebUiEventListener.h
20  * @brief               This is the header file for the %IWebUiEventListener interface.
21  *
22  * This header file contains the declarations of the %IWebUiEventListener interface.
23  */
24 #ifndef _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_
25 #define _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_
26
27 #include <FBaseRtIEventListener.h>
28 #include <FWebCtrlWeb.h>
29 #include <FGrpPoint.h>
30
31 namespace Tizen { namespace Web { namespace Controls
32 {
33
34 /**
35  * @interface   IWebUiEventListener
36  * @brief               This interface is used for receiving user interface (UI) related events caused by the layout changes of a control.
37  *
38  * @since               2.0
39  *
40  * The %IWebUiEventListener interface is used for receiving user interface (UI) related events caused by the layout changes of a control.
41  * The browser engine requests a screen update through this interface when the layout of a page is changed.
42  */
43 class _OSP_EXPORT_ IWebUiEventListener
44         : public virtual Tizen::Base::Runtime::IEventListener
45 {
46 public:
47         /**
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.
49          *
50          * @since       2.0
51          */
52         virtual ~IWebUiEventListener(void) {}
53
54         /**
55          * Called when the layout of a page is updated. @n
56          * The application must call Control::Show() if the screen needs to be updated.
57          *
58          * @since                               2.0
59          *
60          * @param[in]           source                          The source of the event
61          */
62         virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source) = 0;
63
64
65         /**
66          * Called when a request for creating a new window is received. @n
67          * The returned Web control instance must be constructed by using a child window's Construct() method.
68          *
69          * @since                               2.0
70          *
71          * @return                      A pointer to the new WebWindow instance
72          */
73         virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void) = 0;
74
75
76         /**
77          * Called when a request for closing the window is received. @n
78          * This event is called from the parent window's listener that invoked the child window. @n
79          * The application must free the resource allocated for the Web Control.
80          *
81          * @since                        2.0
82          *
83          * @param[in]        source             The source of the closing event
84          */
85         virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) = 0;
86
87         /**
88          * Called when the selected block of a page is updated.
89          *
90          * @since                    2.0
91          *
92          * @param[in]              source             The source of the event
93          * @param[in]           startPoint              The starting point of the selected block
94          * @param[in]           endPoint                The ending point of the selected block
95          */
96         virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint) = 0;
97
98
99 protected:
100         //
101         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
102         //
103         // Gets the Impl instance.
104         //
105         // @since               2.0
106         //
107         virtual void IWebUiEventListener_Reserved1(void) {};
108
109         //
110         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
111         //
112         // Gets the Impl instance.
113         //
114         // @since               2.0
115         //
116         virtual void IWebUiEventListener_Reserved2(void) {};
117
118         //
119         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
120         //
121         // Gets the Impl instance.
122         //
123         // @since               2.0
124         //
125         virtual void IWebUiEventListener_Reserved3(void) {};
126
127         //
128         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
129         //
130         // Gets the Impl instance.
131         //
132         // @since               2.0
133         //
134         virtual void IWebUiEventListener_Reserved4(void) {};
135
136         //
137         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
138         //
139         // Gets the Impl instance.
140         //
141         // @since               2.0
142         //
143         virtual void IWebUiEventListener_Reserved5(void) {};
144 }; // IWebUiEventListener
145
146 }}} // Tizen::Web::Controls
147 #endif // _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_