This chapter provides reference material for the screen orientation API:
Screen Orientation Constants
Screen Orientation Functions and Macros
The header file SystemMgr.h
declares the API that this chapter describes.
Screen Orientation Constants
Orientation States
Purpose
Specify the display orientation.
Declared In
SystemMgr.h
Constants
-
#define sysOrientationUser 0
- Pass this value to
SysSetOrientation()
to tell the system to activate the last user-selected orientation. -
#define sysOrientationPortrait 1
- The display is in portrait orientation.
-
#define sysOrientationLandscape
2 - The display is in landscape orientation.
-
#define sysOrientationReversePortrait
3 - The display is in reverse portrait orientation (upside-down from the normal portrait orientation).
#define sysOrientationReverseLandscape
4
- The display is in reverse landscape orientation (upside-down from the normal landscape orientation).
Orientation Trigger States
Purpose
Specify the state of the orientation icon in the status bar (the icon that allows the user to change the display orientation). This icon currently does not exist on Palm OS® Cobalt version 6.0.
Declared In
SystemMgr.h
Constants
-
#define sysOrientationTriggerDisabled
0 - The orientation trigger is disabled, meaning that the user is not allowed to change the display orientation.
-
#define sysOrientationTriggerEnabled
1 - The orientation trigger is enabled, meaning that the user is allowed to change the display orientation.
Screen Orientation Functions and Macros
SysGetOrientation Function
Purpose
Returns the display orientation.
Prototype
uint16_t SysGetOrientation ( void )
Returns
One of the constants listed in "Orientation States."
Comments
Palm OS Cobalt version 6.0 currently only supports sysOrientationPortrait
.
SysGetOrientationTriggerState Function
Purpose
Returns the display orientation trigger state.
Prototype
uint16_t SysGetOrientationTriggerState ( void )
Returns
One of the constants listed in "Orientation Trigger States."
Comments
Palm OS Cobalt version 6.0 currently always returns sysOrientationTriggerDisabled
.
SysSetOrientation Function
Purpose
Prototype
status_t SysSetOrientation (
uint16_t orientation
)
Parameters
-
→ orientation
- The orientation to which the display should be set. See "Orientation States" for a list of possible values.
Returns
Always returns sysErrNotAllowed
.
SysSetOrientationTriggerState Function
Purpose
Sets the display orientation trigger state.
Prototype
status_t SysSetOrientationTriggerState (
uint16_t triggerState
)
Parameters
-
→ triggerState
- One of the constants listed in "Orientation Trigger States".
Returns
Always returns sysErrNotAllowed
.