-#ifndef __DALI_WINDOW_H__
-#define __DALI_WINDOW_H__
+#ifndef DALI_WINDOW_H
+#define DALI_WINDOW_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/math/rect.h>
#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/math/vector2.h>
+#include <dali/public-api/math/vector4.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/object/any.h>
#include <dali/public-api/signals/dali-signal.h>
class DragAndDropDetector;
class Orientation;
+class Actor;
+class Layer;
/**
* @brief The window class is used internally for drawing.
typedef Uint16Pair WindowSize; ///< Window size type @SINCE_1_2.60
typedef Uint16Pair WindowPosition; ///< Window position type @SINCE_1_2.60
- typedef Signal< void (bool) > IndicatorSignalType; ///< Indicator state signal type @SINCE_1_0.0
- typedef Signal< void (bool) > FocusSignalType; ///< Window focus signal type @SINCE_1_2.60
- typedef Signal< void (WindowSize) > ResizedSignalType; ///< Window resized signal type @SINCE_1_2.60
-
+ typedef Signal< void (bool) > IndicatorSignalType; ///< @DEPRECATED_1_4.9 @brief Indicator state signal type @SINCE_1_0.0
+ typedef Signal< void (bool) > FocusSignalType; ///< @DEPRECATED_1_4.35 @brief Window focus signal type @SINCE_1_2.60
+ typedef Signal< void (WindowSize) > ResizedSignalType; ///< @DEPRECATED_1_4.35 @brief Window resized signal type @SINCE_1_2.60
+ typedef Signal< void (Window,bool) > FocusChangeSignalType; ///< Window focus signal type @SINCE_1_4.35
+ typedef Signal< void (Window,WindowSize) > ResizeSignalType; ///< Window resized signal type @SINCE_1_4.35
public:
// Enumerations
};
/**
+ * @DEPRECATED_1_4.9
* @brief Enumeration for opacity of the indicator.
* @SINCE_1_0.0
*/
enum IndicatorBgOpacity
{
- OPAQUE = 100, ///< Fully opaque indicator Bg @SINCE_1_0.0
- TRANSLUCENT = 50, ///< Semi translucent indicator Bg @SINCE_1_0.0
- TRANSPARENT = 0 ///< Fully transparent indicator Bg @SINCE_1_0.0
+ OPAQUE = 100, ///< @DEPRECATED_1_4.9 @brief Fully opaque indicator Bg @SINCE_1_0.0
+ TRANSLUCENT = 50, ///< @DEPRECATED_1_4.9 @brief Semi translucent indicator Bg @SINCE_1_0.0
+ TRANSPARENT = 0 ///< @DEPRECATED_1_4.9 @brief Fully transparent indicator Bg @SINCE_1_0.0
};
/**
+ * @DEPRECATED_1_4.9
* @brief Enumeration for visible mode of the indicator.
* @SINCE_1_0.0
*/
enum IndicatorVisibleMode
{
- INVISIBLE = 0, ///< Hide indicator @SINCE_1_0.0
- VISIBLE = 1, ///< Show indicator @SINCE_1_0.0
- AUTO = 2 ///< Hide in default, will show when necessary @SINCE_1_0.0
+ INVISIBLE = 0, ///< @DEPRECATED_1_4.9 @brief Hide indicator @SINCE_1_0.0
+ VISIBLE = 1, ///< @DEPRECATED_1_4.9 @brief Show indicator @SINCE_1_0.0
+ AUTO = 2 ///< @DEPRECATED_1_4.9 @brief Hide in default, will show when necessary @SINCE_1_0.0
};
/**
* @param[in] name The Window title
* @param[in] isTransparent Whether Window is transparent
* @return A new window
+ * @note This creates an extra window in addition to the default main window
*/
static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
* @param[in] name The Window title
* @param[in] className The Window class name
* @param[in] isTransparent Whether Window is transparent
+ * @note This creates an extra window in addition to the default main window
* @return A new Window
*/
static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
Window& operator=(const Window& rhs);
/**
+ * @brief Adds a child Actor to the Window.
+ *
+ * The child will be referenced.
+ *
+ * @SINCE_1_4.19
+ * @param[in] actor The child
+ * @pre The actor has been initialized.
+ * @pre The actor does not have a parent.
+ */
+ void Add( Actor actor );
+
+ /**
+ * @brief Removes a child Actor from the Window.
+ *
+ * The child will be unreferenced.
+ *
+ * @SINCE_1_4.19
+ * @param[in] actor The child
+ * @pre The actor has been added to the stage.
+ */
+ void Remove( Actor actor );
+
+ /**
+ * @brief Sets the background color of the Window.
+ *
+ * @SINCE_1_4.19
+ * @param[in] color The new background color
+ */
+ void SetBackgroundColor( const Vector4& color );
+
+ /**
+ * @brief Gets the background color of the Window.
+ *
+ * @SINCE_1_4.19
+ * @return The background color
+ */
+ Vector4 GetBackgroundColor() const;
+
+ /**
+ * @brief Returns the root Layer of the Window.
+ *
+ * @SINCE_1_4.19
+ * @return The root layer
+ */
+ Layer GetRootLayer() const;
+
+ /**
+ * @brief Queries the number of on-scene layers in the Window.
+ *
+ * Note that a default layer is always provided (count >= 1).
+ *
+ * @SINCE_1_4.19
+ * @return The number of layers
+ */
+ uint32_t GetLayerCount() const;
+
+ /**
+ * @brief Retrieves the layer at a specified depth in the Window.
+ *
+ * @SINCE_1_4.19
+ * @param[in] depth The depth
+ * @return The layer found at the given depth
+ * @pre Depth is less than layer count; see GetLayerCount().
+ */
+ Layer GetLayer( uint32_t depth ) const;
+
+ /**
+ * @DEPRECATED_1_4.9
* @brief This sets whether the indicator bar should be shown or not.
* @SINCE_1_0.0
* @param[in] visibleMode Visible mode for indicator bar, VISIBLE in default
*/
- void ShowIndicator( IndicatorVisibleMode visibleMode );
+ void ShowIndicator( IndicatorVisibleMode visibleMode ) DALI_DEPRECATED_API;
/**
+ * @DEPRECATED_1_4.9
* @brief This sets the opacity mode of indicator bar.
* @SINCE_1_0.0
* @param[in] opacity The opacity mode
*/
- void SetIndicatorBgOpacity( IndicatorBgOpacity opacity );
+ void SetIndicatorBgOpacity( IndicatorBgOpacity opacity ) DALI_DEPRECATED_API;
/**
+ * @DEPRECATED_1_4.9
* @brief This sets the orientation of indicator bar.
*
* It does not implicitly show the indicator if it is currently hidden.
* @SINCE_1_0.0
* @param[in] orientation The orientation
*/
- void RotateIndicator(WindowOrientation orientation);
+ void RotateIndicator(WindowOrientation orientation) DALI_DEPRECATED_API;
/**
* @brief Sets the window name and class string.
WindowOrientation GetPreferredOrientation();
/**
- * @brief Returns the Drag & drop detector which can be used to receive drag & drop events.
+ * @DEPRECATED_1_4.19 Was not intended for Application developers
+ * @brief Returns an empty handle.
* @note Not intended for application developers.
* @SINCE_1_0.0
- * @return A handle to the DragAndDropDetector
+ * @return An empty handle
*/
- DragAndDropDetector GetDragAndDropDetector() const;
+ DragAndDropDetector GetDragAndDropDetector() const DALI_DEPRECATED_API;
/**
* @brief Gets the native handle of the window.
public: // Signals
/**
+ * @DEPRECATED_1_4.9
* @brief The user should connect to this signal to get a timing when indicator was shown / hidden.
* @SINCE_1_0.0
* @return The signal to connect to
*/
- IndicatorSignalType& IndicatorVisibilityChangedSignal();
+ IndicatorSignalType& IndicatorVisibilityChangedSignal() DALI_DEPRECATED_API;
/**
+ * @DEPRECATED_1_4.35
* @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
*
* A callback of the following type may be connected:
* @SINCE_1_2.60
* @return The signal to connect to
*/
- FocusSignalType& FocusChangedSignal();
+ FocusSignalType& FocusChangedSignal() DALI_DEPRECATED_API;
/**
* @brief This signal is emitted when the window is resized.
* @SINCE_1_2.60
* @return The signal to connect to
*/
- ResizedSignalType& ResizedSignal();
+ ResizedSignalType& ResizedSignal() DALI_DEPRECATED_API;
+
+ /**
+ * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Window window, bool focusIn );
+ * @endcode
+ * The parameter is true if window gains focus, otherwise false.
+ * and window means this signal was called from what window
+ *
+ * @SINCE_1_4.35
+ * @return The signal to connect to
+ */
+ FocusChangeSignalType& FocusChangeSignal();
+
+ /**
+ * @brief This signal is emitted when the window is resized.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Window window, int width, int height );
+ * @endcode
+ * The parameters are the resized width and height.
+ * and window means this signal was called from what window
+ *
+ * @SINCE_1_4.35
+ * @return The signal to connect to
+ */
+ ResizeSignalType& ResizeSignal();
public: // Not intended for application developers
/// @cond internal