1 #ifndef DALI_WINDOW_DEVEL_H
2 #define DALI_WINDOW_DEVEL_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.
22 #include <dali/public-api/adaptor-framework/window.h>
34 typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type
36 typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type
38 typedef Signal< void (const TouchData&) > TouchSignalType; ///< Touch signal type
40 typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Touched signal type
42 typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType; ///< Visibility changed signal type
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.
47 * @param[in] window The window instance
48 * @param[in] positionSize The new window position and size
50 DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize );
53 * @brief Retrieves the list of render-tasks in the window.
55 * @param[in] window The window instance
56 * @return A valid handle to a RenderTaskList
58 DALI_ADAPTOR_API Dali::RenderTaskList GetRenderTaskList( Window window );
61 * @brief Retrieve the window that the given actor is added to.
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.
66 DALI_ADAPTOR_API Window Get( Actor actor );
69 * @brief This signal is emitted just after the event processing is finished.
71 * @param[in] window The window instance
72 * @return The signal to connect to
74 DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
77 * @brief This signal is emitted when key event is received.
79 * A callback of the following type may be connected:
81 * void YourCallbackName(const KeyEvent& event);
83 * @param[in] window The window instance
84 * @return The signal to connect to
86 DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window );
89 * @brief This signal is emitted when the screen is touched and when the touch ends
90 * (i.e. the down & up touch events only).
92 * If there are multiple touch points, then this will be emitted when the first touch occurs and
93 * then when the last finger is lifted.
94 * An interrupted event will also be emitted (if it occurs).
95 * A callback of the following type may be connected:
97 * void YourCallbackName( TouchData event );
100 * @param[in] window The window instance
101 * @return The touch signal to connect to
102 * @note Motion events are not emitted.
104 DALI_ADAPTOR_API TouchSignalType& TouchSignal( Window window );
107 * @brief This signal is emitted when wheel event is received.
109 * A callback of the following type may be connected:
111 * void YourCallbackName(const WheelEvent& event);
113 * @param[in] window The window instance
114 * @return The signal to connect to
116 DALI_ADAPTOR_API WheelEventSignalType& WheelEventSignal( Window window );
119 * @brief This signal is emitted when the window is shown or hidden.
121 * A callback of the following type may be connected:
123 * void YourCallbackName( Window window, bool visible );
125 * @param[in] window The window instance
126 * @return The signal to connect to
128 DALI_ADAPTOR_API VisibilityChangedSignalType& VisibilityChangedSignal( Window window );
131 * @brief Sets parent window of the window.
133 * After setting that, these windows do together when raise-up, lower and iconified/deiconified.
134 * Initially, the window is located on top of the parent. The window can go below parent by calling Lower().
135 * If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again.
137 * @param[in] window The window instance
138 * @param[in] parent The parent window instance
140 DALI_ADAPTOR_API void SetParent( Window window, Window parent );
143 * @brief Unsets parent window of the window.
145 * After unsetting, the window is disconnected his parent window.
147 * @param[in] window The window instance
149 DALI_ADAPTOR_API void Unparent( Window window );
152 * @brief Gets parent window of the window.
154 * @param[in] window The window instance
155 * @return The parent window of the window
157 DALI_ADAPTOR_API Window GetParent( Window window );
160 * @brief Downcast sceneHolder to window
162 * @param[in] handle The handle need to downcast
163 * @return The window cast from SceneHolder
165 DALI_ADAPTOR_API Window DownCast( BaseHandle handle );
167 } // namespace DevelWindow
171 #endif // DALI_WINDOW_DEVEL_H