2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/public-api/actors/actor.h>
20 #include <dali/public-api/actors/layer.h>
21 #include <dali/public-api/common/stage.h>
22 #include <dali/public-api/object/base-object.h>
23 #include <dali/devel-api/common/stage-devel.h>
26 #include "toolkit-window.h"
33 /********************************************************************************
34 * Stub for Dali::Internal::Adaptor::Window
35 ********************************************************************************/
42 class Window : public Dali::BaseObject
54 static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent)
59 static Dali::Window Get( Dali::Actor actor )
61 return Dali::Window();
76 Dali::Window Window::New( PositionSize windowPosition, const std::string& name, bool isTransparent )
78 Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, "", isTransparent );
79 return Window( window );
82 Dali::Window Window::New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent )
84 Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, className, isTransparent );
85 return Window( window );
88 Dali::Layer Window::GetRootLayer() const
90 return Dali::Stage::GetCurrent().GetRootLayer();
93 Window::Window( Internal::Adaptor::Window* window )
94 : BaseHandle( window )
101 Window Get( Actor actor )
103 return Internal::Adaptor::Window::Get( actor );
106 KeyEventSignalType& KeyEventSignal( Window window )
108 return Dali::Stage::GetCurrent().KeyEventSignal();
111 KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
113 return DevelStage::KeyEventGeneratedSignal( Dali::Stage::GetCurrent() );
116 TouchSignalType& TouchSignal( Window window )
118 return Dali::Stage::GetCurrent().TouchSignal();
121 } // namespace DevelWindow