/*
- * 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.
gEvaluateJavaScriptCallbackCalled++;
}
-static bool OnTouched( Actor actor, const Dali::TouchData& touch )
+static bool OnTouched( Actor actor, const Dali::TouchEvent& touch )
{
gTouched = true;
return true;
WebView view = WebView::New();
view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- view.SetPosition( 0, 0 );
- view.SetSize( 800, 600 );
- Stage::GetCurrent().Add( view );
+ view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
DALI_TEST_CHECK( view );
view.LoadUrl( TEST_URL2 );
view.Suspend();
- view.SetSize( 400, 300 );
+ view.SetProperty( Actor::Property::SIZE, Vector2( 400, 300 ) );
application.SendNotification();
application.Render();
Test::EmitGlobalTimerSignal();
WebView view = WebView::New();
view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- view.SetPosition( 0, 0 );
- view.SetSize( 800, 600 );
+ view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
- Stage::GetCurrent().Add( view );
+ application.GetScene().Add( view );
application.SendNotification();
application.Render();
view.GetNaturalSize();
- view.TouchSignal().Connect( &OnTouched );
+ view.TouchedSignal().Connect( &OnTouched );
// Touch event
Dali::Integration::TouchEvent event;
// Key event
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( view );
- application.ProcessEvent( Integration::KeyEvent( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", "", Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( Integration::KeyEvent( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
DALI_TEST_CHECK( gTouched );