> Do we have the right "orientation" here?
>
> I would guess (with insufficient data) that most apps that restrict supported
> orientations care more about landscape/portrait than they do about the angle
> from the "natural" display orientation. Forcing them to discover screen
> metrics before requesting orientation restrictions seems perverse.
One use case I was thinking about was a client may want to keep a surface in a specific orientation relative to a sensor location - say for example a flute app that requires you to blow into the mic, but perhaps if an application already has a list of sensor locations per phone model, then they should know the "natural" orientation of the screen - so portrait/landscape make sense.
So perhaps they SHOULD be separate - leave MirOrientation as is and introduce:
> Do we have the right "orientation" here?
>
> I would guess (with insufficient data) that most apps that restrict supported
> orientations care more about landscape/portrait than they do about the angle
> from the "natural" display orientation. Forcing them to discover screen
> metrics before requesting orientation restrictions seems perverse.
One use case I was thinking about was a client may want to keep a surface in a specific orientation relative to a sensor location - say for example a flute app that requires you to blow into the mic, but perhaps if an application already has a list of sensor locations per phone model, then they should know the "natural" orientation of the screen - so portrait/landscape make sense.
So perhaps they SHOULD be separate - leave MirOrientation as is and introduce:
MirOrientationMode orientation_ mode_portrait = 1 << 1, orientation_ mode_landscape = 1 << 2, orientation_ mode_inverted_ portrait = 1 << 3, orientation_ mode_inverted_ landscape = 1 << 4, orientation_ mode_portrait_ any = mir_orientation _mode_portrait | mir_orientation _mode_inverted_ portrait, orientation_ mode_landscape_ any = mir_orientation _mode_landscape | mir_orientation _mode_inverted_ landscape, orientation_ mode_any = mir_orientation _mode_portrait_ any | mir_orientation _mode_landscape _any
{
mir_
mir_
mir_
mir_
mir_
mir_
mir_
}
MirWaitHandle* mir_surface_ set_preferred_ orientation( MirSurface *surface, MirOrientationMode orientation_mode)
MirOrientationMode mir_surface_ get_preferred_ orientation( MirSurface *surface)