1 #ifndef __DALI_TOOLKIT_ADAPTOR_IMPL_H__
2 #define __DALI_TOOLKIT_ADAPTOR_IMPL_H__
5 * Copyright (c) 2016 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/adaptors/render-surface.h>
26 class DisplayConnection;
27 class ThreadSynchronizationInterface;
35 class GraphicsInterface;
37 } // namespace Adaptor
39 } // namespace Internal
46 } // namespace Integration
48 class TestRenderSurface : public RenderSurface
51 virtual PositionSize GetPositionSize() const { PositionSize size; return size; }
53 virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { dpiHorizontal = dpiVertical = 96; }
55 virtual void InitializeGraphics( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) {};
57 virtual void CreateSurface() {}
59 virtual void DestroySurface() {}
61 virtual bool ReplaceGraphicsSurface() { return false; }
63 virtual void MoveResize( Dali::PositionSize positionSize ) {}
65 virtual void SetViewMode( ViewMode viewMode ) {}
67 virtual void StartRender() {}
69 virtual bool PreRender( bool resizingSurface ) { return false; }
71 virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) {}
73 virtual void StopRender() {}
75 virtual void ReleaseLock() {}
77 virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) {}
79 virtual RenderSurface::Type GetSurfaceType() { return RenderSurface::WINDOW_RENDER_SURFACE; }
87 class Adaptor: public BaseObject
90 static Dali::Adaptor& Get();
95 static Dali::RenderSurface& GetSurface();
96 static Dali::Adaptor::AdaptorSignalType& AdaptorSignal();
97 static bool mAvailable;
98 static Vector<CallbackBase*> mCallbacks;
101 } // namespace Adaptor
102 } // namespace Internal
105 #endif // __DALI_TOOLKIT_ADAPTOR_IMPL_H__