1 #ifndef DALI_TOOLKIT_ADAPTOR_IMPL_H
2 #define DALI_TOOLKIT_ADAPTOR_IMPL_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
26 class DisplayConnection;
27 class ThreadSynchronizationInterface;
29 class TestApplication;
36 using WindowContainer = std::vector<Window>;
42 class GraphicsInterface;
45 } // namespace Adaptor
47 } // namespace Internal
53 } // namespace Integration
62 static Dali::Adaptor& New();
63 static Dali::Adaptor& Get();
67 void Start(Dali::Window window);
70 bool AddIdle(CallbackBase* callback, bool hasReturnValue);
71 void RemoveIdle(CallbackBase* callback);
74 void RequestUpdateOnce();
76 static Integration::Scene GetScene(Dali::Window window);
78 Dali::RenderSurfaceInterface& GetSurface();
79 Dali::WindowContainer GetWindows();
80 Dali::SceneHolderList GetSceneHolders();
82 Dali::Internal::Adaptor::SceneHolder* GetWindow(Dali::Actor& actor);
83 void AddWindow(Internal::Adaptor::SceneHolder* window);
84 void RemoveWindow(Internal::Adaptor::SceneHolder* window);
86 void RegisterProcessor(Integration::Processor& processor, bool postProcessor = false);
87 void UnregisterProcessor(Integration::Processor& processor, bool postProcessor = false);
89 void SetApplication(Dali::TestApplication& testApplication);
91 bool IsStopped() const
96 Dali::Adaptor::AdaptorSignalType& ResizedSignal();
97 Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal();
98 Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
99 Dali::Adaptor::LocaleChangedSignalType& LocaleChangedSignal();
101 static Adaptor& GetImpl(Dali::Adaptor& adaptor)
103 return *adaptor.mImpl;
105 static const Adaptor& GetImpl(const Dali::Adaptor& adaptor)
107 return *adaptor.mImpl;
111 Vector<CallbackBase*> mCallbacks;
112 Vector<CallbackBase*> mReturnCallbacks;
113 std::vector<Internal::Adaptor::SceneHolder*> mWindows;
114 Dali::Adaptor::AdaptorSignalType mResizedSignal;
115 Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
116 Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
117 Dali::Adaptor::LocaleChangedSignalType mLocaleChangedSignal;
118 TestApplication* mTestApplication;
119 bool mStopped{false};
122 } // namespace Adaptor
123 } // namespace Internal
126 #endif // DALI_TOOLKIT_ADAPTOR_IMPL_H