X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fweb-engine.cpp;h=c7edd4c5b914330f26e7e83d7a1dedb893126638;hb=93f89efc39d006b4e6c6480e85a7c11057c5ef64;hp=69c2b791615eca696964ce059bf034698fddf3ed;hpb=2752db422653b6b949bd7ccf0cb1c5d12325defe;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine.cpp index 69c2b79..c7edd4c 100755 --- a/dali/devel-api/adaptor-framework/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,25 @@ * */ -// CLASS HEADER +// CLASSHEADER #include // INTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +// EXTERNAL INCLUDES +#include + namespace Dali { WebEngine::WebEngine() @@ -67,6 +80,11 @@ void WebEngine::Create(int width, int height, const std::string& locale, const s GetImplementation(*this).Create(width, height, locale, timezoneId); } +void WebEngine::Create(int width, int height, int argc, char** argv) +{ + GetImplementation(*this).Create(width, height, argc, argv); +} + void WebEngine::Destroy() { GetImplementation(*this).Destroy(); @@ -77,19 +95,59 @@ NativeImageInterfacePtr WebEngine::GetNativeImageSource() return GetImplementation(*this).GetNativeImageSource(); } +Dali::WebEngineSettings& WebEngine::GetSettings() const +{ + return GetImplementation(*this).GetSettings(); +} + +Dali::WebEngineContext& WebEngine::GetContext() const +{ + return GetImplementation(*this).GetContext(); +} + +Dali::WebEngineCookieManager& WebEngine::GetCookieManager() const +{ + return GetImplementation(*this).GetCookieManager(); +} + +Dali::WebEngineBackForwardList& WebEngine::GetBackForwardList() const +{ + return GetImplementation(*this).GetBackForwardList(); +} + void WebEngine::LoadUrl(const std::string& url) { return GetImplementation(*this).LoadUrl(url); } +std::string WebEngine::GetTitle() const +{ + return GetImplementation(*this).GetTitle(); +} + +Dali::PixelData WebEngine::GetFavicon() const +{ + return GetImplementation(*this).GetFavicon(); +} + const std::string& WebEngine::GetUrl() { return GetImplementation(*this).GetUrl(); } -void WebEngine::LoadHTMLString(const std::string& htmlString) +void WebEngine::LoadHtmlString(const std::string& htmlString) { - GetImplementation(*this).LoadHTMLString(htmlString); + GetImplementation(*this).LoadHtmlString(htmlString); +} + +bool WebEngine::LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl) +{ + return GetImplementation(*this).LoadHtmlStringOverrideCurrentEntry(html, basicUri, unreachableUrl); +} + +bool WebEngine::LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) +{ + return GetImplementation(*this).LoadContents(contents, contentSize, mimeType, encoding, baseUri); } void WebEngine::Reload() @@ -97,6 +155,11 @@ void WebEngine::Reload() GetImplementation(*this).Reload(); } +bool WebEngine::ReloadWithoutCache() +{ + return GetImplementation(*this).ReloadWithoutCache(); +} + void WebEngine::StopLoading() { GetImplementation(*this).StopLoading(); @@ -112,6 +175,66 @@ void WebEngine::Resume() GetImplementation(*this).Resume(); } +void WebEngine::SuspendNetworkLoading() +{ + GetImplementation(*this).SuspendNetworkLoading(); +} + +void WebEngine::ResumeNetworkLoading() +{ + GetImplementation(*this).ResumeNetworkLoading(); +} + +bool WebEngine::AddCustomHeader(const std::string& name, const std::string& value) +{ + return GetImplementation(*this).AddCustomHeader(name, value); +} + +bool WebEngine::RemoveCustomHeader(const std::string& name) +{ + return GetImplementation(*this).RemoveCustomHeader(name); +} + +uint32_t WebEngine::StartInspectorServer(uint32_t port) +{ + return GetImplementation(*this).StartInspectorServer(port); +} + +bool WebEngine::StopInspectorServer() +{ + return GetImplementation(*this).StopInspectorServer(); +} + +void WebEngine::ScrollBy(int deltaX, int deltaY) +{ + GetImplementation(*this).ScrollBy(deltaX, deltaY); +} + +bool WebEngine::ScrollEdgeBy(int deltaX, int deltaY) +{ + return GetImplementation(*this).ScrollEdgeBy(deltaX, deltaY); +} + +void WebEngine::SetScrollPosition(int x, int y) +{ + GetImplementation(*this).SetScrollPosition(x, y); +} + +Dali::Vector2 WebEngine::GetScrollPosition() const +{ + return GetImplementation(*this).GetScrollPosition(); +} + +Dali::Vector2 WebEngine::GetScrollSize() const +{ + return GetImplementation(*this).GetScrollSize(); +} + +Dali::Vector2 WebEngine::GetContentSize() const +{ + return GetImplementation(*this).GetContentSize(); +} + bool WebEngine::CanGoForward() { return GetImplementation(*this).CanGoForward(); @@ -142,39 +265,44 @@ void WebEngine::AddJavaScriptMessageHandler(const std::string& exposedObjectName GetImplementation(*this).AddJavaScriptMessageHandler(exposedObjectName, handler); } -void WebEngine::ClearHistory() +void WebEngine::RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptAlertCallback callback) { - return GetImplementation(*this).ClearHistory(); + GetImplementation(*this).RegisterJavaScriptAlertCallback(callback); } -void WebEngine::ClearCache() +void WebEngine::JavaScriptAlertReply() { - return GetImplementation(*this).ClearCache(); + GetImplementation(*this).JavaScriptAlertReply(); } -void WebEngine::ClearCookies() +void WebEngine::RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScriptConfirmCallback callback) { - return GetImplementation(*this).ClearCookies(); + GetImplementation(*this).RegisterJavaScriptConfirmCallback(callback); } -Dali::WebEnginePlugin::CacheModel WebEngine::GetCacheModel() const +void WebEngine::JavaScriptConfirmReply(bool confirmed) { - return GetImplementation(*this).GetCacheModel(); + GetImplementation(*this).JavaScriptConfirmReply(confirmed); } -void WebEngine::SetCacheModel(Dali::WebEnginePlugin::CacheModel cacheModel) +void WebEngine::RegisterJavaScriptPromptCallback(Dali::WebEnginePlugin::JavaScriptPromptCallback callback) { - GetImplementation(*this).SetCacheModel(cacheModel); + GetImplementation(*this).RegisterJavaScriptPromptCallback(callback); } -Dali::WebEnginePlugin::CookieAcceptPolicy WebEngine::GetCookieAcceptPolicy() const +void WebEngine::JavaScriptPromptReply(const std::string& result) { - return GetImplementation(*this).GetCookieAcceptPolicy(); + GetImplementation(*this).JavaScriptPromptReply(result); } -void WebEngine::SetCookieAcceptPolicy(Dali::WebEnginePlugin::CookieAcceptPolicy policy) +void WebEngine::ClearHistory() { - GetImplementation(*this).SetCookieAcceptPolicy(policy); + GetImplementation(*this).ClearHistory(); +} + +void WebEngine::ClearAllTilesResources() +{ + GetImplementation(*this).ClearAllTilesResources(); } const std::string& WebEngine::GetUserAgent() const @@ -187,64 +315,154 @@ void WebEngine::SetUserAgent(const std::string& userAgent) GetImplementation(*this).SetUserAgent(userAgent); } -bool WebEngine::IsJavaScriptEnabled() const +void WebEngine::SetSize(int width, int height) { - return GetImplementation(*this).IsJavaScriptEnabled(); + GetImplementation(*this).SetSize(width, height); } -void WebEngine::EnableJavaScript(bool enabled) +void WebEngine::SetDocumentBackgroundColor(Dali::Vector4 color) { - GetImplementation(*this).EnableJavaScript(enabled); + GetImplementation(*this).SetDocumentBackgroundColor(color); } -bool WebEngine::AreImagesAutomaticallyLoaded() const +void WebEngine::ClearTilesWhenHidden(bool cleared) { - return GetImplementation(*this).AreImagesAutomaticallyLoaded(); + GetImplementation(*this).ClearTilesWhenHidden(cleared); } -void WebEngine::LoadImagesAutomatically(bool automatic) +void WebEngine::SetTileCoverAreaMultiplier(float multiplier) { - GetImplementation(*this).LoadImagesAutomatically(automatic); + GetImplementation(*this).SetTileCoverAreaMultiplier(multiplier); } -const std::string& WebEngine::GetDefaultTextEncodingName() const +void WebEngine::EnableCursorByClient(bool enabled) { - return GetImplementation(*this).GetDefaultTextEncodingName(); + GetImplementation(*this).EnableCursorByClient(enabled); } -void WebEngine::SetDefaultTextEncodingName(const std::string& defaultTextEncodingName) +std::string WebEngine::GetSelectedText() const { - GetImplementation(*this).SetDefaultTextEncodingName(defaultTextEncodingName); + return GetImplementation(*this).GetSelectedText(); } -int WebEngine::GetDefaultFontSize() const +bool WebEngine::SendTouchEvent(const TouchEvent& touch) { - return GetImplementation(*this).GetDefaultFontSize(); + return GetImplementation(*this).SendTouchEvent(touch); } -void WebEngine::SetDefaultFontSize(int defaultFontSize) +bool WebEngine::SendKeyEvent(const KeyEvent& event) { - GetImplementation(*this).SetDefaultFontSize(defaultFontSize); + return GetImplementation(*this).SendKeyEvent(event); } -void WebEngine::SetSize(int width, int height) +bool WebEngine::SendHoverEvent( const HoverEvent& event ) { - return GetImplementation(*this).SetSize(width, height); + return GetImplementation( *this ).SendHoverEvent( event ); } -bool WebEngine::SendTouchEvent(const TouchEvent& touch) +bool WebEngine::SendWheelEvent( const WheelEvent& event ) { - return GetImplementation(*this).SendTouchEvent(touch); + return GetImplementation( *this ).SendWheelEvent( event ); } -bool WebEngine::SendKeyEvent(const KeyEvent& event) +void WebEngine::SetFocus(bool focused) { - return GetImplementation(*this).SendKeyEvent(event); + GetImplementation(*this).SetFocus(focused); +} + +void WebEngine::SetPageZoomFactor(float zoomFactor) +{ + GetImplementation(*this).SetPageZoomFactor(zoomFactor); } -void WebEngine::SetFocus( bool focused ) +float WebEngine::GetPageZoomFactor() const { - GetImplementation( *this ).SetFocus( focused ); + return GetImplementation(*this).GetPageZoomFactor(); +} + +void WebEngine::SetTextZoomFactor(float zoomFactor) +{ + GetImplementation(*this).SetTextZoomFactor(zoomFactor); +} + +float WebEngine::GetTextZoomFactor() const +{ + return GetImplementation(*this).GetTextZoomFactor(); +} + +float WebEngine::GetLoadProgressPercentage() const +{ + return GetImplementation(*this).GetLoadProgressPercentage(); +} + +void WebEngine::SetScaleFactor(float scaleFactor, Dali::Vector2 point) +{ + GetImplementation(*this).SetScaleFactor(scaleFactor, point); +} + +float WebEngine::GetScaleFactor() const +{ + return GetImplementation(*this).GetScaleFactor(); +} + +void WebEngine::ActivateAccessibility(bool activated) +{ + GetImplementation(*this).ActivateAccessibility(activated); +} + +bool WebEngine::SetVisibility(bool visible) +{ + return GetImplementation(*this).SetVisibility(visible); +} + +bool WebEngine::HighlightText(const std::string& text, Dali::WebEnginePlugin::FindOption options, uint32_t maxMatchCount) +{ + return GetImplementation(*this).HighlightText(text, options, maxMatchCount); +} + +void WebEngine::AddDynamicCertificatePath(const std::string& host, const std::string& certPath) +{ + GetImplementation(*this).AddDynamicCertificatePath(host, certPath); +} + +Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) +{ + return GetImplementation(*this).GetScreenshot(viewArea, scaleFactor); +} + +bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) +{ + return GetImplementation(*this).GetScreenshotAsynchronously(viewArea, scaleFactor, callback); +} + +bool WebEngine::CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback) +{ + return GetImplementation(*this).CheckVideoPlayingAsynchronously(callback); +} + +void WebEngine::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::GeolocationPermissionCallback callback) +{ + GetImplementation(*this).RegisterGeolocationPermissionCallback(callback); +} + +void WebEngine::UpdateDisplayArea(Dali::Rect displayArea) +{ + 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); } Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal() @@ -252,6 +470,11 @@ Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSi return GetImplementation(*this).PageLoadStartedSignal(); } +Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadInProgressSignal() +{ + return GetImplementation(*this).PageLoadInProgressSignal(); +} + Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadFinishedSignal() { return GetImplementation(*this).PageLoadFinishedSignal(); @@ -262,4 +485,54 @@ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErro return GetImplementation(*this).PageLoadErrorSignal(); } +Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal() +{ + return GetImplementation(*this).ScrollEdgeReachedSignal(); +} + +Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& WebEngine::UrlChangedSignal() +{ + return GetImplementation(*this).UrlChangedSignal(); +} + +Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& WebEngine::FormRepostDecisionSignal() +{ + return GetImplementation(*this).FormRepostDecisionSignal(); +} + +Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal() +{ + return GetImplementation(*this).FrameRenderedSignal(); +} + +Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& WebEngine::RequestInterceptorSignal() +{ + return GetImplementation(*this).RequestInterceptorSignal(); +} + +Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& WebEngine::ConsoleMessageSignal() +{ + return GetImplementation(*this).ConsoleMessageSignal(); +} + +Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& WebEngine::PolicyDecisionSignal() +{ + return GetImplementation(*this).PolicyDecisionSignal(); +} + +Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::CertificateConfirmSignal() +{ + return GetImplementation(*this).CertificateConfirmSignal(); +} + +Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::SslCertificateChangedSignal() +{ + return GetImplementation(*this).SslCertificateChangedSignal(); +} + +Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& WebEngine::HttpAuthHandlerSignal() +{ + return GetImplementation(*this).HttpAuthHandlerSignal(); +} + } // namespace Dali