Merge "Handle becomes Animatable" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 21 Apr 2017 14:09:07 +0000 (07:09 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 21 Apr 2017 14:09:07 +0000 (07:09 -0700)
23 files changed:
automated-tests/src/dali-toolkit/utc-Dali-BubbleEmitter.cpp
automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp
automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.h
dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/third-party/nanosvg/nanosvg.cc
packaging/dali-toolkit.spec
plugins/dali-swig/manual/cpp/event-thread-callback-wrap.cpp [changed mode: 0644->0755]

index a4575fc..c4efcc3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -24,6 +24,7 @@
 
 #include <dali.h>
 #include <dali/public-api/rendering/renderer.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h>
 
@@ -288,20 +289,24 @@ int UtcDaliBubbleEmitterEmitBubble(void)
   (bubbleRenderer.GetProperty(propertyIndex1)).Get( value1 );
   DALI_TEST_EQUALS(value0, 0.f, TEST_LOCATION );
   DALI_TEST_EQUALS(value1, 0.f, TEST_LOCATION );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value0 );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value1 );
+  DALI_TEST_EQUALS(value0, 0.f, TEST_LOCATION );
+  DALI_TEST_EQUALS(value1, 0.f, TEST_LOCATION );
 
   animation.Play();
 
   Wait(application, 300);
   propertyIndex0 = bubbleRenderer.GetPropertyIndex( "uPercentage[0]" );
   propertyIndex1 = bubbleRenderer.GetPropertyIndex( "uPercentage[1]" );
-  (bubbleRenderer.GetProperty(propertyIndex0)).Get( value0 );
-  (bubbleRenderer.GetProperty(propertyIndex1)).Get( value1 );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value0 );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value1 );
   DALI_TEST_CHECK( value0 >= 0.6f );
   DALI_TEST_CHECK( value1 >= 0.6f );
 
   Wait(application,500);
-  (bubbleRenderer.GetProperty(propertyIndex0)).Get( value0 );
-  (bubbleRenderer.GetProperty(propertyIndex1)).Get( value1 );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value0 );
+  ( DevelHandle::GetCurrentProperty( bubbleRenderer, propertyIndex0 ) ).Get( value1 );
   DALI_TEST_EQUALS(value0, 1.f, TEST_LOCATION );
   DALI_TEST_EQUALS(value1, 1.f, TEST_LOCATION );
   END_TEST;
index 363f2b1..15758d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -18,6 +18,7 @@
 #include <iostream>
 #include <stdlib.h>
 #include <sstream>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/effects-view/effects-view.h>
@@ -359,7 +360,7 @@ int UtcDaliEffectsViewOffsetProperty(void)
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/);
 
-  value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET );
+  value = DevelHandle::GetCurrentProperty( view, EffectsView::Property::EFFECT_OFFSET );
   value.Get(offsetValue);
   DALI_TEST_EQUALS( offsetValue, offsetAnimate, TEST_LOCATION );
 
@@ -394,7 +395,7 @@ int UtcDaliEffectsViewColorProperty(void)
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/);
 
-  value = view.GetProperty( EffectsView::Property::EFFECT_COLOR );
+  value = DevelHandle::GetCurrentProperty( view, EffectsView::Property::EFFECT_COLOR );
   value.Get(colorValue);
   DALI_TEST_EQUALS( colorValue, colorAnimate, TEST_LOCATION );
 
index 3eb9c26..56cd9e8 100644 (file)
@@ -250,7 +250,7 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation01(void)
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
-  Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Up, "");
+  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", DevelKeyEvent::DeviceClass::TOUCH );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( callback1.mIsCalled );
@@ -296,7 +296,7 @@ int UtcDaliKeyInputFocusManagerKeyEventPropagation02(void)
   manager.SetFocus( dummy3 );
   DALI_TEST_CHECK( dummy3Impl.keyInputFocusGained );
 
-  Integration::KeyEvent event("a", "a", 0, 0, 0, Integration::KeyEvent::Up, "" );
+  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "", DevelKeyEvent::DeviceClass::TOUCH );
   application.ProcessEvent(event);
 
   DALI_TEST_CHECK( !callback1.mIsCalled );
index 465834a..4c099e6 100644 (file)
@@ -46,7 +46,6 @@ namespace
 
 const std::string DEFAULT_DEVICE_NAME("hwKeyboard");
 
