[dali_1.9.23] Merge branch 'devel/master' 04/240004/1
authorCheng-Shiun Tsai <cheng.tsai@samsung.com>
Fri, 31 Jul 2020 10:12:31 +0000 (11:12 +0100)
committerCheng-Shiun Tsai <cheng.tsai@samsung.com>
Fri, 31 Jul 2020 10:12:31 +0000 (11:12 +0100)
Change-Id: I841314935b5630678668052e42c8e38e1b6cc753

100 files changed:
.gitignore
automated-tests/src/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/addons/rendering.cmake [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/addons/sample.cmake [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/addons/test-rendering-addon.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/addons/test-sample-addon.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.h [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/utc-Dali-AddOns.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-native-image-source.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h
automated-tests/src/dali-toolkit/utc-Dali-AsyncImageLoader.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-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp
dali-toolkit/devel-api/controls/video-view/video-view-devel.cpp
dali-toolkit/devel-api/controls/video-view/video-view-devel.h
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/controls/slider/slider-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.h
dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/image-loader/image-load-thread.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/npatch-loader.cpp
dali-toolkit/internal/visuals/npatch-loader.h
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/rendering-addon.h [new file with mode: 0644]
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/texture-manager-impl.h [changed mode: 0755->0644]
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/buttons/check-box-button.cpp
dali-toolkit/public-api/controls/buttons/check-box-button.h
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/buttons/push-button.h
dali-toolkit/public-api/controls/buttons/radio-button.cpp
dali-toolkit/public-api/controls/buttons/radio-button.h
dali-toolkit/public-api/controls/control-impl.cpp [changed mode: 0755->0644]
dali-toolkit/public-api/controls/control.cpp
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/flex-container/flex-container.cpp
dali-toolkit/public-api/controls/flex-container/flex-container.h
dali-toolkit/public-api/controls/image-view/image-view.cpp
dali-toolkit/public-api/controls/image-view/image-view.h
dali-toolkit/public-api/controls/model3d-view/model3d-view.cpp
dali-toolkit/public-api/controls/model3d-view/model3d-view.h
dali-toolkit/public-api/controls/progress-bar/progress-bar.cpp
dali-toolkit/public-api/controls/progress-bar/progress-bar.h
dali-toolkit/public-api/controls/scrollable/item-view/item-view.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-view.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
dali-toolkit/public-api/controls/scrollable/scrollable.cpp
dali-toolkit/public-api/controls/scrollable/scrollable.h
dali-toolkit/public-api/controls/slider/slider.cpp
dali-toolkit/public-api/controls/slider/slider.h
dali-toolkit/public-api/controls/text-controls/text-editor.cpp
dali-toolkit/public-api/controls/text-controls/text-editor.h
dali-toolkit/public-api/controls/text-controls/text-field.cpp
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/text-controls/text-label.cpp
dali-toolkit/public-api/controls/text-controls/text-label.h
dali-toolkit/public-api/controls/video-view/video-view.cpp
dali-toolkit/public-api/controls/video-view/video-view.h
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/image-loader/async-image-loader.cpp
dali-toolkit/public-api/image-loader/async-image-loader.h
docs/content/example-code/properties.cpp
packaging/dali-toolkit.spec

index 1f19351..daf57d2 100644 (file)
@@ -39,6 +39,8 @@ libdali2-toolkit.so*
 /docs/generated/*
 /build/tizen/doc
 /build/tizen/.cov
+build/tizen/CMakeDoxyfile.in
+build/tizen/CMakeDoxygenDefaults.cmake
 /build/desktop
 /packaging/home*
 .vscode/
index e4f0a2b..4d59c62 100644 (file)
@@ -1,3 +1,4 @@
+# prebuild test addons
 IF( DEFINED MODULE )
     MESSAGE(STATUS "Building: ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}")
     ADD_SUBDIRECTORY(${MODULE})
index 4513301..6a94a6f 100755 (executable)
@@ -7,6 +7,7 @@ SET(CAPI_LIB "dali-toolkit-internal")
 
 # List of test case sources (Only these get parsed for test cases)
 SET(TC_SOURCES
+ utc-Dali-AddOns.cpp
  utc-Dali-BidirectionalSupport.cpp
  utc-Dali-ColorConversion.cpp
  utc-Dali-Control-internal.cpp
@@ -73,19 +74,20 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
    dali-toolkit-test-utils/toolkit-text-utils.cpp
    dali-toolkit-test-utils/dummy-visual.cpp
+   dali-toolkit-test-utils/test-addon-manager.cpp
 )
 
-
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
     dali2-core
     dali2-adaptor
     dali2-toolkit
 )
 
-ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED )
+ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED -fPIC )
 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
 
 ADD_DEFINITIONS(-DTEST_RESOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/../../resources\" )
+ADD_DEFINITIONS(-DDALI_ADDONS_PATH=\"${CMAKE_CURRENT_BINARY_DIR}\")
 
 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
@@ -101,9 +103,42 @@ INCLUDE_DIRECTORIES(
 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
-    -lpthread --coverage
+    -lpthread --coverage -ldl
 )
 
 INSTALL(PROGRAMS ${EXEC_NAME}
     DESTINATION ${BIN_DIR}/${EXEC_NAME}
 )
+
+# build addons
+MESSAGE( STATUS "BINDIR: ${CMAKE_CURRENT_BINARY_DIR}")
+
+FILE( GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR}/addons/*.cmake )
+
+FOREACH( INFILE IN ITEMS ${FILES} )
+
+    INCLUDE( ${INFILE} )
+    MESSAGE( STATUS "Building ${INFILE}" )
+
+    ADD_LIBRARY( ${ADDON_NAME} SHARED ${ADDON_SOURCES} )
+
+    TARGET_INCLUDE_DIRECTORIES( ${ADDON_NAME} PUBLIC
+            ../../../
+            ${${CAPI_LIB}_INCLUDE_DIRS}
+            ../dali-toolkit/dali-toolkit-test-utils
+            dali-toolkit-test-utils)
+
+    TARGET_LINK_LIBRARIES(${ADDON_NAME}
+            ${CMAKE_CXX_LINK_FLAGS}
+            ${${CAPI_LIB}_LIBRARIES}
+            -lpthread -ldl --coverage
+            )
+
+    INSTALL( TARGETS ${ADDON_NAME} DESTINATION ${BIN_DIR} )
+
+    SET( ADDON_LIST "lib${ADDON_NAME}.so
+${ADDON_LIST}")
+ENDFOREACH()
+
+# store AddOns list
+FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/addons.txt "${ADDON_LIST}" )
\ No newline at end of file
diff --git a/automated-tests/src/dali-toolkit-internal/addons/rendering.cmake b/automated-tests/src/dali-toolkit-internal/addons/rendering.cmake
new file mode 100644 (file)
index 0000000..f9e66e1
--- /dev/null
@@ -0,0 +1,2 @@
+SET(ADDON_NAME rendering )
+SET(ADDON_SOURCES ./addons/test-rendering-addon.cpp)
diff --git a/automated-tests/src/dali-toolkit-internal/addons/sample.cmake b/automated-tests/src/dali-toolkit-internal/addons/sample.cmake
new file mode 100644 (file)
index 0000000..1c5d781
--- /dev/null
@@ -0,0 +1,2 @@
+SET(ADDON_NAME sample )
+SET(ADDON_SOURCES ./addons/test-sample-addon.cpp)
\ No newline at end of file
diff --git a/automated-tests/src/dali-toolkit-internal/addons/test-rendering-addon.cpp b/automated-tests/src/dali-toolkit-internal/addons/test-rendering-addon.cpp
new file mode 100644 (file)
index 0000000..6756093
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2020 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 HEADERS
+#include <dali/devel-api/addons/addon-base.h>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/renderer.h>
+
+// INTERNAL HEADERS
+// Needed to access the private class members
+#define private public
+#include <dali-toolkit/internal/visuals/npatch/npatch-visual.h>
+#include <dali-toolkit/internal/visuals/npatch-loader.h>
+#undef private
+
+
+using Dali::Toolkit::Internal::TextureManager;
+
+namespace Dali
+{
+namespace AddOns
+{
+
+struct DummyTiler
+{
+};
+
+void* CreateInstance( TextureManager* textureManager )
+{
+  fprintf(stderr, "AddOn::CreateInstance( %p )\n", textureManager);
+  return new DummyTiler;
+}
+
+namespace GeometryTiler
+{
+std::vector<std::string> gCallStack;
+
+static Geometry GetGeometryInternal(TextureManager::TextureId textureId, uint32_t& o0, uint32_t& o1 )
+{
+  gCallStack.emplace_back( "GetGeometry" );
+  o0 = 10;
+  o1 = 5;
+  fprintf(stderr, "AddOn::GetGeometryInternal()\n");
+  return Dali::Geometry::New();
+}
+
+static Geometry CreateGeometryInternal(TextureManager::TextureId textureId, const Devel::PixelBuffer& pixelBuffer )
+{
+  gCallStack.emplace_back( "CreateGeometry" );
+  fprintf(stderr, "AddOn::CreateGeometryInternal()\n");
+  return Dali::Geometry::New();
+}
+
+static Geometry CreateGeometryMapInternal(const void* opacityMap,
+                                          const Uint16Pair& gridSize,
+                                          uint32_t *outElements)
+{
+  gCallStack.emplace_back( "CreateGeometryGrid" );
+  outElements[0] = 2;
+  outElements[1] = 3;
+  return Dali::Geometry::New();
+}
+
+static void* NPatchBuildInternal(const Devel::PixelBuffer& pixelBuffer, Toolkit::Internal::NPatchLoader::Data* data )
+{
+  gCallStack.emplace_back( "BuildNPatch" );
+  fprintf(stderr, "AddOn::NPatchBuild()\n");
+  static char dummyData;
+  return &dummyData;
+}
+
+static void NPatchDestroyInternal(void* object )
+{
+  gCallStack.emplace_back( "DestroyNPatch" );
+  fprintf(stderr, "AddOn::NPatchDestroy()\n");
+}
+
+static void SubmitInternal(Renderer& renderer, const void* object  )
+{
+  gCallStack.emplace_back( "SubmitRenderTask" );
+  fprintf(stderr, "AddOn::SubmitInternal()\n");
+}
+
+static std::vector<std::string> GetCallStack( bool clear )
+{
+  auto retval = gCallStack;
+  if(clear)
+  {
+    gCallStack.clear();
+  }
+  return retval;
+}
+
+
+}
+}
+}
+
+/**
+ * OverdrawingAddOn implementation
+ */
+class TestRenderingAddOn : public Dali::AddOns::AddOnBase
+{
+public:
+
+  void GetAddOnInfo( Dali::AddOnInfo& info ) override
+  {
+    info.type = Dali::AddOnType::GENERIC;
+    info.name = "oo-rendering";
+    info.version = Dali::DALI_ADDON_VERSION( 1, 0, 0 );
+    info.next = nullptr;
+  }
+
+  /**
+   * Dispatch table for global functions
+   * @return
+   */
+  Dali::AddOns::DispatchTable* GetGlobalDispatchTable() override
+  {
+    static Dali::AddOns::DispatchTable dispatchTable{};
+    if( dispatchTable.Empty() )
+    {
+      dispatchTable["Initialize"]         = Dali::AddOns::CreateInstance;
+      dispatchTable["CreateGeometry"]     = Dali::AddOns::GeometryTiler::CreateGeometryInternal;
+      dispatchTable["GetGeometry"]        = Dali::AddOns::GeometryTiler::GetGeometryInternal;
+      dispatchTable["CreateGeometryGrid"] = Dali::AddOns::GeometryTiler::CreateGeometryMapInternal;
+      dispatchTable["BuildNPatch"]        = Dali::AddOns::GeometryTiler::NPatchBuildInternal;
+      dispatchTable["DestroyNPatch"]      = Dali::AddOns::GeometryTiler::NPatchDestroyInternal;
+      dispatchTable["SubmitRenderTask"]   = Dali::AddOns::GeometryTiler::SubmitInternal;
+      dispatchTable["GetCallStack"]       = Dali::AddOns::GeometryTiler::GetCallStack;
+    }
+    return &dispatchTable;
+  }
+
+  /**
+   * Lifecycle
+   */
+
+  void OnStart() override
+  {
+  }
+
+  void OnStop() override
+  {
+  }
+
+  void OnPause() override
+  {
+  }
+
+  void OnResume() override
+  {
+  }
+
+  /**
+   * Dispatch table for instance functions
+   * @return
+   */
+  Dali::AddOns::DispatchTable* GetInstanceDispatchTable() override
+  {
+    return nullptr;
+  }
+};
+
+REGISTER_ADDON_CLASS( TestRenderingAddOn );
diff --git a/automated-tests/src/dali-toolkit-internal/addons/test-sample-addon.cpp b/automated-tests/src/dali-toolkit-internal/addons/test-sample-addon.cpp
new file mode 100644 (file)
index 0000000..d6f019d
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2020 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.
+ *
+ */
+
+#include <cstring>
+#include <dali/devel-api/addons/addon-base.h>
+#include <dali-test-suite-utils.h>
+
+namespace
+{
+bool gIsPaused = false;
+const auto ANSWER_TO_EVERYTHING = 42;
+}
+
+int StringLen( const char* str )
+{
+  return strlen( str );
+}
+
+int DoSum( int a, int b )
+{
+  return a+b;
+}
+
+bool GetLifecycleStatus()
+{
+  return gIsPaused;
+}
+
+struct AddOnDataInstance
+{
+  int GetValue()
+  {
+    return ANSWER_TO_EVERYTHING;
+  }
+
+  static int GetValueWithInstance( AddOnDataInstance* instance )
+  {
+    return instance->GetValue();
+  }
+};
+
+AddOnDataInstance* CreateInstance()
+{
+  return new AddOnDataInstance();
+}
+
+class TestDummyAddOn : public Dali::AddOns::AddOnBase
+{
+public:
+
+  void GetAddOnInfo( Dali::AddOnInfo& info ) override
+  {
+    info.type = Dali::AddOnType::GENERIC;
+    info.name = "SampleAddOn";
+    info.version = Dali::DALI_ADDON_VERSION( 1, 0, 0 );
+    info.next = nullptr;
+    tet_printf( "SampleAddOn: GetAddOnInfo() : name = %s\n", info.name.c_str());
+  }
+
+  /**
+   * Dispatch table for global functions
+   * @return
+   */
+  Dali::AddOns::DispatchTable* GetGlobalDispatchTable() override
+  {
+    static Dali::AddOns::DispatchTable dispatchTable{};
+    if( dispatchTable.Empty() )
+    {
+      dispatchTable["DoSum"]                     = DoSum;
+      dispatchTable["StringLen"]                 = StringLen;
+      dispatchTable["GetLifecycleStatus"]        = GetLifecycleStatus;
+      dispatchTable["CreateInstance"]            = CreateInstance;
+
+    }
+    return &dispatchTable;
+  }
+
+  /**
+   * Lifecycle
+   */
+  void OnStart() override
+  {
+    gIsPaused = false;
+  }
+
+  void OnStop() override
+  {
+    gIsPaused = true;
+  }
+
+  void OnPause() override
+  {
+    gIsPaused = true;
+  }
+
+  void OnResume() override
+  {
+    gIsPaused = false;
+  }
+
+  /**
+   * Dispatch table for instance functions
+   */
+  Dali::AddOns::DispatchTable* GetInstanceDispatchTable() override
+  {
+    static Dali::AddOns::DispatchTable dispatchTable{};
+    if( dispatchTable.Empty() )
+    {
+      dispatchTable["InstanceCall"] = AddOnDataInstance::GetValueWithInstance;
+    }
+    return &dispatchTable;
+  }
+};
+
+REGISTER_ADDON_CLASS( TestDummyAddOn );
diff --git a/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.cpp b/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.cpp
new file mode 100644 (file)
index 0000000..6bd9682
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2020 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.
+ *
+ */
+
+#include "test-addon-manager.h"
+#include <dali-test-suite-utils.h>
+#include <cstring>
+#include <dlfcn.h>
+
+#ifndef DALI_ADDONS_PATH
+#define DALI_ADDONS_PATH ""
+#endif
+
+namespace Dali
+{
+namespace Test
+{
+
+std::vector<std::string> AddOnManager::EnumerateAddOns()
+{
+  std::string listFileName(DALI_ADDONS_PATH);
+  listFileName += "/addons.txt";
+
+  // Read list of available test addons
+  tet_printf("Enumerating addons, file: %s\n", listFileName.c_str());
+  std::vector<std::string> addons{};
+  auto* fin = fopen( listFileName.c_str(), "r" );
+  char* lineBuf = new char[256];
+  memset( lineBuf, 0, 256 );
+  size_t n = 256;
+  while( getline( &lineBuf, &n, fin ) > 0 )
+  {
+    char* c = lineBuf;
+    while( *c )
+    {
+      if( *c == '\n' || *c == '\r' )
+      {
+        *c = 0;
+        break;
+      }
+      ++c;
+    }
+    tet_printf("Adding %s\n", lineBuf);
+    addons.emplace_back( lineBuf );
+    memset( lineBuf, 0, 256 );
+  }
+  fclose(fin);
+  delete [] lineBuf;
+  std::vector<std::string> retval{};
+  // Open addons
+  for( auto& name : addons )
+  {
+    std::string path(DALI_ADDONS_PATH);
+    path += "/";
+    path += name;
+
+    mAddOnCache.emplace_back();
+    mAddOnCache.back().handle = dlopen( path.c_str(), RTLD_DEEPBIND|RTLD_LAZY );
+    if( !mAddOnCache.back().handle )
+    {
+      mAddOnCache.back().valid = false;
+      tet_printf( "Can't open addon lib: %s, error: '%s'\n", path.c_str(), dlerror());
+      continue;
+    }
+    // Here addon must self register
+    if( !mAddOnCache.back().valid )
+    {
+      puts("Addon invalid!");
+    }
+    else
+    {
+      tet_printf( "Valid AddOn: %s\n", mAddOnCache.back().name.c_str() );
+      retval.emplace_back( mAddOnCache.back().name );
+    }
+  }
+
+  return retval;
+
+  /**
+   * Check for self-registering addons
+   */
+}
+
+void AddOnManager::RegisterAddOnDispatchTable( const AddOnDispatchTable* dispatchTable )
+{
+  // Register the dispatch table
+  auto& entry = mAddOnCache.back();
+  entry.name = dispatchTable->name;
+  tet_printf( "Registering AddOn: %s\n", entry.name.c_str());
+  entry.GetGlobalProc = dispatchTable->GetGlobalProc;
+  entry.GetInstanceProc = dispatchTable->GetInstanceProc;
+  entry.GetAddOnInfo = dispatchTable->GetAddOnInfo;
+  entry.OnStart = dispatchTable->OnStart;
+  entry.OnStop = dispatchTable->OnStop;
+  entry.OnPause = dispatchTable->OnPause;
+  entry.OnResume = dispatchTable->OnResume;
+  entry.valid = true;
+}
+
+bool AddOnManager::GetAddOnInfo(const std::string& name, AddOnInfo& info )
+{
+  auto retval = false;
+  std::find_if( mAddOnCache.begin(), mAddOnCache.end(),
+    [&retval, name, &info]( AddOnCacheEntry& entry )
+  {
+    if(entry.name == name)
+    {
+      entry.GetAddOnInfo( info );
+      retval = true;
+      return true;
+    }
+    return false;
+  });
+  return retval;
+}
+
+std::vector<AddOnLibrary> AddOnManager::LoadAddOns( const std::vector<std::string>& addonNames )
+{
+  if(mAddOnCache.empty())
+  {
+    EnumerateAddOns();
+  }
+
+  std::vector<AddOnLibrary> retval{};
+  for( auto& name : addonNames)
+  {
+    size_t index = 0;
+    auto iter = std::find_if( mAddOnCache.begin(), mAddOnCache.end(),
+      [&retval, name, &index]( AddOnCacheEntry& entry )
+      {
+        index++;
+        if(entry.name == name)
+        {
+          return true;
+        }
+        return false;
+      });
+    if( iter != mAddOnCache.end() )
+    {
+      retval.emplace_back( *reinterpret_cast<void**>( &index ) );
+    }
+    else
+    {
+      retval.emplace_back( nullptr );
+    }
+  }
+
+  return retval;
+}
+
+void* AddOnManager::GetGlobalProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName )
+{
+  auto index = *reinterpret_cast<const size_t*>( &addOnLibrary );
+  return mAddOnCache[index-1].GetGlobalProc( procName );
+}
+
+void* AddOnManager::GetInstanceProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName )
+{
+  auto index = *reinterpret_cast<const size_t*>( &addOnLibrary );
+  return mAddOnCache[index-1].GetInstanceProc( procName );
+}
+
+void AddOnManager::Start()
+{
+  for( auto& entry : mAddOnCache )
+  {
+    if(entry.OnStart)
+    {
+      entry.OnStart();
+    }
+  }
+}
+
+void AddOnManager::Resume()
+{
+  for( auto& entry : mAddOnCache )
+  {
+    if(entry.OnResume)
+    {
+      entry.OnResume();
+    }
+  }
+}
+
+void AddOnManager::Stop()
+{
+  for( auto& entry : mAddOnCache )
+  {
+    if(entry.OnStop)
+    {
+      entry.OnStop();
+    }
+  }
+}
+
+void AddOnManager::Pause()
+{
+  for( auto& entry : mAddOnCache )
+  {
+    if(entry.OnPause)
+    {
+      entry.OnPause();
+    }
+  }
+}
+
+}
+}
+
diff --git a/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.h b/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/test-addon-manager.h
new file mode 100644 (file)
index 0000000..e924876
--- /dev/null
@@ -0,0 +1,89 @@
+#ifndef TEST_ADDON_MANAGER_H
+#define TEST_ADDON_MANAGER_H
+
+/*
+ * Copyright (c) 2020 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.
+ *
+ */
+
+#include <dali/integration-api/addon-manager.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <string>
+
+namespace Dali
+{
+namespace Test
+{
+class AddOnManager : public Dali::Integration::AddOnManager
+{
+public:
+
+  /**
+   * @brief Constructor, initialised by the Adaptor
+   */
+  AddOnManager() = default;
+
+  /**
+   * @brief Destructor
+   */
+  virtual ~AddOnManager() = default;
+
+  std::vector<std::string> EnumerateAddOns() override;
+
+  bool GetAddOnInfo(const std::string& name, AddOnInfo& info ) override;
+
+  std::vector<AddOnLibrary> LoadAddOns( const std::vector<std::string>& addonNames ) override;
+
+  void* GetGlobalProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName ) override;
+
+  void* GetInstanceProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName ) override;
+
+  void RegisterAddOnDispatchTable( const AddOnDispatchTable* dispatchTable ) override;
+
+  void Start() override;
+
+  void Resume() override;
+
+  void Stop() override;
+
+  void Pause() override;
+
+  struct AddOnCacheEntry
+  {
+    std::string name{};
+    AddOnInfo info{};
+
+    // library handle
+    void* handle {nullptr};
+
+    // main function pointers
+    void(*GetAddOnInfo)(AddOnInfo& ) = nullptr; ///< Returns AddOnInfo structure
+    void*(*GetInstanceProc)( const char* ) = nullptr; ///< Returns pointer of instance function (member funtion)
+    void*(*GetGlobalProc)( const char* ) = nullptr; ///< Returns pointer of global function (non-member function)
+
+    void(*OnStart)() = nullptr;
+    void(*OnResume)() = nullptr;
+    void(*OnPause)() = nullptr;
+    void(*OnStop)() = nullptr;
+
+    bool valid = false;
+  };
+
+  std::vector<AddOnCacheEntry> mAddOnCache;
+};
+} // Namespace Test
+} // namespace Dali
+
+#endif // TEST_ADDON_MANAGER_H
diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-AddOns.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-AddOns.cpp
new file mode 100644 (file)
index 0000000..195656d
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2020 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.
+ *
+ */
+
+#include <iostream>
+#include <stdlib.h>
+
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include "dali-toolkit-test-utils/test-addon-manager.h"
+#include <toolkit-event-thread-callback.h>
+
+using namespace Dali::Toolkit::Internal;
+
+namespace
+{
+
+const char* TEST_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR "/application-icon-20.png";
+const char* TEST_IMAGE_FILE_NAME_9 =  TEST_RESOURCE_DIR "/heartsframe.9.png";
+
+int CountFunctionCalls( const std::vector<std::string>& callstack, const std::string& function )
+{
+  int counter = 0;
+  std::find_if( callstack.begin(), callstack.end(), [&counter, &function]( const std::string& item )
+  {
+    if( item == function )
+    {
+      counter++;
+    }
+    return false;
+  });
+
+  return counter;
+}
+
+}
+
+int UtcRenderingAddOnTestP(void)
+{
+  Dali::Integration::AddOnManager* addOnManager = new Dali::Test::AddOnManager();
+
+  bool valid = addOnManager->Get() != nullptr;
+  DALI_TEST_EQUALS( valid, true, TEST_LOCATION );
+  auto addon = addOnManager->GetAddOn( "oo-rendering" );
+  auto GetCallStack = addOnManager->GetGlobalProc<std::vector<std::string>(bool)>( addon, "GetCallStack" );
+
+  ToolkitTestApplication application;
+  tet_infoline( "UtcRenderingAddOnTestP" );
+
+  // Load regular image view
+  auto imageView = Dali::Toolkit::ImageView::New( TEST_IMAGE_FILE_NAME );
+  imageView.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 60.f ) );
+  imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+  // Load npatch image view
+  auto imageView2 = Dali::Toolkit::ImageView::New( TEST_IMAGE_FILE_NAME_9 );
+  imageView2.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 60.f ) );
+  imageView2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  imageView2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+  application.GetScene().Add( imageView );
+  application.GetScene().Add( imageView2 );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( ::Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render();
+
+  auto callstack = GetCallStack(true);
+
+  DALI_TEST_EQUALS( CountFunctionCalls( callstack, "GetGeometry" ), 2, TEST_LOCATION);
+  DALI_TEST_EQUALS( CountFunctionCalls( callstack, "CreateGeometry" ), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS( CountFunctionCalls( callstack, "CreateGeometryGrid" ), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS( CountFunctionCalls( callstack, "BuildNPatch" ), 1, TEST_LOCATION);
+
+  delete addOnManager;
+
+  END_TEST;
+}
index b1afd34..e87c900 100755 (executable)
@@ -1232,3 +1232,62 @@ int UtcDaliTextControllerCheckInputFontPointSizeUpdated(void)
 
   END_TEST;
 }
+
+int UtcDaliTextControllerDeleteSurroundings(void)
+{
+  tet_infoline(" UtcDaliTextControllerDeleteSurroundings");
+  ToolkitTestApplication application;
+
+  // Creates a text controller.
+  ControllerPtr controller = Controller::New();
+
+  ConfigureTextField( controller );
+
+  // Get the implementation of the text controller
+  Controller::Impl& mImpl = Controller::Impl::GetImplementation( *controller.Get() );
+
+  DALI_TEST_EQUALS( EventData::INACTIVE, mImpl.mEventData->mState, TEST_LOCATION );
+
+  InputMethodContext inputMethodContext = InputMethodContext::New();
+  // Add some pre-edit text, such as Korean
+  InputMethodContext::EventData imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "ã…‚ã…‚ã…‚", 0, 3 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+  // Perform a relayout
+  const Size size( application.GetScene().GetSize() );
+
+  application.SendNotification();
+  application.Render();
+
+  controller->Relayout( size );
+
+  // Simulate a key event to delete one text
+  controller->KeyEvent( GenerateKey( "", "", DALI_KEY_BACKSPACE, 0, 0, Dali::KeyEvent::Down ) );
+
+  // Send DELETE_SURROUNDING event (Delete All text)
+  imfEvent = InputMethodContext::EventData( InputMethodContext::DELETE_SURROUNDING, "", -2, 2 );
+  controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+  application.SendNotification();
+  application.Render();
+
+  controller->Relayout( size );
+
+  // simulate a key event to add text
+  controller->KeyEvent( GenerateKey( "ã…‡", "ã…‡", 238, 0, 0, Dali::KeyEvent::Down ) );
+  controller->KeyEvent( GenerateKey( "ã…‡", "ã…‡", 238, 0, 0, Dali::KeyEvent::Down ) );
+
+  DALI_TEST_EQUALS( EventData::EDITING, mImpl.mEventData->mState, TEST_LOCATION );
+
+  // Force to update the model.
+  controller->GetNaturalSize();
+
+  application.SendNotification();
+  application.Render();
+
+  controller->Relayout( size );
+
+  tet_result(TET_PASS);
+
+  END_TEST;
+}
index ee6c17a..5fdc5c3 100644 (file)
@@ -31,26 +31,10 @@ TestNativeImagePointer TestNativeImage::New(uint32_t width, uint32_t height)
 TestNativeImage::TestNativeImage(uint32_t width, uint32_t height)
 : mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
 {
-  mExtension = new TestNativeImageExtension();
 }
 
 TestNativeImage::~TestNativeImage()
 {
 }
 
-
-TestNativeImageNoExtPointer TestNativeImageNoExt::New(uint32_t width, uint32_t height)
-{
-  return new TestNativeImageNoExt(width, height);
-}
-
-TestNativeImageNoExt::TestNativeImageNoExt(uint32_t width, uint32_t height)
-: mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
-{
-}
-
-TestNativeImageNoExt::~TestNativeImageNoExt()
-{
-}
-
 } // namespace dali
