1 #ifndef __DALI_ANIMATION_WRAPPER_H__
2 #define __DALI_ANIMATION_WRAPPER_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/dali-core.h>
23 #include "emscripten/emscripten.h"
24 #include "emscripten/bind.h"
27 #include "handle-wrapper.h"
37 * Keyframe animation helper functions for Emscripten.
39 * Allows a string alphaFunction
41 * @param[in] keyFrames The dali keyframes
42 * @param[in] progress The keyframe progress
43 * @param[in] value The property value
44 * @param[in] alphaFunction The alpha function by name
47 void KeyFramesAddWithAlpha(Dali::KeyFrames& keyFrames, float progress, Property::Value& value,
48 const std::string& alphaFunction);
52 * Animation helper functions for Emscripten.
54 * Allows string property names without function overloading which is unavailable with Javascript
56 * @param[in] self The animation
57 * @param[in] handle The handle to animate
58 * @param[in] property The property name to animate
59 * @param[in] alphaFunction The alpha function
60 * @param[in] delay The animation delay
61 * @param[in] duration The animation duration
64 void AnimateTo(Dali::Animation& self,
66 const std::string& property,
67 const Dali::Property::Value& destinationValue,
68 const Dali::AlphaFunction::BuiltinFunction& alphaFunction,
70 const float duration);
75 * Allows string property names without function overloading which is unavailable with Javascript
77 * @param[in] self The animation
78 * @param[in] handle The handle to animate
79 * @param[in] property The property name to animate
80 * @param[in] alphaFunction The alpha function
81 * @param[in] delay The animation delay
82 * @param[in] duration The animation duration
84 void AnimateBy(Dali::Animation& self,
86 const std::string& property,
87 const Dali::Property::Value& destinationValue,
88 const Dali::AlphaFunction::BuiltinFunction& alphaFunction,
90 const float duration);
93 * AnimateBetween helper
95 * Allows string property names without function overloading which is unavailable with Javascript
97 * @param[in] self The animation
98 * @param[in] handle The handle to animate
99 * @param[in] property The property name to animate
100 * @param[in] alphaFunction The alpha function
101 * @param[in] delay The animation delay
102 * @param[in] duration The animation duration
104 void AnimateBetween(Dali::Animation& self,
105 Dali::Handle& handle,
106 const std::string& property,
107 Dali::KeyFrames& keyFrames,
108 const Dali::AlphaFunction::BuiltinFunction& alphaFunction,
110 const float duration,
111 const Dali::Animation::Interpolation& interpolation);
114 * AnimatePath helper (see AnimateTo docs above)
116 * Allows string property names without function overloading which is unavailable with Javascript
118 * @param[in] self The animation
119 * @param[in] target The handle to animate
120 * @param[in] path The dali Path
121 * @param[in] forward The path animation forward vector
122 * @param[in] delay The animation delay
123 * @param[in] duration The animation duration
125 void AnimatePath(Dali::Animation& self,
126 Dali::Handle& target,
127 const Dali::Path& path,
128 const Dali::Vector3& forward,
129 const Dali::AlphaFunction::BuiltinFunction& alphaFunction,
131 const float duration);
133 }; // namespace Emscripten
134 }; // namespace Internal