Merge "[3.0] Tizen Directory Migration" into tizen accepted/tizen/common/20160711.170612 accepted/tizen/ivi/20160711.084810 accepted/tizen/mobile/20160711.084853 accepted/tizen/tv/20160711.084625 accepted/tizen/wearable/20160711.084736 submit/tizen/20160711.050618
authorminho.sun <minho.sun@samsung.com>
Mon, 11 Jul 2016 05:01:38 +0000 (22:01 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 11 Jul 2016 05:01:38 +0000 (22:01 -0700)
50 files changed:
automated-tests/execute.sh
automated-tests/src/dali-toolkit-third-party/facebook-flexbox/layout-test-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.h [deleted file]
automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp
automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-JsonParser.cpp
automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
build/tizen/Makefile.am
build/tizen/dali-toolkit/Makefile.am
dali-toolkit/devel-api/builder/json-parser.cpp
dali-toolkit/devel-api/builder/tree-node.cpp
dali-toolkit/devel-api/builder/tree-node.h
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/flex-container/flex-container-impl.h
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/renderers/svg/svg-rasterize-thread.cpp
dali-toolkit/internal/controls/renderers/svg/svg-renderer.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/third-party/facebook-flexbox/layout.c [moved from dali-toolkit/internal/controls/flex-container/layout.c with 100% similarity]
dali-toolkit/third-party/facebook-flexbox/layout.h [moved from dali-toolkit/internal/controls/flex-container/layout.h with 100% similarity]
dali-toolkit/third-party/file.list [new file with mode: 0644]
dali-toolkit/third-party/nanosvg/nanosvg.cc [moved from dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc with 100% similarity]
dali-toolkit/third-party/nanosvg/nanosvg.h [moved from dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h with 100% similarity]
dali-toolkit/third-party/nanosvg/nanosvgrast.cc [moved from dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc with 100% similarity]
dali-toolkit/third-party/nanosvg/nanosvgrast.h [moved from dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.h with 100% similarity]
doc/dali-toolkit-doc.h
packaging/dali-toolkit.spec

index 64e27ee..989560f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TEMP=`getopt -o hsSm --long help,serial,tct,modules -n 'execute.sh' -- "$@"`
+TEMP=`getopt -o dhsSm --long debug,help,serial,tct,modules -n 'execute.sh' -- "$@"`
 
 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
 
@@ -9,8 +9,9 @@ eval set -- "$TEMP"
 
 function usage
 {
-    echo -e "Usage: execute.sh [-s|-S|-r] [module|testcase]"
+    echo -e "Usage: execute.sh [-d][-s|-S|-r] [module|testcase]"
     echo -e "       execute.sh\t\tExecute test cases from all modules in parallel"
+    echo -e "       execute.sh -d <testcase>\tDebug testcase"
     echo -e "       execute.sh [module]\tExecute test cases from the given module in parallel"
     echo -e "       execute.sh -s [module]\t\tExecute test cases in serial using Testkit-Lite"
     echo -e "       execute.sh -S [module]\t\tExecute test cases in serial"
@@ -21,9 +22,11 @@ function usage
 opt_tct=0
 opt_serial=""
 opt_modules=0
+opt_debug=0
 while true ; do
     case "$1" in
         -h|--help)     usage ;;
+        -d|--debug)    opt_debug=1 ; shift ;;
         -s|--tct)      opt_tct=1 ; shift ;;
         -S|--serial)   opt_serial="-s" ; shift ;;
         -m|--modules)  opt_modules=1 ; shift ;;
@@ -127,16 +130,20 @@ else
         summary_end
 
     else
-       # First argument is not an executable. Is it a test case name?
-       # Try executing each executable with the test case name until success/known failure
+        # First argument is not an executable. Is it a test case name?
+        # Try executing each executable with the test case name until success/known failure
         for mod in $modules
         do
             output=`build/src/$mod/tct-$mod-core $1`
             ret=$?
             if [ $ret -ne 6 ] ; then
-               echo $output
-               if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
-               exit $ret
+                if [ $opt_debug -ne 0 ] ; then
+                    gdb --args build/src/$mod/tct-$mod-core $1
+                else
+                    echo $output
+                    if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
+                fi
+                exit $ret
             fi
         done
         echo $1 not found
index 9c8a903..7513141 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <dali-toolkit/internal/controls/flex-container/layout.h>
+#include <dali-toolkit/third-party/facebook-flexbox/layout.h>
 
 void test(const char *name, css_node_t *style, css_node_t *expected_layout);
 bool tests_finished(void);
index 873c8d2..1a3490b 100644 (file)
@@ -87,8 +87,10 @@ DummyControlImplOverride::DummyControlImplOverride()
 : DummyControlImpl(),
   initializeCalled(false),
   activatedCalled(false),
-  themeChangeCalled( false ),
-  fontChangeCalled( false ),
+  onAccTouchedCalled(false),
+  onAccValueChangeCalled(false),
+  themeChangeCalled(false),
+  fontChangeCalled(false),
   pinchCalled(false),
   panCalled(false),
   tapCalled(false),
@@ -113,6 +115,12 @@ DummyControlImplOverride::~DummyControlImplOverride() { }
 
 void DummyControlImplOverride::OnInitialize() { initializeCalled = true; }
 bool DummyControlImplOverride::OnAccessibilityActivated() { activatedCalled = true; return true; }
+bool DummyControlImplOverride::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; }
+bool DummyControlImplOverride::OnAccessibilityValueChange( bool isIncrease )
+{
+  onAccValueChangeCalled = true; return true;
+}
+
 void DummyControlImplOverride::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
 {
   themeChangeCalled = change == StyleChange::THEME_CHANGE;
index 0538199..496786e 100644 (file)
@@ -103,6 +103,9 @@ private: // From Internal::Control
 
   virtual void OnInitialize();
   virtual bool OnAccessibilityActivated();
+  virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
+  virtual bool OnAccessibilityValueChange( bool isIncrease );
+
   virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
   virtual void OnPinch(const PinchGesture& pinch);
   virtual void OnPan(const PanGesture& pan);
@@ -128,6 +131,8 @@ public:
 
   bool initializeCalled;
   bool activatedCalled;
+  bool onAccTouchedCalled;
+  bool onAccValueChangeCalled;
   bool themeChangeCalled;
   bool fontChangeCalled;
   bool pinchCalled;
index 5820806..286f733 100644 (file)
  *
  */
 
-#include "toolkit-accessibility-adaptor.h"
-
-#include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/base-object.h>
+#include <dali/integration-api/events/pan-gesture-event.h>
+#include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
 #include <dali/devel-api/adaptor-framework/accessibility-action-handler.h>
+#include <dali/devel-api/adaptor-framework/accessibility-gesture-handler.h>
 
 namespace Dali
 {
@@ -48,6 +48,13 @@ public:
 
   void MockSetReadPosition( Vector2& position );
 
+  void SetEnabled(bool enabled)
+  {
+    mIsEnabled = enabled;
+  }
+
+  void SendPanGesture( const Dali::Integration::PanGestureEvent& panEvent );
+
 public:
 
   bool IsEnabled() const;
@@ -56,16 +63,17 @@ public:
 
   Vector2 GetReadPosition() const;
 
-  bool HandleActionNextEvent();
-  bool HandleActionPreviousEvent();
+  bool HandleActionNextEvent(bool);
+  bool HandleActionPreviousEvent(bool);
   bool HandleActionActivateEvent();
   bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
-  bool HandleActionReadNextEvent();
-  bool HandleActionReadPreviousEvent();
+  bool HandleActionReadNextEvent(bool);
+  bool HandleActionReadPreviousEvent(bool);
   bool HandleActionUpEvent();
   bool HandleActionDownEvent();
   bool HandleActionClearFocusEvent();
-  bool HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp);
+  bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
+  bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
   bool HandleActionBackEvent();
   bool HandleActionEnableEvent();
   bool HandleActionDisableEvent();
@@ -84,8 +92,6 @@ public:
   bool HandleActionReadPauseResumeEvent();
   bool HandleActionStartStopEvent();
 
-public: // Signals
-
 private:
 
   bool mIsEnabled;
@@ -133,6 +139,11 @@ bool AccessibilityAdaptor::IsEnabled() const
   return mIsEnabled;
 }
 
