Merge "Cache font description when a font is created from the file path." into devel...
[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 : mImpl( NULL )
39 {
40 }
41
42 DisplayConnection::DisplayConnection(Internal::Adaptor::DisplayConnection* impl)
43 : mImpl(impl)
44 {
45 }
46
47 DisplayConnection::~DisplayConnection()
48 {
49   if (mImpl)
50   {
51     delete mImpl;
52     mImpl = NULL;
53   }
54 }
55
56 Any DisplayConnection::GetDisplay()
57 {
58   return mImpl->GetDisplay();
59 }
60
61 void DisplayConnection::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
62 {
63   Internal::Adaptor::DisplayConnection::GetDpi(dpiHorizontal, dpiVertical);
64 }
65
66 void DisplayConnection::ConsumeEvents()
67 {
68   mImpl->ConsumeEvents();
69 }
70
71 bool DisplayConnection::InitializeEgl(EglInterface& egl)
72 {
73   return mImpl->InitializeEgl(egl);
74 }
75
76 }