[dali_1.4.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-window.h
1 #ifndef TOOLKIT_WINDOW_H
2 #define TOOLKIT_WINDOW_H
3
4 /*
5  * Copyright (c) 2019 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 //EXTERNAL INCLUDES
22 #include <string>
23 #include <dali/public-api/math/rect.h>
24 #include <dali/public-api/object/base-handle.h>
25 #include <dali/public-api/signals/dali-signal.h>
26
27 namespace Dali
28 {
29
30 class Actor;
31 class Layer;
32 class KeyEvent;
33 class TouchData;
34
35 typedef Dali::Rect<int> PositionSize;
36
37 namespace Internal
38 {
39 namespace Adaptor
40 {
41 class Window;
42 }
43 }
44
45 class Window : public BaseHandle
46 {
47 public:
48
49   static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
50   static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
51   Window();
52   ~Window();
53   Window(const Window& handle);
54   Window& operator=(const Window& rhs);
55   Layer GetRootLayer() const;
56
57 public:
58   explicit Window( Internal::Adaptor::Window* window );
59 };
60
61 namespace DevelWindow
62 {
63
64 typedef Signal< void (const KeyEvent&) > KeyEventSignalType;
65 typedef Signal< void (const TouchData&) > TouchSignalType;
66
67 Dali::Window Get( Actor actor );
68 KeyEventSignalType& KeyEventSignal( Dali::Window window );
69 TouchSignalType& TouchSignal( Dali::Window window );
70
71 }
72
73 } // namespace Dali
74
75 #endif // TOOLKIT_WINDOW_H