+void AccessibilityAdaptor::SendPanGesture( const Integration::PanGestureEvent& panEvent )
+{
+  mGestureHandler->HandlePanGesture( panEvent );
+}
+
 void AccessibilityAdaptor::SetActionHandler(Dali::AccessibilityActionHandler& handler)
 {
   mActionHandler = &handler;
@@ -143,7 +154,7 @@ void AccessibilityAdaptor::SetGestureHandler(Dali::AccessibilityGestureHandler&
   mGestureHandler = &handler;
 }
 
-bool AccessibilityAdaptor::HandleActionNextEvent()
+bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
 {
   if( mActionHandler )
   {
@@ -152,7 +163,7 @@ bool AccessibilityAdaptor::HandleActionNextEvent()
   return false;
 }
 
-bool AccessibilityAdaptor::HandleActionPreviousEvent()
+bool AccessibilityAdaptor::HandleActionPreviousEvent(bool allowEndFeedback)
 {
   if( mActionHandler )
   {
@@ -179,7 +190,7 @@ bool AccessibilityAdaptor::HandleActionReadEvent(unsigned int x, unsigned int y,
   return false;
 }
 
-bool AccessibilityAdaptor::HandleActionReadNextEvent()
+bool AccessibilityAdaptor::HandleActionReadNextEvent(bool allowEndFeedback)
 {
   if( mActionHandler )
   {
@@ -188,7 +199,7 @@ bool AccessibilityAdaptor::HandleActionReadNextEvent()
   return false;
 }
 
-bool AccessibilityAdaptor::HandleActionReadPreviousEvent()
+bool AccessibilityAdaptor::HandleActionReadPreviousEvent(bool allowEndFeedback)
 {
   if( mActionHandler )
   {
@@ -224,7 +235,7 @@ bool AccessibilityAdaptor::HandleActionClearFocusEvent()
   return false;
 }
 
-bool AccessibilityAdaptor::HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp)
+bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
 {
   if( mActionHandler )
   {
@@ -235,6 +246,17 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(TouchPoint& point, unsigned l
   return false;
 }
 
+bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  if( mActionHandler )
+  {
+    Dali::TouchEvent touchEvent;
+    touchEvent.points.push_back( point );
+    return mActionHandler->AccessibilityActionTouch( touchEvent );
+  }
+  return false;
+}
+
 bool AccessibilityAdaptor::HandleActionBackEvent()
 {
   if( mActionHandler )
@@ -419,13 +441,6 @@ AccessibilityAdaptor::~AccessibilityAdaptor()
 {
 }
 
-// Mock setup:
-
-void AccessibilityAdaptor::MockSetReadPosition( Vector2& position )
-{
-  Internal::Adaptor::GetImplementation(*this).MockSetReadPosition( position );
-}
-
 // Methods:
 
 Vector2 AccessibilityAdaptor::GetReadPosition() const
@@ -435,8 +450,7 @@ Vector2 AccessibilityAdaptor::GetReadPosition() const
 
 bool AccessibilityAdaptor::IsEnabled() const
 {
-  //return Internal::Adaptor::GetImplementation(*this).IsEnabled();
-  return false;
+  return Internal::Adaptor::GetImplementation(*this).IsEnabled();
 }
 
 void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
@@ -449,14 +463,14 @@ void AccessibilityAdaptor::SetGestureHandler(AccessibilityGestureHandler& handle
   Internal::Adaptor::GetImplementation(*this).SetGestureHandler(handler);
 }
 
-bool AccessibilityAdaptor::HandleActionNextEvent()
+bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
 {
-  return Internal::Adaptor::GetImplementation(*this).HandleActionNextEvent();
+  return Internal::Adaptor::GetImplementation(*this).HandleActionNextEvent(allowEndFeedback);
 }
 
-bool AccessibilityAdaptor::HandleActionPreviousEvent()
+bool AccessibilityAdaptor::HandleActionPreviousEvent(bool allowEndFeedback)
 {
-  return Internal::Adaptor::GetImplementation(*this).HandleActionPreviousEvent();
+  return Internal::Adaptor::GetImplementation(*this).HandleActionPreviousEvent(allowEndFeedback);
 }
 
 bool AccessibilityAdaptor::HandleActionActivateEvent()
@@ -469,14 +483,14 @@ bool AccessibilityAdaptor::HandleActionReadEvent(unsigned int x, unsigned int y,
   return Internal::Adaptor::GetImplementation(*this).HandleActionReadEvent( x, y, allowReadAgain );
 }
 
-bool AccessibilityAdaptor::HandleActionReadNextEvent()
+bool AccessibilityAdaptor::HandleActionReadNextEvent(bool allowEndFeedback)
 {
-  return Internal::Adaptor::GetImplementation(*this).HandleActionReadNextEvent();
+  return Internal::Adaptor::GetImplementation(*this).HandleActionReadNextEvent(allowEndFeedback);
 }
 
-bool AccessibilityAdaptor::HandleActionReadPreviousEvent()
+bool AccessibilityAdaptor::HandleActionReadPreviousEvent(bool allowEndFeedback)
 {
-  return Internal::Adaptor::GetImplementation(*this).HandleActionReadPreviousEvent();
+  return Internal::Adaptor::GetImplementation(*this).HandleActionReadPreviousEvent(allowEndFeedback);
 }
 
 bool AccessibilityAdaptor::HandleActionUpEvent()
@@ -494,11 +508,16 @@ bool AccessibilityAdaptor::HandleActionClearFocusEvent()
   return Internal::Adaptor::GetImplementation(*this).HandleActionClearFocusEvent();
 }
 
-bool AccessibilityAdaptor::HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp)
+bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
 {
   return Internal::Adaptor::GetImplementation(*this).HandleActionScrollEvent(point, timeStamp);
 }
 
+bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  return Internal::Adaptor::GetImplementation(*this).HandleActionTouchEvent(point, timeStamp);
+}
+
 bool AccessibilityAdaptor::HandleActionBackEvent()
 {
   return Internal::Adaptor::GetImplementation(*this).HandleActionBackEvent();
@@ -590,3 +609,29 @@ AccessibilityAdaptor::AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdap
 }
 
 } // namespace Dali
+
+
+namespace Test
+{
+namespace AccessibilityAdaptor
+{
+
+// Mock setup:
+
+void MockSetReadPosition( Dali::AccessibilityAdaptor adaptor, Dali::Vector2& position )
+{
+  Dali::Internal::Adaptor::GetImplementation(adaptor).MockSetReadPosition( position );
+}
+
+void SetEnabled( Dali::AccessibilityAdaptor adaptor, bool enabled )
+{
+  Dali::Internal::Adaptor::GetImplementation(adaptor).SetEnabled(enabled);
+}
+
+void SendPanGesture( Dali::AccessibilityAdaptor adaptor, const Dali::Integration::PanGestureEvent& panEvent )
+{
+  Dali::Internal::Adaptor::GetImplementation(adaptor).SendPanGesture( panEvent );
+}
+
+} // namespace AccessibilityAdaptor
+} // namespace Test
index 2975c33..744f971 100644 (file)
@@ -1,11 +1,8 @@
-// Prevent normal accessibility adaptor declaration from loading
-#define __DALI_ACCESSIBILITY_ADAPTOR_H__
-
-#ifndef __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
-#define __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#ifndef __DALI_TEST_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#define __DALI_TEST_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/events/touch-point.h>
+#include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
+#include <dali/integration-api/events/pan-gesture-event.h>
 
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
+namespace Test
 {
-class AccessibilityAdaptor;
-}
-}
-class AccessibilityActionHandler;
-class AccessibilityGestureHandler;
-class TouchPoint;
-
-/**
- * This creates a stubbed AccessibilityAdaptor so that internal Toolkit Adaptor calls work.
- */
-class AccessibilityAdaptor : public BaseHandle
+namespace AccessibilityAdaptor
 {
-public: // Construction & Destruction
-  AccessibilityAdaptor();
-  ~AccessibilityAdaptor();
-
-public: // Mock object setup.
-
-  void MockSetReadPosition( Vector2& position );
-
-public: // Getters
-
-  static AccessibilityAdaptor Get();
-
-  Vector2 GetReadPosition() const;
-  bool IsEnabled() const;
-  void SetActionHandler(AccessibilityActionHandler& handler);
-  void SetGestureHandler(AccessibilityGestureHandler& handler);
-
-  bool HandleActionNextEvent();
-  bool HandleActionPreviousEvent();
-  bool HandleActionActivateEvent();
-  bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
-  bool HandleActionReadNextEvent();
-  bool HandleActionReadPreviousEvent();
-  bool HandleActionUpEvent();
-  bool HandleActionDownEvent();
-  bool HandleActionClearFocusEvent();
-  bool HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp);
-  bool HandleActionBackEvent();
-  void HandleActionEnableEvent();
-  void HandleActionDisableEvent();
-  bool HandleActionScrollUpEvent();
-  bool HandleActionScrollDownEvent();
-  bool HandleActionPageLeftEvent();
-  bool HandleActionPageRightEvent();
-  bool HandleActionPageUpEvent();
-  bool HandleActionPageDownEvent();
-  bool HandleActionMoveToFirstEvent();
-  bool HandleActionMoveToLastEvent();
-  bool HandleActionReadFromTopEvent();
-  bool HandleActionReadFromNextEvent();
-  bool HandleActionZoomEvent();
-  bool HandleActionReadIndicatorInformationEvent();
-  bool HandleActionReadPauseResumeEvent();
-  bool HandleActionStartStopEvent();
 
-  AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdaptor* adaptor );
-};
+void MockSetReadPosition( Dali::AccessibilityAdaptor adaptor, Dali::Vector2& position );
+void SetEnabled( Dali::AccessibilityAdaptor adaptor, bool enabled);
+void SendPanGesture( Dali::AccessibilityAdaptor adaptor, const Dali::Integration::PanGestureEvent& panEvent );
 
-} // namespace Dali
+} // namespace AccessibilityAdaptor
+} // namespace Test
 
