X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fcolor-visual%2Fcolor-visual-example.cpp;h=809fdaed2b82f4f4336a50880a9801d57734a15f;hb=1a473d5189ca7e7d55aca3a64a8a4ff2dc3b6c67;hp=616e3f6e8d3499bd62a174f174e1c0a4a1df0229;hpb=02d26ce6a37e6698f41297a1190d9bffa6370742;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/color-visual/color-visual-example.cpp b/examples/color-visual/color-visual-example.cpp index 616e3f6..809fdae 100644 --- a/examples/color-visual/color-visual-example.cpp +++ b/examples/color-visual/color-visual-example.cpp @@ -68,25 +68,25 @@ 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 ); mImageView = ImageView::New( IMAGE_FILE ); - mImageView.SetParentOrigin( ParentOrigin::CENTER ); - mImageView.SetSize( 200.0f, 200.0f ); + mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mImageView.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); mImageView.SetProperty( DevelControl::Property::SHADOW, SHADOW ); - stage.Add( mImageView ); + window.Add( mImageView ); - // Respond to a click anywhere on the stage - stage.GetRootLayer().TouchSignal().Connect( this, &ColorVisualExample::OnTouch ); + // Respond to a click anywhere on the window + window.GetRootLayer().TouchedSignal().Connect( this, &ColorVisualExample::OnTouch ); // Respond to key events - stage.KeyEventSignal().Connect( this, &ColorVisualExample::OnKeyEvent ); + window.KeyEventSignal().Connect( this, &ColorVisualExample::OnKeyEvent ); } - bool OnTouch( Actor actor, const TouchData& touch ) + bool OnTouch( Actor actor, const TouchEvent& touch ) { if( touch.GetState( 0 ) == PointState::UP ) { @@ -117,7 +117,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 ) ) {