[dali_2.0.8] Merge branch 'devel/master' 53/251153/1
authorRichard Huang <r.huang@samsung.com>
Fri, 8 Jan 2021 14:36:36 +0000 (14:36 +0000)
committerRichard Huang <r.huang@samsung.com>
Fri, 8 Jan 2021 14:36:36 +0000 (14:36 +0000)
Change-Id: Ie14c47f2662970c0af9d588d825103dd611467d1

28 files changed:
.gitignore
README.md
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp
build/tizen/.gitignore
build/tizen/CMakeLists.txt
build/tizen/dali-scene-loader/CMakeLists.txt
dali-scene-loader/README.md
dali-toolkit/devel-api/visuals/arc-visual-properties-devel.h
dali-toolkit/devel-api/visuals/image-visual-properties-devel.h
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h
dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp
dali-toolkit/internal/visuals/animated-image/fixed-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/fixed-image-cache.h
dali-toolkit/internal/visuals/animated-image/image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/rolling-image-cache.h
dali-toolkit/internal/visuals/arc/arc-visual.cpp
dali-toolkit/internal/visuals/arc/arc-visual.h
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index daf57d2..b28e3c5 100644 (file)
@@ -45,3 +45,5 @@ build/tizen/CMakeDoxygenDefaults.cmake
 /packaging/home*
 .vscode/
 core
