7c63d23aae9fab8e007022be12c3dc966631c37a
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / display-connection-impl-ecore-wl.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_ECOREWL_DISPLAY_CONNECTION_IMPL_ECORE_WL_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_ECOREWL_DISPLAY_CONNECTION_IMPL_ECORE_WL_H
3
4 /*
5  * Copyright (c) 2017 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-impl.h>
23
24 namespace Dali
25 {
26
27 class DisplayConnection;
28
29 namespace Internal
30 {
31
32 namespace Adaptor
33 {
34
35 /**
36  * DisplayConnection implementation
37  */
38 class DisplayConnectionEcoreWl : public Dali::Internal::Adaptor::DisplayConnection
39 {
40 public:
41
42   /**
43    * @brief Default constructor
44    */
45   DisplayConnectionEcoreWl();
46
47   /**
48    * @brief Create an initialized DisplayConnection.
49    *
50    * @return A handle to a newly allocated DisplayConnection resource.
51    */
52   static DisplayConnection* New();
53
54 public:
55
56   /**
57    * @copydoc Dali::DisplayConnection::GetDisplay
58    */
59   Any GetDisplay();
60
61   /**
62    * @copydoc Dali::DisplayConnection::ConsumeEvents
63    */
64   void ConsumeEvents();
65
66   /**
67    * @copydoc Dali::DisplayConnection::InitializeEgl
68    */
69   bool InitializeEgl(EglInterface& egl);
70
71   /**
72    * @brief Sets surface type
73    */
74   void SetSurfaceType( RenderSurface::Type type );
75
76 public:
77
78   /**
79    * Destructor
80    */
81   virtual ~DisplayConnectionEcoreWl();
82
83 protected:
84
85   /**
86    * @brief Gets display connection for native surface
87    */
88   EGLNativeDisplayType GetNativeDisplay();
89
90   /**
91    * @brief Release display connection for native surface
92    */
93   void ReleaseNativeDisplay();
94
95   // Undefined
96   DisplayConnectionEcoreWl(const DisplayConnectionEcoreWl&);
97
98   // Undefined
99   DisplayConnectionEcoreWl& operator=(const DisplayConnectionEcoreWl& rhs);
100
101 private:
102   EGLNativeDisplayType mDisplay;        ///< Wayland-display for rendering
103   RenderSurface::Type mSurfaceType;
104 };
105
106 } // namespace Adaptor
107
108 } // namespace internal
109
110 } // namespace Dali
111
112 #endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREWL_DISPLAY_CONNECTION_IMPL_ECORE_WL_H