Add pepper-dali
[platform/core/uifw/pepper-dali.git] / pepper-dali / public-api / compositor / compositor.cpp
1 /*
2  * Copyright (c) 2016 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 <pepper-dali/public-api/compositor/compositor.h>
20
21 // INTERNAL INCLUDES
22 #include <pepper-dali/internal/compositor-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Pepper
28 {
29
30 Compositor Compositor::New( Application application, const std::string& name )
31 {
32   Internal::CompositorPtr internal = Internal::Compositor::New( application, name );
33
34   return Compositor( internal.Get() );
35 }
36
37 Compositor Compositor::DownCast( BaseHandle handle )
38 {
39   return Compositor( dynamic_cast< Internal::Compositor* >( handle.GetObjectPtr() ) );
40 }
41
42 Compositor::Compositor()
43 {
44 }
45
46 Compositor::Compositor( const Compositor& handle )
47 : BaseHandle(handle)
48 {
49 }
50
51 Compositor& Compositor::operator=( const Compositor& handle )
52 {
53   BaseHandle::operator=(handle);
54   return *this;
55 }
56
57 Compositor::~Compositor()
58 {
59 }
60
61 Compositor::Compositor( Internal::Compositor* implementation )
62 : BaseHandle( implementation )
63 {
64 }
65
66 Compositor::CompositorSignalType& Compositor::ObjectViewAddedSignal()
67 {
68   return GetImplementation(*this).ObjectViewAddedSignal();
69 }
70
71 Compositor::CompositorSignalType& Compositor::ObjectViewDeletedSignal()
72 {
73   return GetImplementation(*this).ObjectViewDeletedSignal();
74 }
75
76 } // namespace Toolkit
77
78 } // namespace Dali