-#endif // __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#endif //
index 6da3d47..7200f0f 100644 (file)
@@ -1,5 +1,3 @@
-#include "toolkit-tts-player.h"
-
 /*
  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  *
@@ -18,8 +16,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
+#include <dali/dali.h>
+
 
 namespace Dali
 {
@@ -28,11 +26,76 @@ TtsPlayer::TtsPlayer()
 {
 }
 
+namespace Internal
+{
+namespace Adaptor
+{
+
+class TtsPlayer : public BaseObject
+{
+public:
+  TtsPlayer()
+  {
+  }
+
+  void Play(const std::string& text)
+  {
+  }
+
+  void Stop()
+  {
+  }
+
+  void Pause()
+  {
+  }
+
+  void Resume()
+  {
+  }
+
+  Dali::TtsPlayer::State GetState()
+  {
+    return Dali::TtsPlayer::READY;
+  }
+
+  Dali::TtsPlayer::StateChangedSignalType& StateChangedSignal()
+  {
+    return mStateChangedSignal;
+  }
+private:
+  Dali::TtsPlayer::StateChangedSignalType mStateChangedSignal;
+};
+
+
+inline TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+  BaseObject& handle = player.GetBaseObject();
+  return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+inline const TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
+{
+  DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
+  const BaseObject& handle = player.GetBaseObject();
+  return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
+}
+
+} // Adaptor
+} // Internal
+
+static IntrusivePtr<Internal::Adaptor::TtsPlayer> ttsSingleton = NULL;
+
 TtsPlayer TtsPlayer::Get(Dali::TtsPlayer::Mode mode)
 {
-  TtsPlayer ttsPlayer;
+  if( ! ttsSingleton )
+  {
+    ttsSingleton.Reset( new Dali::Internal::Adaptor::TtsPlayer() );
+  }
+  TtsPlayer playerHandle(ttsSingleton.Get());
 
-  return ttsPlayer;
+  return playerHandle;
 }
 
 TtsPlayer::~TtsPlayer()
@@ -77,7 +140,12 @@ TtsPlayer::State TtsPlayer::GetState()
 
 TtsPlayer::StateChangedSignalType& TtsPlayer::StateChangedSignal()
 {
-  return mStateChangedSignal; // GetImplementation(*this).StateChangedSignal();
+  return Internal::Adaptor::GetImplementation(*this).StateChangedSignal();
+}
+
+TtsPlayer::TtsPlayer( Internal::Adaptor::TtsPlayer* player )
+: BaseHandle( player )
+{
 }
 
 } // namespace Dali
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.h
deleted file mode 100644 (file)
index 269039e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef __DALI_TOOLKIT_TTS_PLAYER_H__
-#define __DALI_TOOLKIT_TTS_PLAYER_H__
-
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
-
-namespace Dali
-{
-
-namespace Internal DALI_INTERNAL
-{
-namespace Adaptor
-{
-class TtsPlayer;
-}
-}
-
-class DALI_IMPORT_API TtsPlayer : public BaseHandle
-{
-public:
-
-  enum Mode
-  {
-    DEFAULT = 0,        ///< Default mode for normal application
-    NOTIFICATION,       ///< Notification mode
-    SCREEN_READER,      ///< Screen reader mode
-    MODE_NUM
-  };
-
-  enum State
-  {
-    UNAVAILABLE = 0,    ///< Player is not available
-    READY,              ///< Player is ready to play
-    PLAYING,            ///< Player is playing
-    PAUSED              ///< Player is paused
-  };
-
-  typedef Signal< void ( const Dali::TtsPlayer::State, const Dali::TtsPlayer::State ) > StateChangedSignalType;
-
-  TtsPlayer();
-  static TtsPlayer Get(Dali::TtsPlayer::Mode mode = Dali::TtsPlayer::DEFAULT);
-  ~TtsPlayer();
-
-  TtsPlayer(const TtsPlayer& handle);
-  TtsPlayer& operator=(const TtsPlayer& rhs);
-  void Play(const std::string& text);
-  void Stop();
-  void Pause();
-  void Resume();
-  State GetState();
-  Dali::TtsPlayer::StateChangedSignalType& StateChangedSignal();
-
-public:
-
-  // explicit DALI_INTERNAL TtsPlayer( Internal::Adaptor::TtsPlayer* ttsPlayer );
-
-private:
-
-  StateChangedSignalType mStateChangedSignal;
-};
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_TTS_PLAYER_H__
index a066d8f..6cdb503 100644 (file)
 #include <iostream>
 #include <stdlib.h>
 
-// Need to override adaptor classes for toolkit test harness, so include
-// test harness headers before dali headers.
+#include <dali-toolkit/dali-toolkit.h>
+
 #include <dali-toolkit-test-suite-utils.h>
 #include <toolkit-accessibility-adaptor.h>
-
-#include <dali-toolkit/dali-toolkit.h>
+#include <dummy-control.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -223,6 +222,10 @@ int UtcDaliAccessibilityManagerSetAndGetFocusOrder(void)
   // make sure the change of focus order doesn't affect the actor's description
   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Set the focus order and description for the third actor
   Actor third = Actor::New();
   manager.SetFocusOrder(third, 1);
@@ -309,6 +312,10 @@ int UtcDaliAccessibilityManagerGetActorByFocusOrder(void)
   DALI_TEST_CHECK(manager.GetActorByFocusOrder(2) == second);
   DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == third);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Change the focus order of the third actor to 1
   manager.SetFocusOrder(third, 1);
 
@@ -331,6 +338,10 @@ int UtcDaliAccessibilityManagerSetAndGetCurrentFocusActor(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
   manager.SetFocusOrder(first, 1);
@@ -422,6 +433,10 @@ int UtcDaliAccessibilityManagerGetCurrentFocusGroup(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Create an actor with two child actors and add it to the stage
   Actor parent = Actor::New();
   Actor firstChild = Actor::New();
@@ -489,6 +504,10 @@ int UtcDaliAccessibilityManagerGetCurrentFocusOrder(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   Actor first = Actor::New();
   Stage::GetCurrent().Add(first);
 
@@ -546,6 +565,10 @@ int UtcDaliAccessibilityManagerMoveFocusForward(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   Actor first = Actor::New();
   Stage::GetCurrent().Add(first);
 
@@ -659,6 +682,10 @@ int UtcDaliAccessibilityManagerMoveFocusBackward(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   Actor first = Actor::New();
   Stage::GetCurrent().Add(first);
 
@@ -772,6 +799,10 @@ int UtcDaliAccessibilityManagerClearFocus(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
   manager.SetFocusOrder(first, 1);
@@ -850,6 +881,10 @@ int UtcDaliAccessibilityManagerFocusGroup(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   // Create an actor with two child actors and add it to the stage
   Actor parent = Actor::New();
   Actor firstChild = Actor::New();
@@ -1012,6 +1047,10 @@ int UtcDaliAccessibilityManagerSignalFocusOvershot(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK(manager);
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   bool signalVerified = false;
   FocusOvershotCallback callback(signalVerified);
   manager.FocusOvershotSignal().Connect(&callback, &FocusOvershotCallback::Callback);
@@ -1243,6 +1282,16 @@ int UtcDaliAccessibilityManagerActionActivateSignalP(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
+  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
+  button.SetSize(480, 800);
+  Stage::GetCurrent().Add(button);
+  manager.SetFocusOrder( button, 1 );
+  manager.SetCurrentFocusActor( button );
+
   manager.ActionActivateSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
   Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
@@ -1276,6 +1325,10 @@ int UtcDaliAccessibilityManagerActionReadSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1296,6 +1349,10 @@ int UtcDaliAccessibilityManagerActionReadSignalN(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1312,6 +1369,10 @@ int UtcDaliAccessibilityManagerActionOverSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1333,6 +1394,10 @@ int UtcDaliAccessibilityManagerActionOverSignalN(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1421,12 +1486,21 @@ int UtcDaliAccessibilityManagerActionUpSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accessibilityAdaptor, true );
+  accessibilityAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
   manager.ActionUpSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
-  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+  DummyControl dummyControl = DummyControl::New(true);
+  dummyControl.SetSize(480, 800);
+  manager.SetFocusOrder( dummyControl, 1 );
+  Stage::GetCurrent().Add( dummyControl );
+  manager.SetCurrentFocusActor( dummyControl );
+
   accessibilityAdaptor.HandleActionUpEvent();
 
   DALI_TEST_EQUALS( callback.GetCalls(), 1u, TEST_LOCATION );
@@ -1457,12 +1531,21 @@ int UtcDaliAccessibilityManagerActionDownSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accessibilityAdaptor, true );
+  accessibilityAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
   manager.ActionDownSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
-  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
+  button.SetSize(480, 800);
+  Stage::GetCurrent().Add(button);
+  manager.SetFocusOrder( button, 1 );
+  manager.SetCurrentFocusActor( button );
+
   accessibilityAdaptor.HandleActionDownEvent();
 
   DALI_TEST_EQUALS( callback.GetCalls(), 1u, TEST_LOCATION );
@@ -1493,6 +1576,10 @@ int UtcDaliAccessibilityManagerActionClearFocusSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1529,6 +1616,10 @@ int UtcDaliAccessibilityManagerActionBackSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1565,6 +1656,10 @@ int UtcDaliAccessibilityManagerActionScrollUpSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1601,6 +1696,10 @@ int UtcDaliAccessibilityManagerActionScrollDownSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1637,6 +1736,10 @@ int UtcDaliAccessibilityManagerActionPageLeftSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1673,6 +1776,10 @@ int UtcDaliAccessibilityManagerActionPageRightSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1709,6 +1816,10 @@ int UtcDaliAccessibilityManagerActionPageUpSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1729,6 +1840,10 @@ int UtcDaliAccessibilityManagerActionPageUpSignalN(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1745,6 +1860,10 @@ int UtcDaliAccessibilityManagerActionPageDownSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1781,6 +1900,10 @@ int UtcDaliAccessibilityManagerActionMoveToFirstSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1801,6 +1924,10 @@ int UtcDaliAccessibilityManagerActionMoveToFirstSignalN(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1817,6 +1944,10 @@ int UtcDaliAccessibilityManagerActionMoveToLastSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1853,6 +1984,10 @@ int UtcDaliAccessibilityManagerActionReadFromTopSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1889,6 +2024,10 @@ int UtcDaliAccessibilityManagerActionReadFromNextSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1928,6 +2067,16 @@ int UtcDaliAccessibilityManagerActionZoomSignalP(void)
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
+  Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
+  button.SetSize(480, 800);
+  Stage::GetCurrent().Add(button);
+  manager.SetFocusOrder( button, 1 );
+  manager.SetCurrentFocusActor( button );
+
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   manager.ActionZoomSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
 
   Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
@@ -1961,6 +2110,10 @@ int UtcDaliAccessibilityManagerActionReadIndicatorInformationSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -1997,6 +2150,10 @@ int UtcDaliAccessibilityManagerActionReadPauseResumeSignalP(void)
 
   AccessibilityManagerSignalHandler callback;
 
+  Dali::AccessibilityAdaptor accAdaptor = Dali::AccessibilityAdaptor::Get();
+  Test::AccessibilityAdaptor::SetEnabled( accAdaptor, true );
+  accAdaptor.HandleActionEnableEvent();
+
   AccessibilityManager manager = AccessibilityManager::Get();
   DALI_TEST_CHECK( manager );
 
@@ -2141,3 +2298,72 @@ int UtcDaliAccessibilityManagerActionScrollSignalN(void)
 
   END_TEST;
 }
+
+int UtcDaliAccessibilityManagerActionTouch(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( " UtcDaliAccessibilityManagerActionTouch" );
+
+  AccessibilityManager manager = AccessibilityManager::Get();
+  DALI_TEST_CHECK( manager );
+
+  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+
+  DummyControl dummyControl = DummyControl::New(true);
+  DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummyControl.GetImplementation());
+  dummyControl.SetSize(480, 800);
+  manager.SetFocusOrder( dummyControl, 1 );
+  Stage::GetCurrent().Add( dummyControl );
+  manager.SetCurrentFocusActor( dummyControl );
+
+  TouchPoint point( 0, TouchPoint::Started, 100.0f, 200.0f );
+  accessibilityAdaptor.HandleActionTouchEvent( point, 0u );
+
+  DALI_TEST_CHECK( dummyImpl.onAccTouchedCalled );
+
+  END_TEST;
+}
+
+
+int UtcDaliAccessibilityManagerHandlePanGesture(void)
+{
+  // Pan gesture sent from adaptor to manager via AccessibilityGestureHandler
+  // Adaptor.SetGestureHandler is called in Initialize (check it's the toolkit version)
+  ToolkitTestApplication application;
+  tet_infoline( " UtcDaliAccessibilityManagerHandlePanGesture" );
+
+  AccessibilityManager manager = AccessibilityManager::Get();
+  DALI_TEST_CHECK( manager );
+
+  Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
+  DummyControl dummyControl = DummyControl::New(true);
+  dummyControl.SetSize(480, 800);
+  Stage::GetCurrent().Add( dummyControl );
+
+  Dali::Integration::PanGestureEvent panGestureEvent(Gesture::Started);
+  panGestureEvent.previousPosition = Vector2(0.f, 0.f);
+  panGestureEvent.currentPosition = Vector2(100.f, 0.f);
+  panGestureEvent.timeDelta = 16;
+  panGestureEvent.numberOfTouches = 1;
+
+  Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
+
+  panGestureEvent.state = Gesture::Continuing;
+  panGestureEvent.previousPosition = Vector2(100.f, 0.f);
+  panGestureEvent.currentPosition = Vector2(200.f, 0.f);
+  Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
+
+  panGestureEvent.state = Gesture::Finished;
+  panGestureEvent.previousPosition = Vector2(200.f, 0.f);
+  panGestureEvent.currentPosition = Vector2(300.f, 0.f);
+  Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
+
+
+  END_TEST;
+}
+
+// Methods missing coverage:
+// IsActorFocusableFunction
+// DoActivate
+// SetFocusable
+// TtsStateChanged
index ebfd376..32946a0 100644 (file)
@@ -78,12 +78,15 @@ int UtcDaliBuilderQuitSignal(void)
       "{"
          "\"stage\":"
          "[{"
-           "\"type\": \"Actor\","
+           "\"type\": \"Layer\","
            "\"size\": [100,100,1],"
            "\"parentOrigin\": \"TOP_LEFT\","
            "\"anchorPoint\": \"TOP_LEFT\","
+           "\"maximumSize\": [100,100],"
+           "\"orientation\": [10,10,10,10],"
+           "\"clippingBox\": [10,10,10,10],"
            "\"signals\": [{"
-             "\"name\": \"touched\","
+             "\"name\": \"touch\","
              "\"action\": \"quit\""
            "}]"
          "}]"
@@ -243,7 +246,7 @@ int UtcDaliBuilderAnimationP(void)
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
         "    \"signals\": [{"
-        "      \"name\": \"touched\","
+        "      \"name\": \"touch\","
         "      \"action\": \"play\","
         "      \"animation\": \"animate\""
         "    }]"
@@ -367,7 +370,7 @@ int UtcDaliBuilderAnimationN(void)
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
         "    \"signals\": [{"
-        "      \"name\": \"touched\","
+        "      \"name\": \"touch\","
         "      \"action\": \"play\","
         "      \"animation\": \"animate\""
         "    }]"
@@ -440,7 +443,7 @@ int UtcDaliBuilderConstantsP(void)
       "  \"image\": { \"url\": \"dir/{IMAGE_PATH}\" },"
       "  \"sizeWidth\": \"{WIDTH}\","
       "  \"signals\": [{"
-      "    \"name\": \"touched\","
+      "    \"name\": \"touch\","
       "    \"action\": \"quit\""
       "  }]"
       "}]"
@@ -493,26 +496,41 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
       "    \"color\": [1,0,0,1],\n"
       "    \"actors\": {\n"
       "      \"childImage\": {\n"
-      "        \"color\": [0,1,0,1]\n"
+      "        \"color\": \"34\"\n"
       "      }\n"
       "    }\n"
       "  }\n"
       "},\n"
       "\"templates\":\n"
       "{\n"
+      "  \"imageViewTemplate\": { \n"
+      "    \"type\": \"ImageView\",\n"
+      "    \"styles\": [\"imageStyle\"]\n"
+      "  },\n"
       "  \"imageTree\": { \n"
       "    \"type\": \"ImageView\",\n"
       "    \"styles\": [\"imageStyle\"],\n"
       "    \"name\": \"image\",\n"
       "    \"size\": \"{SIZE}\",\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"actors\": [\n"
       "      {\n"
       "        \"type\":\"ImageView\",\n"
-      "        \"name\":\"childImage\" \n"
+      "        \"name\":\"childImage\", \n"
+      "        \"color\": \n"
+      "          {\n"
+      "            \"r\": 10,\n"
+      "            \"g\": 10,\n"
+      "            \"b\": 10,\n"
+      "            \"a\": 100\n"
+      "          }\n"
+      "      },\n"
+      "      {\n"
+      "        \"type\":\"imageViewTemplate\",\n"
+      "        \"name\":\"childImage2\"\n"
       "      }\n"
       "    ]\n"
       "  }\n"
@@ -530,7 +548,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
     " \"color\": [1,0,0,1],\n"
     " \"actors\": {\n"
     "   \"childImage\": {\n"
-    "     \"color\": [0,1,0,1]\n"
+    "     \"color\": \"#344353\"\n"
     "   }\n"
     " }\n"
     "}\n"
@@ -543,7 +561,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
     "  \"name\": \"image\",\n"
     "  \"size\": \"{SIZE}\",\n"
     "  \"signals\": [{\n"
-    "    \"name\": \"touched\",\n"
+    "    \"name\": \"touch\",\n"
     "    \"action\": \"quit\"\n"
     "  }],\n"
     "  \"actors\": [\n"
@@ -598,14 +616,14 @@ int UtcDaliBuilderRenderTasksP(void)
       "[\n"
       "  { \n"
       "    \"type\": \"CameraActor\",\n"
-      "    \"name\": \"image\"\n"
+      "    \"name\": \"camera\"\n"
       "  }, \n"
       "  { \n"
       "    \"type\": \"ImageView\",\n"
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"actors\": [\n"
@@ -652,7 +670,7 @@ int UtcDaliBuilderChildActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\",\n"
       "      \"actor\": \"actor\",\n"
       "      \"childActor\": \"subActor\"\n"
@@ -708,7 +726,7 @@ int UtcDaliBuilderSetPropertyActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"set\",\n"
       "      \"actor\": \"subActor\",\n"
       "      \"property\": \"visible\",\n"
@@ -765,7 +783,7 @@ int UtcDaliBuilderGenericActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\"\n"
       "    }]\n"
       "  }]\n"
@@ -819,7 +837,7 @@ int UtcDaliBuilderPropertyNotificationP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\"\n"
       "    }],\n"
       "    \"notifications\": [{\n"
@@ -877,7 +895,7 @@ int UtcDaliBuilderCustomPropertyP(void)
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"properties\": {\n"
@@ -1010,7 +1028,7 @@ int UtcDaliBuilderLoadFromStringN(void)
            "\"parentOrigin\": \"TOP_LEFT\","
            "\"anchorPoint\": \"TOP_LEFT\","
            "\"signals\": [{"
-             "\"name\": \"touched\","
+             "\"name\": \"touch\","
              "\"action\": \"quit\""
            "}]"
          "}]"
@@ -1057,7 +1075,7 @@ int UtcDaliBuilderAddActorsP(void)
       "      \"visible\": false\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\",\n"
       "      \"actor\": \"actor\",\n"
       "      \"childActor\": \"subActor\"\n"
index 07e2b14..80a8f70 100644 (file)
@@ -50,6 +50,21 @@ static bool ButtonCallback( Button button )
   return false;
 }
 
+struct CallbackFunctor
+{
+  CallbackFunctor(bool* callbackFlag)
+  : mCallbackFlag( callbackFlag )
+  {
+  }
+
+  void operator()()
+  {
+    *mCallbackFlag = true;
+  }
+  bool* mCallbackFlag;
+};
+
+
 Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height )
 {
   BufferImage imageData = BufferImage::New( width, height, Pixel::RGBA8888 );
@@ -437,8 +452,13 @@ int UtcDaliButtonPressedSignalP(void)
   application.Render();
 
   // connect to its touch signal
+  ConnectionTracker* testTracker = new ConnectionTracker();
   button.PressedSignal().Connect( &ButtonCallback );
   button.ReleasedSignal().Connect( &ButtonCallback );
+  bool pressedSignal = false;
+  bool releasedSignal = false;
+  button.ConnectSignal( testTracker, "pressed",   CallbackFunctor(&pressedSignal) );
+  button.ConnectSignal( testTracker, "released",  CallbackFunctor(&releasedSignal) );
 
   Dali::Integration::TouchEvent event;
 
@@ -450,6 +470,7 @@ int UtcDaliButtonPressedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
+  DALI_TEST_CHECK( pressedSignal );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
@@ -457,15 +478,19 @@ int UtcDaliButtonPressedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
+  DALI_TEST_CHECK( releasedSignal );
 
   // Test2. Touch point down and up outside the button.
 
+  pressedSignal = false;
+  releasedSignal = false;
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
   event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
+  DALI_TEST_CHECK( !pressedSignal );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
@@ -473,6 +498,7 @@ int UtcDaliButtonPressedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
+  DALI_TEST_CHECK( !releasedSignal );
 
   // Test3. Touch point down inside and up outside the button.
 
@@ -534,6 +560,9 @@ int UtcDaliButtonClickedSignalP(void)
 
   // connect to its touch signal
   button.ClickedSignal().Connect( &ButtonCallback );
+  bool clickedSignal = false;
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  button.ConnectSignal( testTracker, "clicked",   CallbackFunctor(&clickedSignal) );
 
   Dali::Integration::TouchEvent event;
 
@@ -549,10 +578,12 @@ int UtcDaliButtonClickedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
+  DALI_TEST_CHECK( clickedSignal );
 
   // Test2. Touch point down and up outside the button.
 
   gIsCalledButtonCallback = false;
+  clickedSignal = false;
   event = Dali::Integration::TouchEvent();
   event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
@@ -562,10 +593,12 @@ int UtcDaliButtonClickedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
+  DALI_TEST_CHECK( !clickedSignal );
 
   // Test3. Touch point down inside and up outside the button.
 
   gIsCalledButtonCallback = false;
+  clickedSignal = false;
   event = Dali::Integration::TouchEvent();
   event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
@@ -579,10 +612,12 @@ int UtcDaliButtonClickedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
+  DALI_TEST_CHECK( !clickedSignal );
 
   // Test4. Touch point down outside and up inside the button.
 
   gIsCalledButtonCallback = false;
+  clickedSignal = false;
   event = Dali::Integration::TouchEvent();
   event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
@@ -596,6 +631,7 @@ int UtcDaliButtonClickedSignalP(void)
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
+  DALI_TEST_CHECK( !clickedSignal );
   END_TEST;
 }
 
@@ -614,16 +650,23 @@ int UtcDaliButtonStateChangedSignalP(void)
 
   // connect to its signal
   button.StateChangedSignal().Connect( &ButtonCallback );
+  bool stateChangedSignal = false;
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  button.ConnectSignal( testTracker, "stateChanged",   CallbackFunctor(&stateChangedSignal) );
 
   gIsCalledButtonCallback = false;
   button.SetSelected( true );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
+  DALI_TEST_CHECK( stateChangedSignal );
 
   gIsCalledButtonCallback = false;
+  stateChangedSignal = false;
+
   button.SetSelected( false );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
+  DALI_TEST_CHECK( stateChangedSignal );
   END_TEST;
 }
 
index a8aca48..07b810f 100644 (file)
@@ -147,3 +147,59 @@ int UtcDaliCheckBoxButtonSetGetSelected(void)
   DALI_TEST_CHECK( gCheckBoxButtonState );
   END_TEST;
 }
+
+int UtcDaliCheckBoxSetLabelP(void)
+{
+  TestApplication application;
+
+  CheckBoxButton checkBox = CheckBoxButton::New();
+
+  Property::Map propertyMap;
+  propertyMap.Insert("text",  "activate");
+  checkBox.SetProperty( checkBox.GetPropertyIndex("label"), propertyMap );
+
+  DALI_TEST_EQUALS( checkBox.GetLabelText(), "activate", TEST_LOCATION ); // Change to use GerProperty once that code is implemented
+
+  END_TEST;
+}
+
+int UtcDaliCheckBoxSetLabelDisabledP(void)
+{
+  TestApplication application;
+
+  CheckBoxButton checkBox = CheckBoxButton::New();
+  Stage::GetCurrent().Add( checkBox );
+
+  checkBox.SetSize( Vector2( 20.0f, 20.0f ) );
+  checkBox.SetDisabledBackgroundImage( "Image.jpg" );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Map propertyMap;
+  propertyMap.Insert("text",  "activate");
+  checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), true);
+
+  checkBox.SetProperty( checkBox.GetPropertyIndex("label"), propertyMap );
+
+  DALI_TEST_CHECK(  checkBox.GetProperty<bool>(checkBox.GetPropertyIndex("disabled")) );
+  DALI_TEST_EQUALS( checkBox.GetLabelText(), "activate", TEST_LOCATION ); // Change to use GerProperty once that code is implemented
+
+  END_TEST;
+}
+
+int UtcDaliCheckBoxSettingDisabled(void)
+{
+  ToolkitTestApplication application;
+
+  CheckBoxButton checkBox = CheckBoxButton::New();
+
+  checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), true);
+  DALI_TEST_CHECK(  checkBox.GetProperty<bool>(checkBox.GetPropertyIndex("disabled")) );
+
+  checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), false);
+
+  DALI_TEST_CHECK(  !checkBox.GetProperty<bool>(checkBox.GetPropertyIndex("disabled")) );
+
+  END_TEST;
+}
index f30007f..12ce913 100644 (file)
@@ -762,7 +762,6 @@ int UtcDaliControlImplKeyInputFocusLost(void)
 
     DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
 
-    dummyImpl.OnAccessibilityValueChange( true );
     dummyImpl.IsKeyboardNavigationSupported();
     dummyImpl.IsKeyboardFocusGroup();
 
index b1fd832..8be97fe 100644 (file)
 // Need to override adaptor classes for toolkit test harness, so include
 // test harness headers before dali headers.
 #include <dali-toolkit-test-suite-utils.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>
+
 
 using namespace Dali;
 using namespace Toolkit;
@@ -59,6 +61,48 @@ static void OnLayoutActivated()
   gOnLayoutActivatedCalled = true;
 }
 
+// Generate a PanGestureEvent to send to Core
+Integration::PanGestureEvent GeneratePan(
+    Gesture::State state,
+    const Vector2& previousPosition,
+    const Vector2& currentPosition,
+    unsigned long timeDelta,
+    unsigned int numberOfTouches = 1)
+{
+  Integration::PanGestureEvent pan(state);
+
+  pan.previousPosition = previousPosition;
+  pan.currentPosition = currentPosition;
+  pan.timeDelta = timeDelta;
+  pan.numberOfTouches = numberOfTouches;
+
+  return pan;
+}
+
+/**
+ * Helper to generate PanGestureEvent
+ *
+ * @param[in] application Application instance
+ * @param[in] state The Gesture State
+ * @param[in] pos The current position of touch.
+ */
+static void SendPan(ToolkitTestApplication& application, Gesture::State state, const Vector2& pos)
+{
+  static Vector2 last;
+
+  if( (state == Gesture::Started) ||
+      (state == Gesture::Possible) )
+  {
+    last.x = pos.x;
+    last.y = pos.y;
+  }
+
+  application.ProcessEvent(GeneratePan(state, last, pos, RENDER_FRAME_INTERVAL));
+
+  last.x = pos.x;
+  last.y = pos.y;
+}
+
 /*
  * Simulate time passed by.
  *
@@ -926,3 +970,126 @@ int UtcDaliItemViewSetGetProperty(void)
   END_TEST;
 }
 
+
+int UtcDaliItemViewOvershootVertical(void)
+{
+  ToolkitTestApplication application;
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+
+  // Create the ItemView actor
+  TestItemFactory factory;
+  ItemView view = ItemView::New(factory);
+
+  // Create a grid layout and add it to ItemView
+  ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
+  view.AddLayout(*gridLayout);
+  stage.Add(view);
+
+  // Activate the grid layout so that the items will be created and added to ItemView
+  Vector3 stageSize(stage.GetSize());
+  view.ActivateLayout(0, stageSize, 0.5f);
+
+  view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
+  DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
+
+  view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
+
+  Wait(application);
+
+  // Do a pan starting from 100,100 and moving down
+  Vector2 pos(100.0f, 100.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.y += 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<200;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.y += 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, 100);
+
+  // Do a pan starting from 100,100 and moving up
+  pos = Vector2(100.0f, 300.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.y -= 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<200;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.y -= 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, 100);
+  END_TEST;
+}
+
+int UtcDaliItemViewOvershootHorizontal(void)
+{
+  ToolkitTestApplication application;
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+
+  // Create the ItemView actor
+  TestItemFactory factory;
+  ItemView view = ItemView::New(factory);
+
+  // Create a grid layout and add it to ItemView
+  ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
+  view.AddLayout(*gridLayout);
+  stage.Add(view);
+
+  // Activate the grid layout so that the items will be created and added to ItemView
+  Vector3 stageSize(stage.GetSize());
+  view.ActivateLayout(0, stageSize, 0.5f);
+
+  view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
+  DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
+
+  view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
+
+  Wait(application);
+
+  // Do a pan starting from 100,100 and moving left
+  Vector2 pos(100.0f, 100.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.x -= 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<200;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.x -= 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, 100);
+
+  // Do a pan starting from 100,100 and moving right
+  pos = Vector2(100.0f, 100.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.x += 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<200;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.x += 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, 100);
+
+  END_TEST;
+}
index 1fafb16..258add1 100644 (file)
@@ -216,6 +216,13 @@ int UtcDaliJsonParserMethod01(void)
   DALI_TEST_CHECK( std::string((*iterObject).first) == std::string("key" ));
   DALI_TEST_CHECK( std::string(((*iterObject).second).GetString()) == std::string("value"));
 
+  ++iter;
+  DALI_TEST_CHECK(!( iter != root->CEnd() ));
+
+  ++iter; // Go past the end
+
+  iter++; // Use the other operator using the post increment operator
+
   tet_result(TET_PASS);
   END_TEST;
 }
@@ -623,6 +630,7 @@ int UtcDaliJsonParserMethod08(void)
   DALI_TEST_CHECK(1  == parser.GetErrorLineNumber());
   DALI_TEST_CHECK(53 == parser.GetErrorPosition());
   DALI_TEST_CHECK(11 == parser.GetErrorColumn());
+  DALI_TEST_CHECK("Missing Value" == parser.GetErrorDescription());
 
   tet_result(TET_PASS);
   END_TEST;
@@ -756,3 +764,62 @@ int UtcDaliJsonParserMerge1(void)
 
   END_TEST;
 }
+
+int UtcDaliJsonParserDownCast(void)
+{
+  BaseHandle handle = JsonParser::New();
+  JsonParser parser = JsonParser::DownCast( handle );
+  DALI_TEST_CHECK( parser );
+  END_TEST;
+}
+
+int UtcDaliJsonParserTreeNodeCount(void)
+{
+  std::string s1( ReplaceQuotes("                                       \
+{                                                                       \
+  'styles':                                                             \
+  {                                                                     \
+    'button':                                                           \
+    {                                                                   \
+      'backgroundColor':[0.8, 0.0, 1.0, 1.0],                           \
+      'foregroundColor':[1, 1, 1, 1]                                    \
+    }                                                                   \
+  }                                                                     \
+}                                                                       \
+"));
+
+  JsonParser parser = JsonParser::New();
+  parser.Parse( s1 );
+
+  const TreeNode* treeNode = parser.GetRoot();
+  DALI_TEST_EQUALS(1, treeNode->Count("styles"), TEST_LOCATION );
+  DALI_TEST_EQUALS(0, treeNode->Count("random"), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliJsonParserTreeNodeFind(void)
+{
+  std::string s1( ReplaceQuotes("\
+{                                         \
+  'string':'value2',                      \
+  'integer':2,                            \
+  'float':2.3,                            \
+  'boolean':true,                         \
+  'nil':null,                             \
+  'array':[1,2,3],                        \
+  'object':{'key':'value'}                \
+}                                         \
+"));
+
+  JsonParser parser = JsonParser::New();
+  parser.Parse( s1 );
+
+  const TreeNode* treeNode = parser.GetRoot();
+  const TreeNode* childNode = treeNode->Find("string");
+  DALI_TEST_CHECK( childNode );
+  const TreeNode* sameNode = childNode->Find("string");
+  DALI_TEST_EQUALS( sameNode, childNode, TEST_LOCATION );
+
+  END_TEST;
+}
index 89bc1a1..e6ff510 100644 (file)
@@ -31,7 +31,7 @@ namespace
 typedef NinePatchImage::StretchRanges StretchRanges;
 
 const char* TEST_IMAGE_FILE_NAME =  "gallery_image_01.jpg";
-const char* TEST_NPATCH_FILE_NAME =  "gallery_image_01.9.jpg";
+const char* TEST_NPATCH_FILE_NAME =  "gallery_image_01.9.png";
 
 const char* TEST_SVG_FILE_NAME = TEST_RESOURCE_DIR "/svg1.svg";
 
@@ -163,7 +163,8 @@ Integration::ResourcePointer CustomizeNinePatch( TestApplication& application,
 
   tet_infoline("Getting resource");
   Integration::ResourcePointer resourcePtr(bitmap);
-  platform.SetResourceLoaded( 0, Dali::Integration::ResourceBitmap, resourcePtr );
+  //platform.SetResourceLoaded( 0, Dali::Integration::ResourceBitmap, resourcePtr );
+  platform.SetSynchronouslyLoadedResource( resourcePtr);
 
   return resourcePtr;
 }
index ee941cc..3b4038e 100644 (file)
@@ -44,10 +44,24 @@ static void TestCallback(BaseHandle handle)
   gObjectCreatedCallBackCalled = true;
 }
 
+struct CallbackFunctor
+{
+  CallbackFunctor(bool* callbackFlag)
+  : mCallbackFlag( callbackFlag )
+  {
+  }
+
+  void operator()()
+  {
+    *mCallbackFlag = true;
+  }
+  bool* mCallbackFlag;
+};
 
 const int MILLISECONDS_PER_SECOND = 1000;
 const int RENDER_FRAME_INTERVAL = 16;                           ///< Duration of each frame in ms. (at approx 60FPS)
 const int RENDER_ANIMATION_TEST_DURATION_MS = 1000;             ///< 1000ms to test animation
+
 const int RENDER_DELAY_SCROLL = 1000;                           ///< duration to wait for any scroll to complete.
 
 // For Clamp Signal testing...
@@ -311,10 +325,10 @@ int UtcDaliScrollViewDestructorP(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewNewP(void)
+int UtcDaliToolkitScrollViewNewP1(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitScrollViewNewP");
+  tet_infoline(" UtcDaliToolkitScrollViewNewP1");
 
   ScrollView scrollView;
 
@@ -341,6 +355,25 @@ int UtcDaliToolkitScrollViewNewP(void)
   END_TEST;
 }
 
+int UtcDaliToolkitScrollViewNewP2(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitScrollViewNewP2 - create thru type registry");
+
+  ScrollView scrollView;
+  DALI_TEST_CHECK( !scrollView );
+
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+  TypeInfo scrollViewType = typeRegistry.GetTypeInfo("ScrollView");
+  BaseHandle handle = scrollViewType.CreateInstance();
+  DALI_TEST_CHECK( handle );
+
+  scrollView = ScrollView::DownCast(handle);
+  DALI_TEST_CHECK( scrollView );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitScrollViewDownCastP(void)
 {
   ToolkitTestApplication application;
@@ -394,6 +427,9 @@ int UtcDaliToolkitScrollViewScrollToPositionWithDirectionBiasP(void)
 
   scrollView.SetWrapMode(true);
 
+  Property::Value wrapMode = scrollView.GetProperty( Toolkit::ScrollView::Property::WRAP_ENABLED );
+  DALI_TEST_EQUALS( wrapMode.Get<bool>(), true, TEST_LOCATION );
+
   const Vector2 target = Vector2(50.0f, 50.0f);
   const Vector2 target2 = Vector2(150.0f, 150.0f);
 
@@ -785,7 +821,7 @@ int UtcDaliToolkitScrollViewSignalsStartComplete(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewSignalsUpdate(void)
+int UtcDaliToolkitScrollViewSignalsUpdate01(void)
 {
   ToolkitTestApplication application;
   tet_infoline(" UtcDaliToolkitScrollViewSignalsUpdate");
@@ -845,6 +881,73 @@ int UtcDaliToolkitScrollViewSignalsUpdate(void)
   END_TEST;
 }
 
+int UtcDaliToolkitScrollViewSignalsUpdate02(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitScrollViewSignalsUpdate");
+
+  gOnScrollStartCalled = false;
+  gOnScrollUpdateCalled = false;
+  gOnScrollCompleteCalled = false;
+
+  ScrollView scrollView = ScrollView::New();
+  Stage::GetCurrent().Add( scrollView );
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  scrollView.SetSize(stageSize);
+  scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+
+  // Position rulers.
+  RulerPtr rulerX = new DefaultRuler();
+  RulerPtr rulerY = new DefaultRuler();
+  rulerX->SetDomain( RulerDomain(0.0f, 1000.0f, false) );
+  rulerY->SetDomain( RulerDomain(0.0f, 1000.0f, false) );
+  scrollView.SetRulerX(rulerX);
+  scrollView.SetRulerY(rulerY);
+  Dali::ConnectionTracker tracker;
+  bool scrollStarted=false;
+  bool scrollUpdated=false;
+  bool scrollCompleted=false;
+  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollStarted", CallbackFunctor(&scrollStarted) ));
+  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollUpdated", CallbackFunctor(&scrollUpdated) ));
+  DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollCompleted", CallbackFunctor(&scrollCompleted) ));
+
+  Actor image = Actor::New();
+  image.SetSize(stageSize);
+  image.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  image.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+  scrollView.Add(image);
+
+  Wait(application);
+
+  // Do a pan starting from 100,100 and moving down diagonally.
+  Vector2 pos(100.0f, 100.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.x += 5.0f;
+  pos.y += 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<20;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.x += 5.0f;
+    pos.y += 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, RENDER_DELAY_SCROLL);
+
+  DALI_TEST_CHECK(scrollStarted);
+  DALI_TEST_CHECK(scrollUpdated);
+  DALI_TEST_CHECK(scrollCompleted);
+
+  Stage::GetCurrent().Remove( scrollView );
+
+  END_TEST;
+}
+
 static Vector2 PerformGestureDiagonalSwipe(ToolkitTestApplication& application, Vector2 start, Vector2 direction, int frames, bool finish = true)
 {
   gOnScrollStartCalled = false;
@@ -2285,6 +2388,9 @@ int UtcDaliToolkitScrollViewConstraintsWrap(void)
   Wait(application, RENDER_DELAY_SCROLL);
   DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
 
+  scrollView.Remove(a);
+  Wait(application);
+
   END_TEST;
 }
 
index 7ec6acf..023224f 100644 (file)
@@ -100,21 +100,28 @@ int UtcDaliSliderDownCast(void)
   END_TEST;
 }
 
-static bool gSliderValueChangedCallBackCalled;
+static bool gSliderValueChangedCallBackCalled=false;
 static bool OnSliderValueChanged( Slider slider, float value )
 {
   gSliderValueChangedCallBackCalled = true;
   return true;
 }
 
-static bool gSliderMarkCallBackCalled;
+static bool gSliderMarkCallBackCalled=false;
 static bool OnSliderMark( Slider slider, int value )
 {
   gSliderMarkCallBackCalled = true;
   return true;
 }
 
-int UtcDaliSliderSignals(void)
+static bool gSliderSlidingFinishedCallBackCalled=false;
+static bool OnSlidingFinished( Slider slider, float value )
+{
+  gSliderSlidingFinishedCallBackCalled = true;
+  return true;
+}
+
+int UtcDaliSliderSignals1(void)
 {
   ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
   tet_infoline(" UtcDaliSliderSignals");
@@ -140,6 +147,103 @@ int UtcDaliSliderSignals(void)
 
   slider.ValueChangedSignal().Connect( &OnSliderValueChanged );
   slider.MarkReachedSignal().Connect( &OnSliderMark );
+  slider.SlidingFinishedSignal().Connect( &OnSlidingFinished );
+
+  application.SendNotification();
+  application.Render();
+
+  gSliderValueChangedCallBackCalled = false;
+  gSliderMarkCallBackCalled = false;
+  gSliderSlidingFinishedCallBackCalled = false;
+
+  {
+    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+    Integration::Point pointDown;
+    pointDown.SetState( PointState::DOWN );
+    pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+    event.AddPoint( pointDown );
+
+    application.ProcessEvent( event );
+    application.SendNotification();
+    application.Render();
+  }
+
+  for( int i = 0; i < 5; ++i )
+  {
+    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+    Integration::Point pointMotion;
+    pointMotion.SetState( PointState::MOTION );
+    pointMotion.SetScreenPosition( Vector2( 10.0f + i * 10.0f, 10.0f ) );
+    event.AddPoint( pointMotion );
+
+    application.ProcessEvent( event );
+    application.SendNotification();
+    application.Render();
+  }
+
+  {
+    Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+    Integration::Point pointUp;
+    pointUp.SetState( PointState::UP );
+    pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+    event.AddPoint( pointUp );
+
+    application.ProcessEvent( event );
+    application.SendNotification();
+    application.Render();
+  }
+
+  DALI_TEST_CHECK(gSliderValueChangedCallBackCalled);
+  DALI_TEST_CHECK(gSliderMarkCallBackCalled);
+  DALI_TEST_CHECK(gSliderSlidingFinishedCallBackCalled);
+  END_TEST;
+}
+
+namespace
+{
+bool gSliderSignal=false;
+struct SliderSignalFunctor
+{
+  SliderSignalFunctor()
+  {
+  }
+
+  void operator()()
+  {
+    gSliderSignal = true;
+  }
+};
+} // anonymous
+
+
+
+int UtcDaliSliderSignals2(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliSliderSignals1");
+
+  // Create the Popup actor
+  Slider slider = Slider::New();
+  Stage::GetCurrent().Add( slider );
+  slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+  slider.SetPosition( 0.0f, 0.0f );
+
+  const float MIN_BOUND = 0.0f;
+  const float MAX_BOUND = 1.0f;
+  const int NUM_MARKS = 5;
+  Property::Array marks;
+  for( int i = 0; i < NUM_MARKS; ++i )
+  {
+    marks.PushBack( MIN_BOUND + ( static_cast<float>(i) / ( NUM_MARKS - 1) ) * ( MAX_BOUND - MIN_BOUND ) );
+  }
+  slider.SetProperty( Slider::Property::MARKS, marks );
+  slider.SetProperty( Slider::Property::MARK_TOLERANCE, 0.1f );
+
+  gSliderSignal = false;
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  slider.ConnectSignal( testTracker, "valueChanged",   SliderSignalFunctor() );
 
   application.SendNotification();
   application.Render();
@@ -174,7 +278,107 @@ int UtcDaliSliderSignals(void)
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_CHECK(gSliderValueChangedCallBackCalled);
-  DALI_TEST_CHECK(gSliderMarkCallBackCalled);
+  DALI_TEST_CHECK(gSliderSignal);
+  END_TEST;
+}
+
+int UtcDaliSetPropertyP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliSetPropertyP" );
+
+  Slider slider = Slider::New();
+  slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+  slider.SetPosition( 0.0f, 0.0f );
+
+  Stage::GetCurrent().Add(slider);
+  application.SendNotification();
+  application.Render();
+
+  slider.SetProperty(Slider::Property::LOWER_BOUND,        1.0f);
+  slider.SetProperty(Slider::Property::UPPER_BOUND,        5.0f);
+  slider.SetProperty(Slider::Property::VALUE,              3.0f);
+  slider.SetProperty(Slider::Property::DISABLED_COLOR,     Color::BLACK);
+  slider.SetProperty(Slider::Property::VALUE_PRECISION,    4);
+  slider.SetProperty(Slider::Property::SHOW_POPUP,         true);
+  slider.SetProperty(Slider::Property::SHOW_VALUE,         true);
+  slider.SetProperty(Slider::Property::MARKS,              false);
+  slider.SetProperty(Slider::Property::SNAP_TO_MARKS,      false);
+  slider.SetProperty(Slider::Property::MARK_TOLERANCE,     0.5f);
+
+  float lb = slider.GetProperty<float>(Slider::Property::LOWER_BOUND);
+  DALI_TEST_EQUALS(lb, 1.0f, TEST_LOCATION);
+  float ub = slider.GetProperty<float>(Slider::Property::UPPER_BOUND);
+  DALI_TEST_EQUALS(ub, 5.0f, TEST_LOCATION);
+  float val = slider.GetProperty<float>(Slider::Property::VALUE);
+  DALI_TEST_EQUALS(val, 3.0f, TEST_LOCATION);
+  Vector4 color = slider.GetProperty<Vector4>(Slider::Property::DISABLED_COLOR);
+  DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
+  int precision = slider.GetProperty<int>(Slider::Property::VALUE_PRECISION);
+  DALI_TEST_EQUALS( precision, 4, TEST_LOCATION);
+  bool showPopup = slider.GetProperty<bool>(Slider::Property::SHOW_POPUP);
+  DALI_TEST_EQUALS( showPopup, true , TEST_LOCATION);
+  bool showValue = slider.GetProperty<bool>(Slider::Property::SHOW_VALUE);
+  DALI_TEST_EQUALS( showValue, true, TEST_LOCATION );
+  bool marks = slider.GetProperty<bool>(Slider::Property::MARKS);
+  DALI_TEST_EQUALS( marks, false, TEST_LOCATION );
+  bool snapToMarks = slider.GetProperty<bool>(Slider::Property::SNAP_TO_MARKS);
+  DALI_TEST_EQUALS( snapToMarks, false, TEST_LOCATION );
+  float tolerance = slider.GetProperty<float>(Slider::Property::MARK_TOLERANCE);
+  DALI_TEST_EQUALS( tolerance, 0.5f, TEST_LOCATION );
+
+  {
+    Property::Map map;
+    map["rendererType"] = "image";
+    map["size"] = Vector2(200, 200);
+    map["url"] = "track2.png";
+    slider.SetProperty(Slider::Property::TRACK_VISUAL,       map);
+    map["url"] = "handle2.png";
+    slider.SetProperty(Slider::Property::HANDLE_VISUAL,      map);
+    map["url"] = "progress2.png";
+    slider.SetProperty(Slider::Property::PROGRESS_VISUAL,    map);
+    map["url"] = "popup2.png";
+    slider.SetProperty(Slider::Property::POPUP_VISUAL,       map);
+    map["url"] = "popupArrow2.png";
+    slider.SetProperty(Slider::Property::POPUP_ARROW_VISUAL, map);
+
+    Property::Value value = slider.GetProperty(Slider::Property::TRACK_VISUAL);
+    Property::Map* resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+    Property::Value* url = resultMap->Find("url");
+    DALI_TEST_CHECK( url ) ;
+    DALI_TEST_EQUALS( *url, "track2.png", TEST_LOCATION );
+
+    value = slider.GetProperty(Slider::Property::HANDLE_VISUAL);
+    resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+    url = resultMap->Find("url");
+    DALI_TEST_CHECK( url ) ;
+    DALI_TEST_EQUALS( *url, "handle2.png", TEST_LOCATION );
+
+    value = slider.GetProperty(Slider::Property::PROGRESS_VISUAL);
+    resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+    url = resultMap->Find("url");
+    DALI_TEST_CHECK( url ) ;
+    DALI_TEST_EQUALS( *url, "progress2.png", TEST_LOCATION );
+
+    value = slider.GetProperty(Slider::Property::POPUP_VISUAL);
+    resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+    url = resultMap->Find("url");
+    DALI_TEST_CHECK( url ) ;
+    DALI_TEST_EQUALS( *url, "popup2.png", TEST_LOCATION );
+
+    value = slider.GetProperty(Slider::Property::POPUP_ARROW_VISUAL);
+    resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+    url = resultMap->Find("url");
+    DALI_TEST_CHECK( url ) ;
+    DALI_TEST_EQUALS( *url, "popupArrow2.png", TEST_LOCATION );
+  }
+
   END_TEST;
 }
index e0b5c9c..3c121c0 100644 (file)
@@ -44,7 +44,7 @@ namespace
 {
 const int BLUR_LEVELS = 3;
 const int RENDER_FRAME_INTERVAL = 16;
-
+const char* TEST_IMAGE_FILE_NAME("image.png");
 static bool gObjectCreatedCallBackCalled;
 static void TestCallback(BaseHandle handle)
 {
@@ -99,6 +99,43 @@ Image CreateSolidColorImage( ToolkitTestApplication& application, const Vector4&
 
   return imageData;
 }
+
+void LoadBitmapResource(TestPlatformAbstraction& platform, int width, int height)
+{
+  Integration::ResourceRequest* request = platform.GetRequest();
+  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD );
+  Integration::ResourcePointer resource(bitmap);
+  bitmap->GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGBA8888, width, height, width, height);
+
+  if(request)
+  {
+    platform.SetResourceLoaded(request->GetId(), request->GetType()->id, resource);
+  }
+}
+
+class SignalHandler : public Dali::ConnectionTracker
+{
+public:
+  SignalHandler() :
+    mCalls( 0 )
+  {
+  }
+
+  void Callback( SuperBlurView handle )
+  {
+    mCalls++;
+    tet_infoline( "Signal called" );
+  }
+
+  unsigned int GetCalls() const
+  {
+    return mCalls;
+  }
+
+private:
+  unsigned int mCalls;  ///< Keeps track of how many times the signal has been called.
+};
+
 }//namespace
 
 
@@ -139,6 +176,33 @@ int UtcDaliSuperBlurViewNew(void)
   END_TEST;
 }
 
+int UtcDaliSuperBlurViewCreate(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliSuperBlurViewNew ");
+
+  // Test default constructor.
+  SuperBlurView blurView;
+  DALI_TEST_CHECK( !blurView );
+
+  // Test object creation
+  TypeInfo type = TypeRegistry::Get().GetTypeInfo("SuperBlurView");
+  if( type )
+  {
+    Dali::BaseHandle handle = type.CreateInstance();
+    if( handle )
+    {
+      blurView = Dali::Toolkit::SuperBlurView::DownCast( handle );
+    }
+  }
+
+  DALI_TEST_CHECK( blurView );
+
+  END_TEST;
+}
+
+
 int UtcDaliSuperBlurViewSetImage(void)
 {
   ToolkitTestApplication application;
@@ -153,13 +217,93 @@ int UtcDaliSuperBlurViewSetImage(void)
   // start multiple guassian blur call, each guassian blur creates two render tasks
   DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
 
+  {
+    // create image renderers for the original image and each blurred image
+    Stage::GetCurrent().Add( blurView );
+    Wait(application);
+    DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
+
+    application.SendNotification();
+    application.Render();
+    Stage::GetCurrent().Remove( blurView );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliSuperBlurViewSetProperty(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliSuperBlurViewSetProperty ");
+
+  SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
   // create image renderers for the original image and each blurred image
   Stage::GetCurrent().Add( blurView );
+  blurView.SetSize( 100.f, 100.f );
+
+  tet_infoline(" Set property map. Set height and width large enough to avoid atlassing");
+  int width(512);
+  int height(513);
+  LoadBitmapResource( application.GetPlatform(), width, height );
+
+  Property::Map propertyMap;
+  propertyMap["filename"] = TEST_IMAGE_FILE_NAME ;
+  propertyMap["width"] = width;
+  propertyMap["height"] = height;
+
+  // Will create ResourceImage
+  blurView.SetProperty(SuperBlurView::Property::IMAGE, propertyMap);
   Wait(application);
-  DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
+
+  // start multiple guassian blur call, each guassian blur creates two render tasks
+  DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+
+  Wait(application);
+
   END_TEST;
 }
 
+
+int UtcDaliSuperBlurViewGetProperty(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliSuperBlurViewSetProperty ");
+
+  SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
+  blurView.SetSize( 100.f, 100.f );
+
+  tet_infoline(" Set property map.");
+  int width(512);
+  int height(513); // Value large enough to avoid future atlassing
+  LoadBitmapResource( application.GetPlatform(), width, height );
+
+  Property::Map propertyMap;
+  propertyMap["filename"] = TEST_IMAGE_FILE_NAME ;
+  propertyMap["width"] = width;
+  propertyMap["height"] = height;
+
+  // Will create ResourceImage
+  blurView.SetProperty(SuperBlurView::Property::IMAGE, propertyMap);
+  Wait(application);
+
+  // create image renderers for the original image and each blurred image
+  Stage::GetCurrent().Add( blurView );
+
+  Property::Value imageProperty = blurView.GetProperty(SuperBlurView::Property::IMAGE);
+  Property::Map* map = imageProperty.GetMap();
+  DALI_TEST_CHECK( map != NULL );
+  if( map )
+  {
+    Property::Map& mapRef = *map;
+    DALI_TEST_EQUALS( mapRef["filename"], TEST_IMAGE_FILE_NAME, TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
+
 int UtcDaliSuperBlurViewSetGetBlurStrength(void)
 {
   ToolkitTestApplication application;
@@ -220,3 +364,30 @@ int UtcDaliSuperBlurViewGetBlurredImage(void)
 
   END_TEST;
 }
+
+int UtcDaliSuperBlurViewBlurSignal(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliSuperBlurViewSignal ");
+
+  SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
+  blurView.SetSize( 100.f, 100.f );
+
+  Image inputImage = CreateSolidColorImage( application, Color::GREEN, 50, 50 );
+  blurView.SetImage( inputImage );
+  // start multiple guassian blur call, each guassian blur creates two render tasks
+  DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2);
+
+  SignalHandler signalHandler;
+  blurView.BlurFinishedSignal().Connect(&signalHandler, &SignalHandler::Callback);
+
+  // create image renderers for the original image and each blurred image
+  Stage::GetCurrent().Add( blurView );
+  Wait(application, 1000);
+
+  DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION );
+  //DALI_TEST_EQUALS(signalHandler.GetCalls(), 1, TEST_LOCATION);
+
+  END_TEST;
+}
index 1bcbe2b..3cef498 100644 (file)
@@ -20,6 +20,8 @@
 #include <dali/devel-api/rendering/renderer.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/tap-gesture-event.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/pan-gesture-event.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 
@@ -94,6 +96,8 @@ const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
 
 const unsigned int CURSOR_BLINK_INTERVAL = 500u; // Cursor blink interval
+const float RENDER_FRAME_INTERVAL = 16.66f;
+
 const float TO_MILLISECONDS = 1000.f;
 const float TO_SECONDS = 1.f / TO_MILLISECONDS;
 
@@ -103,6 +107,105 @@ const float SCROLL_SPEED = 300.f;
 static bool gTextChangedCallBackCalled;
 static bool gMaxCharactersCallBackCalled;
 
+static void LoadBitmapResource(TestPlatformAbstraction& platform, int width, int height)
+{
+  Integration::ResourceRequest* request = platform.GetRequest();
+  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD );
+  Integration::ResourcePointer resource(bitmap);
+  bitmap->GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGBA8888, width, height, width, height);
+
+  if(request)
+  {
+    platform.SetResourceLoaded(request->GetId(), request->GetType()->id, resource);
+  }
+}
+
+static void LoadMarkerImages(ToolkitTestApplication& app, TextField textField)
+{
+  int width(40);
+  int height(40);
+  LoadBitmapResource( app.GetPlatform(), width, height );
+
+  Property::Map propertyMap;
+  propertyMap["filename"] = "image.png";
+  propertyMap["width"] = width;
+  propertyMap["height"] = height;
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::GRAB_HANDLE_IMAGE, propertyMap );
+  textField.SetProperty( Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE, propertyMap );
+}
+
+// Generate a PanGestureEvent to send to Core
+static Integration::PanGestureEvent GeneratePan(
+    Gesture::State state,
+    const Vector2& previousPosition,
+    const Vector2& currentPosition,
+    unsigned long timeDelta,
+    unsigned int numberOfTouches = 1)
+{
+  Integration::PanGestureEvent pan(state);
+
+  pan.previousPosition = previousPosition;
+  pan.currentPosition = currentPosition;
+  pan.timeDelta = timeDelta;
+  pan.numberOfTouches = numberOfTouches;
+
+  return pan;
+}
+
+/**
+ * Helper to generate PanGestureEvent
+ *
+ * @param[in] application Application instance
+ * @param[in] state The Gesture State
+ * @param[in] pos The current position of touch.
+ */
+static void SendPan(ToolkitTestApplication& application, Gesture::State state, const Vector2& pos)
+{
+  static Vector2 last;
+
+  if( (state == Gesture::Started) ||
+      (state == Gesture::Possible) )
+  {
+    last.x = pos.x;
+    last.y = pos.y;
+  }
+
+  application.ProcessEvent(GeneratePan(state, last, pos, 16));
+
+  last.x = pos.x;
+  last.y = pos.y;
+}
+
+/*
+ * Simulate time passed by.
+ *
+ * @note this will always process at least 1 frame (1/60 sec)
+ *
+ * @param application Test application instance
+ * @param duration Time to pass in milliseconds.
+ * @return The actual time passed in milliseconds
+ */
+static int Wait(ToolkitTestApplication& application, int duration = 0)
+{
+  int time = 0;
+
+  for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
+  {
+    application.SendNotification();
+    application.Render(RENDER_FRAME_INTERVAL);
+    time += RENDER_FRAME_INTERVAL;
+  }
+
+  return time;
+}
+
+
 static void TestTextChangedCallback( TextField control )
 {
   tet_infoline(" TestTextChangedCallback");
@@ -693,6 +796,7 @@ int utcDaliTextFieldEvent02(void)
   TextField field = TextField::New();
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
   DALI_TEST_CHECK( field );
+  LoadMarkerImages(application, field);
 
   Stage::GetCurrent().Add( field );
 
@@ -844,6 +948,7 @@ int utcDaliTextFieldEvent03(void)
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  LoadMarkerImages(application, field);
 
   // Render and notify
   application.SendNotification();
@@ -880,3 +985,132 @@ int utcDaliTextFieldEvent03(void)
 
   END_TEST;
 }
+
+int utcDaliTextFieldEvent04(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent04");
+
+  // Checks if the highlight actor is created.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  Stage::GetCurrent().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  field.SetSize( 300.f, 50.f );
+  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+
+  // Tap first to get the focus.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Tap grab handle
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent05(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent05");
+
+  // Checks if the highlight actor is created.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  Stage::GetCurrent().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  field.SetSize( 300.f, 50.f );
+  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+
+  // Tap first to get the focus.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // drag grab handle right
+  Vector2 pos(0.0f, 40.0f);
+  SendPan(application, Gesture::Possible, pos);
+  SendPan(application, Gesture::Started, pos);
+  pos.x += 5.0f;
+  Wait(application, 100);
+
+  for(int i = 0;i<20;i++)
+  {
+    SendPan(application, Gesture::Continuing, pos);
+    pos.x += 5.0f;
+    Wait(application);
+  }
+
+  SendPan(application, Gesture::Finished, pos);
+  Wait(application, RENDER_FRAME_INTERVAL);
+
+  Actor offscreenRoot = field.GetChildAt( 1u );
+  END_TEST;
+}
index e116401..18faf8d 100644 (file)
@@ -55,7 +55,7 @@ cov_data:
        @for i in `find $(COVERAGE_DIR) -name "libdali_toolkit_la-*.gcda" -o -name "libdali_toolkit_la-*.gcno"` ;\
                do mv $$i `echo $$i | sed s/libdali_toolkit_la-//` ; echo $$i ; done
        @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --base-directory . --directory . -c -o dali.info
-       @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "/usr/include/*" "*/dali-env/*" -o dali.info
+       @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "/usr/include/*" "*/dali-env/*" "*/dali-toolkit/third-party/*" -o dali.info
        @test -z $(COVERAGE_OUTPUT_DIR) || mkdir -p $(COVERAGE_OUTPUT_DIR)
 
 coverage: cov_data
index 2cc6de7..7383ebe 100644 (file)
 
 # Build the Dali Toolkit library
 
-toolkit_images_dir = ../../../dali-toolkit/styles/images-common
-toolkit_sounds_dir = ../../../dali-toolkit/sounds
-toolkit_src_dir    = ../../../dali-toolkit/internal
-public_api_src_dir = ../../../dali-toolkit/public-api
-devel_api_src_dir  = ../../../dali-toolkit/devel-api
+toolkit_images_dir  = ../../../dali-toolkit/styles/images-common
+toolkit_sounds_dir  = ../../../dali-toolkit/sounds
+toolkit_src_dir     = ../../../dali-toolkit/internal
+public_api_src_dir  = ../../../dali-toolkit/public-api
+devel_api_src_dir   = ../../../dali-toolkit/devel-api
+third_party_src_dir = ../../../dali-toolkit/third-party
 
 toolkit_styles_dir = $(STYLE_DIR)
 toolkit_style_images_dir = $(STYLE_DIR)/images
@@ -31,6 +32,7 @@ include ../../../dali-toolkit/styles/images-common/file.list
 include ../../../dali-toolkit/internal/file.list
 include ../../../dali-toolkit/public-api/file.list
 include ../../../dali-toolkit/devel-api/file.list
+include ../../../dali-toolkit/third-party/file.list
 
 vector_based_text_src_dir = ../../../dali-toolkit/internal/text/rendering/vector-based
 include ../../../dali-toolkit/internal/text/rendering/vector-based/file.list
@@ -56,7 +58,8 @@ lib_LTLIBRARIES = libdali-toolkit.la
 libdali_toolkit_la_SOURCES = \
                      $(toolkit_src_files) \
                      $(public_api_src_files) \
-                     $(devel_api_src_files)
+                     $(devel_api_src_files) \
+                     $(third_party_src_files)
 
 dalistyledir = ${dataReadOnlyDir}/toolkit/styles/
 dalistyle_DATA = ${dali_toolkit_style_files}
index 5e8c0ae..6bcb108 100644 (file)
@@ -54,7 +54,7 @@ JsonParser::~JsonParser()
 {
 }
 
-JsonParser DownCast( BaseHandle handle )
+JsonParser JsonParser::DownCast( BaseHandle handle )
 {
   return JsonParser( dynamic_cast<Internal::JsonParser*>(handle.GetObjectPtr()) );
 }
index 8515280..302c7a2 100644 (file)
@@ -182,11 +182,6 @@ TreeNode::KeyNodePair TreeNode::ConstIterator::operator *()
   return KeyNodePair(mNode->mName, *mNode);
 }
 
-TreeNode::KeyNodePair TreeNode::ConstIterator::operator ->()
-{
-  return KeyNodePair(mNode->mName, *mNode);
-}
-
 bool TreeNode::ConstIterator::operator!=( const TreeNode::ConstIterator& rhs ) const
 {
   return mNode != rhs.mNode;
index 6da465a..3e47aea 100644 (file)
@@ -105,11 +105,6 @@ public:
      * pointer semantics
      */
     KeyNodePair operator*();
-
-    /*
-     * pointer semantics
-     */
-    KeyNodePair operator->();
   private:
     TreeNode* mNode;
   };
index 0212161..b6c4e3b 100644 (file)
@@ -1390,35 +1390,6 @@ Toolkit::AccessibilityManager::FocusedActorActivatedSignalType& AccessibilityMan
   return mFocusedActorActivatedSignal;
 }
 
-bool AccessibilityManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
-{
-  bool connected( true );
-  AccessibilityManager* manager = dynamic_cast<AccessibilityManager*>( object );
-
-  if( manager )
-  {
-    if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
-    {
-      manager->FocusChangedSignal().Connect( tracker, functor );
-    }
-    else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_OVERSHOT ) )
-    {
-      manager->FocusOvershotSignal().Connect( tracker, functor );
-    }
-    else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ACTIVATED ) )
-    {
-      manager->FocusedActorActivatedSignal().Connect( tracker, functor );
-    }
-    else
-    {
-      // signalName does not match any signal
-      connected = false;
-    }
-  }
-
-  return connected;
-}
-
 } // namespace Internal
 
 } // namespace Toolkit
index 1603a02..bb2b275 100644 (file)
@@ -220,17 +220,6 @@ public:
    */
   Toolkit::AccessibilityManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
 
-  /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
-   */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-
 public:  // Signals
 
   /**
index 3af81bb..dd722a4 100644 (file)
@@ -722,32 +722,6 @@ std::string Button::GetSelectedImageFilename() const
   return std::string();
 }
 
-std::string Button::GetBackgroundImageFilename() const
-{
-  if( mBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
-std::string Button::GetSelectedBackgroundImageFilename() const
-{
-  if( mSelectedBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mSelectedBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
 std::string Button::GetDisabledImageFilename() const
 {
   if( mDisabledContent )
@@ -761,32 +735,6 @@ std::string Button::GetDisabledImageFilename() const
   return std::string();
 }
 
-std::string Button::GetDisabledSelectedImageFilename() const
-{
-  if( mDisabledSelectedContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mDisabledSelectedContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
-std::string Button::GetDisabledBackgroundImageFilename() const
-{
-  if( mDisabledBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mDisabledBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
 bool Button::DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes )
 {
   bool ret = false;
index 2005f9c..f89c1f4 100644 (file)
@@ -26,7 +26,7 @@
 #include <dali-toolkit/public-api/controls/flex-container/flex-container.h>
 extern "C"
 {
-#include "layout.h"
+#include <dali-toolkit/third-party/facebook-flexbox/layout.h>
 }
 
 namespace Dali
index d395fb2..be409da 100644 (file)
@@ -247,21 +247,6 @@ const char* NRMMAP_FRAGMENT_SHADER = MAKE_SHADER(
 
 using namespace Dali;
 
-void LookAt(Matrix& result, const Vector3& eye, const Vector3& target, const Vector3& up)
-{
-  Vector3 vZ = target - eye;
-  vZ.Normalize();
-
-  Vector3 vX = up.Cross(vZ);
-  vX.Normalize();
-
-  Vector3 vY = vZ.Cross(vX);
-  vY.Normalize();
-
-  result.SetInverseTransformComponents(vX, vY, vZ, eye);
-}
-
-
 Model3dView::Model3dView()
   : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) )
 {
index a2c1ad7..9e2e707 100644 (file)
@@ -19,8 +19,8 @@
 #include "svg-rasterize-thread.h"
 
 // INTERNAL INCLUDES
-#include "nanosvg/nanosvgrast.h"
-#include "svg-renderer.h"
+#include <dali-toolkit/third-party/nanosvg/nanosvgrast.h>
+#include <dali-toolkit/internal/controls/renderers/svg/svg-renderer.h>
 
 namespace Dali
 {
index ce3dbc0..8fbf70a 100644 (file)
@@ -26,8 +26,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include "nanosvg/nanosvg.h"
-#include "svg-rasterize-thread.h"
+#include <dali-toolkit/third-party/nanosvg/nanosvg.h>
+#include <dali-toolkit/internal/controls/renderers/svg/svg-rasterize-thread.h>
 #include <dali-toolkit/internal/controls/renderers/image/image-renderer.h>
 #include <dali-toolkit/internal/controls/renderers/renderer-factory-cache.h>
 #include <dali-toolkit/internal/controls/renderers/renderer-string-constants.h>
index 2f13c17..76b0bba 100644 (file)
@@ -1440,16 +1440,6 @@ void ItemView::CalculateDomainSize(const Vector3& layoutSize)
   }
 }
 
-Vector2 ItemView::GetDomainSize() const
-{
-  Actor self = Self();
-
-  float minScrollPosition = self.GetProperty<float>(Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y);
-  float maxScrollPosition = self.GetProperty<float>(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX_Y);
-
-  return Vector2(0.0f, fabs(GetScrollPosition(minScrollPosition, self.GetCurrentSize()) - GetScrollPosition(-maxScrollPosition, self.GetCurrentSize())));
-}
-
 bool ItemView::IsLayoutScrollable(const Vector3& layoutSize)
 {
   Actor self = Self();
index 3d31e1c..c076dce 100644 (file)
@@ -216,11 +216,6 @@ public:
   void ReplaceItems(const ItemContainer& replacementItems, float durationSeconds);
 
   /**
-   * @copydoc Toolkit::Scrollable::GetDomainSize
-   */
-  Vector2 GetDomainSize() const;
-
-  /**
    * @copydoc Toolkit::Scrollable::GetCurrentScrollPosition
    */
   Vector2 GetCurrentScrollPosition() const;
