2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FWebCtrlIWebUiEventListener.h
20 * @brief This is the header file for the %IWebUiEventListener interface.
22 * This header file contains the declarations of the %IWebUiEventListener interface.
24 #ifndef _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_
25 #define _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_
27 #include <FBaseRtIEventListener.h>
28 #include <FWebCtrlWeb.h>
29 #include <FGrpPoint.h>
31 namespace Tizen { namespace Web { namespace Controls
35 * @interface IWebUiEventListener
36 * @brief This interface is used for receiving user interface (UI) related events caused by the layout changes of a control.
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.
43 class _OSP_EXPORT_ IWebUiEventListener
44 : public virtual Tizen::Base::Runtime::IEventListener
48 * This polymorphic destructor should be overridden if required. @n
49 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
53 virtual ~IWebUiEventListener(void) {}
56 * Called when the layout of a page is updated. @n
57 * The application must call Tizen::Ui::Control::Show() if the screen needs to be updated.
61 * @param[in] source The source of the event
63 virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source) = 0;
67 * Called when a request for creating a new window is received. @n
68 * The returned %Web control instance must be constructed by using a child window's Construct() method.
72 * @return A pointer to the new WebWindow instance
74 virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void) = 0;
78 * Called when a request for closing the window is received. @n
79 * This event is called from the parent window's listener that invoked the child window. @n
80 * The application must free the resource allocated for the Web Control.
84 * @param[in] source The source of the closing event
86 virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) = 0;
89 * Called when the selected block of a page is updated.
93 * @param[in] source The source of the event
94 * @param[in] startPoint The starting point of the selected block
95 * @param[in] endPoint The ending point of the selected block
97 virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint) = 0;
100 * Called just after the touch move event to determine whether the preventDefault() method is triggered or not. @n
101 * The application that wants to support the W3C preventDefault() feature is recommended to use this callback and delay the handling of the touch move event until this callback is received.
105 * @param[in] source The source of the event
106 * @param[in] trigger Set to @c true if the preventDefault() method is triggered, @n
108 * @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.
110 virtual void OnWebPreventDefaultTriggered(Tizen::Web::Controls::Web& source, bool trigger) {};
114 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
116 // Gets the Impl instance.
120 virtual void IWebUiEventListener_Reserved1(void) {};
123 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
125 // Gets the Impl instance.
129 virtual void IWebUiEventListener_Reserved2(void) {};
132 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
134 // Gets the Impl instance.
138 virtual void IWebUiEventListener_Reserved3(void) {};
141 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
143 // Gets the Impl instance.
147 virtual void IWebUiEventListener_Reserved4(void) {};
148 }; // IWebUiEventListener
150 }}} // Tizen::Web::Controls
151 #endif // _FWEB_CTRL_IWEB_UI_EVENT_LISTENER_H_