index 0c215b7..89d5095 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
-#include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/integration-api/gl-defines.h>
 
 namespace Dali
 {
 class TestNativeImage;
-class TestNativeImageNoExt;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
-typedef IntrusivePtr<TestNativeImageNoExt> TestNativeImageNoExtPointer;
-
-class DALI_CORE_API TestNativeImageExtension: public Dali::NativeImageInterface::Extension
-{
-public:
-  inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
-  inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
-
-  inline int32_t GetEglImageTextureTarget(){return GL_TEXTURE_EXTERNAL_OES;}
-
-};
 
 class DALI_CORE_API TestNativeImage : public Dali::NativeImageInterface
 {
@@ -46,14 +33,21 @@ public:
   static TestNativeImagePointer New(uint32_t width, uint32_t height);
 
   inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
-  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
-  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 0;};
+  inline virtual bool CreateResource() { ++mExtensionCreateCalls; return createResult;};
+  inline virtual void DestroyResource() { ++mExtensionDestroyCalls; };
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return mTargetTextureError;};
   inline virtual void PrepareTexture() {};
   inline virtual uint32_t GetWidth() const {return mWidth;};
   inline virtual uint32_t GetHeight() const {return mHeight;};
   inline virtual bool RequiresBlending() const {return true;};
-  inline virtual Dali::NativeImageInterface::Extension* GetExtension() {return mExtension;}
+  inline virtual int GetTextureTarget() const {return GL_TEXTURE_EXTERNAL_OES;};
+  inline virtual const char* GetCustomFragmentPrefix() const {return "#extension GL_OES_EGL_image_external:require\n";};
+  inline const char* GetCustomSamplerTypename() const override { return "samplerExternalOES"; };
+
+  inline Any GetNativeImageHandle() const override { return nullptr; };
+  inline bool SourceChanged() const override { return false; };
+
+  inline virtual Dali::NativeImageInterface::Extension* GetExtension() {return nullptr;}
 
 private:
   TestNativeImage(uint32_t width, uint32_t height);
