Sensor
Object Hierarchy:
Description:
Namespace: Cd
Package: colord
Content:
Properties:
- public string connected { get; }
The if the object path has been connected as is valid for use.
- public string embedded { get; }
If the sensor has a native driver.
- public string id { get; }
The object ID of the remote object
- public string kind { get; }
The sensor kind.
- public string locked { get; }
If the sensor is locked.
- public string mode { get; }
The sensor mode.
- public string model { get; }
The sensor model.
- public string native { get; }
If the sensor has a native driver.
- public string object_path { get; set construct; }
The object path of the remote object
- public string serial { get; }
The sensor ID.
- public string state { get; }
The sensor state.
- public string vendor { get; }
The sensor vendor.
Static methods:
- public static SensorCap cap_from_string (string sensor_cap)
Gets the sensor capability as a enumerated value.
- public static unowned string cap_to_string (SensorCap sensor_cap)
Gets the sensor capability as a string.
- public static SensorError error_from_string (string error_desc)
Converts a string to a SensorError.
- public static Quark error_quark ()
- public static unowned string error_to_string (SensorError error_enum)
Converts a SensorError to a string.
- public static SensorKind kind_from_string (string sensor_kind)
Gets the sensor kind as a enumerated value.
- public static unowned string kind_to_string (SensorKind sensor_kind)
Gets the sensor kind as a string.
- public static SensorState state_from_string (string sensor_state)
Gets the sensor stateability as a enumerated value.
- public static unowned string state_to_string (SensorState sensor_state)
Gets the sensor stateability as a string.
Creation methods:
- public Sensor ()
Creates a new Sensor object.
- public Sensor.with_object_path (string object_path)
Creates a new Sensor object with a known object path.
Methods:
- public async bool @lock (Cancellable? cancellable) throws Error
Locks the device so we can use it.
- public async bool @unlock (Cancellable? cancellable) throws Error
Unlocks the sensor for use by other programs.
- public async bool connect (Cancellable? cancellable) throws Error
Connects to the sensor.
- public bool connect_sync (Cancellable? cancellable = null) throws Error
Connects to the object and fills up initial properties.
- public bool equal (Sensor sensor2)
Tests two sensors for equality.
- public uint64 get_caps ()
Returns the sensor metadata.
- public bool get_connected ()
Gets if the sensor has been connected.
- public bool get_embedded ()
Returns if the sensor is embedded into the computer.
- public unowned string get_id ()
Gets the object ID for the sensor.
- public SensorKind get_kind ()
Gets the sensor kind.
- public bool get_locked ()
Returns if the sensor is locked.
- public HashTable<unowned string,unowned string> get_metadata ()
Returns the sensor metadata.
- public unowned string get_metadata_item (string key)
Returns the sensor metadata for a specific key.
- public SensorCap get_mode ()
Gets the sensor operating mode.
- public unowned string get_model ()
Gets the sensor model.
- public bool get_native ()
Returns if the sensor has a native driver.
- public unowned string get_object_path ()
Gets the object path for the sensor.
- public unowned string get_option (string key)
Gets a specific sensor option.
- public HashTable<unowned string,unowned Variant> get_options ()
Gets any sensor options.
- public async ColorXYZ get_sample (SensorCap cap, Cancellable? cancellable) throws Error
Gets a color sample from a sensor
- public ColorXYZ get_sample_sync (SensorCap cap, Cancellable? cancellable = null) throws Error
Gets a sample from the sensor.
- public unowned string get_serial ()
Gets the sensor serial number.
- public async Spectrum get_spectrum (SensorCap cap, Cancellable? cancellable) throws Error
Gets a color spectrum from a sensor
- public Spectrum get_spectrum_sync (SensorCap cap, Cancellable? cancellable = null) throws Error
Gets a spectrum from the sensor.
- public SensorState get_state ()
Gets the sensor state.
- public unowned string get_vendor ()
Gets the sensor vendor.
- public bool has_cap (SensorCap cap)
Returns the sensor metadata for a specific key.
- public bool lock_sync (Cancellable? cancellable = null) throws Error
Locks the device so we can use it.
- public void set_object_path (string object_path)
Sets the object path of the sensor.
- public async bool set_options (HashTable<string,Variant> values, Cancellable? cancellable) throws Error
Sets options on the sensor device.
- public bool set_options_sync (HashTable<string,Variant> values, Cancellable? cancellable = null) throws Error
Sets options on the sensor device.
- public string to_string ()
- public bool unlock_sync (Cancellable? cancellable = null) throws Error
Unlocks the device for use by other programs.
Signals:
- public virtual signal void button_pressed ()
The button_pressed signal is emitted when the button has been pressed.
Inherited Members:
All known members inherited from class GLib.Object