X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fimage-policies%2Fimage-policies-example.cpp;h=3014b3db88e66d70949cce88a9acef70ba38f464;hb=4f818cd12c9bf2773d44e5cfdc2fc0a344abf7f5;hp=8860ef00371ef5eca38c7c0e6027b2f5cc203a62;hpb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/image-policies/image-policies-example.cpp b/examples/image-policies/image-policies-example.cpp index 8860ef0..3014b3d 100644 --- a/examples/image-policies/image-policies-example.cpp +++ b/examples/image-policies/image-policies-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -19,6 +19,7 @@ #include "shared/view.h" #include #include +#include #include #include #include @@ -164,7 +165,7 @@ class ImagePolicies: public ConnectionTracker /** * Part One of the Immediate loading example, displays instructions on what will be shown and starts loading of the Immediate image before it - * is staged. + * is windowd. */ void LoadPolicyImmediateExampleInstructions() { @@ -192,7 +193,7 @@ class ImagePolicies: public ConnectionTracker } /** - * Part Two of the Immediate loading example and here the Image is staged, shown to be instant (if previously step gave enough time to load). + * Part Two of the Immediate loading example and here the Image is windowd, shown to be instant (if previously step gave enough time to load). */ void LoadPolicyImmediateExample() { @@ -246,7 +247,7 @@ class ImagePolicies: public ConnectionTracker } /** - * Part two of the Destroyed example, the image is staged again but to the second column, it shows the loading takes the same amount of time as + * Part two of the Destroyed example, the image is windowd again but to the second column, it shows the loading takes the same amount of time as * when first loaded. */ void LoadPolicyDestroyedExample02() @@ -332,7 +333,7 @@ class ImagePolicies: public ConnectionTracker } /** - * Part two of the Detached example, the image is staged again but to the second column, it shows the loading takes the same amount of time as + * Part two of the Detached example, the image is windowd again but to the second column, it shows the loading takes the same amount of time as * when first loaded. */ void ReleasePolicyDestroyedExample06() @@ -381,8 +382,8 @@ class ImagePolicies: public ConnectionTracker Property::Map gradientBackground; CreateGradient( gradientBackground ); - // Get a handle to the stage - Stage stage = Stage::GetCurrent(); + // Get a handle to the window + Window window = application.GetWindow(); // Create default View. Toolkit::Control view = Toolkit::Control::New(); @@ -390,7 +391,7 @@ class ImagePolicies: public ConnectionTracker view.SetProperty( Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::CENTER ); view.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS ); view.SetProperty( Toolkit::Control::Property::BACKGROUND , gradientBackground ); - stage.Add( view ); + window.Add( view ); // Create a table view to show a pair of buttons above each image. mTable = TableView::New( TableRowPlacement::NUMBER_OF_ROWS, 1 ); @@ -422,7 +423,7 @@ class ImagePolicies: public ConnectionTracker mTable.AddChild( mNextButton, TableView::CellPosition( TableRowPlacement::NEXT_BUTTON, 0 ) ); mTable.SetCellPadding( Vector2( 2.0f, 2.0f ) ); - Stage::GetCurrent().KeyEventSignal().Connect(this, &ImagePolicies::OnKeyEvent); + window.KeyEventSignal().Connect(this, &ImagePolicies::OnKeyEvent); // Outline Map for Labels Property::Map outlineMap; @@ -524,7 +525,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::DOWN) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) {