2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/devel-api/adaptor-framework/offscreen-window.h>
22 #include <dali/public-api/actors/layer.h>
25 #include <dali/internal/offscreen/common/offscreen-window-impl.h>
29 OffscreenWindow OffscreenWindow::New( uint16_t width, uint16_t height, bool isTranslucent )
32 IntrusivePtr< Internal::OffscreenWindow > impl = Internal::OffscreenWindow::New( width, height, surface, isTranslucent );
33 OffscreenWindow window = OffscreenWindow( impl.Get() );
34 impl->Initialize( false );
39 OffscreenWindow OffscreenWindow::New( Any surface )
41 IntrusivePtr< Internal::OffscreenWindow > impl = Internal::OffscreenWindow::New( 0, 0, surface, false );
42 OffscreenWindow window = OffscreenWindow( impl.Get() );
43 impl->Initialize( false );
48 OffscreenWindow::OffscreenWindow() = default;
50 OffscreenWindow::OffscreenWindow( const OffscreenWindow& window ) = default;
52 OffscreenWindow& OffscreenWindow::operator=( const OffscreenWindow& window ) = default;
54 OffscreenWindow::~OffscreenWindow() = default;
56 void OffscreenWindow::Add( Actor actor )
58 Internal::GetImplementation( *this ).Add( actor );
61 void OffscreenWindow::Remove( Actor actor )
63 Internal::GetImplementation( *this ).Remove( actor );
66 void OffscreenWindow::SetBackgroundColor( const Vector4& color )
68 Internal::GetImplementation( *this ).SetBackgroundColor( color );
71 Vector4 OffscreenWindow::GetBackgroundColor() const
73 return Internal::GetImplementation( *this ).GetBackgroundColor();
76 Layer OffscreenWindow::GetRootLayer() const
78 return Internal::GetImplementation( *this ).GetRootLayer();
81 uint32_t OffscreenWindow::GetLayerCount() const
83 return Internal::GetImplementation( *this ).GetLayerCount();
86 Layer OffscreenWindow::GetLayer( uint32_t depth ) const
88 return Internal::GetImplementation( *this ).GetLayer( depth );
91 OffscreenWindow::WindowSize OffscreenWindow::GetSize() const
93 return Internal::GetImplementation( *this ).GetSize();
96 Any OffscreenWindow::GetNativeHandle() const
98 return Internal::GetImplementation( *this ).GetNativeHandle();
101 Uint16Pair OffscreenWindow::GetDpi() const
103 return Internal::GetImplementation(*this).GetDpi();
106 OffscreenWindow::PostRenderSignalType& OffscreenWindow::PostRenderSignal()
108 return Internal::GetImplementation( *this ).PostRenderSignal();
112 OffscreenWindow::OffscreenWindow( Internal::OffscreenWindow* window )
113 : BaseHandle( window )