Some new APIs are added, e.g. Create, GetTitle, GetFavicon.
Change-Id: I273cb0ee6fe158674b2af65a7968905a67e4194c
namespace Dali
{
class KeyEvent;
+class PixelData;
class TouchEvent;
class WebEngineBackForwardList;
class WebEngineContext;
*/
virtual void Create(int width, int height, const std::string& locale, const std::string& timezoneId) = 0;
+ /**
+ * @brief Creates WebEngine instance.
+ *
+ * @param [in] width The width of Web
+ * @param [in] height The height of Web
+ * @param [in] argc The count of application arguments
+ * @param [in] argv The string array of application arguments
+ */
+ virtual void Create( int width, int height, int argc, char** argv ) = 0;
+
/**
* @brief Destroys WebEngine instance.
*/
*/
virtual void LoadUrl(const std::string& url) = 0;
+ /**
+ * @brief Returns the title of the Web.
+ *
+ * @return The title of web page
+ */
+ virtual std::string GetTitle() const = 0;
+
+ /**
+ * @brief Returns the Favicon of the Web.
+ *
+ * @return Favicon of Dali::PixelData& type
+ */
+ virtual Dali::PixelData GetFavicon() const = 0;
+
/**
* @brief Gets image to render.
*/
*/
virtual void AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler) = 0;
+ /**
+ * @brief Clears all tiles resources of Web.
+ */
+ virtual void ClearAllTilesResources() = 0;
+
/**
* @brief Clears the history of Web.
*/
#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
#include <dali/internal/web-engine/common/web-engine-impl.h>
+// EXTERNAL INCLUDES
+#include <dali/public-api/images/pixel-data.h>
+
namespace Dali
{
WebEngine::WebEngine()
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();
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();
GetImplementation(*this).AddJavaScriptMessageHandler(exposedObjectName, handler);
}
+void WebEngine::ClearAllTilesResources()
+{
+ GetImplementation( *this ).ClearAllTilesResources();
+}
+
void WebEngine::ClearHistory()
{
return GetImplementation(*this).ClearHistory();
*/
void Create(int width, int height, const std::string& locale, const std::string& timezoneId);
+ /**
+ * @brief Creates WebEngine instance.
+ *
+ * @param [in] width The width of Web
+ * @param [in] height The height of Web
+ * @param [in] argc The count of application arguments
+ * @param [in] argv The string array of application arguments
+ */
+ void Create( int width, int height, int argc, char** argv );
+
/**
* @brief Destroys WebEngine instance.
*/
*/
void LoadUrl(const std::string& url);
+ /**
+ * @brief Returns the title of the Web.
+ *
+ * @return The title of web page
+ */
+ std::string GetTitle() const;
+
+ /**
+ * @brief Returns the Favicon of the Web.
+ *
+ * @return FavIcon of Dali::PixelData& type
+ */
+ Dali::PixelData GetFavicon() const;
+
/**
* @brief Gets the url.
*/
*/
void AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler);
+ /**
+ * @brief Clears all tiles resources of Web.
+ */
+ void ClearAllTilesResources();
+
/**
* @brief Clears the history of Web.
*/
#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
#include <dali/internal/system/common/environment-variables.h>
#include <dali/public-api/adaptor-framework/native-image-source.h>
+#include <dali/public-api/images/pixel-data.h>
namespace Dali
{
mPlugin->Create( width, height, locale, timezoneId );
}
+void WebEngine::Create( int width, int height, int argc, char** argv )
+{
+ mPlugin->Create( width, height, argc, argv );
+}
+
void WebEngine::Destroy()
{
mPlugin->Destroy();
mPlugin->LoadUrl( url );
}
+std::string WebEngine::GetTitle() const
+{
+ return mPlugin->GetTitle();
+}
+
+Dali::PixelData WebEngine::GetFavicon() const
+{
+ return mPlugin->GetFavicon();
+}
+
const std::string& WebEngine::GetUrl()
{
return mPlugin->GetUrl();
}
+const std::string& WebEngine::GetUserAgent() const
+{
+ return mPlugin->GetUserAgent();
+}
+
+void WebEngine::SetUserAgent( const std::string& userAgent )
+{
+ mPlugin->SetUserAgent( userAgent );
+}
+
void WebEngine::LoadHtmlString( const std::string& htmlString )
{
mPlugin->LoadHtmlString( htmlString );
mPlugin->AddJavaScriptMessageHandler( exposedObjectName, handler );
}
-const std::string& WebEngine::GetUserAgent() const
+void WebEngine::ClearAllTilesResources()
{
- return mPlugin->GetUserAgent();
-}
-
-void WebEngine::SetUserAgent( const std::string& userAgent )
-{
- mPlugin->SetUserAgent( userAgent );
+ mPlugin->ClearAllTilesResources();
}
void WebEngine::ClearHistory()
*/
void Create( int width, int height, const std::string& locale, const std::string& timezoneId );
+ /**
+ * @copydoc Dali::WebEngine::Create()
+ */
+ void Create( int width, int height, int argc, char** argv );
+
/**
* @copydoc Dali::WebEngine::Destroy()
*/
*/
void LoadUrl( const std::string& url );
+ /**
+ * @copydoc Dali::WebEngine::GetTitle()
+ */
+ std::string GetTitle() const;
+
+ /**
+ * @copydoc Dali::WebEngine::GetFavicon()
+ */
+ Dali::PixelData GetFavicon() const;
+
/**
* @copydoc Dali::WebEngine::GetUrl()
*/
const std::string& GetUrl();
+ /**
+ * @copydoc Dali::WebEngine::GetUserAgent()
+ */
+ const std::string& GetUserAgent() const;
+
+ /**
+ * @copydoc Dali::WebEngine::SetUserAgent()
+ */
+ void SetUserAgent( const std::string& userAgent );
+
/**
* @copydoc Dali::WebEngine::LoadHtmlString()
*/
void AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void(const std::string&) > handler );
/**
- * @copydoc Dali::WebEngine::GetUserAgent()
+ * @copydoc Dali::WebEngine::ClearAllTilesResources()
*/
- const std::string& GetUserAgent() const;
-
- /**
- * @copydoc Dali::WebEngine::SetUserAgent()
- */
- void SetUserAgent( const std::string& userAgent );
+ void ClearAllTilesResources();
/**
* @copydoc Dali::WebEngine::ClearHistory()