Ubuntu Platform API  2.0.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
light.h File Reference
+ Include dependency graph for light.h:

Go to the source code of this file.

Typedefs

typedef void UASensorsLight
 Opaque type that models the ambient light sensor. More...
 
typedef void(* on_light_event_cb )(UASLightEvent *event, void *context)
 Callback type used by applications to subscribe to ambient light sensor events. More...
 

Functions

UBUNTU_DLL_PUBLIC UASensorsLightua_sensors_light_new ()
 Create a new object for accessing the ambient light sensor. More...
 
UBUNTU_DLL_PUBLIC UStatus ua_sensors_light_enable (UASensorsLight *sensor)
 Enables the supplied ambient light sensor. More...
 
UBUNTU_DLL_PUBLIC UStatus ua_sensors_light_disable (UASensorsLight *sensor)
 Disables the supplied ambient light sensor. More...
 
UBUNTU_DLL_PUBLIC uint32_t ua_sensors_light_get_min_delay (UASensorsLight *sensor)
 Queries the minimum delay between two readings for the supplied sensor. More...
 
UBUNTU_DLL_PUBLIC UStatus ua_sensors_light_get_min_value (UASensorsLight *sensor, float *value)
 Queries the minimum value that can be reported by the sensor. More...
 
UBUNTU_DLL_PUBLIC UStatus ua_sensors_light_get_max_value (UASensorsLight *sensor, float *value)
 Queries the maximum value that can be reported by the sensor. More...
 
UBUNTU_DLL_PUBLIC UStatus ua_sensors_light_get_resolution (UASensorsLight *sensor, float *value)
 Queries the numeric resolution supported by the sensor. More...
 
UBUNTU_DLL_PUBLIC void ua_sensors_light_set_reading_cb (UASensorsLight *sensor, on_light_event_cb cb, void *ctx)
 Set the callback to be invoked whenever a new sensor reading is available. More...