X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fperf-scroll%2Fperf-scroll.cpp;h=0261ab3485db44bb3555b8f3fa7a37a9857af057;hb=a284a43f0bb9f45e37809d9778d3c774a5169d50;hp=1680e965ef60ed3333ffa0c0b91304b780830a92;hpb=d897eb3708e1860f636f4518ab07a149313cf5c9;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index 1680e96..0261ab3 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -230,24 +230,24 @@ public: // The Init signal is received once (only) during the Application lifetime void Create( Application& application ) { - // Get a handle to the stage - Stage stage = Stage::GetCurrent(); - stage.SetBackgroundColor( Color::WHITE ); - Vector2 stageSize = stage.GetSize(); + // Get a handle to the window + Window window = application.GetWindow(); + window.SetBackgroundColor( Color::WHITE ); + Vector2 windowSize = window.GetSize(); - stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false ); + window.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false ); - mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f ); + mSize = Vector3( windowSize.x / mColumnsPerPage, windowSize.y / mRowsPerPage, 0.0f ); - // Respond to a click anywhere on the stage - stage.GetRootLayer().TouchSignal().Connect( this, &PerfScroll::OnTouch ); + // Respond to a click anywhere on the window + window.GetRootLayer().TouchSignal().Connect( this, &PerfScroll::OnTouch ); // Respond to key events - stage.KeyEventSignal().Connect( this, &PerfScroll::OnKeyEvent ); + window.KeyEventSignal().Connect( this, &PerfScroll::OnKeyEvent ); mParent = Actor::New(); mParent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - stage.Add(mParent); + window.Add(mParent); if( gUseMesh ) { @@ -261,7 +261,7 @@ public: ShowAnimation(); } - bool OnTouch( Actor actor, const TouchData& touch ) + bool OnTouch( Actor actor, const TouchEvent& touch ) { // quit the application mApplication.Quit(); @@ -275,7 +275,7 @@ public: void CreateImageViews() { - Stage stage = Stage::GetCurrent(); + Window window = mApplication.GetWindow(); unsigned int actorCount( mRowsPerPage*mColumnsPerPage * mPageCount ); mImageView.resize( actorCount ); @@ -308,7 +308,7 @@ public: } //Create the actors - Stage stage = Stage::GetCurrent(); + Window window = mApplication.GetWindow(); unsigned int actorCount(mRowsPerPage*mColumnsPerPage * mPageCount); mActor.resize(actorCount); for( size_t i(0); i