#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 )