+.clangd/
+compile_commands.json
index dd18745..e4cfdbc 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@
       * [3. Building for MS Windows](#3-building-for-ms-windows)
          * Build with the Visual Studio project.
          * Build with CMake.
+      * [4. Building for MacOS](#4-building-for-macos)
    * [DALi Scene Loader](#dali-scene-loader)
 
 # Build Instructions
@@ -111,6 +112,25 @@ vcpkg-script folder in the windows-dependencies repository.
     - ENABLE_DEBUG             ---> Whether to build with debug enabled.
     - USE_DEFAULT_RESOURCE_DIR ---> Whether to use the default resource folders. Otherwise set environment variables for DALI_IMAGE_DIR, DALI_SOUND_DIR, DALI_STYLE_DIR, DALI_STYLE_IMAGE_DIR and DALI_DATA_READ_ONLY_DIR
 
+## 4. Building for MacOS
+
+It is assumed that the DALi environment has been set up & both DALi Core & Adaptor have been built accordingly.
+
+To build the repository enter the 'build/tizen' folder:
+```zsh
+% cd dali-toolkit/build/tizen
+```
+Then run the following command to set up the build:
+```zsh
+% cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/scripts/buildsystems/vcpkg.cmake -DINSTALL_CMAKE_MODULES=ON
+```
+If a Debug build is required, then add `-DCMAKE_BUILD_TYPE=Debug -DENABLE_DEBUG=ON`
+
+To build, run:
+```zsh
+% make install -j8
+```
+
 # DALi Scene Loader
 
-For information about the DALi Scene Loader library, refer to dali-scene-loader/README.md.
\ No newline at end of file
+For information about the DALi Scene Loader library, refer to dali-scene-loader/README.md.
index 81b03dd..372aec9 100755 (executable)
@@ -536,6 +536,10 @@ bool WebEngine::SendKeyEvent( const KeyEvent& event )
   return true;
 }
 
+void WebEngine::SetFocus( bool focused )
+{
+}
+
 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
 {
   return Internal::Adaptor::GetImplementation( *this ).PageLoadStartedSignal();
index 90ee00e..3d538cd 100644 (file)
@@ -107,7 +107,66 @@ int UtcDaliAnimatedImageVisualGetPropertyMap01(void)
 int UtcDaliAnimatedImageVisualGetPropertyMap02(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap for multi image" );
+  tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap for multi image with fixed cache" );
+
+  // request AnimatedImageVisual with a property map
+  VisualFactory factory = VisualFactory::Get();
+  Property::Array urls;
+  CopyUrlsIntoArray( urls );
+
+  Visual::Base animatedImageVisual = factory.CreateVisual(
+    Property::Map()
+    .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE )
+    .Add( "url", urls )
+    .Add( "batchSize", 4 )
+    .Add( "cacheSize", 20 )
+    .Add( "loopCount", 10 )
+    .Add( "frameDelay", 200 )
+    .Add( "pixelArea", Vector4() )
+    .Add( "wrapModeU", WrapMode::REPEAT )
+    .Add( "wrapModeV", WrapMode::DEFAULT ));
+
+  Property::Map resultMap;
+  animatedImageVisual.CreatePropertyMap( resultMap );
+  // check the property values from the returned map from a visual
+  Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE,  Property::INTEGER );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
+
+  value = resultMap.Find( ImageVisual::Property::URL, "url" );
+  DALI_TEST_CHECK( value );
+  Property::Array* resultUrls = value->GetArray();
+  DALI_TEST_CHECK( resultUrls );
+  DALI_TEST_EQUALS( resultUrls->Count(), urls.Count(), TEST_LOCATION );
+
+  value = resultMap.Find( ImageVisual::Property::BATCH_SIZE, "batchSize" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 4, TEST_LOCATION );
+
+  value = resultMap.Find( ImageVisual::Property::CACHE_SIZE, "cacheSize" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 20, TEST_LOCATION );
+
+  value = resultMap.Find( Toolkit::DevelImageVisual::Property::LOOP_COUNT, "loopCount" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 10, TEST_LOCATION );
+
+  value = resultMap.Find( ImageVisual::Property::FRAME_DELAY, "frameDelay" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 200, TEST_LOCATION );
+
+  value = resultMap.Find( Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, "totalFrameNumber" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 11, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+int UtcDaliAnimatedImageVisualGetPropertyMap03(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap for multi image rolling cache" );
 
   // request AnimatedImageVisual with a property map
   VisualFactory factory = VisualFactory::Get();
@@ -155,10 +214,14 @@ int UtcDaliAnimatedImageVisualGetPropertyMap02(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<int>(), 200, TEST_LOCATION );
 
+  value = resultMap.Find( Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, "totalFrameNumber" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 11, TEST_LOCATION );
+
   END_TEST;
 }
 
-int UtcDaliAnimatedImageVisualGetPropertyMap03(void)
+int UtcDaliAnimatedImageVisualGetPropertyMap04(void)
 {
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap" );
@@ -193,6 +256,10 @@ int UtcDaliAnimatedImageVisualGetPropertyMap03(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == 2 );
 
+  value = resultMap.Find( Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, "totalFrameNumber" );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<int>(), 4, TEST_LOCATION );
+
   END_TEST;
 }
 
index dbc326d..0bde103 100644 (file)
@@ -198,6 +198,52 @@ int UtcDaliArcVisualGetPropertyMap01(void)
   END_TEST;
 }
 
+int UtcDaliArcVisualGetPropertyMap02(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliArcVisualGetPropertyMap02" );
+
+  float thickness = 20.0f;
+  float startAngle = 0.0f, sweepAngle = 90.0f;
+
+  Property::Map propertyMap;
+  propertyMap.Add(Visual::Property::TYPE, DevelVisual::ARC)
+             .Add(Visual::Property::MIX_COLOR, Color::RED)
+             .Add(DevelArcVisual::Property::THICKNESS, thickness )
+             .Add(DevelArcVisual::Property::START_ANGLE, startAngle )
+             .Add(DevelArcVisual::Property::SWEEP_ANGLE, sweepAngle )
+             .Add(DevelArcVisual::Property::CAP, DevelArcVisual::Cap::ROUND );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  Property::Map resultMap;
+  visual.CreatePropertyMap( resultMap );
+
+  // check the property values from the returned map from a visual
+  Property::Value* value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get< Vector4 >(), Color::RED, TEST_LOCATION );
+
+  value = resultMap.Find( DevelArcVisual::Property::THICKNESS, Property::FLOAT );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get< float >(), thickness, TEST_LOCATION );
+
+  value = resultMap.Find( DevelArcVisual::Property::START_ANGLE, Property::FLOAT );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get< float >(), startAngle, TEST_LOCATION );
+
+  value = resultMap.Find( DevelArcVisual::Property::SWEEP_ANGLE, Property::FLOAT );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get< float >(), sweepAngle, TEST_LOCATION );
+
+  value = resultMap.Find( DevelArcVisual::Property::CAP, Property::INTEGER );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get< int >() == DevelArcVisual::Cap::ROUND );
+
+  END_TEST;
+}
+
 int UtcDaliArcVisualUpdateProperty(void)
 {
   ToolkitTestApplication application;
index adfa9f9..d9c34a6 100644 (file)
@@ -254,6 +254,32 @@ int UtcDaliWebViewTouchAndKeys(void)
   END_TEST;
 }
 
