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 static Integration::Scene GetScene(Dali::Window window);
76 Dali::RenderSurfaceInterface& GetSurface();
77 Dali::WindowContainer GetWindows();
78 Dali::SceneHolderList GetSceneHolders();
80 Dali::Internal::Adaptor::SceneHolder* GetWindow(Dali::Actor& actor);
81 void AddWindow(Internal::Adaptor::SceneHolder* window);
82 void RemoveWindow(Internal::Adaptor::SceneHolder* window);
84 void RegisterProcessor(Integration::Processor& processor, bool postProcessor = false);
85 void UnregisterProcessor(Integration::Processor& processor, bool postProcessor = false);
87 void SetApplication(Dali::TestApplication& testApplication);
89 bool IsStopped() const
94 Dali::Adaptor::AdaptorSignalType& ResizedSignal();
95 Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal();
96 Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
97 Dali::Adaptor::LocaleChangedSignalType& LocaleChangedSignal();
99 static Adaptor& GetImpl(Dali::Adaptor& adaptor)
101 return *adaptor.mImpl;
103 static const Adaptor& GetImpl(const Dali::Adaptor& adaptor)
105 return *adaptor.mImpl;
109 Vector<CallbackBase*> mCallbacks;
110 Vector<CallbackBase*> mReturnCallbacks;
111 std::vector<Internal::Adaptor::SceneHolder*> mWindows;
112 Dali::Adaptor::AdaptorSignalType mResizedSignal;
113 Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
114 Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
115 Dali::Adaptor::LocaleChangedSignalType mLocaleChangedSignal;
116 TestApplication* mTestApplication;
117 bool mStopped{false};
120 } // namespace Adaptor
121 } // namespace Internal
124 #endif // DALI_TOOLKIT_ADAPTOR_IMPL_H