Get the current angle of the device.
Synopsis:
#include <bps/orientation.h>
BPS_API int orientation_event_get_angle(bps_event_t *event)
Arguments:
- event
-
The event to get the angle from.
Library:
libbps (For the qcc command, use the -l bps option to link against this library)
Description:
The orientation_event_get_angle() function gets the current angle of the device from an ORIENTATION_INFO event. For example, possible angles of the device include the following:
- An angle of 0 is the standard orientation of the device (e.g., the BlackBerry logo is upright).
- An angle of 90 is where the device has been rotated clockwise by a quarter turn from its standard orientation.
- An angle of 180 is the reverse of an angle of 0, where the BlackBerry logo is now upside down.
- An angle of 270 is where the device has been rotated counter-clockwise by a quarter turn from its standard orientation.
Returns:
The current angle (in degrees).