/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
#include <dali/devel-api/adaptor-framework/web-engine.h>
// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context.h>
+#include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
+#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
#include <dali/internal/web-engine/common/web-engine-impl.h>
namespace Dali
{
-
WebEngine::WebEngine()
{
}
-WebEngine::WebEngine( Internal::Adaptor::WebEngine* internal )
-: BaseHandle( internal )
+WebEngine::WebEngine(Internal::Adaptor::WebEngine* internal)
+: BaseHandle(internal)
{
}
{
Internal::Adaptor::WebEnginePtr engine = Internal::Adaptor::WebEngine::New();
- return WebEngine( engine.Get() );
+ return WebEngine(engine.Get());
}
-WebEngine::WebEngine( const WebEngine& webEngine )
-: BaseHandle( webEngine )
+WebEngine::WebEngine(const WebEngine& webEngine)
+: BaseHandle(webEngine)
{
}
-WebEngine& WebEngine::operator=( const WebEngine& webEngine )
+WebEngine& WebEngine::operator=(const WebEngine& webEngine)
{
- if( *this != webEngine )
+ if(*this != webEngine)
{
- BaseHandle::operator=( webEngine );
+ BaseHandle::operator=(webEngine);
}
return *this;
}
-WebEngine WebEngine::DownCast( BaseHandle handle )
+WebEngine WebEngine::DownCast(BaseHandle handle)
{
- return WebEngine( dynamic_cast< Internal::Adaptor::WebEngine* >( handle.GetObjectPtr() ) );
+ return WebEngine(dynamic_cast<Internal::Adaptor::WebEngine*>(handle.GetObjectPtr()));
}
-void WebEngine::Create( int width, int height, const std::string& locale, const std::string& timezoneId )
+void WebEngine::Create(int width, int height, const std::string& locale, const std::string& timezoneId)
{
- GetImplementation( *this ).Create( width, height, locale, timezoneId );
+ GetImplementation(*this).Create(width, height, locale, timezoneId);
}
void WebEngine::Destroy()
{
- GetImplementation( *this ).Destroy();
+ GetImplementation(*this).Destroy();
}
NativeImageInterfacePtr WebEngine::GetNativeImageSource()
{
- return GetImplementation( *this ).GetNativeImageSource();
+ return GetImplementation(*this).GetNativeImageSource();
}
-void WebEngine::LoadUrl( const std::string& url )
-{
- return GetImplementation( *this ).LoadUrl( url );
-}
-
-const std::string& WebEngine::GetUrl()
+Dali::WebEngineSettings& WebEngine::GetSettings() const
{
- return GetImplementation( *this ).GetUrl();
+ return GetImplementation( *this ).GetSettings();
}
-void WebEngine::LoadHTMLString( const std::string& htmlString )
+Dali::WebEngineContext& WebEngine::GetContext() const
{
- GetImplementation( *this ).LoadHTMLString( htmlString );
+ return GetImplementation( *this ).GetContext();
}
-void WebEngine::Reload()
+Dali::WebEngineCookieManager& WebEngine::GetCookieManager() const
{
- GetImplementation( *this ).Reload();
+ return GetImplementation( *this ).GetCookieManager();
}
-void WebEngine::StopLoading()
+Dali::WebEngineBackForwardList& WebEngine::GetBackForwardList() const
{
- GetImplementation( *this ).StopLoading();
+ return GetImplementation( *this ).GetBackForwardList();
}
-void WebEngine::Suspend()
+void WebEngine::LoadUrl(const std::string& url)
{
- GetImplementation( *this ).Suspend();
+ return GetImplementation(*this).LoadUrl(url);
}
-void WebEngine::Resume()
-{
- GetImplementation( *this ).Resume();
-}
-
-bool WebEngine::CanGoForward()
-{
- return GetImplementation( *this ).CanGoForward();
-}
-
-void WebEngine::GoForward()
-{
- GetImplementation( *this ).GoForward();
-}
-
-bool WebEngine::CanGoBack()
+const std::string& WebEngine::GetUrl()
{
- return GetImplementation( *this ).CanGoBack();
+ return GetImplementation(*this).GetUrl();
}
-void WebEngine::GoBack()
+void WebEngine::LoadHtmlString(const std::string& htmlString)
{
- GetImplementation( *this ).GoBack();
+ GetImplementation(*this).LoadHtmlString(htmlString);
}
-void WebEngine::EvaluateJavaScript( const std::string& script, std::function< void( const std::string& ) > resultHandler )
+void WebEngine::Reload()
{
- GetImplementation( *this ).EvaluateJavaScript( script, resultHandler );
+ GetImplementation(*this).Reload();
}
-void WebEngine::AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void( const std::string& ) > handler )
+void WebEngine::StopLoading()
{
- GetImplementation( *this ).AddJavaScriptMessageHandler( exposedObjectName, handler );
+ GetImplementation(*this).StopLoading();
}
-void WebEngine::ClearHistory()
+void WebEngine::Suspend()
{
- return GetImplementation( *this ).ClearHistory();
+ GetImplementation(*this).Suspend();
}
-void WebEngine::ClearCache()
+void WebEngine::Resume()
{
- return GetImplementation( *this ).ClearCache();
+ GetImplementation(*this).Resume();
}
-void WebEngine::ClearCookies()
+void WebEngine::ScrollBy( int deltaX, int deltaY )
{
- return GetImplementation( *this ).ClearCookies();
+ GetImplementation( *this ).ScrollBy( deltaX, deltaY );
}
-Dali::WebEnginePlugin::CacheModel WebEngine::GetCacheModel() const
+void WebEngine::SetScrollPosition( int x, int y )
{
- return GetImplementation( *this ).GetCacheModel();
+ GetImplementation( *this ).SetScrollPosition( x, y );
}
-void WebEngine::SetCacheModel( Dali::WebEnginePlugin::CacheModel cacheModel )
+void WebEngine::GetScrollPosition( int& x, int& y ) const
{
- GetImplementation( *this ).SetCacheModel( cacheModel );
+ GetImplementation( *this ).GetScrollPosition( x, y );
}
-Dali::WebEnginePlugin::CookieAcceptPolicy WebEngine::GetCookieAcceptPolicy() const
+void WebEngine::GetScrollSize( int& width, int& height ) const
{
- return GetImplementation( *this ).GetCookieAcceptPolicy();
+ GetImplementation( *this ).GetScrollSize( width, height );
}
-void WebEngine::SetCookieAcceptPolicy( Dali::WebEnginePlugin::CookieAcceptPolicy policy )
+void WebEngine::GetContentSize( int& width, int& height ) const
{
- GetImplementation( *this ).SetCookieAcceptPolicy( policy );
+ GetImplementation( *this ).GetContentSize( width, height );
}
-const std::string& WebEngine::GetUserAgent() const
+bool WebEngine::CanGoForward()
{
- return GetImplementation( *this ).GetUserAgent();
+ return GetImplementation(*this).CanGoForward();
}
-void WebEngine::SetUserAgent( const std::string& userAgent )
+void WebEngine::GoForward()
{
- GetImplementation( *this ).SetUserAgent( userAgent );
+ GetImplementation(*this).GoForward();
}
-bool WebEngine::IsJavaScriptEnabled() const
+bool WebEngine::CanGoBack()
{
- return GetImplementation( *this ).IsJavaScriptEnabled();
+ return GetImplementation(*this).CanGoBack();
}
-void WebEngine::EnableJavaScript( bool enabled )
+void WebEngine::GoBack()
{
- GetImplementation( *this ).EnableJavaScript( enabled );
+ GetImplementation(*this).GoBack();
}
-bool WebEngine::AreImagesAutomaticallyLoaded() const
+void WebEngine::EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler)
{
- return GetImplementation( *this ).AreImagesAutomaticallyLoaded();
+ GetImplementation(*this).EvaluateJavaScript(script, resultHandler);
}
-void WebEngine::LoadImagesAutomatically( bool automatic )
+void WebEngine::AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler)
{
- GetImplementation( *this ).LoadImagesAutomatically( automatic );
+ GetImplementation(*this).AddJavaScriptMessageHandler(exposedObjectName, handler);
}
-const std::string& WebEngine::GetDefaultTextEncodingName() const
+void WebEngine::ClearHistory()
{
- return GetImplementation( *this ).GetDefaultTextEncodingName();
+ return GetImplementation(*this).ClearHistory();
}
-void WebEngine::SetDefaultTextEncodingName( const std::string& defaultTextEncodingName )
+const std::string& WebEngine::GetUserAgent() const
{
- GetImplementation( *this ).SetDefaultTextEncodingName( defaultTextEncodingName );
+ return GetImplementation(*this).GetUserAgent();
}
-int WebEngine::GetDefaultFontSize() const
+void WebEngine::SetUserAgent(const std::string& userAgent)
{
- return GetImplementation( *this ).GetDefaultFontSize();
+ GetImplementation(*this).SetUserAgent(userAgent);
}
-void WebEngine::SetDefaultFontSize( int defaultFontSize )
+void WebEngine::SetSize(int width, int height)
{
- GetImplementation( *this ).SetDefaultFontSize( defaultFontSize );
+ return GetImplementation(*this).SetSize(width, height);
}
-void WebEngine::SetSize( int width, int height )
+bool WebEngine::SendTouchEvent(const TouchEvent& touch)
{
- return GetImplementation( *this ).SetSize( width, height );
+ return GetImplementation(*this).SendTouchEvent(touch);
}
-bool WebEngine::SendTouchEvent( const TouchData& touch )
+bool WebEngine::SendKeyEvent(const KeyEvent& event)
{
- return GetImplementation( *this ).SendTouchEvent( touch );
+ return GetImplementation(*this).SendKeyEvent(event);
}
-bool WebEngine::SendKeyEvent( const KeyEvent& event )
+void WebEngine::SetFocus( bool focused )
{
- return GetImplementation( *this ).SendKeyEvent( event );
+ GetImplementation( *this ).SetFocus( focused );
}
Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
{
- return GetImplementation( *this ).PageLoadStartedSignal();
+ return GetImplementation(*this).PageLoadStartedSignal();
}
Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadFinishedSignal()
{
- return GetImplementation( *this ).PageLoadFinishedSignal();
+ return GetImplementation(*this).PageLoadFinishedSignal();
}
Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErrorSignal()
{
- return GetImplementation( *this ).PageLoadErrorSignal();
+ return GetImplementation(*this).PageLoadErrorSignal();
}
-} // namespace Dali;
+Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal()
+{
+ return GetImplementation( *this ).ScrollEdgeReachedSignal();
+}
+} // namespace Dali