b5fe5b38af8dfc20231f295faa60922cddb71c32
[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/gles/egl-implementation.h>
25
26
27 namespace Dali
28 {
29
30 class DisplayConnection;
31
32 namespace Internal
33 {
34 namespace Adaptor
35 {
36
37 /**
38  * DisplayConnection implementation
39  */
40 class DisplayConnection : public Dali::BaseObject
41 {
42 public:
43
44   /**
45    * @brief Default constructor
46    */
47   DisplayConnection() = default;
48
49   /**
50    * @brief Create an initialized DisplayConnection.
51    *
52    * @return A handle to a newly allocated DisplayConnection resource.
53    */
54   static DisplayConnection* New();
55
56 public:
57
58   /**
59    * @copydoc Dali::DisplayConnection::GetDisplay
60    */
61   virtual Any GetDisplay() = 0;
62
63   /**
64    * @copydoc Dali::DisplayConnection::ConsumeEvents
65    */
66   virtual void ConsumeEvents() = 0;
67
68   /**
69    * @copydoc Dali::DisplayConnection::InitializeGraphics
70    */
71   virtual bool InitializeGraphics() = 0;
72
73   /**
74    * Sets the render surface type
75    * @param[in] type The render surface type
76    */
77   virtual void SetSurfaceType( RenderSurface::Type type ) = 0;
78
79   /**
80    * Sets the graphics interface
81    * @param[in] graphics The graphics interface
82    */
83   virtual void SetGraphicsInterface( GraphicsInterface& graphics ) = 0;
84
85 public:
86
87   /**
88    * Destructor
89    */
90   ~DisplayConnection() override = default;
91
92 protected:
93
94   // Undefined
95   DisplayConnection(const DisplayConnection&) = delete;
96
97   // Undefined
98   DisplayConnection& operator=(const DisplayConnection& rhs) = delete;
99
100 };
101
102 } // namespace Adaptor
103
104 } // namespace internal
105
106 } // namespace Dali
107
108 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_IMPL_H