Fix the build fail of toolkit-test-util
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-adaptor-impl.h
1 #ifndef DALI_TOOLKIT_ADAPTOR_IMPL_H
2 #define DALI_TOOLKIT_ADAPTOR_IMPL_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
22
23 namespace Dali
24 {
25 class EglInterface;
26 class DisplayConnection;
27 class ThreadSynchronizationInterface;
28 class Window;
29 class TestApplication;
30
31 namespace Integration
32 {
33 class Scene;
34 }
35
36 using WindowContainer = std::vector<Window>;
37
38 namespace Internal
39 {
40
41 namespace Adaptor
42 {
43
44 class GraphicsInterface;
45 class SceneHolder;
46
47 } // namespace Adaptor
48
49 } // namespace Internal
50
51 namespace Integration
52 {
53
54 class GlAbstraction;
55
56 } // namespace Integration
57
58 namespace Internal
59 {
60 namespace Adaptor
61 {
62
63 class Adaptor
64 {
65 public:
66   static Dali::Adaptor& New();
67   static Dali::Adaptor& Get();
68   Adaptor();
69   ~Adaptor();
70
71   void Start( Dali::Window window );
72
73   bool AddIdle( CallbackBase* callback, bool hasReturnValue );
74   void RemoveIdle( CallbackBase* callback );
75   void RunIdles();
76
77   static Integration::Scene GetScene( Dali::Window window );
78
79   Dali::RenderSurfaceInterface& GetSurface();
80   Dali::WindowContainer GetWindows();
81   Dali::SceneHolderList GetSceneHolders();
82
83   Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor );
84   void AddWindow( Internal::Adaptor::SceneHolder* window );
85   void RemoveWindow( Internal::Adaptor::SceneHolder* window );
86
87   void RegisterProcessor( Integration::Processor& processor );
88   void UnregisterProcessor( Integration::Processor& processor );
89
90   void SetApplication( Dali::TestApplication& testApplication );
91
92   Dali::Adaptor::AdaptorSignalType& ResizedSignal();
93   Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal();
94   Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
95
96   static Adaptor& GetImpl( Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
97   static const Adaptor& GetImpl( const Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
98
99 private:
100
101   Vector<CallbackBase*> mCallbacks;
102   std::vector<Internal::Adaptor::SceneHolder*> mWindows;
103   Dali::Adaptor::AdaptorSignalType mResizedSignal;
104   Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
105   Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
106   TestApplication* mTestApplication;
107 };
108
109 } // namespace Adaptor
110 } // namespace Internal
111 } // namespace Dali
112
113 #endif // DALI_TOOLKIT_ADAPTOR_IMPL_H