@@ -65,38 +59,11 @@ public:
   int32_t mExtensionCreateCalls;
   int32_t mExtensionDestroyCalls;
   int32_t mTargetTextureCalls;
-
+  uint32_t mTargetTextureError=0u;
   bool createResult;
-  TestNativeImageExtension* mExtension;
 };
 
 
-class DALI_CORE_API TestNativeImageNoExt : public Dali::NativeImageInterface
-{
-public:
-  static TestNativeImageNoExtPointer New(uint32_t width, uint32_t height);
-
-  inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
-  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
-  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
-  inline virtual void PrepareTexture() {};
-  inline virtual uint32_t GetWidth() const {return mWidth;};
-  inline virtual uint32_t GetHeight() const {return mHeight;};
-  inline virtual bool RequiresBlending() const {return true;};
-
-private:
-  TestNativeImageNoExt(uint32_t width, uint32_t height);
-  virtual ~TestNativeImageNoExt();
-
-  uint32_t mWidth;
-  uint32_t mHeight;
-public:
-  int32_t mExtensionCreateCalls;
-  int32_t mExtensionDestroyCalls;
-  int32_t mTargetTextureCalls;
-  bool createResult;
-};
 
 } // Dali
 
index 2277014..11bd75b 100755 (executable)
@@ -62,12 +62,12 @@ bool NativeImageSource::IsColorDepthSupported( ColorDepth colorDepth )
   return false;
 }
 
-bool NativeImageSource::GlExtensionCreate()
+bool NativeImageSource::CreateResource()
 {
   return false;
 }
 
-void NativeImageSource::GlExtensionDestroy()
+void NativeImageSource::DestroyResource()
 {
 }
 
@@ -95,6 +95,31 @@ bool NativeImageSource::RequiresBlending() const
   return false;
 }
 
+int NativeImageSource::GetTextureTarget() const
+{
+  return 0;
+}
+
+const char* NativeImageSource::GetCustomFragmentPrefix() const
+{
+  return "";
+}
+
+const char* NativeImageSource::GetCustomSamplerTypename() const
+{
+  return "";
+}
+
+Any NativeImageSource::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeImageSource::SourceChanged() const
+{
+  return false;
+}
+
 NativeImageInterface::Extension* NativeImageSource::GetExtension()
 {
   return NULL;
index 957681e..4a5e76c 100755 (executable)
@@ -16,6 +16,7 @@
  */
 
 #include <dali/devel-api/adaptor-framework/video-player.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/base-object.h>
 #include <toolkit-application.h>
@@ -98,6 +99,15 @@ public:
     return NULL;
   }
 
+  void StartSynchronization()
+  {
+
+  }
+
+  void FinishSynchronization()
+  {
+
+  }
 
 public:
 
@@ -157,6 +167,13 @@ VideoPlayer VideoPlayer::New()
   return VideoPlayer( player );
 }
 
+VideoPlayer VideoPlayer::New( Dali::Actor actor, Dali::VideoSyncMode syncMode )
+{
+  Internal::Adaptor::VideoPlayer* player = new Internal::Adaptor::VideoPlayer();
+
+  return VideoPlayer( player );
+}
+
 VideoPlayer::VideoPlayer( const VideoPlayer& player )
 : BaseHandle( player )
 {
@@ -298,5 +315,15 @@ Any VideoPlayer::GetMediaPlayer()
   return Internal::Adaptor::GetImplementation( *this ).GetMediaPlayer();
 }
 
+void VideoPlayer::StartSynchronization()
+{
+  Internal::Adaptor::GetImplementation( *this ).StartSynchronization();
+}
+
+void VideoPlayer::FinishSynchronization()
+{
+  Internal::Adaptor::GetImplementation( *this ).FinishSynchronization();
+}
+
 } // namespace Dali;
 
index 72cbe65..3c01e99 100644 (file)
@@ -198,6 +198,16 @@ Window DownCast( BaseHandle handle )
   return Dali::Window( windowImpl );
 }
 
+void AddFrameRenderedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId )
+{
+  CallbackBase::Execute( *callback, frameId );
+}
+
+void AddFramePresentedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId )
+{
+  CallbackBase::Execute( *callback, frameId );
+}
+
 EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window )
 {
   return GetImplementation( window ).GetScene().EventProcessingFinishedSignal();
index 2ff4370..000923a 100644 (file)
@@ -91,6 +91,8 @@ typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType;
 
 Dali::Window Get( Actor actor );
 Dali::Window DownCast(  BaseHandle handle );
+void AddFrameRenderedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId );
+void AddFramePresentedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId );
 
 EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
 KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window );
index 7375515..175ccfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -123,6 +123,22 @@ int UtcDaliAsyncImageLoaderCopyConstructor(void)
   END_TEST;
 }
 
+int UtcDaliAsyncImageLoaderMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  AsyncImageLoader loader = AsyncImageLoader::New( );
+  DALI_TEST_CHECK( loader );
+  DALI_TEST_EQUALS( 1, loader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  AsyncImageLoader moved = std::move( loader );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !loader );
+
+  END_TEST;
+}
+
 int UtcDaliAsyncImageLoaderAssignmentOperator(void)
 {
   ToolkitTestApplication application;
@@ -140,6 +156,23 @@ int UtcDaliAsyncImageLoaderAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliAsyncImageLoaderMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  AsyncImageLoader loader = AsyncImageLoader::New( );
+  DALI_TEST_CHECK( loader );
+  DALI_TEST_EQUALS( 1, loader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  AsyncImageLoader moved;
+  moved = std::move( loader );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !loader );
+
+  END_TEST;
+}
+
 int UtcDaliAsyncImageLoaderDownCastP(void)
 {
   ToolkitTestApplication application;
index 92e64ec..e99c8f7 100644 (file)
@@ -163,6 +163,25 @@ int UtcDaliButtonCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliButtonMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  Button button = PushButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, true );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+  Button moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliButtonAssignmentOperatorP(void)
 {
   TestApplication application;
@@ -176,6 +195,26 @@ int UtcDaliButtonAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliButtonMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  Button button = PushButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, true );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+  Button moved;
+  moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliButtonDownCastP(void)
 {
   TestApplication application;
index cc8d381..799a069 100644 (file)
@@ -90,6 +90,25 @@ int UtcDaliCheckBoxButtonCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliCheckBoxButtonMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  CheckBoxButton button = CheckBoxButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, false );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+  CheckBoxButton moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliCheckBoxButtonAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -103,6 +122,26 @@ int UtcDaliCheckBoxButtonAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliCheckBoxButtonMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  CheckBoxButton button = CheckBoxButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, false );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+  CheckBoxButton moved;
+  moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliCheckBoxButtonNewP(void)
 {
   ToolkitTestApplication application;
index 1f1b2bc..d10cbec 100644 (file)
@@ -181,6 +181,43 @@ int UtcDaliControlCopyAndAssignment(void)
   END_TEST;
 }
 
+int UtcDaliControlMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  Control control = Control::New();
+  DALI_TEST_EQUALS( 1, control.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  control.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == control.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Control moved = std::move( control );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !control );
+
+  END_TEST;
+}
+
+int UtcDaliControlMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  Control control = Control::New();
+  DALI_TEST_EQUALS( 1, control.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  control.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == control.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Control moved;
+  moved = std::move( control );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !control );
+
+  END_TEST;
+}
+
 int UtcDaliControlDownCast(void)
 {
   ToolkitTestApplication application;
index 5eed3b7..bdd74f9 100644 (file)
@@ -1337,3 +1337,28 @@ int UtcDaliControlImplAutoClippingWithVisualsAlreadyOnStage(void)
 
   END_TEST;
 }
+
+int UtcDaliControlImplOnPinch(void)
+{
+  ToolkitTestApplication application;
+
+  Control control = Control::New();
+  control.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(control);
+
+  application.SendNotification();
+  application.Render();
+
+  Toolkit::Internal::Control& impl = Toolkit::Internal::GetImplementation(control);
+  impl.EnableGestureDetection(Gesture::Pinch);
+
+  // Scale becomes 0.6666666
+  TestStartPinch( application,  Vector2( 5.0f, 20.0f ), Vector2( 35.0f, 20.0f ),
+                                Vector2( 10.0f, 20.0f ), Vector2( 30.0f, 20.0f ), 100 );
+
+  DALI_TEST_EQUALS(0.666f, control.GetProperty( Actor::Property::SCALE_X).Get<float>(), 0.01f, TEST_LOCATION);
+
+  END_TEST;
+
+}
index a698b3c..61c4a58 100644 (file)
@@ -109,6 +109,24 @@ int UtcDaliToolkitFlexContainerCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliFlexContainerMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  FlexContainer flexContainer = FlexContainer::New();
+  DALI_TEST_EQUALS( 1, flexContainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW_REVERSE );
+  DALI_TEST_CHECK( flexContainer.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+
+  FlexContainer moved = std::move( flexContainer );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+  DALI_TEST_CHECK( !flexContainer );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitFlexContainerAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -122,6 +140,25 @@ int UtcDaliToolkitFlexContainerAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliFlexContainerMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  FlexContainer flexContainer = FlexContainer::New();
+  DALI_TEST_EQUALS( 1, flexContainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW_REVERSE );
+  DALI_TEST_CHECK( flexContainer.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+
+  FlexContainer moved;
+  moved = std::move( flexContainer );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+  DALI_TEST_CHECK( !flexContainer );
+
+  END_TEST;
+}
+
 // Positive test case for a method
 int UtcDaliToolkitFlexContainerGetPropertyP(void)
 {
index 204cf23..263a4f2 100644 (file)
@@ -126,6 +126,24 @@ int UtcDaliImageViewCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliImageViewMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  ImageView imageView = ImageView::New();
+  DALI_TEST_EQUALS( 1, imageView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  imageView.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == imageView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ImageView moved = std::move( imageView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !imageView );
+
+  END_TEST;
+}
+
 int UtcDaliImageViewAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -139,6 +157,25 @@ int UtcDaliImageViewAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliImageViewMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  ImageView imageView = ImageView::New();
+  DALI_TEST_EQUALS( 1, imageView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  imageView.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == imageView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ImageView moved;
+  moved = std::move( imageView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !imageView );
+
+  END_TEST;
+}
+
 int UtcDaliImageViewDownCastP(void)
 {
   ToolkitTestApplication application;
index 6b5f743..1ba8d0b 100644 (file)
@@ -166,6 +166,75 @@ int UtcDaliItemViewNew(void)
   END_TEST;
 }
 
+int UtcDaliItemViewCopyConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemFactory factory;
+  ItemView itemView = ItemView::New( factory );
+  DALI_TEST_CHECK( itemView );
+
+  ItemView copy( itemView );
+  DALI_TEST_CHECK( copy );
+
+  END_TEST;
+}
+
+int UtcDaliItemViewCopyAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemFactory factory;
+  ItemView itemView = ItemView::New( factory );
+  DALI_TEST_CHECK( itemView );
+
+  ItemView copy;
+  copy = itemView;
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_EQUALS( itemView, copy, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliItemViewMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemFactory factory;
+  ItemView itemView = ItemView::New( factory );
+  DALI_TEST_EQUALS( 1, itemView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  itemView.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == itemView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ItemView moved = std::move( itemView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !itemView );
+
+  END_TEST;
+}
+
+int UtcDaliItemViewMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemFactory factory;
+  ItemView itemView = ItemView::New( factory );
+  DALI_TEST_EQUALS( 1, itemView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  itemView.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == itemView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ItemView moved;
+  moved = std::move( itemView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !itemView );
+
+  END_TEST;
+}
+
 int UtcDaliItemViewDownCast(void)
 {
   ToolkitTestApplication application;
index b13cacb..b5e3429 100644 (file)
@@ -174,6 +174,43 @@ int UtcDaliModelCopyAndAssignment(void)
   END_TEST;
 }
 
+int UtcDaliModelMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  Model3dView view = Toolkit::Model3dView::New();
+  DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  view.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == view.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Model3dView moved = std::move( view );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !view );
+
+  END_TEST;
+}
+
+int UtcDaliModelMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  Model3dView view = Toolkit::Model3dView::New();
+  DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  view.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == view.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Model3dView moved;
+  moved = std::move( view );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !view );
+
+  END_TEST;
+}
+
 int UtcDaliModelTypeRegistry(void)
 {
   ToolkitTestApplication application;
index 9e27978..9e421fd 100644 (file)
@@ -115,6 +115,71 @@ int UtcDaliProgressBarDestructor(void)
   END_TEST;
 }
 
+int UtcDaliProgressBarCopyConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  ProgressBar progressBar = ProgressBar::New();
+  DALI_TEST_CHECK( progressBar );
+
+  ProgressBar copy( progressBar );
+  DALI_TEST_CHECK( copy );
+
+  END_TEST;
+}
+
+int UtcDaliProgressBarCopyAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  ProgressBar progressBar = ProgressBar::New();
+  DALI_TEST_CHECK( progressBar );
+
+  ProgressBar copy;
+  copy = progressBar;
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_EQUALS( progressBar, copy, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliProgressBarMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  ProgressBar progressBar = ProgressBar::New();
+  DALI_TEST_EQUALS( 1, progressBar.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  progressBar.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == progressBar.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ProgressBar moved = std::move( progressBar );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !progressBar );
+
+  END_TEST;
+}
+
+int UtcDaliProgressBarMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  ProgressBar progressBar = ProgressBar::New();
+  DALI_TEST_EQUALS( 1, progressBar.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  progressBar.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == progressBar.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  ProgressBar moved;
+  moved = std::move( progressBar );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !progressBar );
+
+  END_TEST;
+}
+
 int UtcDaliProgressBarDownCast(void)
 {
   ToolkitTestApplication application;
index 4d0de67..044018b 100644 (file)
@@ -187,6 +187,25 @@ int UtcDaliPushButtonCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliPushButtonMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  PushButton button = PushButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, true );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+  PushButton moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliPushButtonAssignmentOperatorP(void)
 {
   TestApplication application;
@@ -200,6 +219,26 @@ int UtcDaliPushButtonAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliPushButtonMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  PushButton button = PushButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, true );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+  PushButton moved;
+  moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliPushButtonNewP(void)
 {
   TestApplication application;
index d56de3e..ee1ebf5 100644 (file)
@@ -86,6 +86,25 @@ int UtcDaliRadioButtonCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliRadioButtonMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  RadioButton button = RadioButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, false );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+  RadioButton moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliRadioButtonAssignmentOperatorP(void)
 {
   TestApplication application;
@@ -99,6 +118,26 @@ int UtcDaliRadioButtonAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliRadioButtonMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  RadioButton button = RadioButton::New();
+  DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+  button.SetProperty( Button::Property::TOGGLABLE, false );
+  DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+  RadioButton moved;
+  moved = std::move( button );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+  DALI_TEST_CHECK( !button );
+
+  END_TEST;
+}
+
 int UtcDaliRadioButtonNewP(void)
 {
   ToolkitTestApplication application;
index c1fee47..4e3974d 100644 (file)
@@ -289,6 +289,24 @@ int UtcDaliToolkitScrollViewCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliScrollViewMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  ScrollView scrollView = ScrollView::New();
+  DALI_TEST_EQUALS( 1, scrollView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
+  DALI_TEST_EQUALS( scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+
+  ScrollView moved = std::move( scrollView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+  DALI_TEST_CHECK( !scrollView );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitScrollViewAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -296,12 +314,32 @@ int UtcDaliToolkitScrollViewAssignmentOperatorP(void)
   ScrollView scrollView = ScrollView::New();
   scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
 
-  ScrollView copy = scrollView;
+  ScrollView copy;
+  copy = scrollView;
   DALI_TEST_CHECK( copy );
   DALI_TEST_CHECK( copy.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ) == scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ) );
   END_TEST;
 }
 
+int UtcDaliScrollViewMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  ScrollView scrollView = ScrollView::New();
+  DALI_TEST_EQUALS( 1, scrollView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
+  DALI_TEST_EQUALS( scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+
+  ScrollView moved;
+  moved = std::move( scrollView );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( moved.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+  DALI_TEST_CHECK( !scrollView );
+
+  END_TEST;
+}
+
 int UtcDaliScrollViewDestructorP(void)
 {
   ToolkitTestApplication application;
index ccec03e..e9cc39b 100644 (file)
@@ -77,6 +77,71 @@ int UtcDaliSliderNew(void)
   END_TEST;
 }
 
+int UtcDaliSliderCopyConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  Slider slider = Slider::New();
+  DALI_TEST_CHECK( slider );
+
+  Slider copy( slider );
+  DALI_TEST_CHECK( copy );
+
+  END_TEST;
+}
+
+int UtcDaliSliderCopyAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  Slider slider = Slider::New();
+  DALI_TEST_CHECK( slider );
+
+  Slider copy;
+  copy = slider;
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_EQUALS( slider, copy, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliSliderMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  Slider slider = Slider::New();
+  DALI_TEST_EQUALS( 1, slider.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  slider.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == slider.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Slider moved = std::move( slider );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !slider );
+
+  END_TEST;
+}
+
+int UtcDaliSliderMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  Slider slider = Slider::New();
+  DALI_TEST_EQUALS( 1, slider.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  slider.SetProperty( Actor::Property::SENSITIVE, false );
+  DALI_TEST_CHECK( false == slider.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+  Slider moved;
+  moved = std::move( slider );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+  DALI_TEST_CHECK( !slider );
+
+  END_TEST;
+}
+
 int UtcDaliSliderDestructor(void)
 {
   ToolkitTestApplication application;
index 51b1cd7..f86d8aa 100644 (file)
@@ -360,6 +360,23 @@ int UtcDaliToolkitTextEditorCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliTextEditorMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TextEditor textEditor = TextEditor::New();
+  textEditor.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textEditor.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+
+  TextEditor moved = std::move( textEditor );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textEditor );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitTextEditorAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -373,6 +390,24 @@ int UtcDaliToolkitTextEditorAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliTextEditorMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TextEditor textEditor = TextEditor::New();
+  textEditor.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textEditor.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+
+  TextEditor moved;
+  moved = std::move( textEditor );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textEditor );
+
+  END_TEST;
+}
+
 int UtcDaliTextEditorNewP(void)
 {
   ToolkitTestApplication application;
index 4751e34..d7ca31f 100644 (file)
@@ -387,6 +387,23 @@ int UtcDaliToolkitTextFieldCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliTextFieldMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TextField textField = TextField::New();
+  textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+  TextField moved = std::move( textField );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textField );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -400,6 +417,24 @@ int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliTextFieldMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TextField textField = TextField::New();
+  textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+  TextField moved;
+  moved = std::move( textField );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textField );
+
+  END_TEST;
+}
+
 int UtcDaliTextFieldNewP(void)
 {
   ToolkitTestApplication application;
index 884079e..f9128fd 100644 (file)
@@ -230,6 +230,23 @@ int UtcDaliToolkitTextLabelCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliTextLabelMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TextLabel textLabel = TextLabel::New();
+  textLabel.SetProperty( TextLabel::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textLabel.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+
+  TextLabel moved = std::move( textLabel );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textLabel );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitTextLabelAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -243,6 +260,24 @@ int UtcDaliToolkitTextLabelAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliTextLabelMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TextLabel textLabel = TextLabel::New();
+  textLabel.SetProperty( TextLabel::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textLabel.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+
+  TextLabel moved;
+  moved = std::move( textLabel );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textLabel );
+
+  END_TEST;
+}
+
 // Positive test case for a method
 int UtcDaliToolkitTextLabelGetPropertyP(void)
 {
@@ -1653,4 +1688,4 @@ int UtcDaliToolkitTextlabelLastCharacterIndex(void)
   DALI_TEST_EQUALS( indexArray.GetElementAt(0).Get<int>(), 10, TEST_LOCATION );
 
   END_TEST;
-}
\ No newline at end of file
+}
index e15a99a..54cb6f7 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/public-api/controls/video-view/video-view.h>
 #include <dali-toolkit/devel-api/controls/video-view/video-view-devel.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -31,6 +32,7 @@ const char* const TEST_FILE( "test.mp4" );
 const char* const VOLUME_LEFT( "volumeLeft" );
 const char* const VOLUME_RIGHT( "volumeRight" );
 const char* const RENDERING_TYPE( "renderingTarget" );
+const char* const DUMMY_STRING( "dummy string" );
 
 const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
@@ -106,7 +108,8 @@ int UtcDaliVideoViewNew(void)
   Toolkit::VideoView view = Toolkit::VideoView::New();
   DALI_TEST_CHECK( view );
 
-  Toolkit::VideoView view2 = Toolkit::VideoView::New( "" );
+  const std::string url( DUMMY_STRING );
+  Toolkit::VideoView view2 = Toolkit::VideoView::New( url );
   DALI_TEST_CHECK( view2 );
   END_TEST;
 }
@@ -271,6 +274,43 @@ int UtcDaliVideoViewCopyAndAssignment(void)
   END_TEST;
 }
 
+int UtcDaliVideoViewMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  VideoView view = Toolkit::VideoView::New();
+  DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  view.SetProperty( VideoView::Property::LOOPING, true );
+  DALI_TEST_CHECK( view.GetProperty<bool>( VideoView::Property::LOOPING ) );
+
+  VideoView moved = std::move( view );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<bool>( VideoView::Property::LOOPING ) );
+  DALI_TEST_CHECK( !view );
+
+  END_TEST;
+}
+
+int UtcDaliVideoViewMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  VideoView view = Toolkit::VideoView::New();
+  DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  view.SetProperty( VideoView::Property::LOOPING, true );
+  DALI_TEST_CHECK( view.GetProperty<bool>( VideoView::Property::LOOPING ) );
+
+  VideoView moved;
+  moved = std::move( view );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<bool>( VideoView::Property::LOOPING ) );
+  DALI_TEST_CHECK( !view );
+
+  END_TEST;
+}
+
 int UtcDaliVideoViewTypeRegistry(void)
 {
   ToolkitTestApplication application;
@@ -546,7 +586,7 @@ int UtcDaliVideoViewCustomShader(void)
   ToolkitTestApplication application;
   tet_infoline( "VideoView with custom shader" );
 
-  VideoView view = VideoView::New();
+  VideoView view = VideoView::New( false );
   DALI_TEST_CHECK( view );
 
   ToolkitApplication::DECODED_IMAGES_SUPPORTED = true;
@@ -597,3 +637,149 @@ int UtcDaliVideoViewCustomShader(void)
 
   END_TEST;
 }