+int UtcDaliWebViewFocusGainedAndLost(void)
+{
+  ToolkitTestApplication application;
+
+  WebView view = WebView::New();
+  DALI_TEST_CHECK( view );
+
+  view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+  view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
+
+  application.GetScene().Add( view );
+  application.SendNotification();
+  application.Render();
+
+  view.SetKeyInputFocus();
+  DALI_TEST_CHECK( view.HasKeyInputFocus() );
+
+  // reset
+  view.ClearKeyInputFocus();
+  DALI_TEST_CHECK( !view.HasKeyInputFocus() );
+
+  END_TEST;
+}
+
 int UtcDaliWebViewProperty1(void)
 {
   // URL
index f52387f..e59a17f 100644 (file)
@@ -1,2 +1,5 @@
 build
 dali.info
+*.dylib
+dali2-*-config.cmake
+libdali2-scene-loader.so*
\ No newline at end of file
index 657446c..63352ba 100644 (file)
@@ -53,6 +53,11 @@ IF( WIN32 ) # WIN32 includes x64 as well according to the cmake doc.
   FIND_PACKAGE( dali2-adaptor REQUIRED)
 ENDIF()
 
+IF ( APPLE )
+  FIND_PACKAGE( dali2-core REQUIRED)
+  FIND_PACKAGE( dali2-adaptor REQUIRED)
+ENDIF()
+
 SET( VCPKG_INCLUDE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
 
 # Define non-boolean options to CMake
@@ -208,16 +213,24 @@ IF( WIN32 )
   ADD_COMPILE_OPTIONS( /vmg )                           # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks.
   ADD_COMPILE_OPTIONS( /wd4251 )                        # Ignores warning C4251: "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'"
 ELSE()
+  INCLUDE(CheckCXXCompilerFlag)
+
   # Set up compiler flags and warnings
   ADD_COMPILE_OPTIONS( -Wno-ignored-qualifiers )
 
   # TODO: Clang is a lot more strict with warnings, we should address
   # those issues at some point.
-  IF( NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
+  # Matches "Clang" or "AppleClang"
+  IF( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
     ADD_COMPILE_OPTIONS( -Werror )
   ENDIF()
 
-  ADD_COMPILE_OPTIONS( -Wall -Wno-unused-parameter -Wno-float-equal -Wno-class-memaccess )
+  ADD_COMPILE_OPTIONS( -Wall -Wno-unused-parameter -Wno-float-equal )
+  ADD_COMPILE_OPTIONS( -Wall -Wno-unused-parameter -Wno-float-equal )
+  CHECK_CXX_COMPILER_FLAG(-Wno-class-memaccess HAVE_NO_CLASS_MEMACCESS)
+  IF (HAVE_NO_CLASS_MEMACCESS)
+    ADD_COMPILE_OPTIONS( -Wno-class-memaccess )
+  ENDIF()
 
   IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
     ADD_COMPILE_OPTIONS( --coverage )
@@ -270,12 +283,11 @@ IF(DEFINED STATIC)
   SET(LIBTYPE STATIC)
 ENDIF()
 
-IF( WIN32 )
+IF( WIN32 OR APPLE )
   SET( DALICORE_LDFLAGS
         "${DALICORE_LDFLAGS}"
         dali2-core::dali2-core )
 
-  FIND_PACKAGE( pthreads REQUIRED )
   FIND_PACKAGE( curl REQUIRED )
   FIND_LIBRARY( GETOPT_LIBRARY NAMES getopt )
   FIND_LIBRARY( EXIF_LIBRARY NAMES libexif )
@@ -285,14 +297,17 @@ IF( WIN32 )
   FIND_PACKAGE( jpeg REQUIRED )
   FIND_LIBRARY( TURBO_JPEG_LIBRARY NAMES turbojpeg )
 
-  FIND_PACKAGE( unofficial-fontconfig REQUIRED )
   FIND_PACKAGE( freetype REQUIRED )
   FIND_PACKAGE( harfbuzz REQUIRED )
   FIND_LIBRARY( FRIBIDI_LIBRARY NAMES fribidi )
 
   FIND_PACKAGE( unofficial-angle REQUIRED )
-  FIND_PACKAGE( unofficial-cairo REQUIRED )
 
+  IF(WIN32)
+    FIND_PACKAGE( unofficial-fontconfig REQUIRED )
+  ENDIF()
+
+  FIND_PACKAGE( unofficial-cairo REQUIRED )
   FIND_PACKAGE( WebP REQUIRED )
 
   SET( DALIADAPTOR_LDFLAGS
@@ -300,6 +315,9 @@ IF( WIN32 )
        dali2-adaptor::dali2-adaptor )
 ENDIF()
 
+IF ( WIN32 )
+  FIND_PACKAGE( pthreads REQUIRED )
+ENDIF()
 
 ADD_LIBRARY( ${name} ${LIBTYPE} ${SOURCES} )
 TARGET_LINK_LIBRARIES( ${name}
@@ -348,7 +366,7 @@ IF( INSTALL_CMAKE_MODULES )
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake DESTINATION share/${name})
 
   # Install the pdb file.
-  IF( ENABLE_DEBUG )
+  IF( ENABLE_DEBUG AND WIN32 )
     install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/${name}.pdb DESTINATION ${BIN_DIR} )
   ENDIF()
 ELSE()
@@ -399,7 +417,7 @@ INSTALL_HEADERS_WITH_DIRECTORY(PACKAGE_DOXY_HEADERS ${PACKAGE_DOXY_SRC_DIR} "dal
 INSTALL( FILES ${ROOT_SRC_DIR}/dali-toolkit/dali-toolkit.h DESTINATION ${INCLUDE_DIR}/dali-toolkit )
 
 # package doxygen file (contains doxygen grouping information)
-INSTALL( FILES ${package_doxy_files} DESTINATION ${DEV_INCLUDE_PATH}/dali-toolkit/doc )
+INSTALL( FILES ${package_doxy_files} DESTINATION ${INCLUDE_DIR}/dali-toolkit/doc )
 
 # On some platforms we want to install the data files to different location compare to
 # the data location used runtime. For example, on Android we want the toolkit library to load
index 2e2cc38..dcab4a3 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2)
 set(name "dali2-scene-loader")
 
 project(${name} CXX)
@@ -144,7 +144,49 @@ if( ANDROID )
        target_link_libraries(${name} log)
 endif()
 
-install(TARGETS ${name} DESTINATION ${LIB_DIR})
+IF( INSTALL_CMAKE_MODULES )
+       SET_TARGET_PROPERTIES( ${name}
+               PROPERTIES
+               VERSION ${DALI_SCENE_LOADER_VERSION}
+               SOVERSION ${${name}_VERSION_MAJOR}
+               CLEAN_DIRECT_OUPUT 1
+       )
+
+       IF( ENABLE_DEBUG )
+               SET( BIN_DIR "${BIN_DIR}/debug" )
+               SET( LIB_DIR "${LIB_DIR}/debug" )
+       ENDIF()
+
+       # Install the library files.
+       INSTALL( TARGETS ${name}
+               EXPORT ${name}-targets
+               LIBRARY DESTINATION ${LIB_DIR}
+               ARCHIVE DESTINATION ${LIB_DIR}
+               RUNTIME DESTINATION ${BIN_DIR}
+       )
+
+       # Install the cmake modules.
+       INSTALL(
+               EXPORT ${name}-targets
+               NAMESPACE ${name}::
+               FILE ${name}-targets.cmake
+               DESTINATION share/${name}
+       )
+
+       FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake "
+               include(CMakeFindDependencyMacro)
+               include(\${CMAKE_CURRENT_LIST_DIR}/${name}-targets.cmake)
+       ")
+       install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake DESTINATION share/${name})
+
+       # Install the pdb file.
+       IF( ENABLE_DEBUG AND WIN32 )
+               install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/${name}.pdb DESTINATION ${BIN_DIR} )
+       ENDIF()
+ELSE()
+       # Install the library so file and symlinks
+       INSTALL( TARGETS ${name} DESTINATION ${LIB_DIR} )
+ENDIF()
 
 file(GLOB scene_loader_include_files ${scene_loader_public_api_dir})
 install(DIRECTORY ${scene_loader_include_files}
index a11d2e4..b29c463 100644 (file)
@@ -40,6 +40,7 @@ DLI is a JSON based format for representing 3D scenes.
 
 # `scenes`
 The "scenes" element is an array of JSON objects, each of which must define a `nodes` array with the index of the definition of the root node.
+
 :warning: The array must not be empty. Only the first element is used.
 An optional `scene` element with an integer value may be defined to specify the index of the first scene to be created.
 The rest of the scenes are created in the order of their definition (from index 0 to the highest, skipping the default - already created - scene).
@@ -55,6 +56,7 @@ The rest of the scenes are created in the order of their definition (from index
 
 # `nodes`
 The 3D scene is built using a hierarchy of nodes, which are used to position the objects to render.
+
 :warning: Each node must have a `name` string that 1, is not an empty string and 2, is unique within the DLI document. The use of alpha-numeric characters and underscore only is highly recommeneded.
 
 ## Transformations
@@ -70,6 +72,7 @@ The `visible` optional boolean property defines whether a node and its children
 
 ## `children`
 An array of 0 or more indices into the top level `nodes` array, which shall inherit the transform and visibility of their parent node.
+
 :warning: Nodes are processed in the order they are encountered during the depth-first traversal of the hierarchy.
 ```js
   "nodes": [ {
@@ -106,11 +109,13 @@ The definition of a `customization` is a single string tag:
 There is support for two types of nodes that define renderable content.
 The definition of these renderables come in sub-objects.
 All of them support a `color` property, which is an array of 3 or 4 numerical values for RGB or RGBA components. For the alpha value to take effect, alpha blending must be enabled; this is controlled by the [material](#materiaL).
+
 :warning: Customizations and renderables are mutually exclusive on the same node.
 
 ### `model`
 Provides definition for a 3D object, which requires a `mesh`, `shader` and `material`.
 Each of these are provided in form of an integer index into the related top-level array of the DLI document.
+
 :warning: `mesh` must be provided; the rest are optional and default to 0.
 ```js
   "nodes": [ {
@@ -182,6 +187,7 @@ Defines configurations of textures (and their samplers) that form materials. The
 
 ## Texture maps
 `albedoMap` / `albedoMetallicMap` / `normalMap` / `normalRoughnessMap` / `metallicRoughnessMap` / `subsurfaceMap`: define various texture semantics, i.e. the role of the texture, which shall be loaded from an image _inside the materials path_, which is up to the application. All of them are optional.
+
 :warning: Semantics shall not overlap within the same material, e.g. multiple albedo definitions, or albedo and albedoMetallic.
 
 # `meshes`
@@ -197,6 +203,7 @@ Those models loaded from a file may provide an accessor, and flag its presence i
 |           |5| 32||Ignored, but reserved for bitangents|
 |`joints0`  |6| 64|Vector4|Joint IDs for skinned meshes|
 |`weights0` |7|128|Vector4|Joint weights for skinned meshes|
+
 E.g. if positions, normals and tangents are provided, the `attributes` property must have a value of 2 + 4 + 16 = 22.
 Each attribute must provide a `byteOffset` and `byteLength` property, which must be correctly sized for the type of the given attribute.
 Finally, to specify what primitives should the geometry be rendered as, a `primitive` property may be provided with one of the following values: `TRIANGLES` (default), `LINES`, `POINTS`.
@@ -251,11 +258,14 @@ For each shader, `vertex` and `fragment` are required string properties pointing
 
 ## Uniforms
 Every property that is not one of the reserved keys above, will be attempted to be registered as a uniform of the same name.
-:warning: boolean values will be converted to floating point 1.0 (for `true`) or 0.0 (for `false`).
-:warning: integer values will be converted to floating point.
-:warning: arrays of numerical values will be treated as one of the vec2 / vec3 / vec4 / mat3 / mat4 types, depending on what do they define sufficient components for.
+
+:warning: Boolean values will be converted to floating point 1.0 (for `true`) or 0.0 (for `false`).
+
+:warning: Integer values will be converted to floating point.
+
+:warning: Arrays of numerical values will be treated as one of the vec2 / vec3 / vec4 / mat3 / mat4 types, depending on what do they define sufficient components for.
 ```js
-  "shader": [ {
+  "shaders": [ {
     "vertex": "dli_pbr.vsh",
     "fragment": "dli_pbr.fsh",
     "defines": [ "HIGHP", SKINNING" ],
@@ -329,12 +339,14 @@ JSON object that defines a keyframe animation in a binary buffer, with the follo
    * `byteOffset`: offset to the start of the buffer
 
 The size of the buffer depends on the property being animated, where  the property value for each frame follows a 4 byte floating point value determining progress (between 0 and 1).
+
 :warning: Only `position` (3D vector of floats, 12 bytes), `rotation` (Quaternion, 12 bytes), and `scale` (3D vector, 12 bytes) properties are supported.
 
 ### `keyFrames`
 JSON array of keyframe objects defined with the following properties:
    * `progress`: a scalar between `0` and `1` to apply to the duration to get the time stamp of the frame;
    * `value`: array of 3 or 4 numerical values depending on which property is being animated;
+
 :warning: Only `position`, `rotation`, and `scale` properties are supported.
 
 ### `value`
index e03515b..8be5a94 100644 (file)
@@ -39,21 +39,21 @@ enum
 {
   /**
    * @brief The thickness of the arc.
-   * @details Name "thickness", type Property::FLOAT.
+   * @details Name "thickness", type Property::FLOAT, animatable.
    * @note Mandatory.
    */
   THICKNESS = VISUAL_PROPERTY_START_INDEX,
 
   /**
    * @brief The start angle where the arc begins in degrees.
-   * @details Name "startAngle", type Property::FLOAT.
+   * @details Name "startAngle", type Property::FLOAT, animatable.
    * @note Optional. If not specified, the default is 0.
    */
   START_ANGLE,
 
   /**
    * @brief The sweep angle of the arc in degrees.
-   * @details Name "sweepAngle", type Property::FLOAT.
+   * @details Name "sweepAngle", type Property::FLOAT, animatable.
    * The arc starts at a specified start angle and sweeps clockwise, drawing slices of pie.
    * @note Optional. If not specified, the default is 360.
    */
index a10a3f8..413b556 100644 (file)
@@ -104,14 +104,14 @@ enum Type
   PLAY_STATE = ORIENTATION_CORRECTION + 5,
 
   /**
-   * @brief The current frame number the AnimatedVectorImageVisual will use.
+   * @brief The current frame number the AnimatedImageVisual and AnimatedVectorImageVisual will use.
    * @details Name "currentFrameNumber", Type Property::INTEGER, between [0, the maximum frame number] or between the play range if specified
    * @note This property is read-only.
    */
   CURRENT_FRAME_NUMBER = ORIENTATION_CORRECTION + 6,
 
   /**
-   * @brief The total frame number the AnimatedVectorImageVisual will use.
+   * @brief The total frame number the AnimatedImageVisual and AnimatedVectorImageVisual will use.
    * @details Name "totalFrameNumber", Type Property::INTEGER.
    * @note This property is read-only.
    */
index 23799c3..7e64b6e 100644 (file)
@@ -1514,6 +1514,9 @@ void TextEditor::OnKeyInputFocusGained()
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext  && IsEditable() )
   {
+    // All input panel properties, such as layout, return key type, and input hint, should be set before input panel activates (or shows).
+    mInputMethodContext.NotifyTextInputMultiLine( true );
+
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextEditor::KeyboardStatusChanged );
 
     mInputMethodContext.EventReceivedSignal().Connect( this, &TextEditor::OnInputMethodContextEvent );
index fc09fd8..e87ba2f 100644 (file)
@@ -1519,7 +1519,9 @@ void TextField::OnKeyInputFocusGained()
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext && IsEditable() )
   {
+    // All input panel properties, such as layout, return key type, and input hint, should be set before input panel activates (or shows).
     mInputMethodContext.ApplyOptions( mInputMethodOptions );
+    mInputMethodContext.NotifyTextInputMultiLine( false );
 
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );
 
index c79e74a..1c9d939 100644 (file)
@@ -541,6 +541,26 @@ bool WebView::OnKeyEvent( const Dali::KeyEvent& event )
   return result;
 }
 
+void WebView::OnKeyInputFocusGained()
+{
+  if( mWebEngine )
+  {
+    mWebEngine.SetFocus( true );
+  }
+
+  EmitKeyInputFocusSignal( true ); // Calls back into the Control hence done last.
+}
+
+void WebView::OnKeyInputFocusLost()
+{
+  if( mWebEngine )
+  {
+    mWebEngine.SetFocus( false );
+  }
+
+  EmitKeyInputFocusSignal( false ); // Calls back into the Control hence done last.
+}
+
 Toolkit::WebView::CacheModel::Type WebView::GetCacheModel() const
 {
   return mWebEngine ? static_cast< Toolkit::WebView::CacheModel::Type >( mWebEngine.GetCacheModel() ) : Toolkit::WebView::CacheModel::DOCUMENT_VIEWER;
index c41be87..968b742 100644 (file)
@@ -213,6 +213,16 @@ private: // From Control
    */
   bool OnKeyEvent( const Dali::KeyEvent& event ) override;
 
+  /**
+   * @copydoc Toolkit::Control::OnKeyInputFocusGained()
+   */
+  void OnKeyInputFocusGained() override;
+
+  /**
+   * @copydoc Toolkit::Control::OnKeyInputFocusLost()
+   */
+  void OnKeyInputFocusLost() override;
+
 private:
 
   // Undefined
index 5a83d92..09cad55 100755 (executable)
@@ -249,6 +249,8 @@ void AnimatedImageVisual::DoCreatePropertyMap( Property::Map& map ) const
   map.Insert( Toolkit::ImageVisual::Property::CACHE_SIZE, static_cast<int>(mCacheSize) );
   map.Insert( Toolkit::ImageVisual::Property::FRAME_DELAY, static_cast<int>(mFrameDelay) );
   map.Insert( Toolkit::DevelImageVisual::Property::LOOP_COUNT, static_cast<int>(mLoopCount) );
+  map.Insert( Toolkit::DevelImageVisual::Property::CURRENT_FRAME_NUMBER, (mImageCache) ? static_cast<int32_t>(mImageCache->GetCurrentFrameIndex()) : -1 );
+  map.Insert( Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, (mImageCache) ? static_cast<int32_t>(mImageCache->GetTotalFrameCount()) : -1 );
 
   map.Insert( Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, mStopBehavior );
 }
index a90b31e..1eea6e6 100644 (file)
@@ -110,6 +110,11 @@ int32_t FixedImageCache::GetCurrentFrameIndex() const
   return static_cast<int32_t>(mFront);
 }
 
+int32_t FixedImageCache::GetTotalFrameCount() const
+{
+  return mImageUrls.size();
+}
+
 bool FixedImageCache::IsFrontReady() const
 {
   return ( mReadyFlags.size() > 0 && mReadyFlags[mFront] == true );
index bd232b4..3eaac8a 100644 (file)
@@ -77,6 +77,11 @@ public:
    */
   int32_t GetCurrentFrameIndex() const override;
 
+  /**
+   * Get total frame count of the animated image file.
+   */
+  int32_t GetTotalFrameCount() const override;
+
 private:
   /**
    * @return true if the front frame is ready
index b16b94e..adb6e58 100644 (file)
@@ -101,6 +101,11 @@ public:
    */
   virtual int32_t GetCurrentFrameIndex() const = 0;
 
+  /**
+   * Get total frame count of the animated image file.
+   */
+  virtual int32_t GetTotalFrameCount() const = 0;
+
 private:
 
   /**
index 2733d7a..565252f 100644 (file)
@@ -192,6 +192,11 @@ int32_t RollingAnimatedImageCache::GetCurrentFrameIndex() const
   return mQueue.Front().mFrameNumber;
 }
 
+int32_t RollingAnimatedImageCache::GetTotalFrameCount() const
+{
+  return mFrameCount;
+}
+
 bool RollingAnimatedImageCache::IsFrontReady() const
 {
   return ( !mQueue.IsEmpty() && mQueue.Front().mReady );
index db35741..595adc0 100644 (file)
@@ -95,6 +95,11 @@ public:
    */
   int32_t GetCurrentFrameIndex() const override;
 
+  /**
+   * Get total frame count of the animated image file.
+   */
+  int32_t GetTotalFrameCount() const override;
+
 private:
   /**
    * @return true if the front frame is ready
index e838060..dee6149 100644 (file)
@@ -165,6 +165,11 @@ int32_t RollingImageCache::GetCurrentFrameIndex() const
   return mQueue.Front().mUrlIndex;
 }
 
+int32_t RollingImageCache::GetTotalFrameCount() const
+{
+  return mImageUrls.size();
+}
+
 bool RollingImageCache::IsFrontReady() const
 {
   return ( !mQueue.IsEmpty() && mQueue.Front().mReady );
index c20586f..f33a7b3 100644 (file)
@@ -88,6 +88,11 @@ public:
    */
   int32_t GetCurrentFrameIndex() const override;
 
+  /**
+   * Get total frame count of the animated image file.
+   */
+  int32_t GetTotalFrameCount() const override;
+
 private:
   /**
    * @return true if the front frame is ready
index 71e2383..d694235 100644 (file)
@@ -244,13 +244,46 @@ void ArcVisual::DoSetOnScene( Actor& actor )
   ResourceReady( Toolkit::Visual::ResourceStatus::READY );
 }
 
+void ArcVisual::DoSetOffScene(Actor& actor)
+{
+  if(mImpl->mRenderer)
+  {
+    // Update values from Renderer
+    mThickness  = mImpl->mRenderer.GetProperty<float>(mThicknessIndex);
+    mStartAngle = mImpl->mRenderer.GetProperty<float>(mStartAngleIndex);
+    mSweepAngle = mImpl->mRenderer.GetProperty<float>(mSweepAngleIndex);
+  }
+
+  actor.RemoveRenderer(mImpl->mRenderer);
+  mImpl->mRenderer.Reset();
+
+  mThicknessIndex  = Property::INVALID_INDEX;
+  mStartAngleIndex = Property::INVALID_INDEX;
+  mSweepAngleIndex = Property::INVALID_INDEX;
+}
+
 void ArcVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
+  float thickness, startAngle, sweepAngle;
+  if(mImpl->mRenderer)
+  {
+    // Update values from Renderer
+    thickness  = mImpl->mRenderer.GetProperty<float>(mThicknessIndex);
+    startAngle = mImpl->mRenderer.GetProperty<float>(mStartAngleIndex);
+    sweepAngle = mImpl->mRenderer.GetProperty<float>(mSweepAngleIndex);
+  }
+  else
+  {
+    thickness  = mThickness;
+    startAngle = mStartAngle;
+    sweepAngle = mSweepAngle;
+  }
+
   map.Clear();
   map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::ARC );
-  map.Insert( Toolkit::DevelArcVisual::Property::THICKNESS, mThickness );
-  map.Insert( Toolkit::DevelArcVisual::Property::START_ANGLE, mStartAngle );
-  map.Insert( Toolkit::DevelArcVisual::Property::SWEEP_ANGLE, mSweepAngle );
+  map.Insert(Toolkit::DevelArcVisual::Property::THICKNESS, thickness);
+  map.Insert(Toolkit::DevelArcVisual::Property::START_ANGLE, startAngle);
+  map.Insert(Toolkit::DevelArcVisual::Property::SWEEP_ANGLE, sweepAngle);
   map.Insert( Toolkit::DevelArcVisual::Property::CAP, mCapType );
 }
 
@@ -313,9 +346,9 @@ void ArcVisual::InitializeRenderer()
 
   mImpl->mRenderer = Renderer::New( geometry, shader );
 
-  mThicknessIndex = mImpl->mRenderer.RegisterProperty( THICKNESS_NAME, mThickness );
-  mStartAngleIndex = mImpl->mRenderer.RegisterProperty( START_ANGLE_NAME, mStartAngle );
-  mSweepAngleIndex = mImpl->mRenderer.RegisterProperty( SWEEP_ANGLE_NAME, mSweepAngle );
+  mThicknessIndex  = mImpl->mRenderer.RegisterProperty(DevelArcVisual::Property::THICKNESS, THICKNESS_NAME, mThickness);
+  mStartAngleIndex = mImpl->mRenderer.RegisterProperty(DevelArcVisual::Property::START_ANGLE, START_ANGLE_NAME, mStartAngle);
+  mSweepAngleIndex = mImpl->mRenderer.RegisterProperty(DevelArcVisual::Property::SWEEP_ANGLE, SWEEP_ANGLE_NAME, mSweepAngle);
 
   mRadiusIndex = mImpl->mRenderer.RegisterProperty( RADIUS_NAME, mRadius );
 
index 90ac861..15f57d3 100644 (file)
@@ -99,6 +99,11 @@ protected:
   void DoSetOnScene( Actor& actor ) override;
 
   /**
+   * @copydoc Visual::Base::DoSetOffScene
+   */
+  void DoSetOffScene(Actor& actor) override;
+
+  /**
    * @copydoc Visual::Base::OnSetTransform
    */
   void OnSetTransform() override;
index db18140..1d1ba00 100644 (file)
@@ -29,7 +29,7 @@ namespace Toolkit
 {
 const unsigned int TOOLKIT_MAJOR_VERSION = 2;
 const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 7;
+const unsigned int TOOLKIT_MICRO_VERSION = 8;
 const char* const  TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 4b468e5..a8be8a2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    2.0.7
+Version:    2.0.8
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT