END_TEST;
}
+int UtcDaliWebViewFocusGainedAndLost(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
+
+ application.GetScene().Add( view );
+ application.SendNotification();
+ application.Render();
+
+ view.SetKeyInputFocus();
+ DALI_TEST_CHECK( view.HasKeyInputFocus() );
+
+ // reset
+ view.ClearKeyInputFocus();
+ DALI_TEST_CHECK( !view.HasKeyInputFocus() );
+
+ END_TEST;
+}
+
int UtcDaliWebViewProperty1(void)
{
// URL
return result;
}
+void WebView::OnKeyInputFocusGained()
+{
+ if( mWebEngine )
+ {
+ mWebEngine.SetFocus( true );
+ }
+
+ EmitKeyInputFocusSignal( true ); // Calls back into the Control hence done last.
+}
+
+void WebView::OnKeyInputFocusLost()
+{
+ if( mWebEngine )
+ {
+ mWebEngine.SetFocus( false );
+ }
+
+ EmitKeyInputFocusSignal( false ); // Calls back into the Control hence done last.
+}
+
Toolkit::WebView::CacheModel::Type WebView::GetCacheModel() const
{
return mWebEngine ? static_cast< Toolkit::WebView::CacheModel::Type >( mWebEngine.GetCacheModel() ) : Toolkit::WebView::CacheModel::DOCUMENT_VIEWER;
*/
bool OnKeyEvent( const Dali::KeyEvent& event ) override;
+ /**
+ * @copydoc Toolkit::Control::OnKeyInputFocusGained()
+ */
+ void OnKeyInputFocusGained() override;
+
+ /**
+ * @copydoc Toolkit::Control::OnKeyInputFocusLost()
+ */
+ void OnKeyInputFocusLost() override;
+
private:
// Undefined