#include <ubuntu/status.h>#include <ubuntu/visibility.h>#include <ubuntu/application/sensors/event/proximity.h>
Include dependency graph for proximity.h:Go to the source code of this file.
Typedefs | |
| typedef void | UASensorsProximity |
| Opaque type that models the proximity sensor. More... | |
| typedef void(* | on_proximity_event_cb) (UASProximityEvent *event, void *context) |
| Callback type used by applications to subscribe to proximity sensor events. More... | |
Functions | |
| UBUNTU_DLL_PUBLIC UASensorsProximity * | ua_sensors_proximity_new () |
| Create a new object for accessing the proximity sensor. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_enable (UASensorsProximity *sensor) |
| Enables the supplied proximity sensor. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_disable (UASensorsProximity *sensor) |
| Disables the supplied proximity sensor. More... | |
| UBUNTU_DLL_PUBLIC uint32_t | ua_sensors_proximity_get_min_delay (UASensorsProximity *sensor) |
| Queries the minimum delay between two readings for the supplied sensor. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_get_min_value (UASensorsProximity *sensor, float *value) |
| Queries the minimum value that can be reported by the sensor. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_get_max_value (UASensorsProximity *sensor, float *value) |
| Queries the maximum value that can be reported by the sensor. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_get_resolution (UASensorsProximity *sensor, float *value) |
| Queries the numeric resolution supported by the sensor. More... | |
| UBUNTU_DLL_PUBLIC void | ua_sensors_proximity_set_reading_cb (UASensorsProximity *sensor, on_proximity_event_cb cb, void *ctx) |
| Set the callback to be invoked whenever a new sensor reading is available. More... | |
| UBUNTU_DLL_PUBLIC UStatus | ua_sensors_proximity_set_event_rate (UASensorsProximity *sensor, uint32_t rate) |
| Set the sensor event delivery rate in nanoseconds.. More... | |
| typedef void(* on_proximity_event_cb) (UASProximityEvent *event, void *context) |
Callback type used by applications to subscribe to proximity sensor events.
Definition at line 41 of file proximity.h.
| typedef void UASensorsProximity |
Opaque type that models the proximity sensor.
Definition at line 35 of file proximity.h.
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_disable | ( | UASensorsProximity * | sensor | ) |
Disables the supplied proximity sensor.
| [in] | sensor | The sensor instance to be disabled. |
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_enable | ( | UASensorsProximity * | sensor | ) |
Enables the supplied proximity sensor.
| [in] | sensor | The sensor instance to be enabled. |
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_get_max_value | ( | UASensorsProximity * | sensor, |
| float * | value | ||
| ) |
Queries the maximum value that can be reported by the sensor.
| [in] | sensor | The sensor instance to be queried. |
| UBUNTU_DLL_PUBLIC uint32_t ua_sensors_proximity_get_min_delay | ( | UASensorsProximity * | sensor | ) |
Queries the minimum delay between two readings for the supplied sensor.
| [in] | sensor | The sensor instance to be queried. |
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_get_min_value | ( | UASensorsProximity * | sensor, |
| float * | value | ||
| ) |
Queries the minimum value that can be reported by the sensor.
| [in] | sensor | The sensor instance to be queried. |
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_get_resolution | ( | UASensorsProximity * | sensor, |
| float * | value | ||
| ) |
Queries the numeric resolution supported by the sensor.
| [in] | sensor | The sensor instance to be queried. |
| UBUNTU_DLL_PUBLIC UASensorsProximity* ua_sensors_proximity_new | ( | ) |
Create a new object for accessing the proximity sensor.
| UBUNTU_DLL_PUBLIC UStatus ua_sensors_proximity_set_event_rate | ( | UASensorsProximity * | sensor, |
| uint32_t | rate | ||
| ) |
Set the sensor event delivery rate in nanoseconds..
| [in] | sensor | The sensor instance to be modified. |
| [in] | rate | The new event delivery rate. |
| UBUNTU_DLL_PUBLIC void ua_sensors_proximity_set_reading_cb | ( | UASensorsProximity * | sensor, |
| on_proximity_event_cb | cb, | ||
| void * | ctx | ||
| ) |
Set the callback to be invoked whenever a new sensor reading is available.
| [in] | sensor | The sensor instance to associate the callback with. |
| [in] | cb | The callback to be invoked. |
| [in] | ctx | The context supplied to the callback invocation. |