2 * Copyright (c) 2023 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::MainLoop()
55 Internal::GetImplementation(*this).MainLoop();
58 void OffscreenApplication::Quit()
60 Internal::GetImplementation(*this).Quit();
63 Dali::OffscreenWindow OffscreenApplication::GetWindow()
65 return Internal::GetImplementation(*this).GetWindow();
68 void OffscreenApplication::RenderOnce()
70 Internal::GetImplementation(*this).RenderOnce();
73 Any OffscreenApplication::GetFrameworkContext() const
75 return Internal::GetImplementation(*this).GetFrameworkContext();
78 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::InitSignal()
80 return Internal::GetImplementation(*this).InitSignal();
83 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::TerminateSignal()
85 return Internal::GetImplementation(*this).TerminateSignal();
88 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::PauseSignal()
90 return Internal::GetImplementation(*this).PauseSignal();
93 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::ResumeSignal()
95 return Internal::GetImplementation(*this).ResumeSignal();
98 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::ResetSignal()
100 return Internal::GetImplementation(*this).ResetSignal();
103 OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::LanguageChangedSignal()
105 return Internal::GetImplementation(*this).LanguageChangedSignal();
108 OffscreenApplication::OffscreenApplication(Internal::OffscreenApplication* offscreenApplication)
109 : BaseHandle(offscreenApplication)