Support for the macOS platform
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / macos / display-connection-impl-mac.h
1 #pragma once
2
3 /*
4  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 // INTERNAL INCLUDES
21 #include <dali/internal/window-system/common/display-connection-impl.h>
22 #include <dali/public-api/object/base-object.h>
23 #include <dali/internal/graphics/gles/egl-implementation.h>
24
25 namespace Dali::Internal::Adaptor
26 {
27
28 /**
29  * DisplayConnection implementation
30  */
31 class DisplayConnectionCocoa : public Dali::Internal::Adaptor::DisplayConnection
32 {
33 public:
34
35   /**
36    * @brief Default constructor
37    */
38   DisplayConnectionCocoa();
39
40   /**
41    * @brief Create an initialized DisplayConnection.
42    *
43    * @return A handle to a newly allocated DisplayConnection resource.
44    */
45   static DisplayConnection* New();
46
47 public:
48
49   /**
50    * @copydoc Dali::DisplayConnection::GetDisplay
51    */
52   Any GetDisplay();
53
54   /**
55    * @copydoc Dali::DisplayConnection::ConsumeEvents
56    */
57   void ConsumeEvents();
58
59   /**
60    * @copydoc Dali::DisplayConnection::InitializeEgl
61    */
62   bool InitializeEgl(EglInterface& egl);
63
64   /**
65   * @copydoc Dali::DisplayConnection::InitializeGraphics
66   */
67   bool InitializeGraphics();
68
69   /**
70   * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
71   */
72   void SetSurfaceType( Dali::RenderSurfaceInterface::Type type );
73
74   /**
75   * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface
76   */
77   void SetGraphicsInterface( GraphicsInterface& graphics );
78
79 public:
80
81   /**
82    * Destructor
83    */
84   virtual ~DisplayConnectionCocoa();
85
86 private:
87
88   // Undefined
89   DisplayConnectionCocoa(const DisplayConnectionCocoa&) = delete;
90
91   // Undefined
92   DisplayConnectionCocoa& operator=(const DisplayConnectionCocoa& rhs) = delete;
93
94 private:
95
96   GraphicsInterface *mGraphics; ///< The graphics interface
97 };
98
99 } // namespace Dali::Internal::Adaptor