#define DALI_WINDOW_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
// EXTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/window-enumerations.h>
+#include <dali/public-api/math/int-pair.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/math/vector2.h>
{
public:
using WindowSize = Uint16Pair; ///< Window size type @SINCE_1_2.60
- using WindowPosition = Uint16Pair; ///< Window position type @SINCE_1_2.60
+ using WindowPosition = Int32Pair; ///< Window position type @SINCE_2_1.45
using FocusChangeSignalType = Signal<void(Window, bool)>; ///< Window focus signal type @SINCE_1_4.35
using ResizeSignalType = Signal<void(Window, WindowSize)>; ///< Window resized signal type @SINCE_1_4.35
Window& operator=(Window&& rhs);
/**
+ * @brief Downcast sceneHolder to window
+ *
+ * @SINCE_2_1.46
+ * @param[in] handle The handle need to downcast
+ * @return Whether it's a valid window or not
+ */
+ static Window DownCast(BaseHandle handle);
+
+ /**
* @brief Adds a child Actor to the Window.
*
* The child will be referenced.
* @brief Sets a priority level for the specified notification window.
* @@SINCE_2_0.0
* @param[in] level The notification window level.
- * @return True if no error occurred, false otherwise.
+ * @return The result of the window operation.
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_WINDOW_PRIORITY
* @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
*/
- bool SetNotificationLevel(WindowNotificationLevel level);
+ WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
/**
* @brief Gets a priority level for the specified notification window.
* If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
* @@SINCE_2_0.0
* @param[in] screenOffMode The screen mode.
- * @return True if no error occurred, false otherwise.
+ * @return The result of the window operation.
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_DISPLAY
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
+ WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @brief Gets a screen off mode of the window.
* A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
* @SINCE_1_2.60
* @param[in] brightness The preferred brightness (0 to 100).
- * @return True if no error occurred, false otherwise.
+ * @return The result of the window operation.
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_DISPLAY
*/
- bool SetBrightness(int brightness);
+ WindowOperationResult SetBrightness(int brightness);
/**
* @brief Gets preferred brightness of the window.