2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <base/display-connection.h>
24 #include <display-connection-impl.h>
25 #include <egl-interface.h>
30 DisplayConnection* DisplayConnection::New()
32 Internal::Adaptor::DisplayConnection* internal(Internal::Adaptor::DisplayConnection::New());
34 return new DisplayConnection(internal);
37 DisplayConnection* DisplayConnection::New( RenderSurface::Type type )
39 Internal::Adaptor::DisplayConnection* internal(Internal::Adaptor::DisplayConnection::New());
40 internal->SetSurfaceType( type );
42 return new DisplayConnection(internal);
45 DisplayConnection::DisplayConnection()
50 DisplayConnection::DisplayConnection(Internal::Adaptor::DisplayConnection* impl)
55 DisplayConnection::~DisplayConnection()
64 Any DisplayConnection::GetDisplay()
66 return mImpl->GetDisplay();
69 void DisplayConnection::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
71 Internal::Adaptor::DisplayConnection::GetDpi(dpiHorizontal, dpiVertical);
74 void DisplayConnection::ConsumeEvents()
76 mImpl->ConsumeEvents();
79 bool DisplayConnection::InitializeEgl(EglInterface& egl)
81 return mImpl->InitializeEgl(egl);