Merge "Changes needed for https://review.tizen.org/gerrit/#/c/191202/" into devel...
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / tizen-wayland / tizen-wearable / capture.cpp
1 /*
2  * Copyright (c) 2018 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/public-api/capture/capture.h>
20
21 // INTERNAL HEADER
22 #include <dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h>
23
24 namespace Dali
25 {
26
27 Capture::Capture()
28 {
29 }
30
31 Capture Capture::New()
32 {
33   Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New();
34
35   return Capture( internal.Get() );
36 }
37
38 Capture Capture::New( Dali::CameraActor cameraActor )
39 {
40   Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New( cameraActor );
41
42   return Capture( internal.Get() );
43 }
44
45 Capture Capture::DownCast( BaseHandle handle )
46 {
47   return Capture( dynamic_cast< Internal::Adaptor::Capture* >( handle.GetObjectPtr() ) );
48 }
49
50 Capture::~Capture()
51 {
52 }
53
54 Capture::Capture( const Capture& copy )
55 : BaseHandle(copy)
56 {
57 }
58
59 Capture& Capture::operator=( const Capture& rhs )
60 {
61   BaseHandle::operator=( rhs );
62   return *this;
63 }
64
65 void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
66 {
67   GetImpl( *this ).Start( source, size, path, clearColor );
68 }
69
70 void Capture::Start( Actor source, const Vector2& size, const std::string &path )
71 {
72   GetImpl( *this ).Start( source, size, path, Dali::Color::TRANSPARENT );
73 }
74
75 Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
76 {
77   return GetImpl( *this ).FinishedSignal();
78 }
79
80 Capture::Capture( Internal::Adaptor::Capture* internal )
81 : BaseHandle( internal )
82 {
83 }
84
85 } // namespace Dali