From 0e831295929caa945d8451ff79ff0d0c36dc8a8e Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 20 Jul 2023 19:49:46 +0900 Subject: [PATCH] Make difference action id between Play and Reload Since ImageVisual's RELOAD and AnimatedImageVisual's PLAY has same action id, 1. We cannot reload AnimatedImage 2. If we call DoAction PLAY into ImageView, the behavior will be seperated by the 'type' of image. To avoid this case, let we make AnimateImageVisual inheriet ImageVisual's action id. More over, let we make AnimateImageVisual and AnimatedVectorImageVisual share the same action id s.t. have the same role. Change-Id: I20745c0cd908fa0cea909ba74cfb9ce68953ba8e Signed-off-by: Eunki, Hong --- .../visuals/animated-image-visual-actions-devel.h | 13 ++++++++----- .../animated-vector-image-visual-actions-devel.h | 17 +++++++++++------ .../devel-api/visuals/image-visual-actions-devel.h | 6 ++++-- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h b/dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h index 94ae63c..7436b85 100644 --- a/dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h +++ b/dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_DEVEL_API_VISUALS_ANIMATED_IMAGE_VISUAL_ACTIONS_DEVEL_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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,6 +18,7 @@ * */ #include +#include namespace Dali { @@ -35,10 +36,12 @@ namespace Action */ enum Type { - PLAY = VISUAL_ACTION_START_INDEX, ///< Play the animated GIF. This is also Default playback mode. - PAUSE, ///< Pause the animated GIF. - STOP, ///< Stop the animated GIF. - JUMP_TO ///< Jump to the specified frame. Property::INTEGER value should be passed. + PLAY = DevelImageVisual::Action::IMAGE_VISUAL_ACTION_END_INDEX, ///< Play the animated GIF. This is also Default playback mode. + PAUSE, ///< Pause the animated GIF. + STOP, ///< Stop the animated GIF. + JUMP_TO, ///< Jump to the specified frame. Property::INTEGER value should be passed. + + ANIMATED_IMAGE_VISUAL_ACTION_END_INDEX = DevelImageVisual::Action::IMAGE_VISUAL_ACTION_END_INDEX + 1000 ///< End of animated image visual action index. }; } // namespace Action 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 33c88e0..a175eb3 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) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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,8 @@ // EXTERNAL INCLUDES #include +#include +#include #include #include @@ -39,11 +41,14 @@ namespace Action */ enum Type { - 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. + // Shared actions with AnimatedImageVisual + PLAY = DevelAnimatedImageVisual::Action::PLAY, ///< Play the animated vector image. + PAUSE = DevelAnimatedImageVisual::Action::PAUSE, ///< Pause the animated vector image. + STOP = DevelAnimatedImageVisual::Action::STOP, ///< Stop the animated vector image. This is also Default playback mode. + JUMP_TO = DevelAnimatedImageVisual::Action::JUMP_TO, ///< Jump to the specified frame. Property::INTEGER value should be passed. + + // AnimatedVectorImageVisual only actions + SET_DYNAMIC_PROPERTY = DevelAnimatedImageVisual::Action::ANIMATED_IMAGE_VISUAL_ACTION_END_INDEX ///< Set the dynamic property. }; } // namespace Action diff --git a/dali-toolkit/devel-api/visuals/image-visual-actions-devel.h b/dali-toolkit/devel-api/visuals/image-visual-actions-devel.h index 66b4715..f49c2ff 100644 --- a/dali-toolkit/devel-api/visuals/image-visual-actions-devel.h +++ b/dali-toolkit/devel-api/visuals/image-visual-actions-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_ACTIONS_DEVEL_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -35,7 +35,9 @@ namespace Action */ enum Type { - RELOAD = VISUAL_ACTION_START_INDEX ///< Force reloading of the image, all visuals using this image will get the latest one. + RELOAD = VISUAL_ACTION_START_INDEX, ///< Force reloading of the image, all visuals using this image will get the latest one. + + IMAGE_VISUAL_ACTION_END_INDEX = VISUAL_ACTION_START_INDEX + 10000 ///< End of image visual action index. }; } // namespace Action -- 2.7.4