Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / macos / display-connection-impl-mac.h
1 #pragma once
2
3 /*
4  * Copyright (c) 2021 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/graphics/gles/egl-implementation.h>
22 #include <dali/internal/window-system/common/display-connection-impl.h>
23 #include <dali/public-api/object/base-object.h>
24
25 namespace Dali::Internal::Adaptor
26 {
27 /**
28  * DisplayConnection implementation
29  */
30 class DisplayConnectionCocoa : public Dali::Internal::Adaptor::DisplayConnection
31 {
32 public:
33   /**
34    * @brief Default constructor
35    */
36   DisplayConnectionCocoa();
37
38   /**
39    * @brief Create an initialized DisplayConnection.
40    *
41    * @return A handle to a newly allocated DisplayConnection resource.
42    */
43   static DisplayConnection* New();
44
45 public:
46   /**
47    * @copydoc Dali::DisplayConnection::GetDisplay
48    */
49   Any GetDisplay();
50
51   /**
52    * @copydoc Dali::DisplayConnection::ConsumeEvents
53    */
54   void ConsumeEvents();
55
56   /**
57    * @copydoc Dali::DisplayConnection::InitializeEgl
58    */
59   bool InitializeEgl(EglInterface& egl);
60
61   /**
62   * @copydoc Dali::DisplayConnection::InitializeGraphics
63   */
64   bool InitializeGraphics();
65
66   /**
67   * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
68   */
69   void SetSurfaceType(Dali::RenderSurfaceInterface::Type type);
70
71   /**
72   * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface
73   */
74   void SetGraphicsInterface(GraphicsInterface& graphics);
75
76 public:
77   /**
78    * Destructor
79    */
80   virtual ~DisplayConnectionCocoa();
81
82 private:
83   // Undefined
84   DisplayConnectionCocoa(const DisplayConnectionCocoa&) = delete;
85
86   // Undefined
87   DisplayConnectionCocoa& operator=(const DisplayConnectionCocoa& rhs) = delete;
88
89 private:
90   GraphicsInterface* mGraphics; ///< The graphics interface
91 };
92
93 } // namespace Dali::Internal::Adaptor