19 #ifndef UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
20 #define UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
60 UASensorsOrientation* sensor);
70 UASensorsOrientation* sensor);
80 UASensorsOrientation* sensor);
90 UASensorsOrientation* sensor,
101 UASensorsOrientation* sensor,
112 UASensorsOrientation* sensor,
124 UASensorsOrientation* sensor,
137 UASensorsOrientation* sensor,
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_set_event_rate(UASensorsOrientation *sensor, uint32_t rate)
Set the sensor event delivery rate in nanoseconds..
void UASensorsOrientation
Opaque type that models the orientation.
void(* on_orientation_event_cb)(UASOrientationEvent *event, void *context)
Callback type used by applications to subscribe to orientation events.
UbuntuStatus
Indicates the status of an operation.
UBUNTU_DLL_PUBLIC UASensorsOrientation * ua_sensors_orientation_new()
Create a new object for accessing the orientation sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_get_resolution(UASensorsOrientation *sensor, float *value)
Queries the numeric resolution supported by the sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_get_max_value(UASensorsOrientation *sensor, float *value)
Queries the maximum value that can be reported by the sensor.
void UASOrientationEvent
Opaque type describing an orientation reading.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_get_min_value(UASensorsOrientation *sensor, float *value)
Queries the minimum value that can be reported by the sensor.
UBUNTU_DLL_PUBLIC void ua_sensors_orientation_set_reading_cb(UASensorsOrientation *sensor, on_orientation_event_cb cb, void *ctx)
Set the callback to be invoked whenever a new sensor reading is available.
#define UBUNTU_DLL_PUBLIC
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_enable(UASensorsOrientation *sensor)
Enables the supplied orientation sensor.
UBUNTU_DLL_PUBLIC uint32_t ua_sensors_orientation_get_min_delay(UASensorsOrientation *sensor)
Queries the minimum delay between two readings for the supplied sensor.
UBUNTU_DLL_PUBLIC UStatus ua_sensors_orientation_disable(UASensorsOrientation *sensor)
Disables the supplied orientation sensor.