Merge "Add Text input style changed signal." 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) 2016 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/devel-api/adaptor-framework/render-surface.h>
22
23 namespace Dali
24 {
25 class EglInterface;
26 class DisplayConnection;
27 class ThreadSynchronizationInterface;
28
29 namespace Integration
30 {
31
32 class GlAbstraction;
33
34 } // namespace Integration
35
36 class TestRenderSurface : public RenderSurface
37 {
38 public:
39   virtual PositionSize GetPositionSize() const { PositionSize size; return size; }
40
41   virtual void InitializeEgl( EglInterface& egl ) {}
42
43   virtual void CreateEglSurface( EglInterface& egl ) {}
44
45   virtual void DestroyEglSurface( EglInterface& egl ) {}
46
47   virtual bool ReplaceEGLSurface( EglInterface& egl ) { return false; }
48
49   virtual void MoveResize( Dali::PositionSize positionSize ) {}
50
51   virtual void SetViewMode( ViewMode viewMode ) {}
52
53   virtual void StartRender() {}
54
55   virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction ) { return false; }
56
57   virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface ) {}
58
59   virtual void StopRender() {}
60
61   virtual void ReleaseLock() {}
62
63   virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) {}
64
65   virtual RenderSurface::Type GetSurfaceType() { return RenderSurface::ECORE_RENDER_SURFACE; }
66 };
67
68 namespace Internal
69 {
70 namespace Adaptor
71 {
72
73 class Adaptor: public BaseObject
74 {
75 public:
76   static Dali::Adaptor& Get();
77   Adaptor();
78   ~Adaptor();
79
80 public:
81   static Dali::RenderSurface& GetSurface();
82   static Dali::Adaptor::AdaptorSignalType& AdaptorSignal();
83   static bool mAvailable;
84   static Vector<CallbackBase*> mCallbacks;
85 };
86
87 } // namespace Adaptor
88 } // namespace Internal
89 } // namespace Dali
90
91 #endif // __DALI_TOOLKIT_ADAPTOR_IMPL_H__