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>
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] stage A reference to the stage.
48 * @return The newly allocated SystemOverlay.
50 static SystemOverlay* New( Stage& stage );
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::GetOverlayRenderTasks()
70 RenderTaskList& GetOverlayRenderTasks();
73 * Forwarded from Stage::SetSize().
74 * @param[in] width The new width.
75 * @param[in] height The new height.
77 void SetSize( float width, float height );
80 * Retrieve the ordered list of system layers.
81 * @return The layer-list.
83 LayerList& GetLayerList();
86 * From RenderTaskDefaults.
87 * Retrieve the default SystemOverlay root actor.
88 * @note This is different to the root actor provided by Dali::Stage.
90 virtual Actor& GetDefaultRootActor();
93 * From RenderTaskDefaults.
94 * Retrieve the default SystemOverlay camera actor.
95 * @note This is different to the default camera actor provided by Dali::Stage.
97 virtual CameraActor& GetDefaultCameraActor();
102 * Protected constructor; see also SystemOverlay::New().
103 * @param[in] stage A reference to the stage.
105 SystemOverlay( Stage& stage );
108 * Second-phase construction.
113 * Lazy initialization of the SystemOverlay root actor.
115 void CreateRootLayer();
118 * Lazy initialization of the default camera actor.
120 void CreateDefaultCameraActor();
128 IntrusivePtr<RenderTaskList> mOverlayRenderTaskList;
132 CameraActorPtr mDefaultCameraActor;
134 // Ordered list of currently on-stage layers
135 OwnerPointer<LayerList> mLayerList;
138 } // namespace Internal
142 #endif // __DALI_INTERNAL_SYSTEM_OVERLAY_H__