[Tizen] ecore-wl2: applying ecore-wl2
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / display-connection-impl.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_IMPL_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_IMPL_H
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/window-system/common/display-connection.h>
23 #include <dali/public-api/object/base-object.h>
24 #include <dali/internal/graphics/gles20/egl-implementation.h>
25
26 #include <memory>
27
28 namespace Dali
29 {
30
31 class RenderSurface;
32 class DisplayConnection;
33
34 namespace Internal
35 {
36 namespace Adaptor
37 {
38 class Impl;
39 /**
40  * DisplayConnection implementation
41  */
42 class DisplayConnection : public Dali::BaseObject
43 {
44 public:
45
46   /**
47    * @brief Default constructor
48    */
49   DisplayConnection() = default;
50
51   /**
52    * @brief Create an initialized DisplayConnection.
53    *
54    * @return A handle to a newly allocated DisplayConnection resource.
55    */
56   static DisplayConnection* New();
57
58 public:
59
60   /**
61    * @copydoc Dali::DisplayConnection::GetDisplay
62    */
63   virtual Any GetDisplay() = 0;
64
65   /**
66    * @copydoc Dali::DisplayConnection::GetDpi
67    */
68   static void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical);
69
70   /**
71    * @copydoc Dali::DisplayConnection::GetDpi with native window
72    */
73   static void GetDpi(Any nativeWindow, unsigned int& dpiHorizontal, unsigned int& dpiVertical);
74
75   /**
76    * @copydoc Dali::DisplayConnection::ConsumeEvents
77    */
78   virtual void ConsumeEvents() = 0;
79
80   /**
81    * @copydoc Dali::DisplayConnection::InitializeEgl
82    */
83   virtual bool InitializeEgl(EglInterface& egl) = 0;
84
85   virtual void SetSurfaceType( RenderSurface::Type type ) = 0;
86
87 public:
88
89   /**
90    * Destructor
91    */
92   ~DisplayConnection() override = default;
93
94 protected:
95
96   // Undefined
97   DisplayConnection(const DisplayConnection&) = delete;
98
99   // Undefined
100   DisplayConnection& operator=(const DisplayConnection& rhs) = delete;
101
102 };
103
104 } // namespace Adaptor
105
106 } // namespace internal
107
108 } // namespace Dali
109
110 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_IMPL_H