1 #ifndef DALI_INTERNAL_THREAD_CONTROLLER_INTERFACE_H
2 #define DALI_INTERNAL_THREAD_CONTROLLER_INTERFACE_H
5 * Copyright (c) 2019 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/public-api/signals/callback.h>
26 class RenderSurfaceInterface;
35 * Interface Class for all controlling threads.
37 class ThreadControllerInterface
42 * Virtual destructor. Not intended as base class.
44 virtual ~ThreadControllerInterface() { }
47 * Initializes the thread controller
49 virtual void Initialize() = 0;
52 * @copydoc Dali::Adaptor::Start()
54 virtual void Start() = 0;
57 * @copydoc Dali::Adaptor::Pause()
59 virtual void Pause() = 0;
62 * @copydoc Dali::Adaptor::Resume()
64 virtual void Resume() = 0;
67 * @copydoc Dali::Adaptor::Stop()
69 virtual void Stop() = 0;
72 * Called by the adaptor when core requires another update
74 virtual void RequestUpdate() = 0;
77 * Called by the adaptor when core requires one update
78 * If Adaptor is paused, we do one update and return to pause
80 virtual void RequestUpdateOnce() = 0;
83 * Replaces the surface.
84 * @param surface new surface
86 virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ) = 0;
91 virtual void ResizeSurface() = 0;
94 * @copydoc Dali::Adaptor::SetRenderRefreshRate()
96 virtual void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender ) = 0;
99 * @copydoc Dali::Adaptor::SetPreRenderCallback()
101 virtual void SetPreRenderCallback( CallbackBase* callback ) = 0;
108 ThreadControllerInterface() { }
112 // Undefined copy constructor.
113 ThreadControllerInterface( const ThreadControllerInterface& );
115 // Undefined assignment operator.
116 ThreadControllerInterface& operator=( const ThreadControllerInterface& );
119 } // namespace Adaptor
121 } // namespace Internal
125 #endif // DALI_INTERNAL_THREAD_CONTROLLER_INTERFACE_H