#define DALI_WEB_ENGINE_IMPL_H
/*
- * 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.
void StopLoading();
/**
+ * @copydoc Dali::WebEngine::Suspend()
+ */
+ void Suspend();
+
+ /**
+ * @copydoc Dali::WebEngine::Resume()
+ */
+ void Resume();
+
+ /**
* @copydoc Dali::WebEngine::CanGoForward()
*/
bool CanGoForward();
/**
* @copydoc Dali::WebEngine::EvaluateJavaScript()
*/
- void EvaluateJavaScript( const std::string& script );
+ void EvaluateJavaScript( const std::string& script, std::function< void(const std::string&) > resultHandler );
/**
* @copydoc Dali::WebEngine::AddJavaScriptMessageHandler()
void ClearCache();
/**
+ * @copydoc Dali::WebEngine::ClearCookies()
+ */
+ void ClearCookies();
+
+ /**
+ * @copydoc Dali::WebEngine::GetCacheModel()
+ */
+ Dali::WebEnginePlugin::CacheModel GetCacheModel() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetCacheModel()
+ */
+ void SetCacheModel( Dali::WebEnginePlugin::CacheModel cacheModel );
+
+ /**
+ * @copydoc Dali::WebEngine::GetCookieAcceptPolicy()
+ */
+ Dali::WebEnginePlugin::CookieAcceptPolicy GetCookieAcceptPolicy() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetCookieAcceptPolicy()
+ */
+ void SetCookieAcceptPolicy( Dali::WebEnginePlugin::CookieAcceptPolicy policy );
+
+ /**
+ * @copydoc Dali::WebEngine::GetUserAgent()
+ */
+ const std::string& GetUserAgent() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetUserAgent()
+ */
+ void SetUserAgent( const std::string& userAgent );
+
+ /**
+ * @copydoc Dali::WebEngine::IsJavaScriptEnabled()
+ */
+ bool IsJavaScriptEnabled() const;
+
+ /**
+ * @copydoc Dali::WebEngine::EnableJavaScript()
+ */
+ void EnableJavaScript( bool enabled );
+
+ /**
+ * @copydoc Dali::WebEngine::AreImagesAutomaticallyLoaded()
+ */
+ bool AreImagesAutomaticallyLoaded() const;
+
+ /**
+ * @copydoc Dali::WebEngine::LoadImagesAutomatically()
+ */
+ void LoadImagesAutomatically( bool automatic );
+
+ /**
+ * @copydoc Dali::WebEngine::GetDefaultTextEncodingName()
+ */
+ const std::string& GetDefaultTextEncodingName() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetDefaultTextEncodingName()
+ */
+ void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName );
+
+ /**
+ * @copydoc Dali::WebEngine::GetDefaultFontSize()
+ */
+ int GetDefaultFontSize() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetDefaultFontSize()
+ */
+ void SetDefaultFontSize( int defaultFontSize );
+
+ /**
* @copydoc Dali::WebEngine::SetSize()
*/
void SetSize( int width, int height );
/**
* @copydoc Dali::WebEngine::SendTouchEvent()
*/
- bool SendTouchEvent( const Dali::TouchData& touch );
+ bool SendTouchEvent( const Dali::TouchEvent& touch );
/**
* @copydoc Dali::WebEngine::SendKeyEvent()
/**
* @copydoc Dali::WebEngine::PageLoadStartedSignal()
*/
- Dali::WebEnginePlugin::WebEngineSignalType& PageLoadStartedSignal();
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal();
/**
* @copydoc Dali::WebEngine::PageLoadFinishedSignal()
*/
- Dali::WebEnginePlugin::WebEngineSignalType& PageLoadFinishedSignal();
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadFinishedSignal();
+
+ /**
+ * @copydoc Dali::WebEngine::PageLoadErrorSignal()
+ */
+ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& PageLoadErrorSignal();
private:
private:
- Dali::WebEnginePlugin* mPlugin; ///< WebEnginePlugin instance
- void* mHandle; ///< Handle for the loaded library
-
typedef Dali::WebEnginePlugin* (*CreateWebEngineFunction)();
typedef void (*DestroyWebEngineFunction)( Dali::WebEnginePlugin* plugin );
- CreateWebEngineFunction mCreateWebEnginePtr;
- DestroyWebEngineFunction mDestroyWebEnginePtr;
+ Dali::WebEnginePlugin* mPlugin; ///< WebEnginePlugin instance
+ void* mHandle; ///< Handle for the loaded library
+ CreateWebEngineFunction mCreateWebEnginePtr; ///< Function to create plugin instance
+ DestroyWebEngineFunction mDestroyWebEnginePtr; ///< Function to destroy plugin instance
};
} // namespace Adaptor