Revert "[Tizen] Revert "Support multiple window rendering""
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / ubuntu-x11 / display-connection-impl-x.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_ECOREX_DISPLAY_CONNECTION_IMPL_ECORE_X_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_ECOREX_DISPLAY_CONNECTION_IMPL_ECORE_X_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-impl.h>
23 #include <dali/internal/window-system/ubuntu-x11/ecore-x-types.h>
24
25 namespace Dali
26 {
27
28 class DisplayConnection;
29
30 namespace Internal
31 {
32
33 namespace Adaptor
34 {
35
36
37 class Impl
38 {
39 public:
40
41   XDisplay*  mDisplay;        ///< X-display for rendering
42 };
43
44
45 /**
46  * DisplayConnection implementation
47  */
48 class DisplayConnectionX11 : public Dali::Internal::Adaptor::DisplayConnection
49 {
50 public:
51
52   /**
53    * @brief Default constructor
54    */
55   DisplayConnectionX11();
56
57   /**
58    * @brief Create an initialized DisplayConnection.
59    *
60    * @return A handle to a newly allocated DisplayConnection resource.
61    */
62   static DisplayConnection* New();
63
64 public:
65
66   /**
67    * @copydoc Dali::DisplayConnection::GetDisplay
68    */
69   Any GetDisplay();
70
71   /**
72    * @copydoc Dali::DisplayConnection::ConsumeEvents
73    */
74   void ConsumeEvents();
75
76   /**
77    * @copydoc Dali::DisplayConnection::InitializeGraphics
78    */
79   bool InitializeGraphics();
80
81   /**
82    * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
83    */
84   void SetSurfaceType( Integration::RenderSurface::Type type );
85
86   /**
87    * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface
88    */
89   void SetGraphicsInterface( GraphicsInterface& graphics );
90
91 public:
92
93   /**
94    * Destructor
95    */
96   virtual ~DisplayConnectionX11();
97
98 protected:
99
100   // Undefined
101   DisplayConnectionX11(const DisplayConnectionX11&) = delete;
102
103   // Undefined
104   DisplayConnectionX11& operator=(const DisplayConnectionX11& rhs) = delete;
105
106 private:
107
108   GraphicsInterface* mGraphics; ///< The graphics interface
109
110 public:
111
112   XDisplay*  mDisplay;        ///< X-display for rendering
113
114 };
115
116 } // namespace Adaptor
117
118 } // namespace internal
119
120 } // namespace Dali
121
122 #endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREX_DISPLAY_CONNECTION_IMPL_ECORE_X_H