Top |
#define | CD_SENSOR_ERROR |
#define | CD_SENSOR_TYPE_ERROR |
#define | CD_TYPE_SENSOR |
struct | CdSensorClass |
CdSensor |
A helper GObject to use for accessing colord sensors, and to be notified when it is changed.
See also: CdClient
CdSensor *
cd_sensor_new_with_object_path (const gchar *object_path
);
Creates a new CdSensor object with a known object path.
Since: 0.1.8
void cd_sensor_connect (CdSensor *sensor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Connects to the sensor.
sensor |
a CdSensor instance |
|
cancellable |
a GCancellable or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.1.8
gboolean cd_sensor_connect_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.1.8
void cd_sensor_lock (CdSensor *sensor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Locks the device so we can use it.
sensor |
a CdSensor instance. |
|
cancellable |
a GCancellable, or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.1.8
gboolean cd_sensor_lock_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.1.8
void cd_sensor_unlock (CdSensor *sensor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Unlocks the sensor for use by other programs.
sensor |
a CdSensor instance. |
|
cancellable |
a GCancellable, or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.1.8
gboolean cd_sensor_unlock_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.1.8
void cd_sensor_set_options (CdSensor *sensor
,GHashTable *values
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Sets options on the sensor device.
sensor |
a CdSensor instance. |
|
values |
the options. |
[element-type utf8 GVariant] |
cancellable |
a GCancellable, or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.1.20
gboolean cd_sensor_set_options_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.1.20
void cd_sensor_get_sample (CdSensor *sensor
,CdSensorCap cap
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Gets a color sample from a sensor
sensor |
a CdSensor instance. |
|
cap |
a CdSensorCap |
|
cancellable |
a GCancellable, or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.1.8
CdColorXYZ * cd_sensor_get_sample_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.1.8
void cd_sensor_get_spectrum (CdSensor *sensor
,CdSensorCap cap
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Gets a color spectrum from a sensor
sensor |
a CdSensor instance. |
|
cap |
a CdSensorCap |
|
cancellable |
a GCancellable, or |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 1.3.1
CdSpectrum * cd_sensor_get_spectrum_finish (CdSensor *sensor
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 1.3.1
const gchar *
cd_sensor_get_object_path (CdSensor *sensor
);
Gets the object path for the sensor.
Since: 0.1.6
const gchar *
cd_sensor_get_id (CdSensor *sensor
);
Gets the object ID for the sensor.
Since: 0.1.26
gboolean
cd_sensor_get_connected (CdSensor *sensor
);
Gets if the sensor has been connected.
Since: 0.1.9
CdSensorKind
cd_sensor_get_kind (CdSensor *sensor
);
Gets the sensor kind.
Since: 0.1.6
CdSensorState
cd_sensor_get_state (CdSensor *sensor
);
Gets the sensor state.
Since: 0.1.6
CdSensorCap
cd_sensor_get_mode (CdSensor *sensor
);
Gets the sensor operating mode.
Since: 0.1.6
const gchar *
cd_sensor_get_serial (CdSensor *sensor
);
Gets the sensor serial number.
Since: 0.1.6
const gchar *
cd_sensor_get_model (CdSensor *sensor
);
Gets the sensor model.
Since: 0.1.6
const gchar *
cd_sensor_get_vendor (CdSensor *sensor
);
Gets the sensor vendor.
Since: 0.1.6
gboolean
cd_sensor_get_native (CdSensor *sensor
);
Returns if the sensor has a native driver.
Since: 0.1.6
gboolean
cd_sensor_get_embedded (CdSensor *sensor
);
Returns if the sensor is embedded into the computer.
Since: 0.1.26
gboolean
cd_sensor_get_locked (CdSensor *sensor
);
Returns if the sensor is locked.
Since: 0.1.6
guint64
cd_sensor_get_caps (CdSensor *sensor
);
Returns the sensor metadata.
Since: 0.1.6
gboolean cd_sensor_has_cap (CdSensor *sensor
,CdSensorCap cap
);
Returns the sensor metadata for a specific key.
Since: 0.1.6
GHashTable *
cd_sensor_get_options (CdSensor *sensor
);
Gets any sensor options.
A refcounted GHashTable of (string, GVariant).
[transfer container][element-type utf8 GVariant]
Since: 0.1.20
const gchar * cd_sensor_get_option (CdSensor *sensor
,const gchar *key
);
Gets a specific sensor option.
Since: 0.1.20
GHashTable *
cd_sensor_get_metadata (CdSensor *sensor
);
Returns the sensor metadata.
Since: 0.1.28
const gchar * cd_sensor_get_metadata_item (CdSensor *sensor
,const gchar *key
);
Returns the sensor metadata for a specific key.
Since: 0.1.28
void cd_sensor_set_object_path (CdSensor *sensor
,const gchar *object_path
);
Sets the object path of the sensor.
Since: 0.1.8
gboolean cd_sensor_equal (CdSensor *sensor1
,CdSensor *sensor2
);
Tests two sensors for equality.
Since: 0.1.8