1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/any.h>
25 #include <dali/integration-api/render-surface.h>
38 class DisplayConnection;
42 class DisplayConnection
47 * @brief Create an initialized DisplayConnection.
49 * @return A handle to a newly allocated DisplayConnection resource.
51 static DisplayConnection* New();
54 * @brief Create an initialized DisplayConnection.
55 * Native surface will need this instead of DisplayConnection::New()
57 * @param[in] type Render surface type
58 * @return A handle to a newly allocated DisplayConnection resource.
60 static DisplayConnection* New( RenderSurface::Type type );
63 * @brief Create a DisplayConnection handle; this can be initialised with DisplayConnection::New().
65 * Calling member functions with an uninitialised handle is not allowed.
72 * This is non-virtual since derived Handle types must not contain data or virtual methods.
85 * @param[out] dpiHorizontal set to the horizontal dpi
86 * @param[out] dpiVertical set to the vertical dpi
88 static void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical);
91 * @brief Consumes any possible events on the queue so that there is no leaking between frames
96 * @brief Initialize EGL display
98 * @param egl implementation to use for the creation
100 bool InitializeEgl(EglInterface& egl);
105 * @brief This constructor is used by DisplayConnection New() methods.
107 * @param [in] handle A pointer to a newly allocated DisplayConnection resource
109 explicit DALI_INTERNAL DisplayConnection(Internal::Adaptor::DisplayConnection* impl);
113 std::unique_ptr<Internal::Adaptor::DisplayConnection> mImpl;
118 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H