1 #ifndef __DALI_INTERNAL_SYSTEM_OVERLAY_H__
2 #define __DALI_INTERNAL_SYSTEM_OVERLAY_H__
5 * Copyright (c) 2014 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.
22 #include <dali/public-api/math/vector2.h>
23 #include <dali/integration-api/system-overlay.h>
24 #include <dali/internal/common/owner-pointer.h>
25 #include <dali/internal/event/actors/actor-declarations.h>
26 #include <dali/internal/event/render-tasks/render-task-defaults.h>
36 class EventThreadServices;
39 * Implementation of Dali::Integration::SystemOverlay
41 class SystemOverlay : public RenderTaskDefaults
46 * Create the SystemOverlay; This should only be done once for each Dali core.
47 * @param[in] eventThreadServices to send messaged to scene graph.
48 * @return The newly allocated SystemOverlay.
50 static SystemOverlay* New( EventThreadServices& eventThreadServices );
53 * Non-virtual destructor; not intended as a base class.
58 * @copydoc Dali::Integration::SystemOverlay::Add()
60 void Add( Actor& actor );
63 * @copydoc Dali::Integration::SystemOverlay::Remove()
65 void Remove( Actor& actor );
68 * @copydoc Dali::Integration::SystemOverlay::SetOverlayRenderTasks()
70 void SetOverlayRenderTasks(RenderTaskList& taskList);
73 * @copydoc Dali::Integration::SystemOverlay::GetOverlayRenderTasks()
75 RenderTaskList& GetOverlayRenderTasks();
78 * Forwarded from Stage::SetSize().
79 * @param[in] width The new width.
80 * @param[in] height The new height.
82 void SetSize( float width, float height );
85 * Retrieve the ordered list of system layers.
86 * @return The layer-list.
88 LayerList& GetLayerList();
91 * From RenderTaskDefaults.
92 * Retrieve the default SystemOverlay root actor.
93 * @note This is different to the root actor provided by Dali::Stage.
95 virtual Actor& GetDefaultRootActor();
98 * From RenderTaskDefaults.
99 * Retrieve the default SystemOverlay camera actor.
100 * @note This is different to the default camera actor provided by Dali::Stage.
102 virtual CameraActor& GetDefaultCameraActor();
107 * Protected constructor; see also SystemOverlay::New().
108 * @param[in] eventThreadServices to send messaged to the scene graph.
110 SystemOverlay( EventThreadServices& eventThreadServices );
113 * Second-phase construction.
118 * Lazy initialization of the SystemOverlay root actor.
120 void CreateRootLayer();
123 * Lazy initialization of the default camera actor.
125 void CreateDefaultCameraActor();
129 EventThreadServices& mEventThreadServices;
133 IntrusivePtr<RenderTaskList> mOverlayRenderTaskList;
137 CameraActorPtr mDefaultCameraActor;
139 // Ordered list of currently on-stage layers
140 OwnerPointer<LayerList> mLayerList;
143 } // namespace Internal
147 #endif // __DALI_INTERNAL_SYSTEM_OVERLAY_H__