Dali 3D User Interface Engine
core-impl.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_CORE_H__
2 #define __DALI_INTERNAL_CORE_H__
3 
4 /*
5  * Copyright (c) 2014 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 // INTERNAL INCLUDES
30 
31 namespace Dali
32 {
33 
34 namespace Integration
35 {
36 class RenderController;
37 class PlatformAbstraction;
38 class GestureManager;
39 class GlAbstraction;
40 class GlSyncAbstraction;
41 class SystemOverlay;
42 class UpdateStatus;
43 class RenderStatus;
44 struct Event;
45 struct TouchData;
46 }
47 
48 namespace Internal
49 {
50 
51 class NotificationManager;
52 class AnimationPlaylist;
53 class PropertyNotificationManager;
54 class EventProcessor;
55 class GestureEventProcessor;
56 class ResourceClient;
57 class ResourceManager;
58 class ImageFactory;
59 class ShaderFactory;
60 class TouchResampler;
61 class RelayoutController;
62 
63 namespace SceneGraph
64 {
65 class UpdateManager;
66 class RenderManager;
67 class DiscardQueue;
68 }
69 
73 class Core
74 {
75 public:
76 
80  Core( Integration::RenderController& renderController,
82  Integration::GlAbstraction& glAbstraction,
83  Integration::GlSyncAbstraction& glSyncAbstraction,
84  Integration::GestureManager& gestureManager,
85  ResourcePolicy::DataRetention dataRetentionPolicy );
86 
90  ~Core();
91 
96 
100  void ContextCreated();
101 
105  void ContextDestroyed();
106 
110  void RecoverFromContextLoss();
111 
115  void SurfaceResized(unsigned int width, unsigned int height);
116 
120  void SetDpi(unsigned int dpiHorizontal, unsigned int dpiVertical);
121 
125  void SetMinimumFrameTimeInterval(unsigned int interval);
126 
130  void Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds, unsigned int nextVSyncTimeMilliseconds, Integration::UpdateStatus& status );
131 
135  void Render( Integration::RenderStatus& status );
136 
140  void Suspend();
141 
145  void Resume();
146 
150  void SceneCreated();
151 
155  void QueueEvent( const Integration::Event& event );
156 
160  void ProcessEvents();
161 
165  void UpdateTouchData(const Integration::TouchData& touch);
166 
170  unsigned int GetMaximumUpdateCount() const;
171 
176 
177  // Stereoscopy
178 
182  void SetViewMode( ViewMode viewMode );
183 
187  ViewMode GetViewMode() const;
188 
192  void SetStereoBase( float stereoBase );
193 
197  float GetStereoBase() const;
198 
199 private: // for use by ThreadLocalStorage
200 
206 
212 
218 
224 
230 
236 
242 
248 
254 
260 
266 
267 private:
268 
272  Core(const Core& core); // No definition
273  Core& operator=(const Core& core); // No definition
274 
279 
280 private:
281 
284 
301 
302  bool mIsActive : 1;
303  bool mProcessingEvent : 1;
304 
305  friend class ThreadLocalStorage;
306 
307 };
308 
309 } // namespace Internal
310 
311 } // namespace Dali
312 
313 #endif // __DALI_INTERNAL_CORE_H__
Dali Docs Home
Read more about Dali