/packaging/home*
.vscode/
core
+.clangd/
+compile_commands.json
* [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
- 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.
return true;
}
+void WebEngine::SetFocus( bool focused )
+{
+}
+
Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
{
return Internal::Adaptor::GetImplementation( *this ).PageLoadStartedSignal();
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();
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" );
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;
}
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;
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
build
dali.info
+*.dylib
+dali2-*-config.cmake
+libdali2-scene-loader.so*
\ No newline at end of file
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
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 )
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 )
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
dali2-adaptor::dali2-adaptor )
ENDIF()
+IF ( WIN32 )
+ FIND_PACKAGE( pthreads REQUIRED )
+ENDIF()
ADD_LIBRARY( ${name} ${LIBTYPE} ${SOURCES} )
TARGET_LINK_LIBRARIES( ${name}
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()
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
-cmake_minimum_required(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2)
set(name "dali2-scene-loader")
project(${name} CXX)
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}
# `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).
# `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
## `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": [ {
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": [ {
## 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`
| |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`.
## 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" ],
* `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`
{
/**
* @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.
*/
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.
*/
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 );
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 );
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;
*/
bool OnKeyEvent( const Dali::KeyEvent& event ) override;
+ /**
+ * @copydoc Toolkit::Control::OnKeyInputFocusGained()
+ */
+ void OnKeyInputFocusGained() override;
+
+ /**
+ * @copydoc Toolkit::Control::OnKeyInputFocusLost()
+ */
+ void OnKeyInputFocusLost() override;
+
private:
// Undefined
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 );
}
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 );
*/
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
*/
virtual int32_t GetCurrentFrameIndex() const = 0;
+ /**
+ * Get total frame count of the animated image file.
+ */
+ virtual int32_t GetTotalFrameCount() const = 0;
+
private:
/**
return mQueue.Front().mFrameNumber;
}
+int32_t RollingAnimatedImageCache::GetTotalFrameCount() const
+{
+ return mFrameCount;
+}
+
bool RollingAnimatedImageCache::IsFrontReady() const
{
return ( !mQueue.IsEmpty() && mQueue.Front().mReady );
*/
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
return mQueue.Front().mUrlIndex;
}
+int32_t RollingImageCache::GetTotalFrameCount() const
+{
+ return mImageUrls.size();
+}
+
bool RollingImageCache::IsFrontReady() const
{
return ( !mQueue.IsEmpty() && mQueue.Front().mReady );
*/
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
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 );
}
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 );
void DoSetOnScene( Actor& actor ) override;
/**
+ * @copydoc Visual::Base::DoSetOffScene
+ */
+ void DoSetOffScene(Actor& actor) override;
+
+ /**
* @copydoc Visual::Base::OnSetTransform
*/
void OnSetTransform() override;
{
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
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