Update position & size of web engine.
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-plugin.h
index fbf8d1c..f74c41a 100755 (executable)
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
+#include <dali/public-api/math/rect.h>
 #include <dali/public-api/signals/dali-signal.h>
 #include <functional>
 
 namespace Dali
 {
 class KeyEvent;
+class PixelData;
 class TouchEvent;
 class WebEngineBackForwardList;
 class WebEngineContext;
@@ -42,12 +44,12 @@ public:
   /**
    * @brief WebEngine signal type related with page loading.
    */
-  typedef Signal<void(const std::string&)> WebEnginePageLoadSignalType;
+  using WebEnginePageLoadSignalType = Signal< void( const std::string& ) >;
 
   /**
    * @brief WebView signal type related with page loading error.
    */
-  typedef Signal<void(const std::string&, int)> WebEnginePageLoadErrorSignalType;
+  using WebEnginePageLoadErrorSignalType = Signal< void( const std::string&, int ) >;
 
   // forward declaration.
   enum class ScrollEdge;
@@ -55,7 +57,7 @@ public:
   /**
    * @brief WebView signal type related with scroll edge reached.
    */
-  typedef Signal< void( const ScrollEdge )> WebEngineScrollEdgeReachedSignalType;
+  using WebEngineScrollEdgeReachedSignalType = Signal< void( const ScrollEdge ) >;
 
   /**
    * @brief Enumeration for the scroll edge.
@@ -89,6 +91,16 @@ public:
   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 Destroy() = 0;
@@ -121,6 +133,20 @@ public:
   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 NativeImageInterfacePtr GetNativeImageSource() = 0;
@@ -172,17 +198,17 @@ public:
   /**
    * @brief Gets the current scroll position of the given view.
    */
-  virtual void GetScrollPosition( int& x, int& y ) const = 0;
+  virtual Dali::Vector2 GetScrollPosition() const = 0;
 
   /**
    * @brief Gets the possible scroll size of the given view.
    */
-  virtual void GetScrollSize( int& width, int& height ) const = 0;
+  virtual Dali::Vector2 GetScrollSize() const = 0;
 
   /**
    * @brief Gets the last known content's size.
    */
-  virtual void GetContentSize( int& width, int& height ) const = 0;
+  virtual Dali::Vector2 GetContentSize() const = 0;
 
   /**
    * @brief Returns whether forward is possible.
@@ -225,6 +251,11 @@ public:
   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.
    */
   virtual void ClearHistory() = 0;
@@ -264,6 +295,18 @@ public:
   virtual void SetFocus( bool focused ) = 0;
 
   /**
+   * @brief Update display area.
+   * @param[in] displayArea The display area need be updated.
+   */
+  virtual void UpdateDisplayArea( Dali::Rect< int > displayArea ) = 0;
+
+  /**
+   * @brief Enable video hole.
+   * @param[in] enabled True if enabled, false othewise.
+   */
+  virtual void EnableVideoHole( bool enabled ) = 0;
+
+  /**
    * @brief Connects to this signal to be notified when page loading is started.
    *
    * @return A signal object to connect with.