Updated header files to new format too
[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) 2021 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 class DisplayConnection;
27
28 namespace Internal
29 {
30 namespace Adaptor
31 {
32 /**
33  * DisplayConnection implementation
34  */
35 class DisplayConnectionAndroid : public Dali::Internal::Adaptor::DisplayConnection
36 {
37 public:
38   /**
39    * @brief Default constructor
40    */
41   DisplayConnectionAndroid();
42
43   /**
44    * @brief Create an initialized DisplayConnection.
45    *
46    * @return A handle to a newly allocated DisplayConnection resource.
47    */
48   static DisplayConnection* New();
49
50 public:
51   /**
52    * @copydoc Dali::DisplayConnection::GetDisplay
53    */
54   Any GetDisplay();
55
56   /**
57    * @copydoc Dali::DisplayConnection::ConsumeEvents
58    */
59   void ConsumeEvents();
60
61   /**
62    * @copydoc Dali::DisplayConnection::InitializeGraphics
63    */
64   bool InitializeGraphics();
65
66   /**
67    * @brief Sets the surface type
68    * @param[in] type The surface type
69    */
70   void SetSurfaceType(Dali::RenderSurfaceInterface::Type type);
71
72   /**
73    * @brief Sets the graphics interface
74    * @param[in] graphics The graphics interface
75    */
76   void SetGraphicsInterface(GraphicsInterface& graphics);
77
78 public:
79   /**
80    * Destructor
81    */
82   virtual ~DisplayConnectionAndroid();
83
84 protected:
85   // Undefined
86   DisplayConnectionAndroid(const DisplayConnectionAndroid&);
87
88   // Undefined
89   DisplayConnectionAndroid& operator=(const DisplayConnectionAndroid& rhs);
90
91 private:
92   EGLNativeDisplayType               mDisplay;     ///< EGL display for rendering
93   Dali::RenderSurfaceInterface::Type mSurfaceType; ///< The surface type
94   GraphicsInterface*                 mGraphics;    ///< The graphics interface
95 };
96
97 } // namespace Adaptor
98
99 } // namespace Internal
100
101 } // namespace Dali
102
103 #endif // DALI_INTERNAL_WINDOWSYSTEM_DISPLAY_CONNECTION_IMPL_ANDROID_H