summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b49c9b5)
Change-Id: I849cb5349a093142e45edf12599588634f354233
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
18 files changed:
-bool WindowBaseAndroid::SetNotificationLevel(Dali::WindowNotificationLevel level)
+Dali::WindowOperationResult WindowBaseAndroid::SetNotificationLevel(Dali::WindowNotificationLevel level)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
Dali::WindowNotificationLevel WindowBaseAndroid::GetNotificationLevel() const
}
Dali::WindowNotificationLevel WindowBaseAndroid::GetNotificationLevel() const
-bool WindowBaseAndroid::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+Dali::WindowOperationResult WindowBaseAndroid::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
WindowScreenOffMode WindowBaseAndroid::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseAndroid::GetScreenOffMode() const
return WindowScreenOffMode::TIMEOUT;
}
return WindowScreenOffMode::TIMEOUT;
}
-bool WindowBaseAndroid::SetBrightness(int brightness)
+Dali::WindowOperationResult WindowBaseAndroid::SetBrightness(int brightness)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
int WindowBaseAndroid::GetBrightness() const
}
int WindowBaseAndroid::GetBrightness() const
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(Dali::WindowNotificationLevel level) override;
+ Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ Dali::WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
- virtual bool SetNotificationLevel(Dali::WindowNotificationLevel level) = 0;
+ virtual Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) = 0;
/**
* @copydoc Dali::Window::GetNotificationLevel()
/**
* @copydoc Dali::Window::GetNotificationLevel()
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
- virtual bool SetScreenOffMode(WindowScreenOffMode screenOffMode) = 0;
+ virtual Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) = 0;
/**
* @copydoc Dali::Window::GetScreenOffMode()
/**
* @copydoc Dali::Window::GetScreenOffMode()
/**
* @copydoc Dali::Window::SetBrightness()
*/
/**
* @copydoc Dali::Window::SetBrightness()
*/
- virtual bool SetBrightness(int brightness) = 0;
+ virtual Dali::WindowOperationResult SetBrightness(int brightness) = 0;
/**
* @copydoc Dali::Window::GetBrightness()
/**
* @copydoc Dali::Window::GetBrightness()
-bool Window::SetNotificationLevel(WindowNotificationLevel level)
+WindowOperationResult Window::SetNotificationLevel(WindowNotificationLevel level)
{
if(mType != WindowType::NOTIFICATION)
{
DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType);
{
if(mType != WindowType::NOTIFICATION)
{
DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType);
+ return WindowOperationResult::INVALID_OPERATION;
}
return mWindowBase->SetNotificationLevel(level);
}
return mWindowBase->SetNotificationLevel(level);
-bool Window::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+WindowOperationResult Window::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
return mWindowBase->SetScreenOffMode(screenOffMode);
}
{
return mWindowBase->SetScreenOffMode(screenOffMode);
}
return mWindowBase->GetScreenOffMode();
}
return mWindowBase->GetScreenOffMode();
}
-bool Window::SetBrightness(int brightness)
+WindowOperationResult Window::SetBrightness(int brightness)
{
if(brightness < 0 || brightness > 100)
{
DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Invalid brightness value [%d]\n", brightness);
{
if(brightness < 0 || brightness > 100)
{
DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Invalid brightness value [%d]\n", brightness);
+ return WindowOperationResult::INVALID_OPERATION;
}
return mWindowBase->SetBrightness(brightness);
}
return mWindowBase->SetBrightness(brightness);
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
- bool SetNotificationLevel(WindowNotificationLevel level);
+ WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
/**
* @copydoc Dali::Window::GetNotificationLevel()
/**
* @copydoc Dali::Window::GetNotificationLevel()
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
+ WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @copydoc Dali::Window::GetScreenOffMode()
/**
* @copydoc Dali::Window::GetScreenOffMode()
/**
* @copydoc Dali::Window::SetBrightness()
*/
/**
* @copydoc Dali::Window::SetBrightness()
*/
- bool SetBrightness(int brightness);
+ WindowOperationResult SetBrightness(int brightness);
/**
* @copydoc Dali::Window::GetBrightness()
/**
* @copydoc Dali::Window::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(WindowNotificationLevel level) override;
+ WindowOperationResult SetNotificationLevel(WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
-bool WindowBaseCocoa::SetNotificationLevel( WindowNotificationLevel level )
+WindowOperationResult WindowBaseCocoa::SetNotificationLevel( WindowNotificationLevel level )
+ return WindowOperationResult::NOT_SUPPORTED;
}
WindowNotificationLevel WindowBaseCocoa::GetNotificationLevel() const
}
WindowNotificationLevel WindowBaseCocoa::GetNotificationLevel() const
-bool WindowBaseCocoa::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+WindowOperationResult WindowBaseCocoa::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+ return WindowOperationResult::NOT_SUPPORTED;
}
WindowScreenOffMode WindowBaseCocoa::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseCocoa::GetScreenOffMode() const
return WindowScreenOffMode::TIMEOUT;
}
return WindowScreenOffMode::TIMEOUT;
}
-bool WindowBaseCocoa::SetBrightness( int brightness )
+WindowOperationResult WindowBaseCocoa::SetBrightness( int brightness )
+ return WindowOperationResult::NOT_SUPPORTED;
}
int WindowBaseCocoa::GetBrightness() const
}
int WindowBaseCocoa::GetBrightness() const
ecore_wl_window_type_set(mEcoreWindow, windowType);
}
ecore_wl_window_type_set(mEcoreWindow, windowType);
}
-bool WindowBaseEcoreWl::SetNotificationLevel(Dali::WindowNotificationLevel level)
+Dali::WindowOperationResult WindowBaseEcoreWl::SetNotificationLevel(Dali::WindowNotificationLevel level)
if(!mNotificationLevelChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
if(!mNotificationLevelChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
+ return Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Permission denied! [%d]\n", level);
}
else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Permission denied! [%d]\n", level);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
+ return Dali::WindowOperationResult::SUCCEED;
}
Dali::WindowNotificationLevel WindowBaseEcoreWl::GetNotificationLevel() const
}
Dali::WindowNotificationLevel WindowBaseEcoreWl::GetNotificationLevel() const
tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
}
tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
}
-bool WindowBaseEcoreWl::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+Dali::WindowOperationResult WindowBaseEcoreWl::SetScreenOffMode(WindowScreenOffMode screenOffMode)
if(!mScreenOffModeChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
if(!mScreenOffModeChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
+ return Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
}
else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
+ return Dali::WindowOperationResult::SUCCEED;
}
WindowScreenOffMode WindowBaseEcoreWl::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseEcoreWl::GetScreenOffMode() const
-bool WindowBaseEcoreWl::SetBrightness(int brightness)
+Dali::WindowOperationResult WindowBaseEcoreWl::SetBrightness(int brightness)
{
while(!mTizenDisplayPolicy)
{
{
while(!mTizenDisplayPolicy)
{
if(!mBrightnessChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
if(!mBrightnessChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
+ return Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Permission denied! [%d]\n", brightness);
}
else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Permission denied! [%d]\n", brightness);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness is changed [%d]\n", mBrightness);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::SetBrightness: Brightness is changed [%d]\n", mBrightness);
+ return Dali::WindowOperationResult::SUCCEED;
}
int WindowBaseEcoreWl::GetBrightness() const
}
int WindowBaseEcoreWl::GetBrightness() const
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(Dali::WindowNotificationLevel level) override;
+ Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ Dali::WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
ecore_wl2_window_type_set(mEcoreWindow, windowType);
}
ecore_wl2_window_type_set(mEcoreWindow, windowType);
}
-bool WindowBaseEcoreWl2::SetNotificationLevel(Dali::WindowNotificationLevel level)
+Dali::WindowOperationResult WindowBaseEcoreWl2::SetNotificationLevel(Dali::WindowNotificationLevel level)
if(!mNotificationLevelChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
if(!mNotificationLevelChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState);
+ Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Permission denied! [%d]\n", level);
}
else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Permission denied! [%d]\n", level);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Level is changed [%d]\n", mNotificationLevel);
+ return Dali::WindowOperationResult::SUCCEED;
}
Dali::WindowNotificationLevel WindowBaseEcoreWl2::GetNotificationLevel() const
}
Dali::WindowNotificationLevel WindowBaseEcoreWl2::GetNotificationLevel() const
tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl2_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
}
tizen_policy_set_opaque_state(mTizenPolicy, ecore_wl2_window_surface_get(mEcoreWindow), (opaque ? 1 : 0));
}
-bool WindowBaseEcoreWl2::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+Dali::WindowOperationResult WindowBaseEcoreWl2::SetScreenOffMode(WindowScreenOffMode screenOffMode)
if(!mScreenOffModeChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
if(!mScreenOffModeChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mScreenOffModeChangeState);
+ return Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
}
else if(mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetScreenOffMode: Screen mode is changed [%d]\n", mScreenOffMode);
+ return Dali::WindowOperationResult::SUCCEED;
}
WindowScreenOffMode WindowBaseEcoreWl2::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseEcoreWl2::GetScreenOffMode() const
-bool WindowBaseEcoreWl2::SetBrightness(int brightness)
+Dali::WindowOperationResult WindowBaseEcoreWl2::SetBrightness(int brightness)
{
while(!mTizenDisplayPolicy)
{
{
while(!mTizenDisplayPolicy)
{
if(!mBrightnessChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
if(!mBrightnessChangeDone)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mBrightnessChangeState);
+ return Dali::WindowOperationResult::UNKNOWN_ERROR;
}
else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Permission denied! [%d]\n", brightness);
}
else if(mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED)
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Permission denied! [%d]\n", brightness);
+ return Dali::WindowOperationResult::PERMISSION_DENIED;
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Brightness is changed [%d]\n", mBrightness);
}
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetBrightness: Brightness is changed [%d]\n", mBrightness);
+ return Dali::WindowOperationResult::SUCCEED;
}
int WindowBaseEcoreWl2::GetBrightness() const
}
int WindowBaseEcoreWl2::GetBrightness() const
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(Dali::WindowNotificationLevel level) override;
+ Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ Dali::WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
-bool WindowBaseEcoreX::SetNotificationLevel(Dali::WindowNotificationLevel level)
+Dali::WindowOperationResult WindowBaseEcoreX::SetNotificationLevel(Dali::WindowNotificationLevel level)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
Dali::WindowNotificationLevel WindowBaseEcoreX::GetNotificationLevel() const
}
Dali::WindowNotificationLevel WindowBaseEcoreX::GetNotificationLevel() const
-bool WindowBaseEcoreX::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+Dali::WindowOperationResult WindowBaseEcoreX::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
WindowScreenOffMode WindowBaseEcoreX::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseEcoreX::GetScreenOffMode() const
return WindowScreenOffMode::TIMEOUT;
}
return WindowScreenOffMode::TIMEOUT;
}
-bool WindowBaseEcoreX::SetBrightness(int brightness)
+Dali::WindowOperationResult WindowBaseEcoreX::SetBrightness(int brightness)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
int WindowBaseEcoreX::GetBrightness() const
}
int WindowBaseEcoreX::GetBrightness() const
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(Dali::WindowNotificationLevel level) override;
+ Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ Dali::WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
-bool WindowBaseWin::SetNotificationLevel(Dali::WindowNotificationLevel level)
+Dali::WindowOperationResult WindowBaseWin::SetNotificationLevel(Dali::WindowNotificationLevel level)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
Dali::WindowNotificationLevel WindowBaseWin::GetNotificationLevel() const
}
Dali::WindowNotificationLevel WindowBaseWin::GetNotificationLevel() const
-bool WindowBaseWin::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+Dali::WindowOperationResult WindowBaseWin::SetScreenOffMode(WindowScreenOffMode screenOffMode)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
WindowScreenOffMode WindowBaseWin::GetScreenOffMode() const
}
WindowScreenOffMode WindowBaseWin::GetScreenOffMode() const
return WindowScreenOffMode::TIMEOUT;
}
return WindowScreenOffMode::TIMEOUT;
}
-bool WindowBaseWin::SetBrightness(int brightness)
+Dali::WindowOperationResult WindowBaseWin::SetBrightness(int brightness)
+ return Dali::WindowOperationResult::NOT_SUPPORTED;
}
int WindowBaseWin::GetBrightness() const
}
int WindowBaseWin::GetBrightness() const
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel(Dali::WindowNotificationLevel level) override;
+ Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
+ Dali::WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
*/
- bool SetBrightness(int brightness) override;
+ Dali::WindowOperationResult SetBrightness(int brightness) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
HIDE, ///< Window hide effect. @SINCE_2_0.0
};
HIDE, ///< Window hide effect. @SINCE_2_0.0
};
+/**
+ * @brief An enum of window operation result.
+ */
+enum class WindowOperationResult
+{
+ UNKNOWN_ERROR = 0, ///< Failed for unknown reason.
+ SUCCEED, ///< Succeed.
+ PERMISSION_DENIED, ///< Permission denied.
+ NOT_SUPPORTED, ///< The operation is not supported.
+ INVALID_OPERATION, ///< The operation is invalid. (e.g. Try to operate to the wrong window)
+};
+
} // namespace Dali
#endif // DALI_WINDOW_ENUMERATIONS_H
} // namespace Dali
#endif // DALI_WINDOW_ENUMERATIONS_H
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return GetImplementation(*this).GetType();
}
return GetImplementation(*this).GetType();
}
-bool Window::SetNotificationLevel(WindowNotificationLevel level)
+WindowOperationResult Window::SetNotificationLevel(WindowNotificationLevel level)
{
return GetImplementation(*this).SetNotificationLevel(level);
}
{
return GetImplementation(*this).SetNotificationLevel(level);
}
return GetImplementation(*this).IsOpaqueState();
}
return GetImplementation(*this).IsOpaqueState();
}
-bool Window::SetScreenOffMode(WindowScreenOffMode screenMode)
+WindowOperationResult Window::SetScreenOffMode(WindowScreenOffMode screenMode)
{
return GetImplementation(*this).SetScreenOffMode(screenMode);
}
{
return GetImplementation(*this).SetScreenOffMode(screenMode);
}
return GetImplementation(*this).GetScreenOffMode();
}
return GetImplementation(*this).GetScreenOffMode();
}
-bool Window::SetBrightness(int brightness)
+WindowOperationResult Window::SetBrightness(int brightness)
{
return GetImplementation(*this).SetBrightness(brightness);
}
{
return GetImplementation(*this).SetBrightness(brightness);
}
* @brief Sets a priority level for the specified notification window.
* @@SINCE_2_0.0
* @param[in] level The notification window level.
* @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.
*/
* @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.
/**
* @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.
* 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
*/
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_DISPLAY
*/
- bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
+ WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @brief Gets a screen off mode of the window.
/**
* @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).
* 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
*/
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_DISPLAY
*/
- bool SetBrightness(int brightness);
+ WindowOperationResult SetBrightness(int brightness);
/**
* @brief Gets preferred brightness of the window.
/**
* @brief Gets preferred brightness of the window.