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() = default;
47 OffscreenApplication::OffscreenApplication(const OffscreenApplication& offscreenApplication) = default;
49 OffscreenApplication& OffscreenApplication::operator=(const OffscreenApplication& offscreenApplication) = default;
51 OffscreenApplication::~OffscreenApplication() = default;
53 void OffscreenApplication::Start()
55 Internal::GetImplementation(*this).Start();
58 void OffscreenApplication::Stop()
60 Internal::GetImplementation(*this).Stop();
63 Dali::OffscreenWindow OffscreenApplication::GetWindow()
65 return Internal::GetImplementation(*this).GetWindow();
68 void OffscreenApplication::RenderOnce()
70 Internal::GetImplementation(*this).RenderOnce();
73 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::InitSignal()
75 return Internal::GetImplementation(*this).InitSignal();
78 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::TerminateSignal()
80 return Internal::GetImplementation(*this).TerminateSignal();
83 OffscreenApplication::OffscreenApplication(Internal::OffscreenApplication* offscreenApplication)
84 : BaseHandle(offscreenApplication)