KeyEvent class pimpling
[platform/core/uifw/dali-demo.git] / examples / styling / styling-application.cpp
index c6aaaea..220ca24 100644 (file)
@@ -635,17 +635,17 @@ void StylingApplication::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 )
       {
         mCurrentTheme++;
         mCurrentTheme %= NUMBER_OF_THEMES;
@@ -676,7 +676,7 @@ void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent )
     }
     keyPressed = 1;
   }
-  else if( keyEvent.state == KeyEvent::Up )
+  else if( keyEvent.GetState() == KeyEvent::Up )
   {
     keyPressed = 0;
   }