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-application.h>
22 #include <dali/internal/offscreen/common/offscreen-application-impl.h>
26 OffscreenApplication OffscreenApplication::New( uint16_t width, uint16_t height, bool isTranslucent, OffscreenApplication::RenderMode renderMode )
29 IntrusivePtr< Internal::OffscreenApplication > impl = Internal::OffscreenApplication::New( width, height, surface, isTranslucent, renderMode );
31 OffscreenApplication offscreenApplication = OffscreenApplication( impl.Get() );
33 return offscreenApplication;
36 OffscreenApplication OffscreenApplication::New( Dali::Any surface, OffscreenApplication::RenderMode renderMode )
38 IntrusivePtr< Internal::OffscreenApplication > impl = Internal::OffscreenApplication::New( 0, 0, surface, false, renderMode );
40 OffscreenApplication offscreenApplication = OffscreenApplication( impl.Get() );
42 return offscreenApplication;
45 OffscreenApplication::OffscreenApplication()
49 OffscreenApplication::OffscreenApplication( const OffscreenApplication& offscreenApplication )
50 : BaseHandle( offscreenApplication )
54 OffscreenApplication& OffscreenApplication::operator=( const OffscreenApplication& offscreenApplication )
56 if( *this != offscreenApplication )
58 BaseHandle::operator=( offscreenApplication );
63 OffscreenApplication::~OffscreenApplication()
67 void OffscreenApplication::Start()
69 Internal::GetImplementation( *this ).Start();
72 void OffscreenApplication::Stop()
74 Internal::GetImplementation( *this ).Stop();
77 Dali::OffscreenWindow OffscreenApplication::GetWindow()
79 return Internal::GetImplementation( *this ).GetWindow();
82 void OffscreenApplication::RenderOnce()
84 Internal::GetImplementation( *this ).RenderOnce();
87 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::InitSignal()
89 return Internal::GetImplementation( *this ).InitSignal();
92 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::TerminateSignal()
94 return Internal::GetImplementation( *this ).TerminateSignal();
97 OffscreenApplication::OffscreenApplication( Internal::OffscreenApplication* offscreenApplication )
98 : BaseHandle( offscreenApplication )