Changes after TouchedSignal changes
[platform/core/uifw/dali-demo.git] / examples / visual-transitions / transition-application.cpp
index b721341..be75a63 100644 (file)
@@ -129,7 +129,7 @@ void TransitionApplication::Create( Application& application )
     mVisualButtons[i].SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
     mVisualButtons[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
     mVisualIndex = mVisualButtons[i].RegisterProperty( "visualId", i, Property::READ_WRITE );
-    mVisualButtons[i].TouchSignal().Connect( this, &TransitionApplication::OnVisualButtonClicked );
+    mVisualButtons[i].TouchedSignal().Connect( this, &TransitionApplication::OnVisualButtonClicked );
     visualTypeLayout.AddChild( mVisualButtons[i], TableView::CellPosition( 0, i ) );
   }
 
@@ -276,9 +276,9 @@ void TransitionApplication::CreateVisualMap( int index, Property::Map& map )
   }
 }
 
-bool TransitionApplication::OnVisualButtonClicked( Actor actor, const TouchData& touchData )
+bool TransitionApplication::OnVisualButtonClicked( Actor actor, const TouchEvent& touch )
 {
-  if( touchData.GetState(0) == PointState::FINISHED )
+  if( touch.GetState(0) == PointState::FINISHED )
   {
     int visual = actor.GetProperty<int>( mVisualIndex );
     Property::Map map;
@@ -324,23 +324,23 @@ void TransitionApplication::OnKeyEvent( const KeyEvent& keyEvent )
 {
   static int keyPressed = 0;
 
-  if( keyEvent.state == KeyEvent::Down)
+  if( keyEvent.GetState() == KeyEvent::DOWN)
   {
     if( keyPressed == 0 ) // Is this the first down event?
     {
-      printf("Key pressed: %s %d\n", keyEvent.keyPressedName.c_str(), keyEvent.keyCode );
+      printf("Key pressed: %s %d\n", keyEvent.GetKeyName().c_str(), keyEvent.GetKeyCode() );
 
       if( IsKey( keyEvent, DALI_KEY_ESCAPE) || IsKey( keyEvent, DALI_KEY_BACK ) )
       {
         mApplication.Quit();
       }
-      else if( keyEvent.keyPressedName.compare("Return") == 0 )
+      else if( keyEvent.GetKeyName().compare("Return") == 0 )
       {
       }
     }
     keyPressed = 1;
   }
-  else if( keyEvent.state == KeyEvent::Up )
+  else if( keyEvent.GetState() == KeyEvent::UP )
   {
     keyPressed = 0;
   }