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