Merge "Add TOUCH_FOCUSABLE property" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / transition / transition-base.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/public-api/transition/transition-base.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/transition/transition-base-impl.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 TransitionBase::TransitionBase() = default;
29
30 TransitionBase::TransitionBase(Internal::TransitionBase* transitionBase)
31 : BaseHandle(transitionBase)
32 {
33 }
34
35 TransitionBase TransitionBase::New()
36 {
37   Internal::TransitionBasePtr internal = Dali::Toolkit::Internal::TransitionBase::New();
38
39   return TransitionBase(internal.Get());
40 }
41
42 TransitionBase TransitionBase::DownCast(BaseHandle handle)
43 {
44   return TransitionBase(dynamic_cast<Dali::Toolkit::Internal::TransitionBase*>(handle.GetObjectPtr()));
45 }
46
47 TransitionBase::~TransitionBase() = default;
48
49 TransitionBase::TransitionBase(const TransitionBase& handle) = default;
50
51 TransitionBase& TransitionBase::operator=(const TransitionBase& rhs) = default;
52
53 TransitionBase::TransitionBase(TransitionBase&& rhs) = default;
54
55 TransitionBase& TransitionBase::operator=(TransitionBase&& rhs) = default;
56
57 void TransitionBase::SetTimePeriod(TimePeriod timePeriod)
58 {
59   GetImplementation(*this).SetTimePeriod(timePeriod);
60 }
61
62 TimePeriod TransitionBase::GetTimePeriod() const
63 {
64   return GetImplementation(*this).GetTimePeriod();
65 }
66
67 void TransitionBase::SetAlphaFunction(AlphaFunction alphaFunction)
68 {
69   GetImplementation(*this).SetAlphaFunction(alphaFunction);
70 }
71
72 AlphaFunction TransitionBase::GetAlphaFunction() const
73 {
74   return GetImplementation(*this).GetAlphaFunction();
75 }
76
77 void TransitionBase::TransitionWithChild(bool transitionWithChild)
78 {
79   return GetImplementation(*this).TransitionWithChild(transitionWithChild);
80 }
81
82 } // namespace Toolkit
83
84 } // namespace Dali