RenderSurface interface change in automated test utils
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-animation-data.h
1 #ifndef DALI_TOOLKIT_TEST_TEST_ANIMATION_DATA_H
2 #define DALI_TOOLKIT_TEST_TEST_ANIMATION_DATA_H
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #include <dali/dali.h>
21 #include <string>
22
23 namespace Test
24 {
25
26 class TestAnimationData
27 {
28 public:
29   TestAnimationData();
30   ~TestAnimationData();
31
32   /**
33    * @brief AnimationDataElement Describes one part of an animation.
34    */
35   struct AnimationDataElement
36   {
37     std::string target;
38     std::string property;
39     Dali::Property::Value value;
40     Dali::AlphaFunction::BuiltinFunction alphaFunction;
41     float timePeriodDelay;
42     float timePeriodDuration;
43
44     AnimationDataElement();
45   };
46
47   /**
48    * @brief AnimationData holds the required data required to define an
49    * animation to be performed on a property source.
50    */
51   typedef Dali::Vector< AnimationDataElement* > AnimationDataList;
52
53   /**
54    * @brief Adds one AnimationDataElement to the list to describe one animation.
55    * @param[in] animationDataElement A pre-populated struct to add
56    */
57   void Add( AnimationDataElement* animationDataElement );
58
59   std::size_t Size() const;
60
61   void Clear();
62
63   AnimationDataList mAnimationDataList;
64 };
65
66 void NewAnimator( const Dali::Property::Map& map, TestAnimationData::AnimationDataElement& element );
67 void NewAnimation( const Dali::Property::Map& map, TestAnimationData& outputAnimationData );
68 void NewAnimation( const Dali::Property::Array& array, TestAnimationData& outputAnimationData );
69 } // Test
70
71 #endif  //DALI_TOOLKIT_TEST_TEST_ANIMATION_DATA_H