cc31ef076fb98681a2ea3a002f59075c45aac064
[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::InitializeGraphics
68    */
69   bool InitializeGraphics();
70
71   /**
72    * @brief Sets the surface type
73    * @param[in] type The surface type
74    */
75   void SetSurfaceType( RenderSurface::Type type );
76
77   /**
78    * @brief Sets the graphics interface
79    * @param[in] graphics The graphics interface
80    */
81   void SetGraphicsInterface( GraphicsInterface& graphics );
82
83 public:
84
85   /**
86    * Destructor
87    */
88   virtual ~DisplayConnectionEcoreWl();
89
90 protected:
91
92   /**
93    * @brief Gets display connection for native surface
94    */
95   EGLNativeDisplayType GetNativeDisplay();
96
97   /**
98    * @brief Release display connection for native surface
99    */
100   void ReleaseNativeDisplay();
101
102   // Undefined
103   DisplayConnectionEcoreWl(const DisplayConnectionEcoreWl&);
104
105   // Undefined
106   DisplayConnectionEcoreWl& operator=(const DisplayConnectionEcoreWl& rhs);
107
108 private:
109   EGLNativeDisplayType mDisplay;        ///< Wayland-display for rendering
110   RenderSurface::Type mSurfaceType;     ///< The surface type
111   GraphicsInterface* mGraphics;         ///< The graphics interface
112 };
113
114 } // namespace Adaptor
115
116 } // namespace internal
117
118 } // namespace Dali
119
120 #endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREWL_DISPLAY_CONNECTION_IMPL_ECORE_WL_H