33ea624fe5b9685585db08bd17b9f9c154c6f11e
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / vector-animation-renderer.cpp
1 /*
2  * Copyright (c) 2022 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/devel-api/adaptor-framework/vector-animation-renderer.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/vector-animation/common/vector-animation-renderer-impl.h>
23
24 namespace Dali
25 {
26 VectorAnimationRenderer VectorAnimationRenderer::New()
27 {
28   Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
29   return VectorAnimationRenderer(animationRenderer.Get());
30 }
31
32 VectorAnimationRenderer::VectorAnimationRenderer()
33 {
34 }
35
36 VectorAnimationRenderer::~VectorAnimationRenderer()
37 {
38 }
39
40 VectorAnimationRenderer::VectorAnimationRenderer(Internal::Adaptor::VectorAnimationRenderer* internal)
41 : BaseHandle(internal)
42 {
43 }
44
45 VectorAnimationRenderer::VectorAnimationRenderer(const VectorAnimationRenderer& handle)
46 : BaseHandle(handle)
47 {
48 }
49
50 VectorAnimationRenderer& VectorAnimationRenderer::operator=(const VectorAnimationRenderer& rhs)
51 {
52   BaseHandle::operator=(rhs);
53   return *this;
54 }
55
56 void VectorAnimationRenderer::Finalize()
57 {
58   GetImplementation(*this).Finalize();
59 }
60
61 bool VectorAnimationRenderer::Load(const std::string& url)
62 {
63   return GetImplementation(*this).Load(url);
64 }
65
66 void VectorAnimationRenderer::SetRenderer(Renderer renderer)
67 {
68   GetImplementation(*this).SetRenderer(renderer);
69 }
70
71 void VectorAnimationRenderer::SetSize(uint32_t width, uint32_t height)
72 {
73   GetImplementation(*this).SetSize(width, height);
74 }
75
76 bool VectorAnimationRenderer::Render(uint32_t frameNumber)
77 {
78   return GetImplementation(*this).Render(frameNumber);
79 }
80
81 void VectorAnimationRenderer::RenderStopped()
82 {
83   GetImplementation(*this).RenderStopped();
84 }
85
86 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
87 {
88   return GetImplementation(*this).GetTotalFrameNumber();
89 }
90
91 float VectorAnimationRenderer::GetFrameRate() const
92 {
93   return GetImplementation(*this).GetFrameRate();
94 }
95
96 void VectorAnimationRenderer::GetDefaultSize(uint32_t& width, uint32_t& height) const
97 {
98   GetImplementation(*this).GetDefaultSize(width, height);
99 }
100
101 void VectorAnimationRenderer::GetLayerInfo(Property::Map& map) const
102 {
103   GetImplementation(*this).GetLayerInfo(map);
104 }
105
106 bool VectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const
107 {
108   return GetImplementation(*this).GetMarkerInfo(marker, startFrame, endFrame);
109 }
110
111 void VectorAnimationRenderer::InvalidateBuffer()
112 {
113   GetImplementation(*this).InvalidateBuffer();
114 }
115
116 void VectorAnimationRenderer::AddPropertyValueCallback(const std::string& keyPath, VectorProperty property, CallbackBase* callback, int32_t id)
117 {
118   GetImplementation(*this).AddPropertyValueCallback(keyPath, property, callback, id);
119 }
120
121 VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
122 {
123   return GetImplementation(*this).UploadCompletedSignal();
124 }
125
126 } // namespace Dali