+
+// Functor to test whether a Finish signal is emitted
+struct AnimationFinishCheck
+{
+  AnimationFinishCheck(bool& signalReceived)
+  : mSignalReceived(signalReceived)
+  {
+  }
+
+  void operator()(Animation& animation)
+  {
+    mSignalReceived = true;
+  }
+
+  void Reset()
+  {
+    mSignalReceived = false;
+  }
+
+  void CheckSignalReceived()
+  {
+    if (!mSignalReceived)
+    {
+      tet_printf("Expected Finish signal was not received\n");
+      tet_result(TET_FAIL);
+    }
+    else
+    {
+      tet_result(TET_PASS);
+    }
+  }
+
+  void CheckSignalNotReceived()
+  {
+    if (mSignalReceived)
+    {
+      tet_printf("Unexpected Finish signal was received\n");
+      tet_result(TET_FAIL);
+    }
+    else
+    {
+      tet_result(TET_PASS);
+    }
+  }
+
+  bool& mSignalReceived; // owned by individual tests
+};
+
+int UtcDaliVideoViewSyncAniamtionForCoverage(void)
+{
+  ToolkitTestApplication application;
+
+  VideoView videoView = DevelVideoView::New( Dali::VideoSyncMode::ENABLED );
+  DALI_TEST_CHECK( videoView );
+
+  // Build the animation
+  float durationSeconds(1.0f);
+  Animation animation = Animation::New(durationSeconds);
+
+  // Start the animation
+  Vector3 targetPosition(10.0f, 10.0f, 10.0f);
+  animation.AnimateTo(Property(videoView, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
+  DevelVideoView::PlayAnimation( videoView, animation );
+
+  bool signalReceived(false);
+  AnimationFinishCheck finishCheck(signalReceived);
+  animation.FinishedSignal().Connect(&application, finishCheck);
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*1000.0f) - 1u/*just less than the animation duration*/);
+
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+
+  application.Render(2u/*just beyond the animation duration*/);
+
+  // We did expect the animation to finish
+  application.SendNotification();
+  finishCheck.CheckSignalReceived();
+  DALI_TEST_EQUALS( targetPosition, videoView.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
+
+  // Restart the animation, with a different duration
+  finishCheck.Reset();
+
+  END_TEST;
+}
+
+int UtcDaliVideoViewASyncAniamtionForCoverage(void)
+{
+  ToolkitTestApplication application;
+
+  VideoView videoView = DevelVideoView::New( Dali::VideoSyncMode::DISABLED );
+  DALI_TEST_CHECK( videoView );
+
+  // Build the animation
+  float durationSeconds(1.0f);
+  Animation animation = Animation::New(durationSeconds);
+
+  // Start the animation
+  Vector3 targetPosition(10.0f, 10.0f, 10.0f);
+  animation.AnimateTo(Property(videoView, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
+  DevelVideoView::PlayAnimation( videoView, animation );
+
+  bool signalReceived(false);
+  AnimationFinishCheck finishCheck(signalReceived);
+  animation.FinishedSignal().Connect(&application, finishCheck);
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*1000.0f) - 1u/*just less than the animation duration*/);
+
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+
+  application.Render(2u/*just beyond the animation duration*/);
+
+  // We did expect the animation to finish
+  application.SendNotification();
+  finishCheck.CheckSignalReceived();
+  DALI_TEST_EQUALS( targetPosition, videoView.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
+
+  // Restart the animation, with a different duration
+  finishCheck.Reset();
+
+  END_TEST;
+}
+
+int UtcDaliVideoViewResizeWithSynchronization(void)
+{
+  ToolkitTestApplication application;
+  VideoView videoView = DevelVideoView::New( Dali::VideoSyncMode::ENABLED );
+  DALI_TEST_CHECK( videoView );
+
+  application.GetScene().Add( videoView );
+
+  Vector3 vector(50.0f, 200.0f, 0.0f);
+  videoView.SetProperty( Actor::Property::SIZE, vector );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK(vector == videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
+
+  END_TEST;
+}
index 317d34d..41c6a30 100755 (executable)
@@ -33,6 +33,16 @@ Any GetMediaPlayer( VideoView videoView )
   return Dali::Toolkit::GetImpl( videoView ).GetMediaPlayer();\r
 }\r
 \r
+VideoView New( VideoSyncMode syncMode )\r
+{\r
+  VideoView videoView = Internal::VideoView::New( syncMode );\r
+  return videoView;\r
+}\r
+\r
+void PlayAnimation( VideoView videoView, Animation animation )\r
+{\r
+  Dali::Toolkit::GetImpl( videoView ).PlayAnimation( animation );\r
+}\r
 \r
 } // namespace DevelVideoView\r
 \r
index b121506..78edb3b 100755 (executable)
  *\r
  */\r
 \r
+// EXTERNAL INCLUDES\r
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>\r
+\r
 // INTERNAL INCLUDES\r
+#include <dali/public-api/animation/animation.h>\r
 #include <dali-toolkit/public-api/controls/video-view/video-view.h>\r
 #include <dali/public-api/object/any.h>\r
 \r
@@ -31,7 +35,6 @@ namespace Toolkit
 namespace DevelVideoView\r
 {\r
 \r
-\r
 /**\r
  * @brief Returns the internal media player.\r
  * @param[in] videoView The current VideoView\r
@@ -39,6 +42,26 @@ namespace DevelVideoView
  */\r
 DALI_TOOLKIT_API Any GetMediaPlayer( VideoView videoView );\r
 \r
+/**\r
+ * @brief Creates an initialized VideoView with synchronization mode.\r
+ *\r
+ * The syncMode is for synchronization between UI(transparent hole) and underlay video.\r
+ *\r
+ * @param[in] syncMode The synchronization mode between the UI (transparent hole) and VideoPlayer\r
+ * @return A handle to a newly allocated Dali VideoView\r
+ */\r
+DALI_TOOLKIT_API VideoView New( VideoSyncMode syncMode );\r
+\r
+/**\r
+ * @brief Play the resize or move animation with synchronization between UI(transparent hole) and video player\r
+ *\r
+ * The resize and move animation's play() function is called.\r
+ * If the animation is played, UI and video player will work synchronization.\r
+ *\r
+ * @param[in] videoView The current VideoView\r
+ * @param[in] animation The animation for video view's resize or move.\r
+ */\r
+DALI_TOOLKIT_API void PlayAnimation( VideoView videoView, Animation animation );\r
 \r
 } // namespace DevelVideoView\r
 \r
index 0305e8a..40aa60c 100644 (file)
@@ -630,11 +630,7 @@ bool Button::OnAccessibilityActivated()
 
 bool Button::OnTouch( Actor actor, const TouchData& touch )
 {
-
-  // Only events are processed when the button is not disabled
-  auto result( false );
-
-  if( !IsDisabled() )
+  if( !IsDisabled() && (actor == touch.GetHitActor(0)) )
   {
     if ( 1 == touch.GetPointCount() )
     {
@@ -675,9 +671,8 @@ bool Button::OnTouch( Actor actor, const TouchData& touch )
       // Sets the button state to the default
       mButtonPressedState = UNPRESSED;
     }
-    result = true;
   }
-  return result;
+  return false;
 }
 
 bool Button::OnKeyboardEnter()
index 1b4c3ab..7d4c2e3 100644 (file)
@@ -330,14 +330,14 @@ void Popup::OnInitialize()
   mPopupLayout.SetFitHeight( 0 ); // Set row to fit.
   mPopupLayout.SetFitHeight( 1 ); // Set row to fit.
 
-  mPopupLayout.TouchSignal().Connect( this, &Popup::OnDialogTouched );
-
   mPopupContainer.Add( mPopupLayout );
 
   // Any content after this point which is added to Self() will be re-parented to mContent.
   mAlterAddedChild = true;
 
   SetAsKeyboardFocusGroup( true );
+
+  SetupTouch();
 }
 
 Popup::~Popup()
@@ -593,9 +593,6 @@ void Popup::SetPopupBackgroundImage( Actor image )
   mPopupBackgroundImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   mPopupBackgroundImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
 
-  // OnDialogTouched only consumes the event. It prevents the touch event to be caught by the backing.
-  mPopupBackgroundImage.TouchSignal().Connect( this, &Popup::OnDialogTouched );
-
   // Set the popup border to be slightly larger than the layout contents.
   UpdateBackgroundPositionAndSize();
 
@@ -938,7 +935,6 @@ Toolkit::Control Popup::CreateBacking()
 
   // Default to being transparent.
   backing.SetProperty( Actor::Property::COLOR_ALPHA, 0.0f );
-  backing.TouchSignal().Connect( this, &Popup::OnBackingTouched );
   backing.WheelEventSignal().Connect( this, &Popup::OnBackingWheelEvent );
   return backing;
 }
@@ -1119,7 +1115,11 @@ const std::string& Popup::GetTailRightImage() const
 
 void Popup::SetTouchTransparent( bool enabled )
 {
-  mTouchTransparent = enabled;
+  if( mTouchTransparent != enabled )
+  {
+    mTouchTransparent = enabled;
+    SetupTouch();
+  }
 }
 
 const bool Popup::IsTouchTransparent() const
@@ -1534,26 +1534,18 @@ bool Popup::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
 
 bool Popup::OnBackingTouched( Actor actor, const TouchData& touch )
 {
-  // Allow events to pass through if touch transparency is enabled.
-  if( mTouchTransparent )
+  // Allow events to pass through if the backing isn't the hit-actor
+  if( (touch.GetHitActor(0) == actor) &&
+      (touch.GetPointCount() > 0) &&
+      (touch.GetState( 0 ) == PointState::DOWN))
   {
-    return false;
-  }
-
-  if( touch.GetPointCount() > 0 )
-  {
-    if( touch.GetState( 0 ) == PointState::DOWN )
-    {
-      // Guard against destruction during signal emission.
-      Toolkit::Popup handle( GetOwner() );
+    // Guard against destruction during signal emission.
+    Toolkit::Popup handle( GetOwner() );
 
-      mTouchedOutsideSignal.Emit();
-    }
+    mTouchedOutsideSignal.Emit();
   }
 
-  // Block anything behind backing becoming touched.
-  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
-  return true;
+  return false;
 }
 
 bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event )
@@ -1564,22 +1556,13 @@ bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event )
     return false;
   }
 
-  // Consume wheel event in dimmed backing actor.
-  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
 bool Popup::OnDialogTouched( Actor actor, const TouchData& touch )
 {
-  // Allow events to pass through if touch transparency is enabled.
-  if( mTouchTransparent )
-  {
-    return false;
-  }
-
-  // Consume event (stops backing actor receiving touch events)
-  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
-  return true;
+  // Only connecting this so the backing does not become the default hit-actor and inadvertently closes the popup
+  return false;
 }
 
 void Popup::OnStageConnection( int depth )
@@ -1975,6 +1958,25 @@ Actor Popup::GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::
   return nextFocusableActor;
 }
 
+void Popup::SetupTouch()
+{
+  if( ! mTouchTransparent )
+  {
+    // Connect all the signals and set us up to consume all touch events
+    mBacking.TouchSignal().Connect( this, &Popup::OnBackingTouched );
+    mPopupBackgroundImage.TouchSignal().Connect( this, &Popup::OnDialogTouched );
+    mPopupLayout.TouchSignal().Connect( this, &Popup::OnDialogTouched );
+    mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
+  }
+  else
+  {
+    // We are touch transparent so disconnect all signals and ensure our layer does not consumed all touch events
+    mBacking.TouchSignal().Disconnect( this, &Popup::OnBackingTouched );
+    mPopupBackgroundImage.TouchSignal().Disconnect( this, &Popup::OnDialogTouched );
+    mPopupLayout.TouchSignal().Disconnect( this, &Popup::OnDialogTouched );
+    mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, false );
+  }
+}
 
 } // namespace Internal
 
old mode 100755 (executable)
new mode 100644 (file)
index 7903998..127aac6
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_POPUP_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -499,6 +499,12 @@ private:
    */
   void AddFocusableChildrenRecursive( Actor parent, std::vector< Actor >& focusableActors );
 
+  /**
+   * Sets up the touch signals connections as required.
+   * @note This must be called after all the members have been created.
+   */
+  void SetupTouch();
+
 private:
 
   // Undefined.
old mode 100755 (executable)
new mode 100644 (file)
index 8492234..0d40921
@@ -1142,7 +1142,7 @@ bool ItemView::OnTouch( Actor actor, const TouchData& touch )
     RemoveAnimation(mScrollAnimation);
   }
 
-  return true; // consume since we're potentially scrolling
+  return false; // Do not consume as we're potentially scrolling (detecting pan gestures)
 }
 
 void ItemView::OnPan( const PanGesture& gesture )
old mode 100755 (executable)
new mode 100644 (file)
index 65f4e7b..fe8923f
@@ -2125,7 +2125,7 @@ bool ScrollView::OnTouch( Actor actor, const TouchData& touch )
     mScrollInterrupted = false;
   }
 
-  return true;
+  return false;
 }
 
 bool ScrollView::OnWheelEvent(const WheelEvent& event)
old mode 100755 (executable)
new mode 100644 (file)
index 9f8d513..7fa1551
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -240,7 +240,7 @@ bool Slider::OnTouch(Actor actor, const TouchData& touch)
     }
   }
 
-  return true;
+  return false;
 }
 
 void Slider::OnPan( Actor actor, const PanGesture& gesture )
index fa8f3c7..0ee3bac 100644 (file)
@@ -1820,7 +1820,7 @@ void TextEditor::OnStageConnection( int depth )
 
 bool TextEditor::OnTouched( Actor actor, const TouchData& touch )
 {
-  return true;
+  return false;
 }
 
 void TextEditor::OnIdleSignal()
index ab00733..21a2e28 100644 (file)
@@ -1868,7 +1868,7 @@ void TextField::OnStageConnection( int depth )
 
 bool TextField::OnTouched( Actor actor, const TouchData& touch )
 {
-  return true;
+  return false;
 }
 
 void TextField::OnIdleSignal()
index a0a696a..2e34f27 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/public-api/adaptor-framework/native-image-source.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/animation/constraint.h>
@@ -130,26 +131,27 @@ const char* FRAGMENT_SHADER_TEXTURE = DALI_COMPOSE_SHADER(
 
 } // anonymous namepsace
 
-VideoView::VideoView()
+VideoView::VideoView( Dali::VideoSyncMode syncMode )
 : Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ),
   mCurrentVideoPlayPosition( 0 ),
+  mFrameID( 0 ),
   mIsPlay( false ),
-  mIsUnderlay( true )
+  mIsUnderlay( true ),
+  mSyncMode( syncMode )
 {
-  mVideoPlayer = Dali::VideoPlayer::New();
 }
 
 VideoView::~VideoView()
 {
 }
 
-Toolkit::VideoView VideoView::New()
+Toolkit::VideoView VideoView::New( VideoSyncMode syncMode )
 {
-  VideoView* impl = new VideoView();
+  VideoView* impl = new VideoView( syncMode );
   Toolkit::VideoView handle = Toolkit::VideoView( *impl );
 
+  impl->mVideoPlayer = Dali::VideoPlayer::New( impl->Self(), syncMode );
   impl->Initialize();
-
   return handle;
 }
 
@@ -565,6 +567,16 @@ void VideoView::OnStageDisconnection()
   Control::OnStageDisconnection();
 }
 
+void VideoView::OnSizeSet( const Vector3& targetSize )
+{
+  if( mIsUnderlay && mSyncMode == Dali::VideoSyncMode::ENABLED )
+  {
+    SetFrameRenderCallback();
+    mVideoPlayer.StartSynchronization();
+  }
+  Control::OnSizeSet( targetSize );
+}
+
 Vector3 VideoView::GetNaturalSize()
 {
   Vector3 size;
@@ -728,7 +740,9 @@ void VideoView::SetNativeImageTarget()
 
 void VideoView::UpdateDisplayArea( Dali::PropertyNotification& source )
 {
-  if( !mIsUnderlay )
+  // If mSyncMode is enabled, Video player's size and poistion is updated in Video player's constraint.
+  // Because video view and player should be work syncronization.
+  if( !mIsUnderlay || mSyncMode == Dali::VideoSyncMode::ENABLED )
   {
     return;
   }
@@ -812,6 +826,22 @@ Any VideoView::GetMediaPlayer()
   return mVideoPlayer.GetMediaPlayer();
 }
 
+void VideoView::OnAnimationFinished( Animation& animation )
+{
+  // send desync
+  SetFrameRenderCallback();
+}
+
+void VideoView::PlayAnimation( Dali::Animation animation )
+{
+  if( mIsUnderlay && mSyncMode == Dali::VideoSyncMode::ENABLED )
+  {
+    mVideoPlayer.StartSynchronization();
+    animation.FinishedSignal().Connect( this, &VideoView::OnAnimationFinished );
+  }
+  animation.Play();
+}
+
 Dali::Shader VideoView::CreateShader()
 {
   std::string fragmentShader = "#extension GL_OES_EGL_image_external:require\n";
@@ -881,6 +911,23 @@ void VideoView::ApplyBackupProperties()
   }
 }
 
+void VideoView::FrameRenderCallback( int frameID )
+{
+  // send desync
+  if( frameID == mFrameID )
+  {
+    mVideoPlayer.FinishSynchronization();
+    mFrameID = 0;
+  }
+}
+
+void VideoView::SetFrameRenderCallback()
+{
+  mFrameID++;
+  DevelWindow::AddFrameRenderedCallback( DevelWindow::Get( Self() ),
+                                         std::unique_ptr< CallbackBase >( MakeCallback( this, &VideoView::FrameRenderCallback ) ), mFrameID );
+}
+
 } // namespace Internal
 
 } // namespace toolkit
