Merge "(Automated Tests) Use Default Scene signals in Window stub" into devel/master
[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/adaptors/render-surface-interface.h>
22
23 namespace Dali
24 {
25 class EglInterface;
26 class DisplayConnection;
27 class ThreadSynchronizationInterface;
28 class Window;
29
30 namespace Integration
31 {
32 class Scene;
33 }
34
35 using WindowContainer = std::vector<Window>;
36
37 namespace Internal
38 {
39
40 namespace Adaptor
41 {
42
43 class GraphicsInterface;
44
45 } // namespace Adaptor
46
47 } // namespace Internal
48
49 namespace Integration
50 {
51
52 class GlAbstraction;
53
54 } // namespace Integration
55
56 namespace Internal
57 {
58 namespace Adaptor
59 {
60
61 class Adaptor
62 {
63 public:
64   static Dali::Adaptor& New();
65   static Dali::Adaptor& Get();
66   Adaptor();
67   ~Adaptor();
68
69   void Start( Dali::Window window );
70
71   bool AddIdle( CallbackBase* callback, bool hasReturnValue );
72   void RemoveIdle( CallbackBase* callback );
73   void RunIdles();
74
75   static Integration::Scene GetScene( Dali::Window window );
76
77   Dali::RenderSurfaceInterface& GetSurface();
78   Dali::WindowContainer GetWindows();
79
80   Dali::Adaptor::AdaptorSignalType& ResizedSignal();
81   Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal();
82   Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
83
84   static Adaptor& GetImpl( Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
85   static const Adaptor& GetImpl( const Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
86
87 private:
88
89   Vector<CallbackBase*> mCallbacks;
90   Dali::WindowContainer mWindows;
91   Dali::Adaptor::AdaptorSignalType mResizedSignal;
92   Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
93   Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
94 };
95
96 } // namespace Adaptor
97 } // namespace Internal
98 } // namespace Dali
99
100 #endif // DALI_TOOLKIT_ADAPTOR_IMPL_H