This improvement is suggested by Mr Richard Huang.
Change-Id: Ia9e06ca7a12bf6e7e8d845f443afe89c34970b46
/**
* @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;
/**
* @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.
/**
* @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.
GetImplementation( *this ).SetScrollPosition( x, y );
}
-void WebEngine::GetScrollPosition( int& x, int& y ) const
+Dali::Vector2 WebEngine::GetScrollPosition() const
{
- GetImplementation( *this ).GetScrollPosition( x, y );
+ return GetImplementation( *this ).GetScrollPosition();
}
-void WebEngine::GetScrollSize( int& width, int& height ) const
+Dali::Vector2 WebEngine::GetScrollSize() const
{
- GetImplementation( *this ).GetScrollSize( width, height );
+ return GetImplementation( *this ).GetScrollSize();
}
-void WebEngine::GetContentSize( int& width, int& height ) const
+Dali::Vector2 WebEngine::GetContentSize() const
{
- GetImplementation( *this ).GetContentSize( width, height );
+ return GetImplementation( *this ).GetContentSize();
}
bool WebEngine::CanGoForward()
/**
* @brief Gets the current scroll position of the given view.
*/
- void GetScrollPosition( int& x, int& y ) const;
+ Dali::Vector2 GetScrollPosition() const;
/**
* @brief Gets the possible scroll size of the given view.
*/
- void GetScrollSize( int& width, int& height ) const;
+ Dali::Vector2 GetScrollSize() const;
/**
* @brief Gets the last known content's size.
*/
- void GetContentSize( int& width, int& height ) const;
+ Dali::Vector2 GetContentSize() const;
/**
* @brief Returns whether forward is possible.
mPlugin->SetScrollPosition( x, y );
}
-void WebEngine::GetScrollPosition( int& x, int& y ) const
+Dali::Vector2 WebEngine::GetScrollPosition() const
{
- mPlugin->GetScrollPosition( x, y );
+ return mPlugin->GetScrollPosition();
}
-void WebEngine::GetScrollSize( int& width, int& height ) const
+Dali::Vector2 WebEngine::GetScrollSize() const
{
- mPlugin->GetScrollSize( width, height );
+ return mPlugin->GetScrollSize();
}
-void WebEngine::GetContentSize( int& width, int& height ) const
+Dali::Vector2 WebEngine::GetContentSize() const
{
- mPlugin->GetContentSize( width, height );
+ return mPlugin->GetContentSize();
}
bool WebEngine::CanGoForward()
/**
* @copydoc Dali::WebEngine::GetScrollPosition()
*/
- void GetScrollPosition( int& x, int& y ) const;
+ Dali::Vector2 GetScrollPosition() const;
/**
* @copydoc Dali::WebEngine::GetScrollSize()
*/
- void GetScrollSize( int& width, int& height ) const;
+ Dali::Vector2 GetScrollSize() const;
/**
* @copydoc Dali::WebEngine::GetContentSize()
*/
- void GetContentSize( int& width, int& height ) const;
+ Dali::Vector2 GetContentSize() const;
/**
* @copydoc Dali::WebEngine::CanGoForward()