Set KeyFrame's frame value
[platform/core/uifw/dali-core.git] / dali / devel-api / animation / key-frames-devel.h
1 #ifndef DALI_KEY_FRAMES_DEVEL_H
2 #define DALI_KEY_FRAMES_DEVEL_H
3
4 /*
5  * Copyright (c) 2023 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
21 // INTERNAL INCLUDES
22 #include <dali/public-api/animation/key-frames.h>
23
24 namespace Dali
25 {
26 namespace DevelKeyFrames
27 {
28 using ValueConvertor = Property::Value (*)(const Property::Value& input);
29
30 /**
31  * @brief Get the number of key frames.
32  * @param[in] keyFrames The KeyFrames object to perform this operation on
33  * @return Total number of key frames
34  */
35 DALI_CORE_API std::size_t GetKeyFrameCount(KeyFrames keyFrames);
36
37 /**
38  * Get a key frame.
39  * @param[in] keyFrames The KeyFrames object to perform this operation on
40  * @param[in] index The index of the key frame to fetch
41  * @param[out] time The progress of the given key frame
42  * @param[out] value The value of the given key frame
43  */
44 DALI_CORE_API void GetKeyFrame(KeyFrames keyFrames, std::size_t index, float& time, Property::Value& value);
45
46 /**
47  * Set a key frame.
48  * @param[in] keyFrames The KeyFrames object to perform this operation on
49  * @param[in] index The index of the key frame to set
50  * @param[in] value The value of the given key frame
51  */
52 DALI_CORE_API void SetKeyFrameValue(KeyFrames keyFrames, std::size_t index, const Property::Value& value);
53
54 } // namespace DevelKeyFrames
55
56 } // namespace Dali
57
58 #endif // DALI_KEY_FRAMES_DEVEL_H