15ceadbc0bb06d6b4a480628ba03ab4bacd0bb32
[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 const std::string& Compositor::GetName() const
38 {
39   return GetImplementation( *this ).GetName();
40 }
41
42 Compositor Compositor::DownCast( BaseHandle handle )
43 {
44   return Compositor( dynamic_cast< Internal::Compositor* >( handle.GetObjectPtr() ) );
45 }
46
47 Compositor::Compositor()
48 {
49 }
50
51 Compositor::Compositor( const Compositor& handle )
52 : BaseHandle(handle)
53 {
54 }
55
56 Compositor& Compositor::operator=( const Compositor& handle )
57 {
58   BaseHandle::operator=(handle);
59   return *this;
60 }
61
62 Compositor::~Compositor()
63 {
64 }
65
66 Compositor::Compositor( Internal::Compositor* implementation )
67 : BaseHandle( implementation )
68 {
69 }
70
71 Compositor::CompositorSignalType& Compositor::ObjectViewAddedSignal()
72 {
73   return GetImplementation(*this).ObjectViewAddedSignal();
74 }
75
76 Compositor::CompositorSignalType& Compositor::ObjectViewDeletedSignal()
77 {
78   return GetImplementation(*this).ObjectViewDeletedSignal();
79 }
80
81 } // namespace Toolkit
82
83 } // namespace Dali