[Tizen] Revert "Support scene holder instead of window in keyinput/keyboard focus"
[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 class SceneHolder;
45
46 } // namespace Adaptor
47
48 } // namespace Internal
49
50 namespace Integration
51 {
52
53 class GlAbstraction;
54
55 } // namespace Integration
56
57 namespace Internal
58 {
59 namespace Adaptor
60 {
61
62 class Adaptor
63 {
64 public:
65   static Dali::Adaptor& New();
66   static Dali::Adaptor& Get();
67   Adaptor();
68   ~Adaptor();
69
70   void Start( Dali::Window window );
71
72   bool AddIdle( CallbackBase* callback, bool hasReturnValue );
73   void RemoveIdle( CallbackBase* callback );
74   void RunIdles();
75
76   static Integration::Scene GetScene( Dali::Window window );
77
78   Dali::RenderSurfaceInterface& GetSurface();
79   Dali::WindowContainer GetWindows();
80
81   Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor );
82   void AddWindow( Internal::Adaptor::SceneHolder* window );
83   void RemoveWindow( Internal::Adaptor::SceneHolder* window );
84
85   Dali::Adaptor::AdaptorSignalType& ResizedSignal();
86   Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal();
87   Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
88
89   static Adaptor& GetImpl( Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
90   static const Adaptor& GetImpl( const Dali::Adaptor& adaptor ) { return *adaptor.mImpl; }
91
92 private:
93
94   Vector<CallbackBase*> mCallbacks;
95   Dali::WindowContainer mWindows;
96   Dali::Adaptor::AdaptorSignalType mResizedSignal;
97   Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal;
98   Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal;
99 };
100
101 } // namespace Adaptor
102 } // namespace Internal
103 } // namespace Dali
104
105 #endif // DALI_TOOLKIT_ADAPTOR_IMPL_H