1 #ifndef DALI_TOOLKIT_SCENE_HOLDER_IMPL_H
2 #define DALI_TOOLKIT_SCENE_HOLDER_IMPL_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 <test-render-surface.h>
23 #include <dali/integration-api/scene.h>
24 #include <dali/public-api/actors/layer.h>
25 #include <dali/public-api/object/base-object.h>
36 class SceneHolder : public Dali::BaseObject
40 SceneHolder( const Dali::Rect<int>& positionSize );
42 virtual ~SceneHolder();
44 Dali::Layer GetRootLayer() const;
46 void SetBackgroundColor( Vector4 color );
48 Vector4 GetBackgroundColor() const;
50 void FeedTouchPoint( Dali::TouchPoint& point, int timeStamp );
52 void FeedWheelEvent( Dali::WheelEvent& wheelEvent );
54 void FeedKeyEvent( Dali::KeyEvent& keyEvent );
56 Dali::Integration::SceneHolder::KeyEventSignalType& KeyEventSignal();
58 Dali::Integration::SceneHolder::KeyEventGeneratedSignalType& KeyEventGeneratedSignal();
60 Dali::Integration::SceneHolder::TouchSignalType& TouchSignal();
62 Dali::Integration::SceneHolder::WheelEventSignalType& WheelEventSignal();
64 Integration::Scene GetScene();
66 Integration::RenderSurface& GetRenderSurface();
70 TestRenderSurface mRenderSurface;
71 Integration::Scene mScene;
74 } // namespace Adaptor
76 } // namespace Internal
78 inline Internal::Adaptor::SceneHolder& GetImplementation( Dali::Integration::SceneHolder& sceneHolder )
80 DALI_ASSERT_ALWAYS( sceneHolder && "SceneHolder handle is empty" );
81 BaseObject& object = sceneHolder.GetBaseObject();
82 return static_cast<Internal::Adaptor::SceneHolder&>( object );
85 inline const Internal::Adaptor::SceneHolder& GetImplementation( const Dali::Integration::SceneHolder& sceneHolder )
87 DALI_ASSERT_ALWAYS( sceneHolder && "SceneHolder handle is empty" );
88 const BaseObject& object = sceneHolder.GetBaseObject();
89 return static_cast<const Internal::Adaptor::SceneHolder&>( object );
94 #endif // DALI_TOOLKIT_SCENE_HOLDER_IMPL_H