-
 // Functors to test whether GetNextFocusableActor() method of CustomAlgorithmInterface is called when the keyboard focus is about to change
 class CustomAlgorithm : public Dali::Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface
 {
@@ -866,7 +865,7 @@ int UtcDaliKeyboardFocusManagerSignalFocusedActorActivated(void)
   FocusedActorActivatedCallback focusedActorActivatedCallback(focusedActorActivatedSignalVerified);
   manager.FocusedActorEnterKeySignal().Connect( &focusedActorActivatedCallback, &FocusedActorActivatedCallback::Callback );
 
-  Integration::KeyEvent returnEvent("Return", "", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME );
+  Integration::KeyEvent returnEvent( "Return", "", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
@@ -924,8 +923,8 @@ int UtcDaliKeyboardFocusManagerSignalFocusGroupChanged(void)
   FocusGroupChangedCallback focusGroupChangedCallback(focusGroupChangedSignalVerified);
   manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
 
-  Integration::KeyEvent tabEvent("Tab", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
-  Integration::KeyEvent shiftTabEvent("Tab", "", 0, 1, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME);
+  Integration::KeyEvent tabEvent( "Tab", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent shiftTabEvent( "Tab", "", 0, 1, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
@@ -1047,12 +1046,12 @@ int UtcDaliKeyboardFocusManagerChangeFocusDirectionByKeyEvents(void)
   FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
   manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
 
-  Integration::KeyEvent leftEvent("Left", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME);
-  Integration::KeyEvent rightEvent("Right", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
-  Integration::KeyEvent upEvent("Up", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
-  Integration::KeyEvent downEvent("Down", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
-  Integration::KeyEvent pageUpEvent("Prior", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
-  Integration::KeyEvent pageDownEvent("Next", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME );
+  Integration::KeyEvent leftEvent( "Left", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent rightEvent( "Right", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent upEvent( "Up", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent downEvent( "Down", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent pageUpEvent( "Prior", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
+  Integration::KeyEvent pageDownEvent( "Next", "", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE );
 
   // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
   // It makes mIsFocusIndicatorEnabled true
index d3dc69f..9a8b579 100644 (file)
@@ -179,7 +179,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
-                                   const std::string& deviceName
+                                   const std::string& deviceName,
+                                   const DevelKeyEvent::DeviceClass::Type& deviceClass
                                    )
 {
   return Integration::KeyEvent( keyName,
@@ -188,7 +189,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
-                                deviceName);
+                                deviceName,
+                                deviceClass );
 }
 
 } // Anonymous namespace
@@ -1428,7 +1430,7 @@ int UtcDaliPopupOnKeyEvent(void)
 
   popup.SetKeyInputFocus();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "" ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DevelKeyEvent::DeviceClass::TOUCH ) );
   application.SendNotification();
   application.Render();
 
index fdd32b5..1a88abb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -18,6 +18,7 @@
 #include <iostream>
 #include <stdlib.h>
 #include <dali-toolkit-test-suite-utils.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
@@ -249,8 +250,8 @@ static float TestOvershootSnapDuration(ToolkitTestApplication &application, Scro
   int timeToReachOrigin = -1;
   for(int i = 0;i<MAX_FRAMES_TO_TEST_OVERSHOOT;i++)
   {
-    float overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-    float overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+    float overshootXValue = DevelHandle::GetCurrentProperty<float>( scrollView, ScrollView::Property::OVERSHOOT_X );
+    float overshootYValue = DevelHandle::GetCurrentProperty<float>( scrollView, ScrollView::Property::OVERSHOOT_Y );
     if(overshootXValue == 0.0f && overshootYValue == 0.0f)
     {
       break;
@@ -1226,9 +1227,9 @@ int UtcDaliToolkitScrollViewOvershoot(void)
   // 1. Scroll page in NW (-500,-500 pixels), then inspect overshoot. (don't release touch)
   Vector2 currentPos = Vector2(100.0f, 100.0f);
   currentPos = PerformGestureDiagonalSwipe(application, currentPos, Vector2(5.0f, 5.0f), 100, false);
-  float overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  float overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
-  Vector2 positionValue = scrollView.GetProperty<Vector2>(ScrollView::Property::SCROLL_POSITION);
+  float overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  float overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
+  Vector2 positionValue = DevelHandle::GetCurrentProperty< Vector2 >( scrollView, ScrollView::Property::SCROLL_POSITION );
   DALI_TEST_EQUALS(overshootXValue, 1.0f, TEST_LOCATION);
   DALI_TEST_EQUALS(overshootYValue, 1.0f, TEST_LOCATION);
   DALI_TEST_EQUALS(positionValue, Vector2::ZERO, TEST_LOCATION);
@@ -1425,15 +1426,15 @@ int UtcDaliToolkitScrollViewSetMaxOvershootP(void)
 
   // Scroll page in NW (-20,-20 pixels), then check that overshoot should be 0. (don't release touch)
   Vector2 currentPos = PerformGestureDiagonalSwipe(application, OVERSHOOT_START_SCROLL_POSITION, Vector2(1.0f, 1.0f), 20, false);
-  float overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  float overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+  float overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  float overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
   DALI_TEST_EQUALS(overshootXValue, 0.0f, TEST_LOCATION);
   DALI_TEST_EQUALS(overshootYValue, 0.0f, TEST_LOCATION);
 
   // Scroll page further in NW (-105,-105 pixels), then check that overshoot should be around 0.5. (don't release touch)
   currentPos = PerformGestureDiagonalSwipe(application, OVERSHOOT_START_SCROLL_POSITION, Vector2(1.0f, 1.0f), 105, false);
-  overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+  overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
   // The overshoot value is a 0.0f - 1.0f ranged value of the amount overshot related to the maximum overshoot.
   // EG. If we move 105, max overshoot is 50, then we overshot 50 / 105.
   float correctOvershootValue = 50.0f / 105.f;
@@ -1442,8 +1443,8 @@ int UtcDaliToolkitScrollViewSetMaxOvershootP(void)
 
   // Scroll page further in NW (-30,-30 pixels), then check that overshoot should be now 1.0. (don't release touch)
   currentPos = PerformGestureDiagonalSwipe(application, OVERSHOOT_START_SCROLL_POSITION, Vector2(1.0f, 1.0f), 30, false);
-  overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+  overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
   DALI_TEST_EQUALS(overshootXValue, 1.0f, TEST_LOCATION);
   DALI_TEST_EQUALS(overshootYValue, 1.0f, TEST_LOCATION);
 
@@ -1452,15 +1453,15 @@ int UtcDaliToolkitScrollViewSetMaxOvershootP(void)
   Wait(application);
 
   // Check that overshoot should be now around 0.8.
-  overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+  overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
   DALI_TEST_CHECK(overshootXValue > 0.79f && overshootXValue < 0.81f);
   DALI_TEST_CHECK(overshootYValue > 0.79f && overshootYValue < 0.81f);
 
   // Scroll page further in NW (-30,-30 pixels), then check that overshoot should be now 1.0. (don't release touch)
   currentPos = PerformGestureDiagonalSwipe(application, OVERSHOOT_START_SCROLL_POSITION, Vector2(1.0f, 1.0f), 30, false);
-  overshootXValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_X);
-  overshootYValue = scrollView.GetProperty<float>(ScrollView::Property::OVERSHOOT_Y);
+  overshootXValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_X );
+  overshootYValue = DevelHandle::GetCurrentProperty< float >( scrollView, ScrollView::Property::OVERSHOOT_Y );
   DALI_TEST_EQUALS(overshootXValue, 1.0f, TEST_LOCATION);
   DALI_TEST_EQUALS(overshootYValue, 1.0f, TEST_LOCATION);
 
index ae4b526..b7829fa 100644 (file)
@@ -189,7 +189,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
-                                   const std::string& deviceName )
+                                   const std::string& deviceName,
+                                   const DevelKeyEvent::DeviceClass::Type& deviceClass )
 {
   return Integration::KeyEvent( keyName,
                                 keyString,
@@ -197,7 +198,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
-                                deviceName );
+                                deviceName,
+                                deviceClass );
 }
 
 /**
@@ -776,7 +778,7 @@ int utcDaliTextEditorTextChangedP(void)
   editor.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
-  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME  ) );
+  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
@@ -1096,7 +1098,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1121,7 +1123,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1137,7 +1139,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   gInputStyleMask = TextEditor::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1178,7 +1180,7 @@ int utcDaliTextEditorInputStyleChanged02(void)
   editor.SetProperty( TextEditor::Property::INPUT_EMBOSS, "emboss" );
   editor.SetProperty( TextEditor::Property::INPUT_OUTLINE, "outline" );
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1286,7 +1288,7 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // Add a key event but as the text editor has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1303,8 +1305,8 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // Now the text editor has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1335,8 +1337,8 @@ int utcDaliTextEditorEvent01(void)
   application.Render();
 
   // The second text editor has the focus. It should handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1392,8 +1394,8 @@ int utcDaliTextEditorEvent02(void)
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text editor has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1417,8 +1419,8 @@ int utcDaliTextEditorEvent02(void)
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1428,8 +1430,8 @@ int utcDaliTextEditorEvent02(void)
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1467,8 +1469,8 @@ int utcDaliTextEditorEvent02(void)
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   editor.SetProperty( TextEditor::Property::TEXT, "" );
 
   // Render and notify
@@ -1608,8 +1610,8 @@ int utcDaliTextEditorEvent04(void)
   application.Render();
 
   // Move at the end of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1617,8 +1619,8 @@ int utcDaliTextEditorEvent04(void)
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
     // Render and notify
     application.SendNotification();
@@ -1626,7 +1628,7 @@ int utcDaliTextEditorEvent04(void)
   }
 
   // Add a character
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1635,8 +1637,8 @@ int utcDaliTextEditorEvent04(void)
   DALI_TEST_EQUALS( "Hello\nworld", editor.GetProperty<std::string>( TextEditor::Property::TEXT ), TEST_LOCATION );
 
   // Add some key events
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_UP, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1644,8 +1646,8 @@ int utcDaliTextEditorEvent04(void)
 
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
     // Render and notify
     application.SendNotification();
@@ -1653,7 +1655,7 @@ int utcDaliTextEditorEvent04(void)
   }
 
   // Add a character
-  application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( " ", " ", KEY_WHITE_SPACE_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1703,8 +1705,8 @@ int utcDaliTextEditorEvent05(void)
   application.Render();
 
   // Move at the end of the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1713,7 +1715,7 @@ int utcDaliTextEditorEvent05(void)
   for( unsigned int index = 0u; index < 10u; ++index )
   {
     // Add a character
-    application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
     // Render and notify
     application.SendNotification();
@@ -1725,7 +1727,7 @@ int utcDaliTextEditorEvent05(void)
   // Continuous scroll left to increase coverage
   for( unsigned int index = 0u; index < 10u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
     // Render and notify
     application.SendNotification();
@@ -1738,7 +1740,7 @@ int utcDaliTextEditorEvent05(void)
   DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SCROLL_BAR_FADE_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   // Press Escape to increase coverage
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
index 785ad78..3e91406 100644 (file)
@@ -304,7 +304,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyModifier,
                                    unsigned long timeStamp,
                                    const Integration::KeyEvent::State& keyState,
-                                   const std::string& deviceName )
+                                   const std::string& deviceName,
+                                   const DevelKeyEvent::DeviceClass::Type& deviceClass )
 {
   return Integration::KeyEvent( keyName,
                                 keyString,
@@ -312,7 +313,8 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                 keyModifier,
                                 timeStamp,
                                 keyState,
-                                deviceName );
+                                deviceName,
+                                deviceClass );
 }
 
 bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Map& fontStyleMapSet )
@@ -896,7 +898,7 @@ int utcDaliTextFieldTextChangedP(void)
   field.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
-  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "D", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
@@ -949,8 +951,8 @@ int utcDaliTextFieldMaxCharactersReachedP(void)
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( maxLengthReachedSignal );
@@ -981,8 +983,8 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
@@ -1299,7 +1301,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1324,7 +1326,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1340,7 +1342,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1447,7 +1449,7 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1464,8 +1466,8 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1496,8 +1498,8 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // The second text field has the focus. It should handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1555,8 +1557,8 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1580,8 +1582,8 @@ int utcDaliTextFieldEvent02(void)
   // Move the cursor and check the position changes.
   Vector3 position1 = cursor.GetCurrentPosition();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1591,8 +1593,8 @@ int utcDaliTextFieldEvent02(void)
 
   DALI_TEST_CHECK( position2.x < position1.x );
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1630,8 +1632,8 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_CHECK( position5.x > position4.x );
 
   // Remove all the text.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   field.SetProperty( TextField::Property::TEXT, "" );
 
   // Render and notify
@@ -2037,14 +2039,14 @@ int utcDaliTextFieldEvent09(void)
   Property::Map map;
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_NONE;
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
   map[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2053,7 +2055,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
     application.SendNotification();
     application.Render();
   }
@@ -2063,7 +2065,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
     application.SendNotification();
     application.Render();
   }
@@ -2071,16 +2073,16 @@ int utcDaliTextFieldEvent09(void)
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_LAST_CHARACTER;
   map[ HiddenInput::Property::SHOW_DURATION ] = 0;
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::SHOW_DURATION ] = 100;
   field.SetProperty( DevelTextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2192,7 +2194,7 @@ int utcDaliTextFieldStyleWhilstSelected(void)
   DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
 
   // Press Escape to increase coverage
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2226,8 +2228,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2244,10 +2246,10 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2256,8 +2258,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2266,8 +2268,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
   // No more text should be introduced
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2332,24 +2334,24 @@ int utcDaliTextFieldSomeSpecialKeys(void)
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME ) );
-  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelKeyEvent::DeviceClass::NONE ) );
 
   // Render and notify
   application.SendNotification();
index de4c4dd..49d62ab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -260,7 +260,9 @@ int UtcDaliTransitionDataMap1P(void)
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -268,13 +270,13 @@ int UtcDaliTransitionDataMap1P(void)
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   application.Render(500); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -327,7 +329,9 @@ int UtcDaliTransitionDataMap2P(void)
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -336,13 +340,13 @@ int UtcDaliTransitionDataMap2P(void)
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
 
   application.Render(500); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -398,7 +402,9 @@ int UtcDaliTransitionDataMap2Pb(void)
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   anim.Play();
 
@@ -407,13 +413,13 @@ int UtcDaliTransitionDataMap2Pb(void)
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
 
   application.Render(500); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::RED), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::RED), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -529,6 +535,7 @@ int UtcDaliTransitionDataMap4P(void)
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector2>(sizeIndex), Vector2(10.0f, 10.0f), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( renderer, sizeIndex ), Vector2(10.0f, 10.0f), TEST_LOCATION);
 
   anim.Play();
 
@@ -537,11 +544,11 @@ int UtcDaliTransitionDataMap4P(void)
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector2>(sizeIndex), Vector2(60.0f, 60.0f), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( renderer, sizeIndex ), Vector2(60.0f, 60.0f), TEST_LOCATION);
 
   application.Render(500); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector2>(sizeIndex), Vector2(110.0f, 110.0f), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( renderer, sizeIndex ), Vector2(110.0f, 110.0f), TEST_LOCATION );
 
   END_TEST;
 }
@@ -595,21 +602,25 @@ int UtcDaliTransitionDataMap5P(void)
   DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 0.0f, 0.001f, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
 
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 0.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
+
   anim.Play();
 
   application.SendNotification();
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 0.5f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 0.5f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   application.Render(501); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::AUTO, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::AUTO, TEST_LOCATION );
 
   END_TEST;
 }
@@ -660,12 +671,15 @@ int UtcDaliTransitionDataMap6P(void)
   application.Render(0);
 
   DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
   DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 1.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 1.0f, 0.001f, TEST_LOCATION );
 
   // Note, This should be testing for AUTO
   // this is the same problem as C# target value being set before Play is called.
   // @todo How was this solved?
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   anim.Play();
 
@@ -673,15 +687,15 @@ int UtcDaliTransitionDataMap6P(void)
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION);
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 0.5f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION);
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 0.5f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   application.Render(500); // End of anim
   application.SendNotification();
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector3>(mixColorIndex), Vector3(Color::MAGENTA), TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<float>(opacityIndex), 0.0f, 0.001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::BLEND_MODE), (int)BlendMode::ON, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex ), Vector3(Color::MAGENTA), TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( renderer, opacityIndex ), 0.0f, 0.001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( renderer, Renderer::Property::BLEND_MODE ), (int)BlendMode::ON, TEST_LOCATION );
 
   END_TEST;
 }
index d6128c5..983ac77 100644 (file)
@@ -29,6 +29,7 @@ namespace
 const char* const TEST_FILE( "test.mp4" );
 const char* const VOLUME_LEFT( "volumeLeft" );
 const char* const VOLUME_RIGHT( "volumeRight" );
+const char* const RENDERING_TYPE( "renderingTarget" );
 
 }
 
@@ -201,20 +202,21 @@ int UtcDaliVideoViewProperty4(void)
   left = right = 0.f;
 
   Property::Map map;
-  map.Insert( VOLUME_LEFT, 1.0f );
+  map.Insert( VOLUME_LEFT, 0.5f );
   map.Insert( VOLUME_RIGHT, 0.5f );
 
-  Property::Map map2;
   view.SetProperty( VideoView::Property::VOLUME, map );
-  Property::Value val4 = view.GetProperty( VideoView::Property::VOLUME );
-  DALI_TEST_CHECK( val4.Get( map2 ) );
+  Property::Value val = view.GetProperty( VideoView::Property::VOLUME );
+
+  Property::Map map2;
+  DALI_TEST_CHECK( val.Get( map2 ) );
 
-  Property::Value* volumeLeft = map.Find( VOLUME_LEFT );
-  Property::Value* volumeRight = map.Find( VOLUME_RIGHT );
+  Property::Value* volumeLeft = map2.Find( VOLUME_LEFT );
+  Property::Value* volumeRight = map2.Find( VOLUME_RIGHT );
 
   DALI_TEST_CHECK( volumeLeft && volumeLeft->Get( left ) );
   DALI_TEST_CHECK( volumeRight && volumeRight->Get( right ) );
-  DALI_TEST_CHECK( left == 1.0f );
+  DALI_TEST_CHECK( left == 0.5f );
   DALI_TEST_CHECK( right == 0.5f );
 
   END_TEST;
@@ -275,3 +277,38 @@ int UtcDaliVideoViewMethodsForCoverage(void)
 
   END_TEST;
 }
+
+int UtcDaliVideoViewMethodsForRenderType(void)
+{
+  ToolkitTestApplication application;
+  VideoView videoView = VideoView::New();
+  DALI_TEST_CHECK( videoView );
+
+  Property::Map windowSurfaceTarget;
+  Property::Map nativeImageTarget;
+
+  windowSurfaceTarget.Insert( RENDERING_TYPE, "windowSurfaceTarget" );
+  nativeImageTarget.Insert( RENDERING_TYPE, "nativeImageTarget" );
+
+  Property::Map map;
+  Property::Value value;
+  videoView.SetProperty( VideoView::Property::VIDEO, windowSurfaceTarget );
+
+  value = videoView.GetProperty( VideoView::Property::VIDEO );
+  DALI_TEST_CHECK( value.Get( map ) );
+
+  Property::Value* type = map.Find( RENDERING_TYPE );
+  DALI_TEST_CHECK( type );
+  DALI_TEST_EQUALS( "windowSurfaceTarget", type->Get<std::string>(), TEST_LOCATION );
+
+  videoView.SetProperty( VideoView::Property::VIDEO, nativeImageTarget );
+
+  value = videoView.GetProperty( VideoView::Property::VIDEO );
+  DALI_TEST_CHECK( value.Get( map ) );
+  type = map.Find( RENDERING_TYPE );
+
+  DALI_TEST_CHECK( type );
+  DALI_TEST_EQUALS( "nativeImageTarget", type->Get<std::string>(), TEST_LOCATION );
+
+  END_TEST;
+}
index 80429f4..604fb7b 100644 (file)
@@ -1166,12 +1166,12 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   application.Render(0);
   application.Render(2000u); // halfway point between blue and white
 
-  Vector4 color = renderer.GetProperty<Vector4>( borderColorIndex );
+  Vector4 color = DevelHandle::GetCurrentProperty< Vector4 >( renderer, borderColorIndex );
   Vector4 testColor = (Color::BLUE + Color::WHITE)*0.5f;
   DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", testColor ), true, TEST_LOCATION );
 
-  color = renderer.GetProperty<Vector3>( mixColorIndex );
+  color = DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex );
   testColor = Vector4( 1,1,1,0.4f );
   DALI_TEST_EQUALS( Vector3(color), Vector3(testColor), 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(testColor) ), true, TEST_LOCATION );
@@ -1179,11 +1179,11 @@ int UtcDaliVisualAnimateBorderVisual01(void)
 
   application.Render(2000u);
 
-  color = renderer.GetProperty<Vector4>( borderColorIndex );
+  color = DevelHandle::GetCurrentProperty< Vector4 >( renderer, borderColorIndex );
   DALI_TEST_EQUALS( color, Color::WHITE, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", Color::WHITE ), true, TEST_LOCATION );
 
-  color = renderer.GetProperty<Vector4>( mixColorIndex );
+  color = DevelHandle::GetCurrentProperty< Vector4 >( renderer, mixColorIndex );
   testColor = Vector4(1,1,1,0);
   DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(testColor) ), true, TEST_LOCATION );
@@ -1225,13 +1225,13 @@ int UtcDaliVisualAnimateBorderVisual02(void)
   application.Render(0);
   application.Render(2000u); // halfway point
 
-  float size = renderer.GetProperty<float>( index );
+  float size = DevelHandle::GetCurrentProperty< float >( renderer, index );
   DALI_TEST_EQUALS( size, 7.0f, 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("borderSize", 7.0f ), true, TEST_LOCATION );
 
   application.Render(2000u); // halfway point between blue and white
 
-  size = renderer.GetProperty<float>( index );
+  size = DevelHandle::GetCurrentProperty< float >( renderer, index );
   DALI_TEST_EQUALS( size, 9.0f, 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<float>("borderSize", 9.0f ), true, TEST_LOCATION );
 
@@ -1272,7 +1272,7 @@ int UtcDaliVisualAnimateColorVisual(void)
   application.Render(0);
   application.Render(2000u); // halfway point
 
-  Vector3 color = renderer.GetProperty<Vector3>( mixColorIndex );
+  Vector3 color = DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex );
   Vector3 testColor = Vector3(Color::BLUE + Color::WHITE)*0.5f;
   DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
 
@@ -1280,12 +1280,12 @@ int UtcDaliVisualAnimateColorVisual(void)
 
   application.Render(2000u); // halfway point between blue and white
 
-  color = renderer.GetProperty<Vector3>( mixColorIndex );
+  color = DevelHandle::GetCurrentProperty< Vector3 >( renderer, mixColorIndex );
   DALI_TEST_EQUALS( color, Vector3(Color::WHITE), TEST_LOCATION );
 
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(Color::WHITE) ), true, TEST_LOCATION );
 
-  blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  blendModeValue = DevelHandle::GetCurrentProperty( renderer, Renderer::Property::BLEND_MODE );
   DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
 
   END_TEST;
index 5adc065..b59e6e0 100755 (executable)
@@ -28,6 +28,7 @@
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 #include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/devel-api/object/handle-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h>
@@ -361,7 +362,7 @@ void ScrollBar::OnScrollPositionIntervalReached(PropertyNotification& source)
   Handle scrollableHandle = mScrollableObject.GetBaseHandle();
   if(scrollableHandle)
   {
-    mScrollPositionIntervalReachedSignal.Emit(scrollableHandle.GetProperty<float>(mPropertyScrollPosition));
+    mScrollPositionIntervalReachedSignal.Emit( DevelHandle::GetCurrentProperty< float >( scrollableHandle, mPropertyScrollPosition ) );
   }
 }
 
@@ -471,7 +472,7 @@ void ScrollBar::OnPan( const PanGesture& gesture )
         }
 
         ShowIndicator();
-        mScrollStart = scrollableHandle.GetProperty<float>(mPropertyScrollPosition);
+        mScrollStart = DevelHandle::GetCurrentProperty< float >( scrollableHandle, mPropertyScrollPosition );
         mGestureDisplacement = Vector3::ZERO;
         mIsPanning = true;
 
@@ -482,8 +483,8 @@ void ScrollBar::OnPan( const PanGesture& gesture )
         mGestureDisplacement.x += gesture.displacement.x;
         mGestureDisplacement.y += gesture.displacement.y;
 
-        float minScrollPosition = scrollableHandle.GetProperty<float>( mPropertyMinScrollPosition );
-        float maxScrollPosition = scrollableHandle.GetProperty<float>( mPropertyMaxScrollPosition );
+        float minScrollPosition = DevelHandle::GetCurrentProperty<float>( scrollableHandle, mPropertyMinScrollPosition );
+        float maxScrollPosition = DevelHandle::GetCurrentProperty<float>( scrollableHandle, mPropertyMaxScrollPosition );
 
         // The domain size is the internal range
         float domainSize = maxScrollPosition - minScrollPosition;
index 6794590..a121343 100755 (executable)
@@ -32,6 +32,7 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/devel-api/object/handle-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
@@ -407,7 +408,7 @@ ItemLayoutPtr ItemView::GetActiveLayout() const
 
 float ItemView::GetCurrentLayoutPosition(unsigned int itemId) const
 {
-  return Self().GetProperty<float>( Toolkit::ItemView::Property::LAYOUT_POSITION ) + static_cast<float>( itemId );
+  return DevelHandle::GetCurrentProperty< float >( Self(), Toolkit::ItemView::Property::LAYOUT_POSITION ) + static_cast<float>( itemId );
 }
 
 void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSize, float durationSeconds)
@@ -1233,7 +1234,7 @@ void ItemView::OnPan( const PanGesture& gesture )
 
       float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout);
 
-      float currentOvershoot = self.GetProperty<float>(Toolkit::ItemView::Property::OVERSHOOT);
+      float currentOvershoot = DevelHandle::GetCurrentProperty< float >( self, Toolkit::ItemView::Property::OVERSHOOT );
 
       self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
 
@@ -1645,7 +1646,7 @@ void ItemView::AnimateScrollOvershoot(float overshootAmount, bool animateBack)
 
   if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0)
   {
-    float currentOvershoot = self.GetProperty<float>(Toolkit::ItemView::Property::OVERSHOOT);
+    float currentOvershoot = DevelHandle::GetCurrentProperty< float >( self, Toolkit::ItemView::Property::OVERSHOOT );
     float duration = 0.0f;
 
     if (mOvershootOverlay)
index eff1b08..8652ac4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -18,6 +18,9 @@
 // CLASS HEADER
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/object/handle-devel.h>
+
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
 #include <dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h>
@@ -280,7 +283,7 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible )
 void ScrollOvershootEffectRipple::OnOvershootNotification(PropertyNotification& source)
 {
   Actor self = mAttachedScrollView.Self();
-  mOvershoot = self.GetProperty<float>(mOvershootProperty);
+  mOvershoot = DevelHandle::GetCurrentProperty< float >( self, mOvershootProperty );
   SetOvershoot(mOvershoot, false);
   UpdatePropertyNotifications();
 }
index 3063cbc..9c05d79 100644 (file)
@@ -27,6 +27,7 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/object/property-map.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -1533,7 +1534,7 @@ bool ScrollView::SnapWithVelocity(Vector2 velocity)
 
     if(child)
     {
-      Vector2 position = Self().GetProperty<Vector2>(Toolkit::ScrollView::Property::SCROLL_POSITION);
+      Vector2 position = DevelHandle::GetCurrentProperty<Vector2>( Self(), Toolkit::ScrollView::Property::SCROLL_POSITION );
 
       // Get center-point of the Actor.
       Vector3 childPosition = GetPositionOfAnchor(child, AnchorPoint::CENTER);
@@ -1731,7 +1732,7 @@ bool ScrollView::AnimateTo(const Vector2& position, const Vector2& positionDurat
     }
 
     DALI_LOG_SCROLL_STATE("[0x%X] position-changed, mScrollTargetPosition[%.2f, %.2f], mScrollPrePosition[%.2f, %.2f], mScrollPostPosition[%.2f, %.2f]", this, mScrollTargetPosition.x, mScrollTargetPosition.y, mScrollPrePosition.x, mScrollPrePosition.y, mScrollPostPosition.x, mScrollPostPosition.y );
-    DALI_LOG_SCROLL_STATE("[0x%X] SCROLL_PRE_POSITION[%.2f, %.2f], SCROLL_POSITION[%.2f, %.2f]", this, self.GetProperty( Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get<Vector2>().x, self.GetProperty( Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get<Vector2>().y, self.GetProperty( Toolkit::ScrollView::Property::SCROLL_POSITION ).Get<Vector2>().x, self.GetProperty( Toolkit::ScrollView::Property::SCROLL_POSITION ).Get<Vector2>().y );
+    DALI_LOG_SCROLL_STATE("[0x%X] SCROLL_PRE_POSITION[%.2f, %.2f], SCROLL_POSITION[%.2f, %.2f]", this, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get<Vector2>().x, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get<Vector2>().y, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_POSITION ).Get<Vector2>().x, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_POSITION ).Get<Vector2>().y );
   }
 
   SetScrollUpdateNotification(true);
@@ -1828,14 +1829,14 @@ void ScrollView::FindAndUnbindActor(Actor child)
 
 Vector2 ScrollView::GetPropertyPrePosition() const
 {
-  Vector2 position = Self().GetProperty<Vector2>(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION);
+  Vector2 position = DevelHandle::GetCurrentProperty< Vector2 >( Self(), Toolkit::ScrollView::Property::SCROLL_PRE_POSITION );
   WrapPosition(position);
   return position;
 }
 
 Vector2 ScrollView::GetPropertyPosition() const
 {
-  Vector2 position = Self().GetProperty<Vector2>(Toolkit::ScrollView::Property::SCROLL_POSITION);
+  Vector2 position = DevelHandle::GetCurrentProperty< Vector2 >( Self(), Toolkit::ScrollView::Property::SCROLL_POSITION );
   WrapPosition(position);
 
   return position;
@@ -2174,7 +2175,7 @@ bool ScrollView::OnWheelEvent(const WheelEvent& event)
 void ScrollView::ResetScrolling()
 {
   Actor self = Self();
-  self.GetProperty(Toolkit::ScrollView::Property::SCROLL_POSITION).Get(mScrollPostPosition);
+  DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_POSITION ).Get( mScrollPostPosition );
   mScrollPrePosition = mScrollPostPosition;
   DALI_LOG_SCROLL_STATE("[0x%X] Setting SCROLL_PRE_POSITION To[%.2f, %.2f]", this, mScrollPostPosition.x, mScrollPostPosition.y );
   self.SetProperty(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION, mScrollPostPosition);
@@ -2183,8 +2184,8 @@ void ScrollView::ResetScrolling()
 void ScrollView::UpdateLocalScrollProperties()
 {
   Actor self = Self();
-  self.GetProperty(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION).Get(mScrollPrePosition);
-  self.GetProperty(Toolkit::ScrollView::Property::SCROLL_POSITION).Get(mScrollPostPosition);
+  DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get( mScrollPrePosition );
+  DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_POSITION ).Get( mScrollPostPosition );
 }
 
 // private functions
@@ -2230,7 +2231,7 @@ void ScrollView::AnimateInternalXTo( float position, float duration, AlphaFuncti
   if( duration > Math::MACHINE_EPSILON_10 )
   {
     Actor self = Self();
-    DALI_LOG_SCROLL_STATE("[0x%X], Animating from[%.2f] to[%.2f]", this, self.GetProperty(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION).Get<Vector2>().x, position );
+    DALI_LOG_SCROLL_STATE("[0x%X], Animating from[%.2f] to[%.2f]", this, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get< Vector2 >().x, position );
     mInternalXAnimation = Animation::New(duration);
     DALI_LOG_SCROLL_STATE("[0x%X], mInternalXAnimation[0x%X]", this, mInternalXAnimation.GetObjectPtr() );
     mInternalXAnimation.FinishedSignal().Connect(this, &ScrollView::OnScrollAnimationFinished);
@@ -2251,7 +2252,7 @@ void ScrollView::AnimateInternalYTo( float position, float duration, AlphaFuncti
   if( duration > Math::MACHINE_EPSILON_10 )
   {
     Actor self = Self();
-    DALI_LOG_SCROLL_STATE("[0x%X], Animating from[%.2f] to[%.2f]", this, self.GetProperty(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION).Get<Vector2>().y, position );
+    DALI_LOG_SCROLL_STATE("[0x%X], Animating from[%.2f] to[%.2f]", this, DevelHandle::GetCurrentProperty( self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION ).Get< Vector2 >().y, position );
     mInternalYAnimation = Animation::New(duration);
     DALI_LOG_SCROLL_STATE("[0x%X], mInternalYAnimation[0x%X]", this, mInternalYAnimation.GetObjectPtr() );
     mInternalYAnimation.FinishedSignal().Connect(this, &ScrollView::OnScrollAnimationFinished);
@@ -2278,7 +2279,7 @@ void ScrollView::OnScrollAnimationFinished( Animation& source )
 
   if( source == mInternalXAnimation )
   {
-    DALI_LOG_SCROLL_STATE("[0x%X] mInternalXAnimation[0x%X], expected[%.2f], actual[%.2f], post[%.2f]", this, mInternalXAnimation.GetObjectPtr(), mScrollTargetPosition.x, Self().GetProperty(SCROLL_PRE_POSITION).Get<Vector2>().x, mScrollPostPosition.x );
+    DALI_LOG_SCROLL_STATE("[0x%X] mInternalXAnimation[0x%X], expected[%.2f], actual[%.2f], post[%.2f]", this, mInternalXAnimation.GetObjectPtr(), mScrollTargetPosition.x, DevelHandle::GetCurrentProperty( Self(), SCROLL_PRE_POSITION ).Get< Vector2 >().x, mScrollPostPosition.x );
 
     if( !(mScrollStateFlags & AnimatingInternalY) )
     {
@@ -2298,7 +2299,7 @@ void ScrollView::OnScrollAnimationFinished( Animation& source )
 
   if( source == mInternalYAnimation )
   {
-    DALI_LOG_SCROLL_STATE("[0x%X] mInternalYAnimation[0x%X], expected[%.2f], actual[%.2f], post[%.2f]", this, mInternalYAnimation.GetObjectPtr(), mScrollTargetPosition.y, Self().GetProperty(SCROLL_PRE_POSITION).Get<Vector2>().y, mScrollPostPosition.y );
+    DALI_LOG_SCROLL_STATE("[0x%X] mInternalYAnimation[0x%X], expected[%.2f], actual[%.2f], post[%.2f]", this, mInternalYAnimation.GetObjectPtr(), mScrollTargetPosition.y, DevelHandle::GetProperty( Self(), SCROLL_PRE_POSITION ).Get< Vector2 >().y, mScrollPostPosition.y );
 
     if( !(mScrollStateFlags & AnimatingInternalX) )
     {
index 2ec07ef..1fd4be5 100644 (file)
@@ -67,7 +67,7 @@ DALI_TYPE_REGISTRATION_END()
 
 const char* const VOLUME_LEFT( "volumeLeft" );
 const char* const VOLUME_RIGHT( "volumeRight" );
-const char* const RENDERING_TARGET( "RENDERING_TARGET" );
+const char* const RENDERING_TARGET( "renderingTarget" );
 const char* const WINDOW_SURFACE_TARGET( "windowSurfaceTarget" );
 const char* const NATIVE_IMAGE_TARGET( "nativeImageTarget" );
 
@@ -76,7 +76,7 @@ const char* const NATIVE_IMAGE_TARGET( "nativeImageTarget" );
 VideoView::VideoView()
 : Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ),
   mCurrentVideoPlayPosition( 0 ),
-  mSetRenderingTarget( false ),
+  mIsNativeImageTarget( true ),
   mIsPlay( false ),
   mIsPause( false )
 {
@@ -97,23 +97,31 @@ Toolkit::VideoView VideoView::New()
   return handle;
 }
 
+void VideoView::OnInitialize()
+{
+  Any source;
+  Dali::NativeImageSourcePtr nativeImageSourcePtr = Dali::NativeImageSource::New( source );
+  mNativeImage = Dali::NativeImage::New( *nativeImageSourcePtr );
+
+  mVideoPlayer.SetRenderingTarget( nativeImageSourcePtr );
+  mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish );
+}
+
 void VideoView::SetUrl( const std::string& url )
 {
   if( mUrl != url || !mPropertyMap.Empty() )
   {
-    mPropertyMap.Clear();
-
     mUrl = url;
+    mPropertyMap.Clear();
   }
 
-  if( mSetRenderingTarget )
-  {
-    mVideoPlayer.SetUrl( mUrl );
-  }
-  else
+  if( mIsNativeImageTarget )
   {
-    SetNativeImageTarget();
+    Actor self( Self() );
+    Internal::InitializeVisual( self, mVisual, mNativeImage );
   }
+
+  mVideoPlayer.SetUrl( mUrl );
 }
 
 void VideoView::SetPropertyMap( Property::Map map )
@@ -505,8 +513,6 @@ void VideoView::SetWindowSurfaceTarget()
   Actor self = Self();
   int curPos = mVideoPlayer.GetPlayPosition();
 
-  mSetRenderingTarget = true;
-
   if( mVisual )
   {
     Toolkit::GetImplementation(mVisual).SetOffStage(self);
@@ -515,7 +521,8 @@ void VideoView::SetWindowSurfaceTarget()
 
   mVideoPlayer.SetRenderingTarget( Dali::Adaptor::Get().GetNativeWindowHandle() );
   mVideoPlayer.SetUrl( mUrl );
-  mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish );
+
+  mIsNativeImageTarget = false;
 
   if( mIsPlay )
   {
@@ -534,17 +541,15 @@ void VideoView::SetNativeImageTarget()
   Actor self( Self() );
   int curPos = mVideoPlayer.GetPlayPosition();
 
-  mSetRenderingTarget = true;
-
   Any source;
   Dali::NativeImageSourcePtr nativeImageSourcePtr = Dali::NativeImageSource::New( source );
   mNativeImage = Dali::NativeImage::New( *nativeImageSourcePtr );
 
   mVideoPlayer.SetRenderingTarget( nativeImageSourcePtr );
   mVideoPlayer.SetUrl( mUrl );
-  mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish );
 
   Internal::InitializeVisual( self, mVisual, mNativeImage );
+  mIsNativeImageTarget = true;
 
   if( mIsPlay )
   {
index 57641cd..a662802 100644 (file)
@@ -185,7 +185,6 @@ public:
    */
   void SetDepthIndex( int depthIndex );
 
-
   /**
    * @brief Performs actions as requested using the action name.
    * @SINCE_1_1.38
@@ -201,6 +200,11 @@ public:
 private: // From Control
 
   /**
+   * @copydoc Toolkit::Control::OnInitialize()
+   */
+  virtual void OnInitialize();
+
+  /**
    * @copydoc Toolkit::Control::OnStageConnect()
    */
   virtual void OnStageConnection( int depth );
@@ -246,7 +250,7 @@ private:
   Dali::Toolkit::VideoView::VideoViewSignalType mFinishedSignal;
   std::string mUrl;
   int mCurrentVideoPlayPosition;
-  bool mSetRenderingTarget;
+  bool mIsNativeImageTarget;
   bool mIsPlay;
   bool mIsPause;
 };
index b38d23b..98596eb 100644 (file)
@@ -34,7 +34,7 @@
 namespace
 {
 
-const char* LANDSCAPE_QUALIFIER = "landscape";
+//const char* LANDSCAPE_QUALIFIER = "landscape";
 const char* PORTRAIT_QUALIFIER  = "portrait";
 const char* FONT_SIZE_QUALIFIER = "fontsize";
 
@@ -295,23 +295,16 @@ bool StyleManager::LoadJSON( Toolkit::Builder builder, const std::string& jsonFi
 static void CollectQualifiers( std::vector<std::string>& qualifiersOut )
 {
   // Append the relevant qualifier for orientation
-  int orientation = 0; // Get the orientation from the system
-  switch( orientation )
-  {
-    case 90:
-    case 270:
-    {
-      qualifiersOut.push_back( std::string( LANDSCAPE_QUALIFIER ) );
-      break;
-    }
-    case 180:
-    case 0: // fall through
-    default:
-    {
-      qualifiersOut.push_back( std::string( PORTRAIT_QUALIFIER ) );
-      break;
-    }
-  }
+  // int orientation = 0; // Get the orientation from the system
+  /*
+  //// To Do /////
+  Getting orientation from the system, and determine Qualifie LANDSCAPE or PORTRAIT
+  orientation  0, 180 : PORTRAIT_QUALIFIER (default)
+  orientation 90, 270 : LANDSCAPE_QUALIFIER
+  */
+
+  qualifiersOut.push_back( std::string( PORTRAIT_QUALIFIER ) );
+
 }
 
 /**
index 275f569..d483ef5 100644 (file)
@@ -521,8 +521,11 @@ void Visual::Base::AnimateProperty(
   Property::Map map;
   DoCreatePropertyMap( map );
   Property::Value* valuePtr = map.Find( Toolkit::DevelVisual::Property::TYPE );
-  int visualType;
-  valuePtr->Get(visualType);
+  int visualType = -1;
+  if( valuePtr )
+  {
+    valuePtr->Get( visualType );
+  }
 
   if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR ||
       animator.propertyKey == MIX_COLOR ||
@@ -540,7 +543,7 @@ void Visual::Base::AnimateProperty(
   }
   else if( mImpl->mRenderer )
   {
-    AnimateRendererProperty(transition, animator);
+    AnimateRendererProperty( transition, animator );
   }
 }
 
index 844b660..8faaf51 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 35;
+const unsigned int TOOLKIT_MICRO_VERSION = 36;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 9643567..d3ffc40 100644 (file)
@@ -1035,7 +1035,12 @@ static unsigned int nsvg__parseColorRGB(const char* str)
 {
     int r = -1, g = -1, b = -1;
     char s1[32]="", s2[32]="";
-    sscanf(str + 4, "%d%[%%, \t]%d%[%%, \t]%d", &r, s1, &g, s2, &b);
+
+    /**
+     * In the original file, the formatted data reading did not specify the string with width limitation.
+     * To prevent the possible overflow, we replace '%s' with '%32s' here.
+     */
+    sscanf(str + 4, "%d%32[%%, \t]%d%32[%%, \t]%d", &r, s1, &g, s2, &b);
     if (strchr(s1, '%')) {
         return NSVG_RGB((r*255)/100,(g*255)/100,(b*255)/100);
     } else {
index 79f0c80..ce84638 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.2.35
+Version:    1.2.36
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-2-Clause and MIT
old mode 100644 (file)
new mode 100755 (executable)
index 736c697..ced564b
@@ -39,14 +39,17 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_EventThreadCallback(SWIG_CallbackM
       result = (Dali::EventThreadCallback *)new Dali::EventThreadCallback((Dali::CallbackBase *)Dali::MakeCallback(arg1));
     } catch (std::out_of_range& e) {
       {
+        delete result;
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
       };
     } catch (std::exception& e) {
       {
+        delete result;
         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
       };
     } catch (...) {
       {
+        delete result;
         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
       };
     }