[dali_2.3.34] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / x11 / display-connection-impl-x.h
1 #ifndef DALI_INTERNAL_WINDOW_SYSTEM_X11_DISPLAY_CONNECTION_IMPL_X_H
2 #define DALI_INTERNAL_WINDOW_SYSTEM_X11_DISPLAY_CONNECTION_IMPL_X_H
3
4 /*
5  * Copyright (c) 2024 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 <X11/Xlib.h>
23 #include <dali/internal/window-system/common/display-connection-impl.h>
24
25 namespace Dali
26 {
27 class DisplayConnection;
28
29 namespace Internal::Adaptor
30 {
31 /**
32  * DisplayConnection implementation
33  */
34 class DisplayConnectionX11 : public Dali::Internal::Adaptor::DisplayConnection
35 {
36 public:
37   /**
38    * @brief Default constructor
39    */
40   DisplayConnectionX11();
41
42   /**
43    * @brief Create an initialized DisplayConnection.
44    *
45    * @return A handle to a newly allocated DisplayConnection resource.
46    */
47   static DisplayConnection* New();
48
49 public:
50   /**
51    * @copydoc Dali::DisplayConnection::GetDisplay
52    */
53   Any GetDisplay() override;
54
55   /**
56    * @copydoc Dali::DisplayConnection::GetNativeGraphicsDisplay
57    */
58   Any GetNativeGraphicsDisplay() override;
59
60   /**
61    * @copydoc Dali::DisplayConnection::ConsumeEvents
62    */
63   void ConsumeEvents() override;
64
65   /**
66    * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
67    */
68   void SetSurfaceType(Dali::Integration::RenderSurfaceInterface::Type type) override;
69
70 public:
71   /**
72    * Destructor
73    */
74   ~DisplayConnectionX11() override;
75
76   DisplayConnectionX11(const DisplayConnectionX11&) = delete;
77
78   DisplayConnectionX11& operator=(const DisplayConnectionX11& rhs) = delete;
79
80 public:
81   ::Display* mDisplay; ///< X-display for rendering
82 };
83
84 } // namespace Internal::Adaptor
85
86 } // namespace Dali
87
88 #endif // DALI_INTERNAL_WINDOW_SYSTEM_X11_DISPLAY_CONNECTION_IMPL_X_H