e61381e1cde3c6a438863242d67be5a5e4af596d
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.h
1 #ifndef DALI_WINDOW_DEVEL_H
2 #define DALI_WINDOW_DEVEL_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 // INTERNAL INCLUDES
22 #include <dali/public-api/adaptor-framework/window.h>
23
24 namespace Dali
25 {
26 class KeyEvent;
27 class TouchData;
28 class WheelEvent;
29 class RenderTaskList;
30
31 namespace DevelWindow
32 {
33
34 typedef Signal< void () > EventProcessingFinishedSignalType;       ///< Event Processing finished signal type
35
36 typedef Signal< void (const KeyEvent&) > KeyEventSignalType;       ///< Key event signal type
37
38 typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;       ///< Key event generated signal type
39
40 typedef Signal< void (const TouchData&) > TouchSignalType;         ///< Touch signal type
41
42 typedef Signal< void (const WheelEvent&) > WheelEventSignalType;   ///< Touched signal type
43
44 /**
45  * @brief Sets position and size of the window. This API guarantees that both moving and resizing of window will appear on the screen at once.
46  *
47  * @param[in] window The window instance
48  * @param[in] positionSize The new window position and size
49  */
50 DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize );
51
52 /**
53  * @brief Retrieves the list of render-tasks in the window.
54  *
55  * @param[in] window The window instance
56  * @return A valid handle to a RenderTaskList
57  */
58 DALI_ADAPTOR_API Dali::RenderTaskList GetRenderTaskList( Window window );
59
60 /**
61  * @brief Retrieve the window that the given actor is added to.
62  *
63  * @param[in] actor The actor
64  * @return The window the actor is added to or an empty handle if the actor is not added to any window.
65  */
66 DALI_ADAPTOR_API Window Get( Actor actor );
67
68 /**
69  * @brief This signal is emitted just after the event processing is finished.
70  *
71  * @param[in] window The window instance
72  * @return The signal to connect to
73  */
74 DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
75
76 /**
77  * @brief This signal is emitted when key event is received.
78  *
79  * A callback of the following type may be connected:
80  * @code
81  *   void YourCallbackName(const KeyEvent& event);
82  * @endcode
83  * @param[in] window The window instance
84  * @return The signal to connect to
85  */
86 DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window );
87
88 /**
89  * @brief This signal is emitted when key event is received.
90  *
91  * A callback of the following type may be connected:
92  * @code
93  *   bool YourCallbackName(const KeyEvent& event);
94  * @endcode
95  * @param[in] window The window instance
96  * @return The signal to connect to
97  */
98 DALI_ADAPTOR_API KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window );
99
100 /**
101  * @brief This signal is emitted when the screen is touched and when the touch ends
102  * (i.e. the down & up touch events only).
103  *
104  * If there are multiple touch points, then this will be emitted when the first touch occurs and
105  * then when the last finger is lifted.
106  * An interrupted event will also be emitted (if it occurs).
107  * A callback of the following type may be connected:
108  * @code
109  *   void YourCallbackName( TouchData event );
110  * @endcode
111  *
112  * @param[in] window The window instance
113  * @return The touch signal to connect to
114  * @note Motion events are not emitted.
115  */
116 DALI_ADAPTOR_API TouchSignalType& TouchSignal( Window window );
117
118 /**
119  * @brief This signal is emitted when wheel event is received.
120  *
121  * A callback of the following type may be connected:
122  * @code
123  *   void YourCallbackName(const WheelEvent& event);
124  * @endcode
125  * @param[in] window The window instance
126  * @return The signal to connect to
127  */
128 DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window );
129
130 } // namespace DevelWindow
131
132 } // namespace Dali
133
134 #endif // DALI_WINDOW_DEVEL_H