index 200ab10..f10c1c0 100755 (executable)
@@ -27,6 +27,7 @@
 #include <dali/public-api/rendering/texture.h>
 #include <dali/devel-api/adaptor-framework/video-player.h>
 #include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
@@ -47,16 +48,16 @@ class VideoView: public Control
 {
 protected:
 
-  VideoView();
+  VideoView( Dali::VideoSyncMode syncMode );
 
   virtual ~VideoView();
 
 public:
 
   /**
-   * @copydoc Toolkit::VideoView::New()
+   * @copydoc Toolkit::DevelVideoView::New()
    */
-  static Toolkit::VideoView New();
+  static Toolkit::VideoView New( VideoSyncMode syncMode );
 
   /**
    * @brief Sets a video url to play.
@@ -255,6 +256,17 @@ public:
    */
   Any GetMediaPlayer();
 
+  /**
+   * @brief Play the resize or move animation with synchronization between UI(transparent hole) and video player
+   *
+   * The resize and move animation's play() function is called.
+   * If the animation is played, UI and video player will work synchronization.
+   *
+   * @param[in] videoView The current VideoView
+   * @param[in] animation The animation for video view's resize or move.
+   */
+  void PlayAnimation( Dali::Animation animation );
+
 private: // From Control
 
   /**
@@ -273,6 +285,11 @@ private: // From Control
   virtual void OnStageDisconnection();
 
   /**
+   * @copydoc Toolkit::Control::OnSizeSet()
+   */
+  virtual void OnSizeSet( const Vector3& targetSize );
+
+  /**
    * @copydoc Toolkit::Control::GetNaturalSize
    */
   virtual Vector3 GetNaturalSize();
@@ -330,6 +347,32 @@ private:
    */
   void ApplyBackupProperties();
 
+  /*
+   * @brief FrameRender's callback function
+   *
+   * This function means the resize/move animation is finished,
+   * so Ui and video player's synchronization can be finished.
+   *
+   */
+  void FrameRenderCallback( int frameID );
+
+  /*
+   * @brief Set frameRender Callback function
+   *
+   * This function is added for listenr the resize/move animation is finished,
+   *
+   */
+  void SetFrameRenderCallback();
+
+
+  /*
+   * @brief resize/move animation finished callback function
+   *
+   * This function is called the resize/move animation is finished,
+   *
+   */
+  void OnAnimationFinished( Dali::Animation& animation );
+
 private:
 
   Dali::VideoPlayer mVideoPlayer;
@@ -348,8 +391,12 @@ private:
   Dali::Property::Map mPropertyBackup;
 
   int mCurrentVideoPlayPosition;
+  int mFrameID;
+
   bool mIsPlay;
   bool mIsUnderlay;
+
+  Dali::VideoSyncMode mSyncMode;
 };
 
 } // namespace Internal
old mode 100755 (executable)
new mode 100644 (file)
index f1aec26..34be65a
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -209,7 +209,7 @@ bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& data)
     }
     mPointDown = false;
   }
-  return true;
+  return false;
 }
 
 const std::string& DragAndDropDetector::GetContent() const
index dae742d..eba2eef 100644 (file)
@@ -140,6 +140,18 @@ ImageLoadThread::~ImageLoadThread()
   Join();
 
   delete mTrigger;
+
+  for( auto&& iter : mLoadQueue )
+  {
+    delete iter;
+  }
+  mLoadQueue.Clear();
+
+  for( auto&& iter : mCompleteQueue )
+  {
+    delete iter;
+  }
+  mCompleteQueue.Clear();
 }
 
 void ImageLoadThread::Run()
index 470c46c..56948c5 100644 (file)
@@ -1386,8 +1386,7 @@ struct Decorator::Impl : public ConnectionTracker
       SetHandleImage( GRAB_HANDLE );
     }
 
-    // Consume to avoid pop-ups accidentally closing, when handle is outside of pop-up area
-    return true;
+    return false;
   }
 
   bool OnHandleOneTouched( Actor actor, const TouchData& touch )
@@ -1417,8 +1416,7 @@ struct Decorator::Impl : public ConnectionTracker
       SetHandleImage( LEFT_SELECTION_HANDLE );
     }
 
-    // Consume to avoid pop-ups accidentally closing, when handle is outside of pop-up area
-    return true;
+    return false;
   }
 
   bool OnHandleTwoTouched( Actor actor, const TouchData& touch )
@@ -1448,8 +1446,7 @@ struct Decorator::Impl : public ConnectionTracker
       SetHandleImage( RIGHT_SELECTION_HANDLE );
     }
 
-    // Consume to avoid pop-ups accidentally closing, when handle is outside of pop-up area
-    return true;
+    return false;
   }
 
   void HandleResetPosition( PropertyNotification& source )
index a972810..a3f7efd 100755 (executable)
@@ -42,7 +42,7 @@ AtlasGlyphManager::AtlasGlyphManager()
 {
   mAtlasManager = Dali::Toolkit::AtlasManager::New();
   mSampler = Sampler::New();
-  mSampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
+  mSampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
 }
 
 void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
index cd043e2..d1aca24 100755 (executable)
@@ -549,7 +549,8 @@ struct AtlasRenderer::Impl
         }
 
         // Move the origin (0,0) of the mesh to the center of the actor
