Remove RenderSurface from Core
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / android / display-connection-impl-android.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_DISPLAY_CONNECTION_IMPL_ANDROID_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_DISPLAY_CONNECTION_IMPL_ANDROID_H
3
4 /*
5  * Copyright (c) 2020 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 DisplayConnectionAndroid : public Dali::Internal::Adaptor::DisplayConnection
39 {
40 public:
41
42   /**
43    * @brief Default constructor
44    */
45   DisplayConnectionAndroid();
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( Dali::RenderSurfaceInterface::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 ~DisplayConnectionAndroid();
89
90 protected:
91
92   // Undefined
93   DisplayConnectionAndroid(const DisplayConnectionAndroid&);
94
95   // Undefined
96   DisplayConnectionAndroid& operator=(const DisplayConnectionAndroid& rhs);
97
98 private:
99   EGLNativeDisplayType mDisplay;        ///< EGL display for rendering
100   Dali::RenderSurfaceInterface::Type mSurfaceType;     ///< The surface type
101   GraphicsInterface* mGraphics;         ///< The graphics interface
102 };
103
104 } // namespace Adaptor
105
106 } // namespace internal
107
108 } // namespace Dali
109
110 #endif // DALI_INTERNAL_WINDOWSYSTEM_DISPLAY_CONNECTION_IMPL_ANDROID_H