X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftext-label-emojis%2Ftext-label-emojis.cpp;h=9ec53d231ca03535862871ce8c3a0843386d0418;hb=4f818cd12c9bf2773d44e5cfdc2fc0a344abf7f5;hp=8ae9bf1924225537bef5214c7cf82d9decc34076;hpb=a54e318859e1c6f56e7e37ad5f03f5f2c1ef19bf;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/text-label-emojis/text-label-emojis.cpp b/examples/text-label-emojis/text-label-emojis.cpp index 8ae9bf1..9ec53d2 100644 --- a/examples/text-label-emojis/text-label-emojis.cpp +++ b/examples/text-label-emojis/text-label-emojis.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. @@ -17,6 +17,7 @@ // EXTERNAL INCLUDES #include +#include #include // INTERNAL INCLUDES @@ -55,9 +56,9 @@ public: // The Init signal is received once (only) during the Application lifetime void Create( Application& application ) { - Stage stage = Stage::GetCurrent(); - stage.SetBackgroundColor( Color::WHITE ); - stage.KeyEventSignal().Connect(this, &EmojiExample::OnKeyEvent); + Window window = application.GetWindow(); + window.SetBackgroundColor( Color::WHITE ); + window.KeyEventSignal().Connect(this, &EmojiExample::OnKeyEvent); mTableView = Toolkit::TableView::New( NUMBER_OF_EMOJIS, 1 ); mTableView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); @@ -65,7 +66,7 @@ public: mTableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mTableView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); mTableView.TouchSignal().Connect( this, &EmojiExample::OnTouch ); - stage.Add( mTableView ); + window.Add( mTableView ); for( unsigned int index = 0u; index < NUMBER_OF_EMOJIS; ++index ) { @@ -82,7 +83,7 @@ public: } } - bool OnTouch( Actor actor, const TouchData& event ) + bool OnTouch( Actor actor, const TouchEvent& event ) { if( 1u == event.GetPointCount() ) { @@ -115,7 +116,7 @@ public: */ 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 ) ) {