-        const Vector2 position = *( positionsBuffer + i ) - halfTextSize - lineOffsetPosition;
+        const Vector2& temp = *( positionsBuffer + i );
+        const Vector2 position = Vector2( roundf( temp.x ), temp.y ) - halfTextSize - lineOffsetPosition; // roundf() avoids pixel alignment issues.
 
         if ( 0u != slot.mImageId ) // invalid slot id, glyph has failed to be added to atlas
         {
index 95f54bc..19cae29 100755 (executable)
@@ -3833,6 +3833,7 @@ bool Controller::RemoveText( int cursorOffset,
       if( ( currentText.Count() - numberOfCharacters == 0 ) && ( cursorIndex == 0 ) )
       {
         mImpl->ClearPreEditFlag();
+        mImpl->mTextUpdateInfo.mNumberOfCharactersToAdd = 0;
       }
 
       // Updates the text style runs by removing characters. Runs with no characters are removed.
index 23a4793..059e9c8 100644 (file)
@@ -40,6 +40,7 @@
 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
 #include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 
 namespace Dali
 {
@@ -515,7 +516,15 @@ void ImageVisual::CreateRenderer( TextureSet& textureSet )
 
   if( !mImpl->mCustomShader )
   {
-    geometry = CreateGeometry( mFactoryCache, ImageDimensions( 1, 1 ) );
+    TextureManager& textureManager = mFactoryCache.GetTextureManager();
+
+    uint32_t opaqueElementsCount {0u};
+    uint32_t transparentElementsCount {0u};
+    geometry = textureManager.GetRenderGeometry(mTextureId, opaqueElementsCount, transparentElementsCount);
+    if(!opaqueElementsCount && !transparentElementsCount)
+    {
+      geometry = CreateGeometry( mFactoryCache, ImageDimensions( 1, 1 ) );
+    }
 
     shader = mImageVisualShaderFactory.GetShader( mFactoryCache,
                              mImpl->mFlags & Impl::IS_ATLASING_APPLIED,
@@ -850,6 +859,37 @@ void ImageVisual::UploadComplete( bool loadingSuccess, int32_t textureId, Textur
   {
     resourceStatus = Toolkit::Visual::ResourceStatus::FAILED;
   }
+
+  // use geometry if needed
+  if( loadingSuccess )
+  {
+    uint32_t opaqueElements{0u};
+    uint32_t transparentElements{0u};
+    auto geometry = mFactoryCache.GetTextureManager().GetRenderGeometry(mTextureId, opaqueElements, transparentElements);
+    if (mImpl->mRenderer && geometry)
+    {
+      mImpl->mRenderer.SetGeometry(geometry);
+      Dali::DevelRenderer::DrawCommand drawCommand{};
+      drawCommand.drawType = DevelRenderer::DrawType::INDEXED;
+
+      if (opaqueElements)
+      {
+        drawCommand.firstIndex = 0;
+        drawCommand.elementCount = opaqueElements;
+        drawCommand.queue = 0;
+        DevelRenderer::AddDrawCommand(mImpl->mRenderer, drawCommand);
+      }
+
+      if (transparentElements)
+      {
+        drawCommand.firstIndex = opaqueElements;
+        drawCommand.elementCount = transparentElements;
+        drawCommand.queue = 1;
+        DevelRenderer::AddDrawCommand(mImpl->mRenderer, drawCommand);
+      }
+    }
+  }
+
   // Signal to observers ( control ) that resources are ready. Must be all resources.
   ResourceReady( resourceStatus );
   mLoading = false;
index d4a1f0e..2e216f3 100644 (file)
 // CLASS HEADER
 #include <dali-toolkit/internal/visuals/npatch-loader.h>
 
-// EXTERNAL INCLUDES
+// INTERNAL HEADERS
+#include <dali-toolkit/internal/visuals/rendering-addon.h>
+
+// EXTERNAL HEADERS
 #include <dali/devel-api/common/hash.h>
 #include <dali/integration-api/debug.h>
 
@@ -52,6 +55,9 @@ void SetLoadedNPatchData( NPatchLoader::Data* data, Devel::PixelBuffer& pixelBuf
   data->croppedWidth = pixelBuffer.GetWidth();
   data->croppedHeight = pixelBuffer.GetHeight();
 
+  // Create opacity map
+  data->renderingMap = RenderingAddOn::Get().IsValid() ? RenderingAddOn::Get().BuildNPatch(pixelBuffer, data ) : nullptr;
+
   PixelData pixels = Devel::PixelBuffer::Convert( pixelBuffer ); // takes ownership of buffer
 
   Texture texture = Texture::New( TextureType::TEXTURE_2D, pixels.GetPixelFormat(), pixels.GetWidth(), pixels.GetHeight() );
@@ -65,6 +71,15 @@ void SetLoadedNPatchData( NPatchLoader::Data* data, Devel::PixelBuffer& pixelBuf
 
 } // namespace NPatchBuffer
 
+NPatchLoader::Data::~Data()
+{
+  // If there is an opacity map, it has to be destroyed using addon call
+  if( renderingMap )
+  {
+    RenderingAddOn::Get().DestroyNPatch( renderingMap );
+  }
+}
+
 NPatchLoader::NPatchLoader()
 {
 }
index 58bd73f..2c0e852 100644 (file)
@@ -63,18 +63,22 @@ public:
       croppedWidth( 0 ),
       croppedHeight( 0 ),
       border( 0, 0, 0, 0 ),
-      loadCompleted( false )
+      loadCompleted( false ),
+      renderingMap{ nullptr }
     {}
 
-    std::string url;                              ///< Url of the N-Patch
-    TextureSet textureSet;                        ///< Texture containing the cropped image
-    NPatchUtility::StretchRanges stretchPixelsX;  ///< X stretch pixels
-    NPatchUtility::StretchRanges stretchPixelsY;  ///< Y stretch pixels
-    std::size_t hash;                             ///< Hash code for the Url
-    uint32_t croppedWidth;                        ///< Width of the cropped middle part of N-patch
-    uint32_t croppedHeight;                       ///< Height of the cropped middle part of N-patch
-    Rect< int > border;                           ///< The size of the border
-    bool loadCompleted;                           ///< True if the data loading is completed
+    ~Data();
+
+    std::string url;                               ///< Url of the N-Patch
+    TextureSet textureSet;                         ///< Texture containing the cropped image
+    NPatchUtility::StretchRanges stretchPixelsX;   ///< X stretch pixels
+    NPatchUtility::StretchRanges stretchPixelsY;   ///< Y stretch pixels
+    std::size_t hash;                              ///< Hash code for the Url
+    uint32_t croppedWidth;                         ///< Width of the cropped middle part of N-patch
+    uint32_t croppedHeight;                        ///< Height of the cropped middle part of N-patch
+    Rect< int > border;                            ///< The size of the border
+    bool loadCompleted;                            ///< True if the data loading is completed
+    void* renderingMap;                            ///< NPatch rendering data
   };
 
 public:
index 147f88c..ea72d4f 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/object/handle-devel.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/integration-api/debug.h>
 
@@ -33,6 +34,7 @@
 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
+#include <dali-toolkit/internal/visuals/rendering-addon.h>
 
 namespace Dali
 {
@@ -403,6 +405,11 @@ void NPatchVisual::DoSetOnStage( Actor& actor )
     mPlacementActor = actor;
     if( data->loadCompleted )
     {
+      if( RenderingAddOn::Get().IsValid() )
+      {
+        RenderingAddOn::Get().SubmitRenderTask( mImpl->mRenderer, data->renderingMap );
+      }
+
       ApplyTextureAndUniforms();
       actor.AddRenderer( mImpl->mRenderer );
       mPlacementActor.Reset();
@@ -486,13 +493,30 @@ Geometry NPatchVisual::CreateGeometry()
       }
       else
       {
-        geometry = GetNinePatchGeometry( VisualFactoryCache::NINE_PATCH_GEOMETRY );
+        if( data->renderingMap )
+        {
+          uint32_t elementCount[2];
+          geometry = RenderingAddOn::Get().CreateGeometryGrid(data->renderingMap, Uint16Pair(3, 3), elementCount );
+        }
+        else
+        {
+          geometry = GetNinePatchGeometry( VisualFactoryCache::NINE_PATCH_GEOMETRY );
+        }
       }
     }
     else if( data->stretchPixelsX.Size() > 0 || data->stretchPixelsY.Size() > 0)
     {
       Uint16Pair gridSize( 2 * data->stretchPixelsX.Size() + 1,  2 * data->stretchPixelsY.Size() + 1 );
-      geometry = !mBorderOnly ? CreateGridGeometry( gridSize ) : CreateBorderGeometry( gridSize );
+      if( !data->renderingMap )
+      {
+        geometry = !mBorderOnly ? CreateGridGeometry( gridSize ) : CreateBorderGeometry( gridSize );
+      }
+      else
+      {
+        uint32_t elementCount[2];
+        geometry = !mBorderOnly ?
+                   RenderingAddOn::Get().CreateGeometryGrid(data->renderingMap, gridSize, elementCount ) : CreateBorderGeometry(gridSize );
+      }
     }
   }
   else
diff --git a/dali-toolkit/internal/visuals/rendering-addon.h b/dali-toolkit/internal/visuals/rendering-addon.h
new file mode 100644 (file)
index 0000000..5d39f97
--- /dev/null
@@ -0,0 +1,93 @@
+#ifndef DALI_CMAKE_RENDERING_ADDON_H
+#define DALI_CMAKE_RENDERING_ADDON_H
+
+/*
+* Copyright (c) 2020 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.
+*
+*/
+
+#include <dali/devel-api/common/addon-binder.h>
+#include <dali-toolkit/internal/visuals/npatch/npatch-visual.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Internal
+{
+
+/**
+ * Interface of Overdrawing AddOn
+ */
+class RenderingAddOn : public Dali::AddOn::AddOnBinder
+{
+  using TextureManager = Dali::Toolkit::Internal::TextureManager;
+public:
+  RenderingAddOn() : Dali::AddOn::AddOnBinder( "oo-rendering", 0u )
+  {}
+
+  // Bind AddOn functions
+  ADDON_BIND_FUNCTION(
+    GetGeometry,
+    Dali::Geometry(TextureManager::TextureId, uint32_t&, uint32_t& ) );
+
+  ADDON_BIND_FUNCTION(
+    CreateGeometry,
+    Dali::Geometry( TextureManager::TextureId, const Dali::Devel::PixelBuffer& pixelBuffer ) );
+
+  ADDON_BIND_FUNCTION(
+    Initialize,
+    void*() );
+
+  ADDON_BIND_FUNCTION(
+    CreateGeometryGrid,
+    Dali::Geometry( const void*, const Uint16Pair&, uint32_t*) );
+
+  ADDON_BIND_FUNCTION(
+    SubmitRenderTask,
+    void( Renderer&, const void* ) );
+
+  ADDON_BIND_FUNCTION(
+    BuildNPatch,
+    void*( const Devel::PixelBuffer&, void*) );
+
+  ADDON_BIND_FUNCTION(
+    DestroyNPatch,
+    void( void* ) );
+
+  /**
+   * Single instance of the addon
+   * @return
+   */
+  static RenderingAddOn& Get()
+  {
+    static RenderingAddOn* addon = nullptr;
+    if( !addon )
+    {
+      addon = new RenderingAddOn();
+      if(addon->IsValid())
+      {
+        addon->Initialize();
+      }
+    }
+    return *addon;
+  }
+};
+
+} // Internal
+} // Toolkit
+} // Dali
+
+#endif //DALI_CMAKE_RENDERING_ADDON_H
index e23290b..64bbb5b 100644 (file)
 #include <dali/devel-api/common/hash.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
+#include <dali/public-api/rendering/geometry.h>
 
 // INTERNAL HEADERS
 #include <dali-toolkit/internal/image-loader/image-atlas-impl.h>
 #include <dali-toolkit/public-api/image-loader/sync-image-loader.h>
 #include <dali-toolkit/internal/visuals/image-atlas-manager.h>
+#include <dali-toolkit/internal/visuals/rendering-addon.h>
 
 namespace
 {
@@ -133,6 +135,8 @@ TextureManager::TextureManager()
   mCurrentTextureId( 0 ),
   mQueueLoadFlag(false)
 {
+  // Initialize the AddOn
+  RenderingAddOn::Get();
 }
 
 TextureManager::~TextureManager()
@@ -1048,6 +1052,12 @@ void TextureManager::UploadTexture( Devel::PixelBuffer& pixelBuffer, TextureInfo
     // Check if this pixelBuffer is premultiplied
     textureInfo.preMultiplied = pixelBuffer.IsAlphaPreMultiplied();
 
+    auto& renderingAddOn = RenderingAddOn::Get();
+    if( renderingAddOn.IsValid() )
+    {
+      renderingAddOn.CreateGeometry( textureInfo.textureId, pixelBuffer );
+    }
+
     Texture texture = Texture::New( Dali::TextureType::TEXTURE_2D, pixelBuffer.GetPixelFormat(),
                                     pixelBuffer.GetWidth(), pixelBuffer.GetHeight() );
 
@@ -1373,6 +1383,13 @@ void TextureManager::SetBrokenImageUrl(const std::string& brokenImageUrl)
   mBrokenImageUrl = brokenImageUrl;
 }
 
+Geometry TextureManager::GetRenderGeometry(TextureId textureId, uint32_t& frontElements, uint32_t& backElements )
+{
+  return RenderingAddOn::Get().IsValid() ?
+         RenderingAddOn::Get().GetGeometry( textureId, frontElements, backElements) :
+         Geometry();
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index c3cd015..2ad0225
@@ -27,6 +27,7 @@
 #include <dali/public-api/rendering/texture-set.h>
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/public-api/rendering/geometry.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/image-loader/async-image-loader-devel.h>
@@ -426,6 +427,15 @@ public:
    */
   void SetBrokenImageUrl(const std::string& brokenImageUrl);
 
+  /**
+   * @brief Returns the geometry associated with texture.
+   * @param[in] textureId Id of the texture
+   * @param[out] frontElements number of front elements
+   * @param[out] backElements number of back elements
+   * @return Returns valid geometry object
+   */
+  Geometry GetRenderGeometry(TextureId textureId, uint32_t& frontElements, uint32_t& backElements );
+
 private:
 
   /**
@@ -690,6 +700,14 @@ private:
   void UploadTexture( Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo );
 
   /**
+   * Creates tiled geometry of for the texture which separates fully-opaque
+   * tiles from ones which use transparency.
+   * @param pixelBuffer
+   * @param textureInfo
+   */
+  bool CreateTiledGeometry( const Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo );
+
+  /**
    * Mark the texture as complete, and inform observers
    * @param[in] textureInfo The struct associated with this Texture
    */
index 2855636..02adab4 100644 (file)
@@ -36,19 +36,13 @@ namespace Toolkit
 Button::Button()
 {}
 
-Button::Button( const Button& button )
-: Control( button )
-{
-}
+Button::Button( const Button& button ) = default;
 
-Button& Button::operator=( const Button& button )
-{
-  if( &button != this )
-  {
-    Control::operator=( button );
-  }
-  return *this;
-}
+Button::Button( Button&& rhs ) = default;
+
+Button& Button::operator=( const Button& button ) = default;
+
+Button& Button::operator=( Button&& rhs ) = default;
 
 Button::~Button()
 {
index 2544d46..c9c79d6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -236,6 +236,14 @@ public:
   Button( const Button& button );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  Button( Button&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] button Handle to an object
@@ -244,6 +252,15 @@ public:
   Button& operator=( const Button& button );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Button& operator=( Button&& rhs );
+
+  /**
    * @brief Downcasts a handle to Button handle.
    *
    * If handle points to a Button, the downcast produces valid handle.
index e2f7f56..69dbdd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -34,19 +34,13 @@ CheckBoxButton::CheckBoxButton()
 {
 }
 
-CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
-: Button( checkBox )
-{
-}
+CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox ) = default;
 
-CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
-{
-  if( &checkBox != this )
-  {
-    Button::operator=( checkBox );
-  }
-  return *this;
-}
+CheckBoxButton::CheckBoxButton( CheckBoxButton&& rhs ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( CheckBoxButton&& rhs ) = default;
 
 CheckBoxButton::~CheckBoxButton()
 {
index 675ae70..4ae4608 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CHECK_BOX_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -97,6 +97,14 @@ public:
   CheckBoxButton( const CheckBoxButton& checkBox );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  CheckBoxButton( CheckBoxButton&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] checkBox Handle to an object
@@ -105,6 +113,15 @@ public:
   CheckBoxButton& operator=( const CheckBoxButton& checkBox );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  CheckBoxButton& operator=( CheckBoxButton&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index e8ae5a1..0cc3706 100644 (file)
@@ -41,19 +41,13 @@ PushButton::PushButton( Internal::PushButton& implementation )
 {
 }
 
-PushButton::PushButton( const PushButton& pushButton )
-: Button( pushButton )
-{
-}
+PushButton::PushButton( const PushButton& pushButton ) = default;
 
-PushButton& PushButton::operator=( const PushButton& pushButton )
-{
-  if( &pushButton != this )
-  {
-    Button::operator=( pushButton );
-  }
-  return *this;
-}
+PushButton::PushButton( PushButton&& rhs ) = default;
+
+PushButton& PushButton::operator=( const PushButton& pushButton ) = default;
+
+PushButton& PushButton::operator=( PushButton&& rhs ) = default;
 
 PushButton::PushButton( Dali::Internal::CustomActor* internal )
 : Button( internal )
index 4a6b0c2..e237cc8 100644 (file)
@@ -134,6 +134,14 @@ public:
   PushButton( const PushButton& pushButton );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  PushButton( PushButton&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] pushButton Handle to an object
@@ -142,6 +150,15 @@ public:
   PushButton& operator=( const PushButton& pushButton );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  PushButton& operator=( PushButton&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 7538723..d9d8d60 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -39,19 +39,13 @@ RadioButton::RadioButton( Internal::RadioButton& implementation )
 {
 }
 
-RadioButton::RadioButton( const RadioButton& radioButton )
-  : Button( radioButton )
-{
-}
+RadioButton::RadioButton( const RadioButton& radioButton ) = default;
 
-RadioButton& RadioButton::operator=( const RadioButton& radioButton )
-{
-  if( &radioButton != this )
-  {
-    Button::operator=( radioButton );
-  }
-  return *this;
-}
+RadioButton::RadioButton( RadioButton&& rhs ) = default;
+
+RadioButton& RadioButton::operator=( const RadioButton& radioButton ) = default;
+
+RadioButton& RadioButton::operator=( RadioButton&& rhs ) = default;
 
 RadioButton::RadioButton( Dali::Internal::CustomActor* internal )
   : Button( internal )
index d241e74..b125ab3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_RADIO_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2029 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.
@@ -103,6 +103,14 @@ class DALI_TOOLKIT_API RadioButton: public Button
   RadioButton( const RadioButton& radioButton );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  RadioButton( RadioButton&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] radioButton Handle to an object
@@ -111,6 +119,15 @@ class DALI_TOOLKIT_API RadioButton: public Button
   RadioButton& operator=( const RadioButton& radioButton );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  RadioButton& operator=( RadioButton&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index d9b2f8f..07170ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -40,23 +40,17 @@ Control::Control()
 {
 }
 
-Control::Control( const Control& uiControl )
-: CustomActor( uiControl  )
-{
-}
+Control::Control( const Control& uiControl ) = default;
+
+Control::Control( Control&& rhs ) = default;
 
 Control::~Control()
 {
 }
 
-Control& Control::operator=( const Control& handle )
-{
-  if( &handle != this )
-  {
-    CustomActor::operator=( handle );
-  }
-  return *this;
-}
+Control& Control::operator=( const Control& handle ) = default;
+
+Control& Control::operator=( Control&& rhs ) = default;
 
 Control Control::DownCast( BaseHandle handle )
 {
index b8b5621..6ecfd8b 100644 (file)
@@ -200,6 +200,14 @@ public: // Creation & Destruction
   Control(const Control& uiControl);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.23
+   * @param[in] rhs Handle to move
+   */
+  Control( Control&& rhs );
+
+  /**
    * @brief Dali::Control is intended as a base class.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
@@ -210,7 +218,7 @@ public: // Creation & Destruction
 public: // operators
 
   /**
-   * @brief Assignment operator.
+   * @brief Copy assignment operator.
    *
    * Changes this handle to point to another real object.
    * @SINCE_1_0.0
@@ -219,6 +227,15 @@ public: // operators
    */
   Control& operator=( const Control& handle );
 
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.23
+   * @param[in] rhs Object to assign this to
+   * @return Reference to this
+   */
+  Control& operator=( Control&& rhs );
+
 public:
 
   /**
index ec95d8c..0c0227d 100644 (file)
@@ -36,19 +36,13 @@ FlexContainer::FlexContainer()
 {
 }
 
-FlexContainer::FlexContainer( const FlexContainer& handle )
-: Control( handle )
-{
-}
+FlexContainer::FlexContainer( const FlexContainer& handle ) = default;
 
-FlexContainer& FlexContainer::operator=( const FlexContainer& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+FlexContainer::FlexContainer( FlexContainer&& rhs ) = default;
+
+FlexContainer& FlexContainer::operator=( const FlexContainer& handle ) = default;
+
+FlexContainer& FlexContainer::operator=( FlexContainer&& rhs ) = default;
 
 FlexContainer::~FlexContainer()
 {
index 78965f8..c89ef8e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_FLEX_CONTAINER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -241,6 +241,14 @@ public:
   FlexContainer( const FlexContainer& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  FlexContainer( FlexContainer&& rhs );
+
+  /**
    * @brief Assignment operator. Changes this handle to point to another real object.
    * @SINCE_1_1.35
    * @param[in] handle Handle to an object
@@ -249,6 +257,15 @@ public:
   FlexContainer& operator=( const FlexContainer& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  FlexContainer& operator=( FlexContainer&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * @details This is non-virtual since derived Handle types must not contain data or virtual methods.
index f06b667..980c0a5 100644 (file)
@@ -35,19 +35,13 @@ ImageView::ImageView()
 {
 }
 
-ImageView::ImageView( const ImageView& imageView )
-: Control( imageView )
-{
-}
+ImageView::ImageView( const ImageView& imageView ) = default;
 
-ImageView& ImageView::operator=( const ImageView& imageView )
-{
-  if( &imageView != this )
-  {
-    Control::operator=( imageView );
-  }
-  return *this;
-}
+ImageView::ImageView( ImageView&& rhs ) = default;
+
+ImageView& ImageView::operator=( const ImageView& imageView ) = default;
+
+ImageView& ImageView::operator=( ImageView&& rhs ) = default;
 
 ImageView::~ImageView()
 {
index 47806df..b2fc518 100644 (file)
@@ -194,6 +194,14 @@ public:
   ImageView( const ImageView& imageView );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  ImageView( ImageView&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
@@ -203,6 +211,15 @@ public:
   ImageView& operator=( const ImageView& imageView );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  ImageView& operator=( ImageView&& rhs );
+
+  /**
    * @brief Downcasts a handle to ImageView handle.
    *
    * If handle points to a ImageView, the downcast produces valid handle.
index e1dc94c..1ebdd2b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -33,19 +33,13 @@ namespace Toolkit
 Model3dView::Model3dView()
 {}
 
-Model3dView::Model3dView( const Model3dView& model3dView )
-: Control( model3dView )
-{
-}
+Model3dView::Model3dView( const Model3dView& model3dView ) = default;
 
-Model3dView& Model3dView::operator=( const Model3dView& model3dView )
-{
-  if( &model3dView != this )
-  {
-    Control::operator=( model3dView );
-  }
-  return *this;
-}
+Model3dView::Model3dView( Model3dView&& rhs ) = default;
+
+Model3dView& Model3dView::operator=( const Model3dView& model3dView ) = default;
+
+Model3dView& Model3dView::operator=( Model3dView&& rhs ) = default;
 
 Model3dView::~Model3dView()
 {
index dfa6830..358fd9f 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_MODEL3D_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -142,6 +142,14 @@ public:
   Model3dView( const Model3dView& model3dView );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  Model3dView( Model3dView&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_1.4
    * @param[in] model3dView Handle to an object
@@ -150,6 +158,15 @@ public:
   Model3dView& operator=( const Model3dView& model3dView );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Model3dView& operator=( Model3dView&& rhs );
+
+  /**
    * @brief Downcasts an Object handle to Model3dView.
    *
    * If handle points to a Model3dView, the downcast produces valid handle.
index d34a5a8..849de38 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -31,19 +31,13 @@ ProgressBar::ProgressBar()
 {
 }
 
-ProgressBar::ProgressBar( const ProgressBar& handle )
-: Control( handle )
-{
-}
+ProgressBar::ProgressBar( const ProgressBar& handle ) = default;
 
-ProgressBar& ProgressBar::operator=( const ProgressBar& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+ProgressBar::ProgressBar( ProgressBar&& rhs ) = default;
+
+ProgressBar& ProgressBar::operator=( const ProgressBar& handle ) = default;
+
+ProgressBar& ProgressBar::operator=( ProgressBar&& rhs ) = default;
 
 ProgressBar::ProgressBar(Internal::ProgressBar& implementation)
 : Control(implementation)
index 407e026..7497fbd 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_PROGRESS_BAR_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -180,6 +180,14 @@ public:
   ProgressBar( const ProgressBar& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  ProgressBar( ProgressBar&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * Changes this handle to point to another real object.
@@ -190,6 +198,15 @@ public:
   ProgressBar& operator=( const ProgressBar& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  ProgressBar& operator=( ProgressBar&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 12a6baf..7435b13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -40,19 +40,13 @@ ItemView::ItemView( Dali::Internal::CustomActor* internal )
   VerifyCustomActorPointer<Internal::ItemView>(internal);
 }
 
-ItemView::ItemView( const ItemView& itemView )
-: Scrollable(itemView)
-{
-}
+ItemView::ItemView( const ItemView& itemView ) = default;
 
-ItemView& ItemView::operator=( const ItemView& itemView )
-{
-  if( &itemView != this )
-  {
-    Control::operator=( itemView );
-  }
-  return *this;
-}
+ItemView::ItemView( ItemView&& rhs ) = default;
+
+ItemView& ItemView::operator=( const ItemView& itemView ) = default;
+
+ItemView& ItemView::operator=( ItemView&& rhs ) = default;
 
 ItemView ItemView::New(ItemFactory& factory)
 {
index 692d129..5bc7eea 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ITEM_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -215,6 +215,14 @@ public:
   ItemView( const ItemView& itemView );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  ItemView( ItemView&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] itemView Handle to an object
@@ -223,6 +231,15 @@ public:
   ItemView& operator=( const ItemView& itemView );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  ItemView& operator=( ItemView&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 471f371..effc31a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -298,19 +298,13 @@ ScrollView::ScrollView( Dali::Internal::CustomActor* internal )
   VerifyCustomActorPointer<Internal::ScrollView>(internal);
 }
 
-ScrollView::ScrollView( const ScrollView& handle )
-: Scrollable( handle )
-{
-}
+ScrollView::ScrollView( const ScrollView& handle ) = default;
 
-ScrollView& ScrollView::operator=( const ScrollView& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+ScrollView::ScrollView( ScrollView&& rhs ) = default;
+
+ScrollView& ScrollView::operator=( const ScrollView& handle ) = default;
+
+ScrollView& ScrollView::operator=( ScrollView&& rhs ) = default;
 
 ScrollView ScrollView::New()
 {
index 4acf64c..14b9909 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SCROLL_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -737,6 +737,14 @@ public:
   ScrollView( const ScrollView& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  ScrollView( ScrollView&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * Changes this handle to point to another real object.
@@ -747,6 +755,15 @@ public:
   ScrollView& operator=( const ScrollView& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  ScrollView& operator=( ScrollView&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 9e1c66f..3802239 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -41,19 +41,13 @@ Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
   VerifyCustomActorPointer<Internal::Scrollable>(internal);
 }
 
-Scrollable::Scrollable( const Scrollable& handle )
-: Control( handle )
-{
-}
+Scrollable::Scrollable( const Scrollable& handle ) = default;
 
-Scrollable& Scrollable::operator=( const Scrollable& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+Scrollable::Scrollable( Scrollable&& rhs ) = default;
+
+Scrollable& Scrollable::operator=( const Scrollable& handle ) = default;
+
+Scrollable& Scrollable::operator=( Scrollable&& rhs ) = default;
 
 Scrollable::~Scrollable()
 {
index 38050ae..c3f235c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SCROLLABLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -124,6 +124,14 @@ public:
   Scrollable( const Scrollable& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  Scrollable( Scrollable&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * Changes this handle to point to another real object.
@@ -134,6 +142,15 @@ public:
   Scrollable& operator=( const Scrollable& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Scrollable& operator=( Scrollable&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 8aa47d0..ed7cda9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -33,19 +33,13 @@ Slider::Slider()
 {
 }
 
-Slider::Slider( const Slider& handle )
-: Control( handle )
-{
-}
+Slider::Slider( const Slider& handle ) = default;
 
-Slider& Slider::operator=( const Slider& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+Slider::Slider( Slider&& rhs ) = default;
+
+Slider& Slider::operator=( const Slider& handle ) = default;
+
+Slider& Slider::operator=( Slider&& rhs ) = default;
 
 Slider::Slider(Internal::Slider& implementation)
 : Control(implementation)
index 603e110..1788734 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SLIDER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -193,6 +193,14 @@ public:
   Slider( const Slider& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  Slider( Slider&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * Changes this handle to point to another real object.
@@ -203,6 +211,15 @@ public:
   Slider& operator=( const Slider& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Slider& operator=( Slider&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index f02d843..f3c26f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -36,19 +36,13 @@ TextEditor::TextEditor()
 {
 }
 
-TextEditor::TextEditor( const TextEditor& handle )
-: Control( handle )
-{
-}
+TextEditor::TextEditor( const TextEditor& handle ) = default;
 
-TextEditor& TextEditor::operator=( const TextEditor& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+TextEditor::TextEditor( TextEditor&& rhs ) = default;
+
+TextEditor& TextEditor::operator=( const TextEditor& handle ) = default;
+
+TextEditor& TextEditor::operator=( TextEditor&& rhs ) = default;
 
 TextEditor::~TextEditor()
 {
index acebb97..18bb112 100644 (file)
@@ -532,14 +532,30 @@ public:
   TextEditor( const TextEditor &handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextEditor( TextEditor&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * @SINCE_1_1.37
    * @param[in] handle The handle to copy from
    * @return A reference to this
    */
-  TextEditor&
-  operator=( const TextEditor &handle );
+  TextEditor& operator=( const TextEditor &handle );
+
+  /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  TextEditor& operator=( TextEditor&& rhs );
 
   /**
    * @brief Destructor.
index fc58261..1ebedb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -36,19 +36,13 @@ TextField::TextField()
 {
 }
 
-TextField::TextField( const TextField& handle )
-: Control( handle )
-{
-}
+TextField::TextField( const TextField& handle ) = default;
 
-TextField& TextField::operator=( const TextField& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+TextField::TextField( TextField&& rhs ) = default;
+
+TextField& TextField::operator=( const TextField& handle ) = default;
+
+TextField& TextField::operator=( TextField&& rhs ) = default;
 
 TextField::~TextField()
 {
index c5d257d..b705039 100644 (file)
@@ -539,6 +539,14 @@ public:
   TextField( const TextField& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextField( TextField&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
@@ -548,6 +556,15 @@ public:
   TextField& operator=( const TextField& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  TextField& operator=( TextField&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index 7a61615..39450c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -44,19 +44,13 @@ TextLabel::TextLabel()
 {
 }
 
-TextLabel::TextLabel( const TextLabel& handle )
-: Control( handle )
-{
-}
+TextLabel::TextLabel( const TextLabel& handle ) = default;
 
-TextLabel& TextLabel::operator=( const TextLabel& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+TextLabel::TextLabel( TextLabel&& rhs ) = default;
+
+TextLabel& TextLabel::operator=( const TextLabel& handle ) = default;
+
+TextLabel& TextLabel::operator=( TextLabel&& rhs ) = default;
 
 TextLabel::~TextLabel()
 {
index f61d675..4fe6447 100644 (file)
@@ -399,6 +399,14 @@ public:
   TextLabel( const TextLabel& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextLabel( TextLabel&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
@@ -408,6 +416,15 @@ public:
   TextLabel& operator=( const TextLabel& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  TextLabel& operator=( TextLabel&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
index e709a58..5f827a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-map.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/video-view/video-view-impl.h>
@@ -34,20 +35,13 @@ VideoView::VideoView()
 {
 }
 
-VideoView::VideoView( const VideoView& videoView )
-: Control( videoView )
-{
-}
+VideoView::VideoView( const VideoView& videoView ) = default;
 
-VideoView& VideoView::operator=( const VideoView& videoView )
-{
-  if( &videoView != this )
-  {
-    Control::operator=( videoView );
-  }
+VideoView::VideoView( VideoView&& rhs ) = default;
 
-  return *this;
-}
+VideoView& VideoView::operator=( const VideoView& videoView ) = default;
+
+VideoView& VideoView::operator=( VideoView&& rhs ) = default;
 
 VideoView::~VideoView()
 {
@@ -55,26 +49,26 @@ VideoView::~VideoView()
 
 VideoView VideoView::New()
 {
-  return Internal::VideoView::New();
+  return Internal::VideoView::New( Dali::VideoSyncMode::DISABLED );
 }
 
 VideoView VideoView::New( const std::string& url )
 {
-  VideoView videoView = Internal::VideoView::New();
+  VideoView videoView = Internal::VideoView::New( Dali::VideoSyncMode::DISABLED );
   Dali::Toolkit::GetImpl( videoView ).SetUrl( url );
   return videoView;
 }
 
 VideoView VideoView::New( bool swCodec )
 {
-  VideoView videoView = Internal::VideoView::New();
+  VideoView videoView = Internal::VideoView::New( Dali::VideoSyncMode::DISABLED );
   Dali::Toolkit::GetImpl( videoView ).SetSWCodec( swCodec );
   return videoView;
 }
 
 VideoView VideoView::New( const std::string& url, bool swCodec )
 {
-  VideoView videoView = Internal::VideoView::New();
+  VideoView videoView = Internal::VideoView::New( Dali::VideoSyncMode::DISABLED );
   Dali::Toolkit::GetImpl( videoView ).SetUrl( url );
   Dali::Toolkit::GetImpl( videoView ).SetSWCodec( swCodec );
   return videoView;
index 88728ee..e97bb27 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VIDEO_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -255,6 +255,14 @@ public:
   VideoView( const VideoView& videoView );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  VideoView( VideoView&& rhs );
+
+  /**
    * @brief Assignment operator.
    *
    * @SINCE_1_1.38
@@ -264,6 +272,15 @@ public:
   VideoView& operator=( const VideoView& videoView );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  VideoView& operator=( VideoView&& rhs );
+
+  /**
    * @brief Downcasts a handle to VideoView handle.
    *
    * If handle points to a VideoView, the downcast produces valid handle.
index 581818c..ed930ac 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 9;
-const unsigned int TOOLKIT_MICRO_VERSION = 22;
+const unsigned int TOOLKIT_MICRO_VERSION = 23;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index a1d21e7..cd84dd6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -40,16 +40,13 @@ AsyncImageLoader::AsyncImageLoader( Internal::AsyncImageLoader* impl )
 {
 }
 
-AsyncImageLoader::AsyncImageLoader( const AsyncImageLoader& handle )
-: BaseHandle( handle )
-{
-}
+AsyncImageLoader::AsyncImageLoader( const AsyncImageLoader& handle ) = default;
 
-AsyncImageLoader& AsyncImageLoader::operator=( const AsyncImageLoader& handle )
-{
-  BaseHandle::operator=( handle );
-  return *this;
-}
+AsyncImageLoader::AsyncImageLoader( AsyncImageLoader&& rhs ) = default;
+
+AsyncImageLoader& AsyncImageLoader::operator=( const AsyncImageLoader& handle ) =  default;
+
+AsyncImageLoader& AsyncImageLoader::operator=( AsyncImageLoader&& rhs ) =  default;
 
 AsyncImageLoader AsyncImageLoader::DownCast( BaseHandle handle )
 {
index 3a30253..e163b07 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ASYNC_IMAGE_LOADER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -128,6 +128,14 @@ public:
   AsyncImageLoader( const AsyncImageLoader& handle );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  AsyncImageLoader( AsyncImageLoader&& rhs );
+
+  /**
    * @brief This assignment operator is required for (smart) pointer semantics.
    * @SINCE_1_2_14
    *
@@ -137,6 +145,14 @@ public:
   AsyncImageLoader& operator=( const AsyncImageLoader& handle );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  AsyncImageLoader& operator=( AsyncImageLoader&& rhs );
+
+  /**
    * @brief Creates a new loader to load the image asynchronously in a worker thread.
    * @SINCE_1_2_14
    *
index bbf5ae0..f421be2 100644 (file)
@@ -113,7 +113,7 @@ public:
     valueText << touchedCount;
     mTagText.SetProperty( TextLabel::Property::TEXT, valueText.str() );
 
-    return true; // Consumed
+    return true; // Consumed meaning any gestures will be cancelled
   }
   // C++ EXAMPLE END
 
index 463e63b..6ad5413 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.9.22
+Version:    1.9.23
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT