4 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <dali/internal/window-system/common/window-base.h>
24 namespace Dali::Internal::Adaptor
28 * WindowBaseCocoa class provides an WindowBase Win32 implementation.
30 class WindowBaseCocoa : public WindowBase
39 WindowBaseCocoa( PositionSize positionSize, Any surface, bool isTransparent );
49 * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeWindow()
51 Any GetNativeWindow() override;
54 * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeWindowId()
56 int GetNativeWindowId() override;
59 * @copydoc Dali::Internal::Adaptor::WindowBase::CreateEglWindow()
61 EGLNativeWindowType CreateEglWindow( int width, int height ) override;
64 * @copydoc Dali::Internal::Adaptor::WindowBase::DestroyEglWindow()
66 void DestroyEglWindow() override;
69 * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowRotation()
71 void SetEglWindowRotation( int angle ) override;
74 * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowBufferTransform()
76 void SetEglWindowBufferTransform( int angle ) override;
79 * @copydoc Dali::Internal::Adaptor::WindowBase::SetEglWindowTransform()
81 void SetEglWindowTransform( int angle ) override;
84 * @copydoc Dali::Internal::Adaptor::WindowBase::ResizeEglWindow()
86 void ResizeEglWindow( PositionSize positionSize ) override;
89 * @copydoc Dali::Internal::Adaptor::WindowBase::IsEglWindowRotationSupported()
91 bool IsEglWindowRotationSupported() override;
94 * @copydoc Dali::Internal::Adaptor::WindowBase::Move()
96 void Move( PositionSize positionSize ) override;
99 * @copydoc Dali::Internal::Adaptor::WindowBase::Resize()
101 void Resize( PositionSize positionSize ) override;
104 * @copydoc Dali::Internal::Adaptor::WindowBase::MoveResize()
106 void MoveResize( PositionSize positionSize ) override;
109 * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass()
111 void SetClass( const std::string& name, const std::string& className ) override;
114 * @copydoc Dali::Internal::Adaptor::WindowBase::Raise()
116 void Raise() override;
119 * @copydoc Dali::Internal::Adaptor::WindowBase::Lower()
121 void Lower() override;
124 * @copydoc Dali::Internal::Adaptor::WindowBase::Activate()
126 void Activate() override;
129 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableAnlges()
131 void SetAvailableAnlges( const std::vector< int >& angles ) override;
134 * @copydoc Dali::Internal::Adaptor::WindowBase::SetPreferredAngle()
136 void SetPreferredAngle( int angle ) override;
139 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAcceptFocus()
141 void SetAcceptFocus( bool accept ) override;
144 * @copydoc Dali::Internal::Adaptor::WindowBase::Show()
146 void Show() override;
149 * @copydoc Dali::Internal::Adaptor::WindowBase::Hide()
151 void Hide() override;
154 * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHintCount()
156 unsigned int GetSupportedAuxiliaryHintCount() const override;
159 * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHint()
161 std::string GetSupportedAuxiliaryHint( unsigned int index ) const override;
164 * @copydoc Dali::Internal::Adaptor::WindowBase::AddAuxiliaryHint()
166 unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value ) override;
169 * @copydoc Dali::Internal::Adaptor::WindowBase::RemoveAuxiliaryHint()
171 bool RemoveAuxiliaryHint( unsigned int id ) override;
174 * @copydoc Dali::Internal::Adaptor::WindowBase::SetAuxiliaryHintValue()
176 bool SetAuxiliaryHintValue( unsigned int id, const std::string& value ) override;
179 * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintValue()
181 std::string GetAuxiliaryHintValue( unsigned int id ) const override;
184 * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintId()
186 unsigned int GetAuxiliaryHintId( const std::string& hint ) const override;
189 * @copydoc Dali::Internal::Adaptor::WindowBase::SetInputRegion()
191 void SetInputRegion( const Rect< int >& inputRegion ) override;
194 * @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
196 void SetType( Dali::WindowType type ) override;
199 * @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
201 bool SetNotificationLevel( WindowNotificationLevel level ) override;
204 * @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
206 WindowNotificationLevel GetNotificationLevel() const override;
209 * @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
211 void SetOpaqueState( bool opaque ) override;
214 * @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
216 bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
219 * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
221 WindowScreenOffMode GetScreenOffMode() const override;
224 * @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
226 bool SetBrightness( int brightness ) override;
229 * @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
231 int GetBrightness() const override;
234 * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKey()
236 bool GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode ) override;
239 * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKey()
241 bool UngrabKey( Dali::KEY key ) override;
244 * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKeyList()
247 const Dali::Vector< Dali::KEY >& key,
248 const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode,
249 Dali::Vector< bool >& result
253 * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKeyList()
256 const Dali::Vector< Dali::KEY >& key,
257 Dali::Vector< bool >& result
261 * @copydoc Dali::Internal::Adaptor::WindowBase::GetDpi()
263 void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
266 * @copydoc Dali::Internal::Adaptor::WindowBase::GetOrientation()
268 int GetOrientation() const override;
271 * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
273 int GetScreenRotationAngle() override;
276 * @copydoc Dali::Internal::Adaptor::WindowBase::SetWindowRotationAngle()
278 void SetWindowRotationAngle( int degree ) override;
281 * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
283 void WindowRotationCompleted( int degree, int width, int height ) override;
286 * @copydoc Dali::Internal::Adaptor::WindowBase::SetTransparency()
288 void SetTransparency( bool transparent ) override;
291 * @copydoc Dali::Internal::Adaptor::WindowBase::SetParent()
293 void SetParent( WindowBase* parentWinBase ) override;
296 * @copydoc Dali::Internal::Adaptor::WindowBase::CreateFrameRenderedSyncFence()
298 int CreateFrameRenderedSyncFence() override;
301 * @copydoc Dali::Internal::Adaptor::WindowBase::CreateFramePresentedSyncFence()
303 int CreateFramePresentedSyncFence() override;
308 WindowBaseCocoa(const WindowBaseCocoa &) = delete;
311 WindowBaseCocoa& operator=(const WindowBaseCocoa& rhs) = delete;
314 std::unique_ptr<Impl> mImpl;
317 } // namespace Dali::Internal::Adaptor