Window and GlWindow's enum type are same.
It is unnessary that they has each their enum type.
For enhancement, common enum type is added and used both Window and GlWindow.
Change-Id: Ic15423fa79a2e79b27c9abfac83aca898d49f658
try
{
- Dali::Vector< Dali::GlWindow::GlWindowOrientation> orientations;
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::PORTRAIT );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::LANDSCAPE );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::PORTRAIT_INVERSE );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::LANDSCAPE_INVERSE );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::PORTRAIT );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::LANDSCAPE );
- orientations.PushBack( Dali::GlWindow::GlWindowOrientation::PORTRAIT_INVERSE );
+ Dali::Vector< Dali::WindowOrientation> orientations;
+ orientations.PushBack( Dali::WindowOrientation::PORTRAIT );
+ orientations.PushBack( Dali::WindowOrientation::LANDSCAPE );
+ orientations.PushBack( Dali::WindowOrientation::PORTRAIT_INVERSE );
+ orientations.PushBack( Dali::WindowOrientation::LANDSCAPE_INVERSE );
+ orientations.PushBack( Dali::WindowOrientation::NO_ORIENTATION_PREFERENCE );
+ orientations.PushBack( Dali::WindowOrientation::PORTRAIT );
+ orientations.PushBack( Dali::WindowOrientation::LANDSCAPE );
+ orientations.PushBack( Dali::WindowOrientation::PORTRAIT_INVERSE );
window.SetAvailableOrientations(orientations);
DALI_TEST_CHECK( false );
try
{
- window.SetPreferredOrientation(Dali::GlWindow::GlWindowOrientation::PORTRAIT);
+ window.SetPreferredOrientation(Dali::WindowOrientation::PORTRAIT);
DALI_TEST_CHECK( false );
}
try
{
- window.SetPreferredOrientation(Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE);
+ window.SetPreferredOrientation(Dali::WindowOrientation::NO_ORIENTATION_PREFERENCE);
DALI_TEST_CHECK( false );
}
try
{
- Dali::GlWindow::GlWindowOrientation orientation = window.GetCurrentOrientation();
- DALI_TEST_CHECK( orientation == Dali::GlWindow::GlWindowOrientation::PORTRAIT );
+ Dali::WindowOrientation orientation = window.GetCurrentOrientation();
+ DALI_TEST_CHECK( orientation == Dali::WindowOrientation::PORTRAIT );
DALI_TEST_CHECK( false );
}
Dali::Window window;
try
{
- window.AddAvailableOrientation(Dali::Window::PORTRAIT);
+ window.AddAvailableOrientation(Dali::WindowOrientation::PORTRAIT);
DALI_TEST_CHECK(false); // Should not reach here!
}
catch(...)
Dali::Window window;
try
{
- window.RemoveAvailableOrientation(Dali::Window::PORTRAIT);
+ window.RemoveAvailableOrientation(Dali::WindowOrientation::PORTRAIT);
DALI_TEST_CHECK(false); // Should not reach here!
}
catch(...)
Dali::Window window;
try
{
- window.SetPreferredOrientation(Dali::Window::PORTRAIT);
+ window.SetPreferredOrientation(Dali::WindowOrientation::PORTRAIT);
DALI_TEST_CHECK(false); // Should not reach here!
}
catch(...)
Dali::Window window;
try
{
- Dali::Window::WindowOrientation orientation = window.GetPreferredOrientation();
- DALI_TEST_CHECK(orientation == Dali::Window::PORTRAIT); // Should not reach here!
+ Dali::WindowOrientation orientation = window.GetPreferredOrientation();
+ DALI_TEST_CHECK(orientation == Dali::WindowOrientation::PORTRAIT); // Should not reach here!
}
catch(...)
{
namespace Dali
{
+
GlWindow GlWindow::New()
{
PositionSize positionSize( 0, 0, 0, 0 );
return Dali::GlWindow::New( positionSize, "", "", false );
}
+
GlWindow GlWindow::New(PositionSize positionSize, const std::string& name, const std::string& className, bool isTransparent )
{
GlWindow newWindow;
}
return newWindow;
}
+
GlWindow::GlWindow()
{
}
+
GlWindow::~GlWindow()
{
}
{
GetImplementation(*this).SetEglConfig( depth, stencil, msaa, version );
}
+
void GlWindow::Raise()
{
GetImplementation(*this).Raise();
}
+
void GlWindow::Lower()
{
GetImplementation(*this).Lower();
}
+
void GlWindow::Activate()
{
GetImplementation(*this).Activate();
}
+
void GlWindow::Show()
{
GetImplementation(*this).Show();
}
+
void GlWindow::Hide()
{
GetImplementation(*this).Hide();
}
+
unsigned int GlWindow::GetSupportedAuxiliaryHintCount() const
{
return GetImplementation(*this).GetSupportedAuxiliaryHintCount();
}
+
std::string GlWindow::GetSupportedAuxiliaryHint( unsigned int index ) const
{
return GetImplementation(*this).GetSupportedAuxiliaryHint( index );
}
+
unsigned int GlWindow::AddAuxiliaryHint( const std::string& hint, const std::string& value )
{
return GetImplementation(*this).AddAuxiliaryHint( hint, value );
}
+
bool GlWindow::RemoveAuxiliaryHint( unsigned int id )
{
return GetImplementation(*this).RemoveAuxiliaryHint( id );
}
+
bool GlWindow::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
{
return GetImplementation(*this).SetAuxiliaryHintValue( id, value );
}
+
std::string GlWindow::GetAuxiliaryHintValue( unsigned int id ) const
{
return GetImplementation(*this).GetAuxiliaryHintValue( id );
}
+
unsigned int GlWindow::GetAuxiliaryHintId( const std::string& hint ) const
{
return GetImplementation(*this).GetAuxiliaryHintId( hint );
}
+
void GlWindow::SetInputRegion( const Rect< int >& inputRegion )
{
GetImplementation(*this).SetInputRegion( inputRegion );
}
+
void GlWindow::SetOpaqueState( bool opaque )
{
GetImplementation(*this).SetOpaqueState( opaque );
}
+
bool GlWindow::IsOpaqueState() const
{
return GetImplementation(*this).IsOpaqueState();
}
+
void GlWindow::SetPositionSize( PositionSize positionSize )
{
GetImplementation(*this).SetPositionSize( positionSize );
}
+
PositionSize GlWindow::GetPositionSize() const
{
return GetImplementation(*this).GetPositionSize();
}
-Dali::GlWindow::GlWindowOrientation GlWindow::GetCurrentOrientation() const
+
+WindowOrientation GlWindow::GetCurrentOrientation() const
{
return GetImplementation( *this ).GetCurrentOrientation();
}
-void GlWindow::SetAvailableOrientations( const Dali::Vector< Dali::GlWindow::GlWindowOrientation >& orientations )
+
+void GlWindow::SetAvailableOrientations( const Dali::Vector< WindowOrientation >& orientations )
{
GetImplementation( *this ).SetAvailableOrientations( orientations );
}
-void GlWindow::SetPreferredOrientation( Dali::GlWindow::GlWindowOrientation orientation )
+
+void GlWindow::SetPreferredOrientation( WindowOrientation orientation )
{
GetImplementation(*this).SetPreferredOrientation( orientation );
}
+
void GlWindow::RegisterGlCallback( CallbackBase* initCallback, CallbackBase* renderFrameCallback, CallbackBase* terminateCallback )
{
GetImplementation(*this).RegisterGlCallback( initCallback, renderFrameCallback, terminateCallback );
}
+
void GlWindow::RenderOnce()
{
GetImplementation(*this).RenderOnce();
}
+
GlWindow::FocusChangeSignalType& GlWindow::FocusChangeSignal()
{
return GetImplementation(*this).FocusChangeSignal();
}
+
GlWindow::ResizeSignalType& GlWindow::ResizeSignal()
{
return GetImplementation(*this).ResizeSignal();
}
+
GlWindow::KeyEventSignalType& GlWindow::KeyEventSignal()
{
return GetImplementation(*this).KeyEventSignal();
}
+
GlWindow::TouchEventSignalType& GlWindow::TouchedSignal()
{
return GetImplementation(*this).TouchedSignal();
}
+
GlWindow::VisibilityChangedSignalType& GlWindow::VisibilityChangedSignal()
{
return GetImplementation(*this).VisibilityChangedSignal();
}
+
GlWindow::GlWindow( Internal::Adaptor::GlWindow* window )
: BaseHandle( window )
{
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/object/any.h>
#include <dali/public-api/signals/dali-signal.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
// INTERNAL INCLUDES
#include <dali/public-api/dali-adaptor-common.h>
// Enumerations
/**
- * @brief Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
- *
- * This Enumeration is used the available orientation APIs and the preferred orientation.
- *
- */
- enum class GlWindowOrientation
- {
- PORTRAIT = 0, ///< Portrait orientation. The height of the display area is greater than the width.
- LANDSCAPE = 1, ///< Landscape orientation. A wide view area is needed.
- PORTRAIT_INVERSE = 2, ///< Portrait inverse orientation
- LANDSCAPE_INVERSE = 3, ///< Landscape inverse orientation
- NO_ORIENTATION_PREFERENCE = -1 ///< Invalid angle value. It is used to initialize or unset the preferred orientation.
- };
-
- /**
* @brief Enumeration for GLES verion
*
* This Enumeration is used the GLES version for EGL configuration.
*
* @return The current GlWindow rotation angle if previously set, or none
*/
- Dali::GlWindow::GlWindowOrientation GetCurrentOrientation() const;
+ WindowOrientation GetCurrentOrientation() const;
/**
* @brief Sets available orientations of the window.
*
* @param[in] orientations The available orientations list to add
*/
- void SetAvailableOrientations( const Dali::Vector<Dali::GlWindow::GlWindowOrientation>& orientations );
+ void SetAvailableOrientations( const Dali::Vector<WindowOrientation>& orientations );
/**
* @brief Sets a preferred orientation.
*
* @note To unset the preferred orientation, angle should be set NO_ORIENTATION_PREFERENCE.
*/
- void SetPreferredOrientation( Dali::GlWindow::GlWindowOrientation orientation );
+ void SetPreferredOrientation( WindowOrientation orientation );
/**
* @brief Registers a GL callback function for application.
// EXTERNAL INCLUDES
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/events/wheel-event.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/window-devel.h>
return Window(dynamic_cast<Dali::Internal::Adaptor::Window*>(handle.GetObjectPtr()));
}
-Dali::Window::WindowOrientation GetCurrentOrientation(Window window)
+WindowOrientation GetCurrentOrientation(Window window)
{
return GetImplementation(window).GetCurrentOrientation();
}
-void SetAvailableOrientations(Window window, const Dali::Vector<Dali::Window::WindowOrientation>& orientations)
+void SetAvailableOrientations(Window window, const Dali::Vector<WindowOrientation>& orientations)
{
GetImplementation(window).SetAvailableOrientations(orientations);
}
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/window.h>
#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
namespace Dali
{
namespace DevelWindow
{
-/**
- * @brief Enumeration for transition effect's state.
- */
-enum class EffectState
-{
- NONE = 0, ///< None state
- START, ///< Transition effect is started.
- END ///< Transition effect is ended.
-};
-
-/**
- * @brief Enumeration for transition effect's type.
- */
-enum class EffectType
-{
- NONE = 0, ///< None type
- SHOW, ///< Window show effect.
- HIDE, ///< Window hide effect.
-};
typedef Signal<void()> EventProcessingFinishedSignalType; ///< Event Processing finished signal type
typedef Signal<void(Window, bool)> VisibilityChangedSignalType; ///< Visibility changed signal type
-typedef Signal<void(Window, EffectState, EffectType)> TransitionEffectEventSignalType; ///< Effect signal type and state
+typedef Signal<void(Window, WindowEffectState, WindowEffectType)> TransitionEffectEventSignalType; ///< Effect signal type and state
typedef Signal<void()> KeyboardRepeatSettingsChangedSignalType; ///< Keyboard repeat settings changed signal type
* @param[in] window The window instance
* @return The current window orientation if previously set, or none
*/
-DALI_ADAPTOR_API Dali::Window::WindowOrientation GetCurrentOrientation(Window window);
+DALI_ADAPTOR_API WindowOrientation GetCurrentOrientation(Window window);
/**
* @brief Sets available orientations of the window.
* @param[in] window The window instance
* @param[in] orientations The available orientation list to add
*/
-DALI_ADAPTOR_API void SetAvailableOrientations(Window window, const Dali::Vector<Dali::Window::WindowOrientation>& orientations);
+DALI_ADAPTOR_API void SetAvailableOrientations(Window window, const Dali::Vector<WindowOrientation>& orientations);
/**
* @brief Gets current window ID.
{
}
-void WindowBaseAndroid::SetType( Dali::Window::Type type )
+void WindowBaseAndroid::SetType( Dali::WindowType type )
{
}
-bool WindowBaseAndroid::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool WindowBaseAndroid::SetNotificationLevel( Dali::WindowNotificationLevel level )
{
return false;
}
-Dali::Window::NotificationLevel::Type WindowBaseAndroid::GetNotificationLevel() const
+Dali::WindowNotificationLevel WindowBaseAndroid::GetNotificationLevel() const
{
- return Dali::Window::NotificationLevel::NONE;
+ return Dali::WindowNotificationLevel::NONE;
}
void WindowBaseAndroid::SetOpaqueState( bool opaque )
{
}
-bool WindowBaseAndroid::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool WindowBaseAndroid::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
return false;
}
-Dali::Window::ScreenOffMode::Type WindowBaseAndroid::GetScreenOffMode() const
+WindowScreenOffMode WindowBaseAndroid::GetScreenOffMode() const
{
- return Dali::Window::ScreenOffMode::TIMEOUT;
+ return WindowScreenOffMode::TIMEOUT;
}
bool WindowBaseAndroid::SetBrightness( int brightness )
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
*/
- void SetType( Dali::Window::Type type ) override;
+ void SetType( Dali::WindowType type ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+ bool SetNotificationLevel( Dali::WindowNotificationLevel level ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+ Dali::WindowNotificationLevel GetNotificationLevel() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+ WindowScreenOffMode GetScreenOffMode() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
mWindowBase->SetAvailableAnlges( angles );
}
-bool GlWindow::IsOrientationAvailable( Dali::GlWindow::GlWindowOrientation orientation ) const
+bool GlWindow::IsOrientationAvailable( WindowOrientation orientation ) const
{
- if( orientation <= Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE
- || orientation > Dali::GlWindow::GlWindowOrientation::LANDSCAPE_INVERSE )
+ if( orientation <= WindowOrientation::NO_ORIENTATION_PREFERENCE
+ || orientation > WindowOrientation::LANDSCAPE_INVERSE )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::IsOrientationAvailable: Invalid input orientation [%d]\n", orientation );
return false;
return true;
}
-int GlWindow::ConvertToAngle( Dali::GlWindow::GlWindowOrientation orientation )
+int GlWindow::ConvertToAngle( WindowOrientation orientation )
{
int convertAngle = 0;
if ( mOrientationMode == 0 )
{
- convertAngle = ( static_cast< int >( orientation ) ) * 90;
+ convertAngle = static_cast< int >( orientation );
}
else if( mOrientationMode == 1)
{
switch( orientation )
{
- case Dali::GlWindow::GlWindowOrientation::LANDSCAPE:
+ case WindowOrientation::LANDSCAPE:
{
convertAngle = 0;
break;
}
- case Dali::GlWindow::GlWindowOrientation::PORTRAIT:
+ case WindowOrientation::PORTRAIT:
{
convertAngle = 90;
break;
}
- case Dali::GlWindow::GlWindowOrientation::LANDSCAPE_INVERSE:
+ case WindowOrientation::LANDSCAPE_INVERSE:
{
convertAngle = 180;
break;
}
- case Dali::GlWindow::GlWindowOrientation::PORTRAIT_INVERSE:
+ case WindowOrientation::PORTRAIT_INVERSE:
{
convertAngle = 270;
break;
}
- case Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE:
+ case WindowOrientation::NO_ORIENTATION_PREFERENCE:
{
convertAngle = -1;
break;
return convertAngle;
}
-Dali::GlWindow::GlWindowOrientation GlWindow::ConvertToOrientation( int angle ) const
+WindowOrientation GlWindow::ConvertToOrientation( int angle ) const
{
- Dali::GlWindow::GlWindowOrientation orientation = Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE;
+ WindowOrientation orientation = WindowOrientation::NO_ORIENTATION_PREFERENCE;
if ( mOrientationMode == 0 ) // Portrate mode
{
- orientation = static_cast< Dali::GlWindow::GlWindowOrientation >( angle / 90 );
+ orientation = static_cast< WindowOrientation >( angle );
}
else if( mOrientationMode == 1 ) // Landscape mode
{
{
case 0:
{
- orientation = Dali::GlWindow::GlWindowOrientation::LANDSCAPE;
+ orientation = WindowOrientation::LANDSCAPE;
break;
}
case 90:
{
- orientation = Dali::GlWindow::GlWindowOrientation::PORTRAIT;
+ orientation = WindowOrientation::PORTRAIT;
break;
}
case 180:
{
- orientation = Dali::GlWindow::GlWindowOrientation::LANDSCAPE_INVERSE;
+ orientation = WindowOrientation::LANDSCAPE_INVERSE;
break;
}
case 270:
{
- orientation = Dali::GlWindow::GlWindowOrientation::PORTRAIT_INVERSE;
+ orientation = WindowOrientation::PORTRAIT_INVERSE;
break;
}
case -1:
{
- orientation = Dali::GlWindow::GlWindowOrientation::NO_ORIENTATION_PREFERENCE;
+ orientation = WindowOrientation::NO_ORIENTATION_PREFERENCE;
break;
}
}
return orientation;
}
-Dali::GlWindow::GlWindowOrientation GlWindow::GetCurrentOrientation() const
+WindowOrientation GlWindow::GetCurrentOrientation() const
{
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), GetCurrentOrientation(): %d\n", this, mNativeWindowId, mTotalRotationAngle );
return ConvertToOrientation( mTotalRotationAngle );
}
-void GlWindow::SetAvailableOrientations( const Dali::Vector< Dali::GlWindow::GlWindowOrientation >& orientations )
+void GlWindow::SetAvailableOrientations( const Dali::Vector< WindowOrientation >& orientations )
{
Dali::Vector<float>::SizeType count = orientations.Count();
for( Dali::Vector<float>::SizeType index = 0; index < count; ++index )
SetAvailableAnlges( mAvailableAngles );
}
-void GlWindow::SetPreferredOrientation( Dali::GlWindow::GlWindowOrientation orientation )
+void GlWindow::SetPreferredOrientation( WindowOrientation orientation )
{
if( IsOrientationAvailable( orientation ) == false )
{
/**
* @copydoc Dali::GlWindow::GetCurrentOrientation() const
*/
- Dali::GlWindow::GlWindowOrientation GetCurrentOrientation() const;
+ WindowOrientation GetCurrentOrientation() const;
/**
* @copydoc Dali::GlWindow::SetAvailableOrientations()
*/
- void SetAvailableOrientations( const Dali::Vector< Dali::GlWindow::GlWindowOrientation >& orientations );
+ void SetAvailableOrientations( const Dali::Vector< WindowOrientation >& orientations );
/**
* @copydoc Dali::GlWindow::SetPreferredOrientation()
*/
- void SetPreferredOrientation( Dali::GlWindow::GlWindowOrientation orientation );
+ void SetPreferredOrientation( WindowOrientation orientation );
/**
* @copydoc Dali::GlWindow::RegisterGlCallback()
*
* @return true is available window orientation. false is not available.
*/
- bool IsOrientationAvailable( Dali::GlWindow::GlWindowOrientation orientation ) const;
+ bool IsOrientationAvailable( WindowOrientation orientation ) const;
/**
* @brief Convert from window orientation to angle using orientation mode value.
*
* @return The coverted angle value is returned.
*/
- int ConvertToAngle( Dali::GlWindow::GlWindowOrientation orientation );
+ int ConvertToAngle( WindowOrientation orientation );
/**
* @brief Convert from angle to window orientation using orientation mode value.
*
* @return The converted window orientation value is returned.
*/
- Dali::GlWindow::GlWindowOrientation ConvertToOrientation( int angle ) const;
+ WindowOrientation ConvertToOrientation( int angle ) const;
/**
* @brief Run Ui GL callback function.
#include <dali/public-api/adaptor-framework/window.h>
#include <dali/public-api/adaptor-framework/key-grab.h>
#include <dali/public-api/adaptor-framework/style-change.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
#include <dali/internal/window-system/common/damage-observer.h>
#include <dali/internal/window-system/common/rotation-event.h>
typedef Signal< void ( ) > DeleteSignalType;
typedef Signal< void ( const DamageArea& ) > DamageSignalType;
typedef Signal< void ( const RotationEvent& ) > RotationSignalType;
- typedef Signal< void ( DevelWindow::EffectState, DevelWindow::EffectType ) > TransitionEffectEventSignalType;
+ typedef Signal< void ( WindowEffectState, WindowEffectType ) > TransitionEffectEventSignalType;
typedef Signal< void ( ) > KeyboardRepeatSettingsChangedSignalType;
typedef Signal< void ( ) > WindowRedrawRequestSignalType;
/**
* @copydoc Dali::Window::SetType()
*/
- virtual void SetType( Dali::Window::Type type ) = 0;
+ virtual void SetType( Dali::WindowType type ) = 0;
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
- virtual bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) = 0;
+ virtual bool SetNotificationLevel( Dali::WindowNotificationLevel level ) = 0;
/**
* @copydoc Dali::Window::GetNotificationLevel()
*/
- virtual Dali::Window::NotificationLevel::Type GetNotificationLevel() const = 0;
+ virtual Dali::WindowNotificationLevel GetNotificationLevel() const = 0;
/**
* @copydoc Dali::Window::SetOpaqueState()
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
- virtual bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) = 0;
+ virtual bool SetScreenOffMode(WindowScreenOffMode screenOffMode) = 0;
/**
* @copydoc Dali::Window::GetScreenOffMode()
*/
- virtual Dali::Window::ScreenOffMode::Type GetScreenOffMode() const = 0;
+ virtual WindowScreenOffMode GetScreenOffMode() const = 0;
/**
* @copydoc Dali::Window::SetBrightness()
#include <dali/public-api/render-tasks/render-task.h>
#include <dali/public-api/render-tasks/render-task-list.h>
#include <dali/public-api/rendering/frame-buffer.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
#include <dali/devel-api/adaptor-framework/orientation.h>
#include <dali/integration-api/events/touch-event-integ.h>
mIconified( false ),
mOpaqueState( false ),
mResizeEnabled( false ),
- mType( Dali::Window::NORMAL ),
+ mType( WindowType::NORMAL ),
mParentWindow( NULL ),
- mPreferredAngle( Dali::Window::NO_ORIENTATION_PREFERENCE ),
+ mPreferredAngle( static_cast< int >( WindowOrientation::NO_ORIENTATION_PREFERENCE ) ),
mRotationAngle( -1 ),
mWindowWidth( 0 ),
mWindowHeight( 0 ),
return mScene.GetRenderTaskList();
}
-void Window::AddAvailableOrientation( Dali::Window::WindowOrientation orientation )
+void Window::AddAvailableOrientation( WindowOrientation orientation )
{
if( IsOrientationAvailable( orientation ) == false )
{
}
}
-void Window::RemoveAvailableOrientation( Dali::Window::WindowOrientation orientation )
+void Window::RemoveAvailableOrientation( WindowOrientation orientation )
{
if( IsOrientationAvailable( orientation ) == false )
{
SetAvailableAnlges( mAvailableAngles );
}
-void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
+void Window::SetPreferredOrientation( WindowOrientation orientation )
{
- if( orientation < Dali::Window::NO_ORIENTATION_PREFERENCE || orientation > Dali::Window::LANDSCAPE_INVERSE )
+ if( orientation < WindowOrientation::NO_ORIENTATION_PREFERENCE || orientation > WindowOrientation::LANDSCAPE_INVERSE )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::CheckOrientation: Invalid input orientation [%d]\n", orientation );
return;
mWindowBase->SetPreferredAngle( mPreferredAngle );
}
-Dali::Window::WindowOrientation Window::GetPreferredOrientation()
+WindowOrientation Window::GetPreferredOrientation()
{
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), GetPreferredOrientation: %d\n", this, mNativeWindowId, mPreferredAngle );
- Dali::Window::WindowOrientation preferredOrientation = ConvertToOrientation( mPreferredAngle );
+ WindowOrientation preferredOrientation = ConvertToOrientation( mPreferredAngle );
return preferredOrientation;
}
mWindowBase->SetAvailableAnlges( angles );
}
-int Window::ConvertToAngle( Dali::Window::WindowOrientation orientation )
+int Window::ConvertToAngle( WindowOrientation orientation )
{
int convertAngle = static_cast< int >( orientation );
if( mOrientationMode == Internal::Adaptor::Window::OrientationMode::LANDSCAPE )
{
switch( orientation )
{
- case Dali::Window::LANDSCAPE:
+ case WindowOrientation::LANDSCAPE:
{
convertAngle = 0;
break;
}
- case Dali::Window::PORTRAIT:
+ case WindowOrientation::PORTRAIT:
{
convertAngle = 90;
break;
}
- case Dali::Window::LANDSCAPE_INVERSE:
+ case WindowOrientation::LANDSCAPE_INVERSE:
{
convertAngle = 180;
break;
}
- case Dali::Window::PORTRAIT_INVERSE:
+ case WindowOrientation::PORTRAIT_INVERSE:
{
convertAngle = 270;
break;
}
- case Dali::Window::NO_ORIENTATION_PREFERENCE:
+ case WindowOrientation::NO_ORIENTATION_PREFERENCE:
{
convertAngle = -1;
break;
return convertAngle;
}
-Dali::Window::WindowOrientation Window::ConvertToOrientation( int angle ) const
+WindowOrientation Window::ConvertToOrientation( int angle ) const
{
- Dali::Window::WindowOrientation orientation = static_cast< Dali::Window::WindowOrientation >( angle );
+ WindowOrientation orientation = static_cast< WindowOrientation >( angle );
if( mOrientationMode == Internal::Adaptor::Window::OrientationMode::LANDSCAPE )
{
switch( angle )
{
case 0:
{
- orientation = Dali::Window::LANDSCAPE;
+ orientation = WindowOrientation::LANDSCAPE;
break;
}
case 90:
{
- orientation = Dali::Window::PORTRAIT;
+ orientation = WindowOrientation::PORTRAIT;
break;
}
case 180:
{
- orientation = Dali::Window::LANDSCAPE_INVERSE;
+ orientation = WindowOrientation::LANDSCAPE_INVERSE;
break;
}
case 270:
{
- orientation = Dali::Window::PORTRAIT_INVERSE;
+ orientation = WindowOrientation::PORTRAIT_INVERSE;
break;
}
case -1:
{
- orientation = Dali::Window::NO_ORIENTATION_PREFERENCE;
+ orientation = WindowOrientation::NO_ORIENTATION_PREFERENCE;
break;
}
}
return orientation;
}
-bool Window::IsOrientationAvailable( Dali::Window::WindowOrientation orientation ) const
+bool Window::IsOrientationAvailable( WindowOrientation orientation ) const
{
- if( orientation <= Dali::Window::NO_ORIENTATION_PREFERENCE || orientation > Dali::Window::LANDSCAPE_INVERSE )
+ if( orientation <= WindowOrientation::NO_ORIENTATION_PREFERENCE || orientation > WindowOrientation::LANDSCAPE_INVERSE )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::IsOrientationAvailable: Invalid input orientation [%d]\n", orientation );
return false;
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
}
-void Window::SetType( Dali::Window::Type type )
+void Window::SetType( WindowType type )
{
if( type != mType )
{
}
}
-Dali::Window::Type Window::GetType() const
+WindowType Window::GetType() const
{
return mType;
}
-bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( WindowNotificationLevel level )
{
- if( mType != Dali::Window::NOTIFICATION )
+ if( mType != WindowType::NOTIFICATION )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType );
return false;
return mWindowBase->SetNotificationLevel( level );
}
-Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
+WindowNotificationLevel Window::GetNotificationLevel() const
{
- if( mType != Dali::Window::NOTIFICATION )
+ if( mType != WindowType::NOTIFICATION )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType );
- return Dali::Window::NotificationLevel::NONE;
+ return WindowNotificationLevel::NONE;
}
return mWindowBase->GetNotificationLevel();
return mOpaqueState;
}
-bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool Window::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
return mWindowBase->SetScreenOffMode( screenOffMode );
}
-Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
+WindowScreenOffMode Window::GetScreenOffMode() const
{
return mWindowBase->GetScreenOffMode();
}
mDeleteRequestSignal.Emit();
}
-void Window::OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type )
+void Window::OnTransitionEffectEvent( WindowEffectState state, WindowEffectType type )
{
Dali::Window handle( this );
mTransitionEffectEventSignal.Emit( handle, state, type );
return mParentWindow;
}
-Dali::Window::WindowOrientation Window::GetCurrentOrientation() const
+WindowOrientation Window::GetCurrentOrientation() const
{
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), GetCurrentOrientation(): %d\n", this, mNativeWindowId, mRotationAngle );
return ConvertToOrientation( mRotationAngle );
}
-void Window::SetAvailableOrientations( const Dali::Vector<Dali::Window::WindowOrientation>& orientations )
+void Window::SetAvailableOrientations( const Dali::Vector<WindowOrientation>& orientations )
{
Dali::Vector<float>::SizeType count = orientations.Count();
for( Dali::Vector<float>::SizeType index = 0; index < count; ++index )
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/render-tasks/render-task-list.h>
#include <dali/public-api/object/property-array.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/window.h>
/**
* @copydoc Dali::Window::AddAvailableOrientation()
*/
- void AddAvailableOrientation(Dali::Window::WindowOrientation orientation);
+ void AddAvailableOrientation(WindowOrientation orientation);
/**
* @copydoc Dali::Window::RemoveAvailableOrientation()
*/
- void RemoveAvailableOrientation(Dali::Window::WindowOrientation orientation);
+ void RemoveAvailableOrientation(WindowOrientation orientation);
/**
* @copydoc Dali::Window::SetPreferredOrientation()
*/
- void SetPreferredOrientation(Dali::Window::WindowOrientation orientation);
+ void SetPreferredOrientation(WindowOrientation orientation);
/**
* @copydoc Dali::Window::GetPreferredOrientation()
*/
- Dali::Window::WindowOrientation GetPreferredOrientation();
+ WindowOrientation GetPreferredOrientation();
/**
* @copydoc Dali::Window::SetAcceptFocus()
/**
* @copydoc Dali::Window::SetType()
*/
- void SetType( Dali::Window::Type type );
+ void SetType( WindowType type );
/**
* @copydoc Dali::Window::GetType() const
*/
- Dali::Window::Type GetType() const;
+ WindowType GetType() const;
/**
* @copydoc Dali::Window::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level );
+ bool SetNotificationLevel( WindowNotificationLevel level );
/**
* @copydoc Dali::Window::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const;
+ WindowNotificationLevel GetNotificationLevel() const;
/**
* @copydoc Dali::Window::SetOpaqueState()
/**
* @copydoc Dali::Window::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode);
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @copydoc Dali::Window::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const;
+ WindowScreenOffMode GetScreenOffMode() const;
/**
* @copydoc Dali::Window::SetBrightness()
/**
* @copydoc Dali::DevelWindow::GetCurrentOrientation()
*/
- Dali::Window::WindowOrientation GetCurrentOrientation() const;
+ WindowOrientation GetCurrentOrientation() const;
/**
* @copydoc Dali::DevelWindow::SetAvailableOrientations()
*/
- void SetAvailableOrientations( const Dali::Vector<Dali::Window::WindowOrientation>& orientations );
+ void SetAvailableOrientations( const Dali::Vector<WindowOrientation>& orientations );
public: // Dali::Internal::Adaptor::SceneHolder
/**
* Called when the window receives a Transition effect-start/end event.
*/
- void OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type );
+ void OnTransitionEffectEvent( WindowEffectState state, WindowEffectType type );
/**
* @brief Called when window receives a keyboard repeat event.
/**
* @brief Convert from window orientation to angle using OrientationMode.
*/
- int ConvertToAngle( Dali::Window::WindowOrientation orientation );
+ int ConvertToAngle( WindowOrientation orientation );
/**
* @brief Convert from angle to window orientation using OrientationMode.
*/
- Dali::Window::WindowOrientation ConvertToOrientation( int angle ) const;
+ WindowOrientation ConvertToOrientation( int angle ) const;
/**
* @brief Check available window orientation for Available orientation.
*/
- bool IsOrientationAvailable( Dali::Window::WindowOrientation orientation ) const;
+ bool IsOrientationAvailable( WindowOrientation orientation ) const;
private: // Dali::Internal::Adaptor::SceneHolder
bool mIconified:1;
bool mOpaqueState:1;
bool mResizeEnabled:1;
- Dali::Window::Type mType;
+ WindowType mType;
Dali::Window mParentWindow;
OrientationPtr mOrientation;
ecore_wl_window_input_region_set( mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
}
-void WindowBaseEcoreWl::SetType( Dali::Window::Type type )
+void WindowBaseEcoreWl::SetType( Dali::WindowType type )
{
Ecore_Wl_Window_Type windowType;
switch( type )
{
- case Dali::Window::NORMAL:
+ case Dali::WindowType::NORMAL:
{
windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
break;
}
- case Dali::Window::NOTIFICATION:
+ case Dali::WindowType::NOTIFICATION:
{
windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
break;
}
- case Dali::Window::UTILITY:
+ case Dali::WindowType::UTILITY:
{
windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
break;
}
- case Dali::Window::DIALOG:
+ case Dali::WindowType::DIALOG:
{
windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
break;
ecore_wl_window_type_set( mEcoreWindow, windowType );
}
-bool WindowBaseEcoreWl::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool WindowBaseEcoreWl::SetNotificationLevel( Dali::WindowNotificationLevel level )
{
while( !mTizenPolicy )
{
switch( level )
{
- case Dali::Window::NotificationLevel::NONE:
+ case Dali::WindowNotificationLevel::NONE:
{
notificationLevel = TIZEN_POLICY_LEVEL_NONE;
break;
}
- case Dali::Window::NotificationLevel::BASE:
+ case Dali::WindowNotificationLevel::BASE:
{
notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
break;
}
- case Dali::Window::NotificationLevel::MEDIUM:
+ case Dali::WindowNotificationLevel::MEDIUM:
{
notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
break;
}
- case Dali::Window::NotificationLevel::HIGH:
+ case Dali::WindowNotificationLevel::HIGH:
{
notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
break;
}
- case Dali::Window::NotificationLevel::TOP:
+ case Dali::WindowNotificationLevel::TOP:
{
notificationLevel = TIZEN_POLICY_LEVEL_TOP;
break;
return true;
}
-Dali::Window::NotificationLevel::Type WindowBaseEcoreWl::GetNotificationLevel() const
+Dali::WindowNotificationLevel WindowBaseEcoreWl::GetNotificationLevel() const
{
while( !mTizenPolicy )
{
return Dali::Window::NotificationLevel::NONE;
}
- Dali::Window::NotificationLevel::Type level;
+ Dali::WindowNotificationLevel level;
switch( mNotificationLevel )
{
case TIZEN_POLICY_LEVEL_NONE:
{
- level = Dali::Window::NotificationLevel::NONE;
+ level = Dali::WindowNotificationLevel::NONE;
break;
}
case TIZEN_POLICY_LEVEL_DEFAULT:
{
- level = Dali::Window::NotificationLevel::BASE;
+ level = Dali::WindowNotificationLevel::BASE;
break;
}
case TIZEN_POLICY_LEVEL_MEDIUM:
{
- level = Dali::Window::NotificationLevel::MEDIUM;
+ level = Dali::WindowNotificationLevel::MEDIUM;
break;
}
case TIZEN_POLICY_LEVEL_HIGH:
{
- level = Dali::Window::NotificationLevel::HIGH;
+ level = Dali::WindowNotificationLevel::HIGH;
break;
}
case TIZEN_POLICY_LEVEL_TOP:
{
- level = Dali::Window::NotificationLevel::TOP;
+ level = Dali::WindowNotificationLevel::TOP;
break;
}
default:
{
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetNotificationLevel: invalid level [%d]\n", mNotificationLevel );
- level = Dali::Window::NotificationLevel::NONE;
+ level = Dali::WindowNotificationLevel::NONE;
break;
}
}
tizen_policy_set_opaque_state( mTizenPolicy, ecore_wl_window_surface_get( mEcoreWindow ), ( opaque ? 1 : 0 ) );
}
-bool WindowBaseEcoreWl::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool WindowBaseEcoreWl::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
while( !mTizenPolicy )
{
switch( screenOffMode )
{
- case Dali::Window::ScreenOffMode::TIMEOUT:
+ case WindowScreenOffMode::TIMEOUT:
{
mode = 0;
break;
}
- case Dali::Window::ScreenOffMode::NEVER:
+ case WindowScreenOffMode::NEVER:
{
mode = 1;
break;
return true;
}
-Dali::Window::ScreenOffMode::Type WindowBaseEcoreWl::GetScreenOffMode() const
+WindowScreenOffMode WindowBaseEcoreWl::GetScreenOffMode() const
{
while( !mTizenPolicy )
{
if( !mScreenOffModeChangeDone )
{
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl::GetScreenOffMode: Error! [%d]\n", mScreenOffModeChangeState );
- return Dali::Window::ScreenOffMode::TIMEOUT;
+ return WindowScreenOffMode::TIMEOUT;
}
- Dali::Window::ScreenOffMode::Type screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
+ WindowScreenOffMode screenMode = WindowScreenOffMode::TIMEOUT;
switch( mScreenOffMode )
{
case 0:
{
- screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
+ screenMode = WindowScreenOffMode::TIMEOUT;
break;
}
case 1:
{
- screenMode = Dali::Window::ScreenOffMode::NEVER;
+ screenMode = WindowScreenOffMode::NEVER;
break;
}
}
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
*/
- void SetType( Dali::Window::Type type ) override;
+ void SetType( Dali::WindowType type ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+ bool SetNotificationLevel( Dali::WindowNotificationLevel level ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+ Dali::WindowNotificationLevel GetNotificationLevel() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+ WindowScreenOffMode GetScreenOffMode() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
// EXTERNAL_HEADERS
#include <dali/public-api/object/any.h>
#include <dali/public-api/events/mouse-button.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
#include <dali/integration-api/debug.h>
#include <Ecore_Input.h>
#include <vconf.h>
{
if( effectStart->type < 3 ) // only under restack
{
- windowBase->OnTransitionEffectEvent( DevelWindow::EffectState::START, static_cast<DevelWindow::EffectType>( effectStart->type ) );
+ windowBase->OnTransitionEffectEvent( WindowEffectState::START, static_cast<WindowEffectType>( effectStart->type ) );
}
}
return ECORE_CALLBACK_PASS_ON;
{
if( effectEnd->type < 3 ) // only under restack
{
- windowBase->OnTransitionEffectEvent( DevelWindow::EffectState::END, static_cast<DevelWindow::EffectType>( effectEnd->type ) );
+ windowBase->OnTransitionEffectEvent( WindowEffectState::END, static_cast<WindowEffectType>( effectEnd->type ) );
}
}
return ECORE_CALLBACK_PASS_ON;
#endif
}
-void WindowBaseEcoreWl2::OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type )
+void WindowBaseEcoreWl2::OnTransitionEffectEvent( WindowEffectState state, WindowEffectType type )
{
mTransitionEffectEventSignal.Emit( state, type );
}
ecore_wl2_window_input_region_set( mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
}
-void WindowBaseEcoreWl2::SetType( Dali::Window::Type type )
+void WindowBaseEcoreWl2::SetType( Dali::WindowType type )
{
Ecore_Wl2_Window_Type windowType;
switch( type )
{
- case Dali::Window::NORMAL:
+ case Dali::WindowType::NORMAL:
{
windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
break;
}
- case Dali::Window::NOTIFICATION:
+ case Dali::WindowType::NOTIFICATION:
{
windowType = ECORE_WL2_WINDOW_TYPE_NOTIFICATION;
break;
}
- case Dali::Window::UTILITY:
+ case Dali::WindowType::UTILITY:
{
windowType = ECORE_WL2_WINDOW_TYPE_UTILITY;
break;
}
- case Dali::Window::DIALOG:
+ case Dali::WindowType::DIALOG:
{
windowType = ECORE_WL2_WINDOW_TYPE_DIALOG;
break;
ecore_wl2_window_type_set( mEcoreWindow, windowType );
}
-bool WindowBaseEcoreWl2::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool WindowBaseEcoreWl2::SetNotificationLevel( Dali::WindowNotificationLevel level )
{
while( !mTizenPolicy )
{
switch( level )
{
- case Dali::Window::NotificationLevel::NONE:
+ case Dali::WindowNotificationLevel::NONE:
{
notificationLevel = TIZEN_POLICY_LEVEL_NONE;
break;
}
- case Dali::Window::NotificationLevel::BASE:
+ case Dali::WindowNotificationLevel::BASE:
{
notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
break;
}
- case Dali::Window::NotificationLevel::MEDIUM:
+ case Dali::WindowNotificationLevel::MEDIUM:
{
notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
break;
}
- case Dali::Window::NotificationLevel::HIGH:
+ case Dali::WindowNotificationLevel::HIGH:
{
notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
break;
}
- case Dali::Window::NotificationLevel::TOP:
+ case Dali::WindowNotificationLevel::TOP:
{
notificationLevel = TIZEN_POLICY_LEVEL_TOP;
break;
return true;
}
-Dali::Window::NotificationLevel::Type WindowBaseEcoreWl2::GetNotificationLevel() const
+Dali::WindowNotificationLevel WindowBaseEcoreWl2::GetNotificationLevel() const
{
while( !mTizenPolicy )
{
if( !mNotificationLevelChangeDone )
{
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::GetNotificationLevel: Error! [%d]\n", mNotificationChangeState );
- return Dali::Window::NotificationLevel::NONE;
+ return Dali::WindowNotificationLevel::NONE;
}
- Dali::Window::NotificationLevel::Type level;
+ Dali::WindowNotificationLevel level;
switch( mNotificationLevel )
{
case TIZEN_POLICY_LEVEL_NONE:
{
- level = Dali::Window::NotificationLevel::NONE;
+ level = Dali::WindowNotificationLevel::NONE;
break;
}
case TIZEN_POLICY_LEVEL_DEFAULT:
{
- level = Dali::Window::NotificationLevel::BASE;
+ level = Dali::WindowNotificationLevel::BASE;
break;
}
case TIZEN_POLICY_LEVEL_MEDIUM:
{
- level = Dali::Window::NotificationLevel::MEDIUM;
+ level = Dali::WindowNotificationLevel::MEDIUM;
break;
}
case TIZEN_POLICY_LEVEL_HIGH:
{
- level = Dali::Window::NotificationLevel::HIGH;
+ level = Dali::WindowNotificationLevel::HIGH;
break;
}
case TIZEN_POLICY_LEVEL_TOP:
{
- level = Dali::Window::NotificationLevel::TOP;
+ level = Dali::WindowNotificationLevel::TOP;
break;
}
default:
{
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::GetNotificationLevel: invalid level [%d]\n", mNotificationLevel );
- level = Dali::Window::NotificationLevel::NONE;
+ level = Dali::WindowNotificationLevel::NONE;
break;
}
}
tizen_policy_set_opaque_state( mTizenPolicy, ecore_wl2_window_surface_get( mEcoreWindow ), ( opaque ? 1 : 0 ) );
}
-bool WindowBaseEcoreWl2::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool WindowBaseEcoreWl2::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
while( !mTizenPolicy )
{
switch( screenOffMode )
{
- case Dali::Window::ScreenOffMode::TIMEOUT:
+ case WindowScreenOffMode::TIMEOUT:
{
mode = 0;
break;
}
- case Dali::Window::ScreenOffMode::NEVER:
+ case WindowScreenOffMode::NEVER:
{
mode = 1;
break;
return true;
}
-Dali::Window::ScreenOffMode::Type WindowBaseEcoreWl2::GetScreenOffMode() const
+WindowScreenOffMode WindowBaseEcoreWl2::GetScreenOffMode() const
{
while( !mTizenPolicy )
{
if( !mScreenOffModeChangeDone )
{
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::GetScreenOffMode: Error! [%d]\n", mScreenOffModeChangeState );
- return Dali::Window::ScreenOffMode::TIMEOUT;
+ return WindowScreenOffMode::TIMEOUT;
}
- Dali::Window::ScreenOffMode::Type screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
+ WindowScreenOffMode screenMode = WindowScreenOffMode::TIMEOUT;
switch( mScreenOffMode )
{
case 0:
{
- screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
+ screenMode = WindowScreenOffMode::TIMEOUT;
break;
}
case 1:
{
- screenMode = Dali::Window::ScreenOffMode::NEVER;
+ screenMode = WindowScreenOffMode::NEVER;
break;
}
}
/**
* @brief Called when a transition effect-start/end event is received.
*/
- void OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type );
+ void OnTransitionEffectEvent( WindowEffectState state, WindowEffectType type );
/**
* @brief Called when a keyboard repeat event is changed.
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
*/
- void SetType( Dali::Window::Type type ) override;
+ void SetType( Dali::WindowType type ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+ bool SetNotificationLevel( Dali::WindowNotificationLevel level ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+ Dali::WindowNotificationLevel GetNotificationLevel() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+ WindowScreenOffMode GetScreenOffMode() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
{
}
-void WindowBaseEcoreX::SetType( Dali::Window::Type type )
+void WindowBaseEcoreX::SetType( Dali::WindowType type )
{
}
-bool WindowBaseEcoreX::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool WindowBaseEcoreX::SetNotificationLevel( Dali::WindowNotificationLevel level )
{
return false;
}
-Dali::Window::NotificationLevel::Type WindowBaseEcoreX::GetNotificationLevel() const
+Dali::WindowNotificationLevel WindowBaseEcoreX::GetNotificationLevel() const
{
- return Dali::Window::NotificationLevel::NONE;
+ return Dali::WindowNotificationLevel::NONE;
}
void WindowBaseEcoreX::SetOpaqueState( bool opaque )
{
}
-bool WindowBaseEcoreX::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool WindowBaseEcoreX::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
return false;
}
-Dali::Window::ScreenOffMode::Type WindowBaseEcoreX::GetScreenOffMode() const
+WindowScreenOffMode WindowBaseEcoreX::GetScreenOffMode() const
{
- return Dali::Window::ScreenOffMode::TIMEOUT;
+ return WindowScreenOffMode::TIMEOUT;
}
bool WindowBaseEcoreX::SetBrightness( int brightness )
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
*/
- void SetType( Dali::Window::Type type ) override;
+ void SetType( Dali::WindowType type ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+ bool SetNotificationLevel( Dali::WindowNotificationLevel level ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+ Dali::WindowNotificationLevel GetNotificationLevel() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+ WindowScreenOffMode GetScreenOffMode() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
{
}
-void WindowBaseWin::SetType( Dali::Window::Type type )
+void WindowBaseWin::SetType( Dali::WindowType type )
{
}
-bool WindowBaseWin::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+bool WindowBaseWin::SetNotificationLevel( Dali::WindowNotificationLevel level )
{
return false;
}
-Dali::Window::NotificationLevel::Type WindowBaseWin::GetNotificationLevel() const
+Dali::WindowNotificationLevel WindowBaseWin::GetNotificationLevel() const
{
- return Dali::Window::NotificationLevel::NONE;
+ return Dali::WindowNotificationLevel::NONE;
}
void WindowBaseWin::SetOpaqueState( bool opaque )
{
}
-bool WindowBaseWin::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+bool WindowBaseWin::SetScreenOffMode(WindowScreenOffMode screenOffMode)
{
return false;
}
-Dali::Window::ScreenOffMode::Type WindowBaseWin::GetScreenOffMode() const
+WindowScreenOffMode WindowBaseWin::GetScreenOffMode() const
{
- return Dali::Window::ScreenOffMode::TIMEOUT;
+ return WindowScreenOffMode::TIMEOUT;
}
bool WindowBaseWin::SetBrightness( int brightness )
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
*/
- void SetType( Dali::Window::Type type ) override;
+ void SetType( Dali::WindowType type ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+ bool SetNotificationLevel( Dali::WindowNotificationLevel level ) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
*/
- Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+ Dali::WindowNotificationLevel GetNotificationLevel() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
*/
- bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
*/
- Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+ WindowScreenOffMode GetScreenOffMode() const override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
--- /dev/null
+#ifndef DALI_WINDOW_ENUMERATIONS_H
+#define DALI_WINDOW_ENUMERATIONS_H
+
+/*
+ * Copyright (c) 2020 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+/**
+ * @brief Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
+ *
+ * This Enumeration is used the available orientation APIs and the preferred orientation.
+ *
+ * @SINCE_2_0.0
+ */
+enum class WindowOrientation
+{
+ PORTRAIT = 0, ///< Portrait orientation. The height of the display area is greater than the width. @SINCE_2_0.0
+ LANDSCAPE = 90, ///< Landscape orientation. A wide view area is needed. @SINCE_2_0.0
+ PORTRAIT_INVERSE = 180, ///< Portrait inverse orientation. @SINCE_2_0.0
+ LANDSCAPE_INVERSE = 270, ///< Landscape inverse orientation. @SINCE_2_0.0
+ NO_ORIENTATION_PREFERENCE = -1 ///< No orientation. It is used to initialize or unset the preferred orientation. @SINCE_2_0.0
+};
+
+/**
+ * @brief An enum of Window types.
+ * @SINCE_2_0.0
+ */
+enum class WindowType
+{
+ NORMAL, ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type. @SINCE_2_0.0
+ NOTIFICATION, ///< A notification window, like a warning about battery life or a new E-Mail received. @SINCE_2_0.0
+ UTILITY, ///< A persistent utility window, like a toolbox or palette. @SINCE_2_0.0
+ DIALOG ///< Used for simple dialog windows. @SINCE_2_0.0
+};
+
+/**
+ * @brief An enum of notification level.
+ * @SINCE_2_0.0
+ */
+enum class WindowNotificationLevel
+{
+ NONE = -1, ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window. @SINCE_2_0.0
+ BASE = 10, ///< Base notification level. @SINCE_2_0.0
+ MEDIUM = 20, ///< Higher notification level than base. @SINCE_2_0.0
+ HIGH = 30, ///< Higher notification level than medium. @SINCE_2_0.0
+ TOP = 40 ///< The highest notification level. @SINCE_2_0.0
+};
+
+/**
+ * @brief An enum of screen mode.
+ * @SINCE_2_0.0
+ */
+enum class WindowScreenOffMode
+{
+ TIMEOUT, ///< The mode which turns the screen off after a timeout. @SINCE_2_0.0
+ NEVER, ///< The mode which keeps the screen turned on. @SINCE_2_0.0
+};
+
+/**
+ * @brief Enumeration for transition effect's state.
+ * @SINCE_2_0.0
+ */
+enum class WindowEffectState
+{
+ NONE = 0, ///< None state. @SINCE_2_0.0
+ START, ///< Transition effect is started. @SINCE_2_0.0
+ END ///< Transition effect is ended. @SINCE_2_0.0
+};
+
+/**
+ * @brief Enumeration for transition effect's type.
+ * @SINCE_2_0.0
+ */
+enum class WindowEffectType
+{
+ NONE = 0, ///< None type. @SINCE_2_0.0
+ SHOW, ///< Window show effect. @SINCE_2_0.0
+ HIDE, ///< Window hide effect. @SINCE_2_0.0
+};
+
+}
+
+#endif // DALI_WINDOW_ENUMERATIONS_H
GetImplementation(*this).SetPreferredOrientation(orientation);
}
-Dali::Window::WindowOrientation Window::GetPreferredOrientation()
+WindowOrientation Window::GetPreferredOrientation()
{
return GetImplementation(*this).GetPreferredOrientation();
}
return GetImplementation(*this).SetInputRegion(inputRegion);
}
-void Window::SetType(Window::Type type)
+void Window::SetType(WindowType type)
{
GetImplementation(*this).SetType(type);
}
-Window::Type Window::GetType() const
+WindowType Window::GetType() const
{
return GetImplementation(*this).GetType();
}
-bool Window::SetNotificationLevel(Window::NotificationLevel::Type level)
+bool Window::SetNotificationLevel(WindowNotificationLevel level)
{
return GetImplementation(*this).SetNotificationLevel(level);
}
-Window::NotificationLevel::Type Window::GetNotificationLevel() const
+WindowNotificationLevel Window::GetNotificationLevel() const
{
return GetImplementation(*this).GetNotificationLevel();
}
return GetImplementation(*this).IsOpaqueState();
}
-bool Window::SetScreenOffMode(Window::ScreenOffMode::Type screenMode)
+bool Window::SetScreenOffMode(WindowScreenOffMode screenMode)
{
return GetImplementation(*this).SetScreenOffMode(screenMode);
}
-Window::ScreenOffMode::Type Window::GetScreenOffMode() const
+WindowScreenOffMode Window::GetScreenOffMode() const
{
return GetImplementation(*this).GetScreenOffMode();
}
#include <dali/public-api/object/any.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/signals/dali-signal.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
#include <string>
// INTERNAL INCLUDES
using TouchEventSignalType = Signal<void(const TouchEvent&)>; ///< Touch signal type @SINCE_1_9.28
public:
- // Enumerations
-
- /**
- * @brief Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
- *
- * This Enumeration is used the available orientation APIs and the preferred orientation.
- *
- * @SINCE_1_0.0
- */
- enum WindowOrientation
- {
- PORTRAIT = 0, ///< Portrait orientation. The height of the display area is greater than the width. @SINCE_1_0.0
- LANDSCAPE = 90, ///< Landscape orientation. A wide view area is needed. @SINCE_1_0.0
- PORTRAIT_INVERSE = 180, ///< Portrait inverse orientation @SINCE_1_0.0
- LANDSCAPE_INVERSE = 270, ///< Landscape inverse orientation @SINCE_1_0.0
- NO_ORIENTATION_PREFERENCE = -1 ///< No orientation. It is used to initialize or unset the preferred orientation. @SINCE_1_4.51
- };
-
- /**
- * @brief An enum of Window types.
- * @SINCE_1_2.60
- */
- enum Type
- {
- NORMAL, ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type. @SINCE_1_2.60
- NOTIFICATION, ///< A notification window, like a warning about battery life or a new E-Mail received. @SINCE_1_2.60
- UTILITY, ///< A persistent utility window, like a toolbox or palette. @SINCE_1_2.60
- DIALOG ///< Used for simple dialog windows. @SINCE_1_2.60
- };
-
- /**
- * @brief An enum of screen mode.
- * @SINCE_1_2.60
- */
- struct NotificationLevel
- {
- /**
- * @brief An enum of screen mode.
- * @SINCE_1_2.60
- */
- enum Type
- {
- NONE = -1, ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window. @SINCE_1_2.60
- BASE = 10, ///< Base notification level. @SINCE_1_2.60
- MEDIUM = 20, ///< Higher notification level than base. @SINCE_1_2.60
- HIGH = 30, ///< Higher notification level than medium. @SINCE_1_2.60
- TOP = 40 ///< The highest notification level. @SINCE_1_2.60
- };
- };
-
- /**
- * @brief An enum of screen mode.
- * @SINCE_1_2.60
- */
- struct ScreenOffMode
- {
- /**
- * @brief An enum of screen mode.
- * @SINCE_1_2.60
- */
- enum Type
- {
- TIMEOUT, ///< The mode which turns the screen off after a timeout. @SINCE_1_2.60
- NEVER, ///< The mode which keeps the screen turned on. @SINCE_1_2.60
- };
-
- static constexpr Type DEFAULT{TIMEOUT}; ///< The default mode. @SINCE_1_2.60
- };
// Methods
/**
* @brief Sets a window type.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @param[in] type The window type.
* @remarks The default window type is NORMAL.
*/
- void SetType(Type type);
+ void SetType(WindowType type);
/**
* @brief Gets a window type.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @return A window type.
*/
- Type GetType() const;
+ WindowType GetType() const;
/**
* @brief Sets a priority level for the specified notification window.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @param[in] level The notification window level.
* @return True if no error occurred, false otherwise.
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_WINDOW_PRIORITY
* @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
*/
- bool SetNotificationLevel(NotificationLevel::Type level);
+ bool SetNotificationLevel(WindowNotificationLevel level);
/**
* @brief Gets a priority level for the specified notification window.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @return The notification window level.
* @remarks This can be used for a notification type window only.
*/
- NotificationLevel::Type GetNotificationLevel() const;
+ WindowNotificationLevel GetNotificationLevel() const;
/**
* @brief Sets a transparent window's visual state to opaque.
/**
* @brief Sets a window's screen off mode.
* @details This API is useful when the application needs to keep the display turned on.
- * If the application sets the screen mode to #::Dali::Window::ScreenOffMode::NEVER to its window and the window is shown,
+ * If the application sets the screen mode to #::Dali::WindowScreenOffMode::NEVER to its window and the window is shown,
* the window manager requests the display system to keep the display on as long as the window is shown.
* If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @param[in] screenOffMode The screen mode.
* @return True if no error occurred, false otherwise.
* @PRIVLEVEL_PUBLIC
* @PRIVILEGE_DISPLAY
*/
- bool SetScreenOffMode(ScreenOffMode::Type screenOffMode);
+ bool SetScreenOffMode(WindowScreenOffMode screenOffMode);
/**
* @brief Gets a screen off mode of the window.
- * @SINCE_1_2.60
+ * @@SINCE_2_0.0
* @return The screen off mode.
*/
- ScreenOffMode::Type GetScreenOffMode() const;
+ WindowScreenOffMode GetScreenOffMode() const;
/**
* @brief Sets preferred brightness of the window.
${adaptor_public_api_dir}/adaptor-framework/widget.h
${adaptor_public_api_dir}/adaptor-framework/widget-application.h
${adaptor_public_api_dir}/adaptor-framework/widget-impl.h
+ ${adaptor_public_api_dir}/adaptor-framework/window-enumerations.h
)