2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/public-api/transition/transition-base.h>
22 #include <dali-toolkit/internal/transition/transition-base-impl.h>
28 TransitionBase::TransitionBase() = default;
30 TransitionBase::TransitionBase(Internal::TransitionBase* transitionBase)
31 : BaseHandle(transitionBase)
35 TransitionBase TransitionBase::New()
37 Internal::TransitionBasePtr internal = Dali::Toolkit::Internal::TransitionBase::New();
39 return TransitionBase(internal.Get());
42 TransitionBase TransitionBase::DownCast(BaseHandle handle)
44 return TransitionBase(dynamic_cast<Dali::Toolkit::Internal::TransitionBase*>(handle.GetObjectPtr()));
47 TransitionBase::~TransitionBase() = default;
49 TransitionBase::TransitionBase(const TransitionBase& handle) = default;
51 TransitionBase& TransitionBase::operator=(const TransitionBase& rhs) = default;
53 TransitionBase::TransitionBase(TransitionBase&& rhs) = default;
55 TransitionBase& TransitionBase::operator=(TransitionBase&& rhs) = default;
57 void TransitionBase::SetDuration(float seconds)
59 GetImplementation(*this).SetDuration(seconds);
62 float TransitionBase::GetDuration() const
64 return GetImplementation(*this).GetDuration();
67 void TransitionBase::SetDelay(float seconds)
69 GetImplementation(*this).SetDelay(seconds);
72 float TransitionBase::GetDelay() const
74 return GetImplementation(*this).GetDelay();
77 void TransitionBase::SetTimePeriod(TimePeriod timePeriod)
79 GetImplementation(*this).SetTimePeriod(timePeriod);
82 void TransitionBase::SetAlphaFunction(AlphaFunction alphaFunction)
84 GetImplementation(*this).SetAlphaFunction(alphaFunction);
87 AlphaFunction TransitionBase::GetAlphaFunction() const
89 return GetImplementation(*this).GetAlphaFunction();
92 void TransitionBase::TransitionWithChild(bool transitionWithChild)
94 return GetImplementation(*this).TransitionWithChild(transitionWithChild);
97 } // namespace Toolkit