index 4cc2393..853abe2 100644 (file)
@@ -1175,19 +1175,6 @@ Vector2 ScrollView::GetCurrentScrollPosition() const
   return -GetPropertyPosition();
 }
 
-Vector2 ScrollView::GetDomainSize() const
-{
-  Vector3 size = Self().GetCurrentSize();
-
-  const RulerDomain& xDomain = GetRulerX()->GetDomain();
-  const RulerDomain& yDomain = GetRulerY()->GetDomain();
-
-  Vector2 domainSize;
-  domainSize.x = xDomain.max - xDomain.min - size.x;
-  domainSize.y = yDomain.max - yDomain.min - size.y;
-  return domainSize;
-}
-
 void ScrollView::TransformTo(const Vector2& position,
                              DirectionBias horizontalBias, DirectionBias verticalBias)
 {
index b9db77d..998f6c3 100644 (file)
@@ -364,11 +364,6 @@ public:
   Vector2 GetCurrentScrollPosition() const;
 
   /**
-   * @copydoc Toolkit::Scrollable::GetDomainSize
-   */
-  Vector2 GetDomainSize() const;
-
-  /**
    * @copydoc ScrollTo(const Vector2&)
    */
   void TransformTo(const Vector2& position,
index 0d5d045..660606c 100644 (file)
@@ -55,12 +55,6 @@ public:
   void SetOvershootEnabled(bool enable);
 
   /**
-   * Gets the size of the domain (minimum/maximum extents for each axis to scroll to)
-   * @return the domain size
-   */
-  virtual Vector2 GetDomainSize() const = 0;
-
-  /**
    * Adds actor as an Overlay to Scrollable
    * This method is called by Add-on UI components
    * such as scroll bars, page indicators.
index c987ea3..2a4979b 100644 (file)
@@ -382,7 +382,7 @@ Property::Value SuperBlurView::GetProperty( BaseObject* object, Property::Index
     {
       Property::Map map;
       Image inputImage = superBlurViewImpl.GetImage();
-      if( !inputImage )
+      if( inputImage )
       {
         Scripting::CreatePropertyMap( inputImage, map );
       }
index f9edbdd..e5d0dc1 100644 (file)
@@ -25,8 +25,6 @@ toolkit_src_files = \
    $(toolkit_src_dir)/controls/renderers/gradient/linear-gradient.cpp \
    $(toolkit_src_dir)/controls/renderers/gradient/radial-gradient.cpp \
    $(toolkit_src_dir)/controls/renderers/gradient/gradient-renderer.cpp \
-   $(toolkit_src_dir)/controls/renderers/svg/nanosvg/nanosvg.cc \
-   $(toolkit_src_dir)/controls/renderers/svg/nanosvg/nanosvgrast.cc \
    $(toolkit_src_dir)/controls/renderers/svg/svg-rasterize-thread.cpp \
    $(toolkit_src_dir)/controls/renderers/svg/svg-renderer.cpp \
    $(toolkit_src_dir)/controls/alignment/alignment-impl.cpp \
@@ -38,7 +36,6 @@ toolkit_src_files = \
    $(toolkit_src_dir)/controls/buttons/push-button-impl.cpp \
    $(toolkit_src_dir)/controls/buttons/radio-button-impl.cpp \
    $(toolkit_src_dir)/controls/effects-view/effects-view-impl.cpp \
-   $(toolkit_src_dir)/controls/flex-container/layout.c \
    $(toolkit_src_dir)/controls/flex-container/flex-container-impl.cpp \
    $(toolkit_src_dir)/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp \
    $(toolkit_src_dir)/controls/image-view/image-view-impl.cpp \
index 4605cd7..2a52cff 100644 (file)
@@ -78,9 +78,9 @@ BaseHandle Create()
 
 DALI_TYPE_REGISTRATION_BEGIN_CREATE( Toolkit::KeyboardFocusManager, Dali::BaseHandle, Create, true )
 
-DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardPreFocusChange",           SIGNAL_PRE_FOCUS_CHANGE        )
-DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusChanged",             SIGNAL_FOCUS_CHANGED           )
-DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusGroupChanged",        SIGNAL_FOCUS_GROUP_CHANGED     )
+DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardPreFocusChange",           SIGNAL_PRE_FOCUS_CHANGE )
+DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusChanged",             SIGNAL_FOCUS_CHANGED )
+DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusGroupChanged",        SIGNAL_FOCUS_GROUP_CHANGED )
 DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusedActorEnterKey",     SIGNAL_FOCUSED_ACTOR_ENTER_KEY )
 
 DALI_TYPE_REGISTRATION_END()
diff --git a/dali-toolkit/third-party/file.list b/dali-toolkit/third-party/file.list
new file mode 100644 (file)
index 0000000..53e027f
--- /dev/null
@@ -0,0 +1,4 @@
+third_party_src_files = \
+   $(third_party_src_dir)/nanosvg/nanosvg.cc \
+   $(third_party_src_dir)/nanosvg/nanosvgrast.cc \
+   $(third_party_src_dir)/facebook-flexbox/layout.c
index eef34ab..87b49b5 100644 (file)
  *    <td>Controls for displaying text or text input.</td>
  * </tr>
  * <tr>
+ *    <td style="padding-left:1em">@ref dali_toolkit_controls_flex_container</td>
+ *    <td>FlexContainer is a container for Flexbox layout.</td>
+ * </tr>
+ * <tr>
+ *    <td style="padding-left:1em">@ref dali_toolkit_controls_video_view</td>
+ *    <td>VideoView is a control for video playback and display.</td>
+ * </tr>
+ * <tr>
+ *    <td style="padding-left:1em">@ref dali_toolkit_controls_slider</td>
+ *    <td>Slider is a control to enable sliding an indicator between two values.</td>
+ * </tr>
+ * <tr>
  *    <td>@ref dali_toolkit_managers</td>
  *    <td>Singleton classes for managing application-wide functionalities.</td>
  * </tr>
  *     @defgroup dali_toolkit_controls_video_view Video View
  *     @brief VideoView is a control for video playback and display.
 
+ *     @defgroup dali_toolkit_controls_slider Slider
+ *     @brief Slider is a control to enable sliding an indicator between two values.
+
  *   @}
 
  *   @defgroup dali_toolkit_managers Managers
index 72a4a84..4507c4f 100644 (file)
@@ -100,6 +100,11 @@ PREFIX="/usr"
 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
 
+%if 0%{?enable_coverage}
+CXXFLAGS+=" --coverage "
+LDFLAGS+=" --coverage "
+%endif
+
 libtoolize --force
 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
 autoreconf --install