X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fcompressed-texture-formats%2Fcompressed-texture-formats-example.cpp;h=cf081f5b8d91a146a6ec899488d0cabbdc1a3460;hb=1a473d5189ca7e7d55aca3a64a8a4ff2dc3b6c67;hp=2c0de1d8a0ec97a56ab962e5c81883ce7e39bcee;hpb=437340fcbd1432fae7c7d9af926e41631ad5a407;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp index 2c0de1d..cf081f5 100644 --- a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp +++ b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 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. @@ -107,9 +107,9 @@ 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 ); + // Get a handle to the window + Window window = application.GetWindow(); + window.SetBackgroundColor( Color::WHITE ); // Setup a TableView to hold a grid of images and labels. Toolkit::TableView table = Toolkit::TableView::New( 3u, 2u ); @@ -174,14 +174,14 @@ public: table.AddChild( actor, Toolkit::TableView::CellPosition( 2u, 1u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 2u, 1u ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); - stage.Add( table ); + window.Add( table ); // Respond to touch and key signals - stage.GetRootLayer().TouchSignal().Connect( this, &CompressedTextureFormatsController::OnTouch ); - stage.KeyEventSignal().Connect(this, &CompressedTextureFormatsController::OnKeyEvent); + window.GetRootLayer().TouchedSignal().Connect( this, &CompressedTextureFormatsController::OnTouch ); + window.KeyEventSignal().Connect(this, &CompressedTextureFormatsController::OnKeyEvent); } - bool OnTouch( Actor actor, const TouchData& touch ) + bool OnTouch( Actor actor, const TouchEvent& touch ) { // quit the application mApplication.Quit(); @@ -190,7 +190,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::DOWN) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) {