X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fvisuals%2Fimage-visual-properties-devel.h;h=d48eea896bb1e9c231dca99384f5adbe828d82f8;hp=e87af5d76a056cbd80f9bd04338c269c7d3125fc;hb=46a27bd33d7dc6ef7844b63399dbdfcb2ebb55d7;hpb=149fa4a2bd6765eef1601be6957c6f608876be38 diff --git a/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h b/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h index e87af5d..d48eea8 100644 --- a/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h +++ b/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -30,42 +30,6 @@ namespace Toolkit namespace DevelImageVisual { -/** - * @brief The policy determining if the image is loaded when the visual is staged or created. - */ -namespace LoadPolicy -{ - -/** - * @brief The available named elements that define the LoadPolicy. - */ -enum Type -{ - IMMEDIATE = 0, ///< The image is loaded when the ImageVisual is created. - ATTACHED ///< The image is loaded when the ImageVisual is attached to the stage. -}; - -} // namespace LoadPolicy - -/** - * @brief The policy determining when a image is deleted from the cache in relation to the ImageVisual lifetime. - * @note If the texture is being shared by another visual it persist if still required. - */ -namespace ReleasePolicy -{ - -/** - * @brief The available named elements that define the ReleasePolicy. - */ -enum Type -{ - DETACHED = 0, ///< Image deleted from cache when ImageVisual detached from stage. - DESTROYED, ///< Image deleted from cache when ImageVisual destroyed. - NEVER ///< Image is never deleted, will survive the lifetime of the application. -}; - -} // namespace ReleasePolicy; - namespace Property { @@ -89,29 +53,9 @@ enum Type FRAME_DELAY = Dali::Toolkit::ImageVisual::Property::FRAME_DELAY, MASK_CONTENT_SCALE = Dali::Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, CROP_TO_MASK = Dali::Toolkit::ImageVisual::Property::CROP_TO_MASK, - - /** - * @brief The policy to determine when an image should be loaded. - * @details Name "loadPolicy", Type LoadPolicy::Type (Property::INTEGER)or Property::STRING. - * @note Default LoadPolicy::ATTACHED - * @see LoadPolicy::Type - */ - LOAD_POLICY = CROP_TO_MASK + 1, - - /** - * @brief The policy to determine when an image should no longer be cached. - * @details Name "releasePolicy", Type ReleasePolicy::Type (Property::INTEGER) or Property::STRING - * @note Default ReleasePolicy::DESTROYED - * @see ReleasePolicy::Type - */ - RELEASE_POLICY = CROP_TO_MASK + 2, - - /** - * @brief Determines if image orientation should be corrected so the image displays as it was intended. - * @details Name "orientationCorrection", Type Property::BOOLEAN, if true the image's orientation will be corrected. - * @note Default true - */ - ORIENTATION_CORRECTION = CROP_TO_MASK + 3, + LOAD_POLICY = Dali::Toolkit::ImageVisual::Property::LOAD_POLICY, + RELEASE_POLICY = Dali::Toolkit::ImageVisual::Property::RELEASE_POLICY, + ORIENTATION_CORRECTION = Dali::Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION, /** * @brief Overlays the auxiliary iamge on top of an NPatch image. @@ -123,19 +67,60 @@ enum Type * @details Name "auxiliaryImage", Type Property::STRING, URL of the image. * @note Default true */ - AUXILIARY_IMAGE = CROP_TO_MASK + 4, + AUXILIARY_IMAGE = ORIENTATION_CORRECTION + 1, /** * @brief An alpha value for mixing between the masked main NPatch image and the auxiliary image * @details Name "auxiliaryImageAlpha", Type Property::FLOAT, between 0 and 1 * @note Default 0 */ - AUXILIARY_IMAGE_ALPHA = CROP_TO_MASK + 5, + AUXILIARY_IMAGE_ALPHA = ORIENTATION_CORRECTION + 2, + /** + * @brief The number of times the AnimatedImageVisual will be looped. + * @details Name "loopCount", type Property::INTEGER. + * @note For Animated images only. Default -1. if < 0, loop unlimited. else, loop loopCount times. + */ + LOOP_COUNT = ORIENTATION_CORRECTION + 3, + + /** + * @brief The playing range the AnimatedVectorImageVisual will use. + * + * Animation will play between the values specified. Both values should be between 0-1, + * otherwise they will be ignored. If the range provided is not in proper order ( minimum,maximum ), it will be reordered. + * + * @details Name "playRange", Type Property::VECTOR2, between 0 and 1 + * @note Default 0 and 1 + */ + PLAY_RANGE = ORIENTATION_CORRECTION + 4, + + /** + * @brief The playing state the AnimatedVectorImageVisual will use. + * @details Name "playState", type PlayState (Property::INTEGER) + * @note This property is read-only. + */ + PLAY_STATE = ORIENTATION_CORRECTION + 5, + + /** + * @brief The animation progress the AnimatedVectorImageVisual will use. + * @details Name "currentProgress", Type Property::FLOAT, between [0, 1] or between the play range if specified + * @note This property is read-only. + */ + CURRENT_PROGRESS = ORIENTATION_CORRECTION + 6 }; } //namespace Property +/** + * @brief Enumeration for what state the animation is in. + */ +enum class PlayState +{ + STOPPED, ///< Animation has stopped + PLAYING, ///< The animation is playing + PAUSED ///< The animation is paused +}; + } // namespace DevelImageVisual } // namespace Toolkit