X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fvisuals%2Fanimated-vector-image-visual-actions-devel.h;h=33c88e0c13e5674fc3f0eeb05857499e20d63d17;hp=82d463c396cb95851328bac1ce833042c69c2688;hb=1f5f10ff81ed70d033cbc236216dda5ea5a1b8e4;hpb=b0d0b451bd3414c8f502810f45fcacba2882d717 diff --git a/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h b/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h index 82d463c..33c88e0 100644 --- a/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h +++ b/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_DEVEL_API_VISUALS_ANIMATED_VECTOR_IMAGE_VISUAL_ACTIONS_DEVEL_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,15 +18,17 @@ * */ +// EXTERNAL INCLUDES +#include +#include +#include + namespace Dali { - namespace Toolkit { - namespace DevelAnimatedVectorImageVisual { - /** * @brief Actions that the animated vector image visual can perform. These actions are called through the Visual::Base::DoAction API. */ @@ -37,15 +39,39 @@ namespace Action */ enum Type { - PLAY, ///< Play the animated vector image. - PAUSE, ///< Pause the animated vector image. - STOP, ///< Stop the animated vector image. This is also Default playback mode. - JUMP_TO, ///< Jump to the specified frame. Property::INTEGER value should be passed. - UPDATE_PROPERTY ///< Update the properties of the animated vector image. + PLAY = VISUAL_ACTION_START_INDEX, ///< Play the animated vector image. + PAUSE, ///< Pause the animated vector image. + STOP, ///< Stop the animated vector image. This is also Default playback mode. + JUMP_TO, ///< Jump to the specified frame. Property::INTEGER value should be passed. + SET_DYNAMIC_PROPERTY ///< Set the dynamic property. }; } // namespace Action +/** + * @brief The dynamic property info + * + * @note A callback of the following type may be used: + * @code + * Property::Value MyFunction(int32_t id, VectorAnimationRenderer::VectorProperty property, uint32_t frameNumber); + * @endcode + * + * id The id to specify the callback. + * property The property that represent what you are trying to change. + * frameNumber The current frame number. + * It returns a Property::Value to set according to the property type. + * + * The callback will be called on the worker thread. You MUST not call other DALi methods in the callback. + * And the object must still be alive when the callback occurs if you make the callback from a class member function. + */ +struct DynamicPropertyInfo +{ + int32_t id; ///< The Id to specify the callback. It should be unique and will be passed when the callback is called. + std::string keyPath; ///< The key path used to target a specific content or a set of contents that will be updated. + int32_t property; ///< The property to set. + CallbackBase* callback; ///< The callback that gets called every time the animation is rendered. Ownership of the callback is passed onto the visual. +}; + } // namespace DevelAnimatedVectorImageVisual } // namespace Toolkit