1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Added display rotation support for iOS - see the Desktop class for implementation methods. Also fixed a couple of minor build issues.

This commit is contained in:
Julian Storer 2010-10-13 19:16:01 +01:00
parent c583b68cd6
commit 4bc85a9dc3
22 changed files with 776 additions and 283 deletions

View file

@ -37,7 +37,8 @@ BEGIN_JUCE_NAMESPACE
//==============================================================================
Desktop::Desktop()
: mouseClickCounter (0),
kioskModeComponent (0)
kioskModeComponent (0),
allowedOrientations (allOrientations)
{
createMouseInputSources();
refreshMonitorSizes();
@ -359,5 +360,22 @@ void Desktop::setKioskModeComponent (Component* componentToUse, const bool allow
}
}
//==============================================================================
void Desktop::setOrientationsEnabled (const int newOrientations)
{
// Dodgy set of flags being passed here! Make sure you specify at least one permitted orientation.
jassert (newOrientations != 0 && (newOrientations & ~allOrientations) == 0);
allowedOrientations = newOrientations;
}
bool Desktop::isOrientationEnabled (const DisplayOrientation orientation) const throw()
{
// Make sure you only pass one valid flag in here...
jassert (orientation == upright || orientation == upsideDown || orientation == rotatedClockwise || orientation == rotatedAntiClockwise);
return (allowedOrientations & orientation) != 0;
}
END_JUCE_NAMESPACE