Separating integration-devel from devel package for 2nd party to use adaptor #2 ...
[platform/core/uifw/dali-adaptor.git] / adaptors / base / display-connection.cpp
1 /*
2  * Copyright (c) 2015 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 <base/display-connection.h>
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <display-connection-impl.h>
25 #include <egl-interface.h>
26
27 namespace Dali
28 {
29
30 DisplayConnection* DisplayConnection::New()
31 {
32   Internal::Adaptor::DisplayConnection* internal(Internal::Adaptor::DisplayConnection::New());
33
34   return new DisplayConnection(internal);
35 }
36
37 DisplayConnection::DisplayConnection()
38 {
39 }
40
41 DisplayConnection::DisplayConnection(Internal::Adaptor::DisplayConnection* impl)
42 : mImpl(impl)
43 {
44 }
45
46 DisplayConnection::~DisplayConnection()
47 {
48   if (mImpl)
49   {
50     delete mImpl;
51     mImpl = NULL;
52   }
53 }
54
55 Any DisplayConnection::GetDisplay()
56 {
57   return mImpl->GetDisplay();
58 }
59
60 void DisplayConnection::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
61 {
62   Internal::Adaptor::DisplayConnection::GetDpi(dpiHorizontal, dpiVertical);
63 }
64
65 void DisplayConnection::ConsumeEvents()
66 {
67   mImpl->ConsumeEvents();
68 }
69
70 bool DisplayConnection::InitializeEgl(EglInterface& egl)
71 {
72   return mImpl->InitializeEgl(egl);
73 }
74
75 }