Mouse and wheel events are supported in web engine.
Change-Id: I52b240ee8fe83fc17f5d2ec28bcb45e74832c693
class WebEngineContext;
class WebEngineCookieManager;
class WebEngineSettings;
+class HoverEvent;
+class WheelEvent;
/**
* @brief WebEnginePlugin is an abstract interface, used by dali-adaptor to access WebEngine plugin.
virtual bool SendKeyEvent(const KeyEvent& event) = 0;
/**
+ * @brief Support mouse events or not.
+ * @param[in] enabled True if enabled, false othewise.
+ */
+ virtual void EnableMouseEvents( bool enabled ) = 0;
+
+ /**
+ * @brief Support key events or not.
+ * @param[in] enabled True if enabled, false othewise.
+ */
+ virtual void EnableKeyEvents( bool enabled ) = 0;
+
+ /**
* @brief Sets focus.
+ * @param[in] focused True if focus is gained, false lost.
*/
virtual void SetFocus(bool focused) = 0;
virtual void EnableVideoHole(bool enabled) = 0;
/**
+ * @brief Sends Hover Events.
+ * @param[in] event The hover event would be sent.
+ */
+ virtual bool SendHoverEvent( const HoverEvent& event ) = 0;
+
+ /**
+ * @brief Sends Wheel Events.
+ * @param[in] event The wheel event would be sent.
+ */
+ virtual bool SendWheelEvent( const WheelEvent& event ) = 0;
+
+ /**
* @brief Connects to this signal to be notified when page loading is started.
*
* @return A signal object to connect with.
return GetImplementation(*this).SendKeyEvent(event);
}
+bool WebEngine::SendHoverEvent( const HoverEvent& event )
+{
+ return GetImplementation( *this ).SendHoverEvent( event );
+}
+
+bool WebEngine::SendWheelEvent( const WheelEvent& event )
+{
+ return GetImplementation( *this ).SendWheelEvent( event );
+}
+
void WebEngine::SetFocus(bool focused)
{
GetImplementation(*this).SetFocus(focused);
GetImplementation(*this).UpdateDisplayArea(displayArea);
}
+void WebEngine::EnableMouseEvents(bool enabled)
+{
+ GetImplementation(*this).EnableMouseEvents(enabled);
+}
+
+void WebEngine::EnableKeyEvents(bool enabled)
+{
+ GetImplementation(*this).EnableKeyEvents(enabled);
+}
+
void WebEngine::EnableVideoHole(bool enabled)
{
GetImplementation(*this).EnableVideoHole(enabled);
void SetFocus(bool focused);
/**
+ * @brief Enables/disables mouse events. The default is enabled.
+ *
+ * @param[in] enabled True if mouse events are enabled, false otherwise
+ */
+ void EnableMouseEvents( bool enabled );
+
+ /**
+ * @brief Enables/disables key events. The default is enabled.
+ *
+ * @param[in] enabled True if key events are enabled, false otherwise
+ */
+ void EnableKeyEvents( bool enabled );
+
+ /**
* @brief Update display area.
* @param[in] displayArea The area to display web page.
*/
void EnableVideoHole(bool enabled);
/**
+ * @brief Sends hover events.
+ * @param[in] event The hover event would be sent.
+ */
+ bool SendHoverEvent( const HoverEvent& event );
+
+ /**
+ * @brief Sends wheel events.
+ * @param[in] event The wheel event would be sent.
+ */
+ bool SendWheelEvent( const WheelEvent& event );
+
+ /**
* @brief Connects to this signal to be notified when page loading is started.
*
* @return A signal object to connect with.
mPlugin->SetSize(width, height);
}
+void WebEngine::EnableMouseEvents(bool enabled)
+{
+ mPlugin->EnableMouseEvents(enabled);
+}
+
+void WebEngine::EnableKeyEvents(bool enabled)
+{
+ mPlugin->EnableKeyEvents(enabled);
+}
+
bool WebEngine::SendTouchEvent(const Dali::TouchEvent& touch)
{
return mPlugin->SendTouchEvent(touch);
mPlugin->EnableVideoHole(enabled);
}
+bool WebEngine::SendHoverEvent( const Dali::HoverEvent& event )
+{
+ return mPlugin->SendHoverEvent( event );
+}
+
+bool WebEngine::SendWheelEvent( const Dali::WheelEvent& event )
+{
+ return mPlugin->SendWheelEvent( event );
+}
+
Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
{
return mPlugin->PageLoadStartedSignal();
void SetSize(int width, int height);
/**
+ * @copydoc Dali::WebEngine::EnableMouseEvents()
+ */
+ void EnableMouseEvents( bool enabled );
+
+ /**
+ * @copydoc Dali::WebEngine::EnableKeyEvents()
+ */
+ void EnableKeyEvents( bool enabled );
+
+ /**
* @copydoc Dali::WebEngine::SendTouchEvent()
*/
bool SendTouchEvent(const Dali::TouchEvent& touch);
void EnableVideoHole(bool enabled);
/**
+ * @copydoc Dali::WebEngine::SendHoverEvent()
+ */
+ bool SendHoverEvent( const Dali::HoverEvent& event );
+
+ /**
+ * @copydoc Dali::WebEngine::SendWheelEvent()
+ */
+ bool SendWheelEvent( const Dali::WheelEvent& event );
+
+ /**
* @copydoc Dali::WebEngine::PageLoadStartedSignal()
*/
Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal();