Colord.Device¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r/w/c |
|||
r |
|||
[ |
r |
||
r |
|||
r |
|||
r |
|||
r |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Colord.Device(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod error_from_string(error_desc)[source]¶
- Parameters:
error_desc (
str) –- Returns:
enumerated value
- Return type:
Converts a string to a
Colord.DeviceError.New in version 0.1.26.
- classmethod error_to_string(error_enum)[source]¶
- Parameters:
error_enum (
Colord.DeviceError) –- Returns:
identifier string
- Return type:
Converts a
Colord.DeviceErrorto a string.New in version 0.1.26.
- classmethod kind_from_string(kind)[source]¶
- Parameters:
kind (
str) –- Returns:
enumerated value
- Return type:
Converts a string to a
Colord.DeviceKind.New in version 0.1.0.
- classmethod kind_to_profile_kind(device_kind)[source]¶
- Parameters:
device_kind (
Colord.DeviceKind) – AColord.DeviceKind- Returns:
- Return type:
Gets the most suitable profile kind for a device kind.
New in version 0.1.6.
- classmethod kind_to_string(kind_enum)[source]¶
- Parameters:
kind_enum (
Colord.DeviceKind) –- Returns:
identifier string
- Return type:
Converts a
Colord.DeviceKindto a string.New in version 0.1.0.
- classmethod mode_to_string(device_mode)[source]¶
- Parameters:
device_mode (
Colord.DeviceMode) –- Return type:
- classmethod new()[source]¶
- Returns:
a new
Colord.Deviceobject.- Return type:
Creates a new
Colord.Deviceobject.New in version 0.1.0.
- classmethod new_with_object_path(object_path)[source]¶
- Parameters:
object_path (
str) – The colord object path.- Returns:
a new device object.
- Return type:
Creates a new
Colord.Deviceobject with a known object path.New in version 0.1.8.
- classmethod relation_from_string(device_relation)[source]¶
- Parameters:
device_relation (
str) –- Return type:
- classmethod relation_to_string(device_relation)[source]¶
- Parameters:
device_relation (
Colord.DeviceRelation) –- Return type:
- add_profile(relation, profile, cancellable, callback, *user_data)[source]¶
- Parameters:
relation (
Colord.DeviceRelation) – aColord.DeviceRelation, e.g.Colord.DeviceRelation.HARDprofile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Adds a profile to a device.
New in version 0.1.8.
- add_profile_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- add_profile_sync(relation, profile, cancellable)[source]¶
- Parameters:
relation (
Colord.DeviceRelation) – aColord.DeviceRelation, e.g.Colord.DeviceRelation.HARDprofile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Adds a profile to a device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.3.
- connect(cancellable, callback, *user_data)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Connects to the object and fills up initial properties.
New in version 0.1.8.
- connect_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- connect_sync(cancellable)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone- Raises:
- Returns:
- Return type:
Connects to the object and fills up initial properties.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.8.
- equal(device2)[source]¶
- Parameters:
device2 (
Colord.Device) – anotherColord.Deviceinstance.- Returns:
Trueif the devices are the same device- Return type:
Tests two devices for equality.
New in version 0.1.8.
- get_colorspace()[source]¶
- Returns:
A colorspace, e.g.
Colord.Colorspace.RGB- Return type:
Gets the device colorspace.
New in version 0.1.1.
- get_created()[source]¶
- Returns:
A value in microseconds, or 0 for invalid
- Return type:
Gets the device creation date.
New in version 0.1.0.
- get_default_profile()[source]¶
- Returns:
A
Colord.Profile's orNone- Return type:
Gets the default device profile. A profile will not be returned if the device is being profiled or is disabled.
New in version 0.1.1.
- get_embedded()[source]¶
-
Returns if the device is embedded in the computer and cannot be removed.
New in version 0.1.27.
- get_kind()[source]¶
- Returns:
A device kind, e.g.
Colord.DeviceKind.DISPLAY- Return type:
Gets the device kind.
New in version 0.1.0.
- get_metadata_item(key)[source]¶
- Parameters:
key (
str) – a key for the metadata dictionary- Returns:
the metadata value, or
Noneif not set.- Return type:
Returns the device metadata for a specific key.
New in version 0.1.5.
- get_mode()[source]¶
- Returns:
A colorspace, e.g.
Colord.DeviceMode.VIRTUAL- Return type:
Gets the device mode.
New in version 0.1.2.
- get_modified()[source]¶
- Returns:
A value in microseconds, or 0 for invalid
- Return type:
Gets the device modified date.
New in version 0.1.1.
- get_owner()[source]¶
- Returns:
The UID of the user that created the device
- Return type:
Gets the device owner.
New in version 0.1.13.
- get_profile_for_qualifiers(qualifiers, cancellable, callback, *user_data)[source]¶
- Parameters:
qualifiers (
str) – a set of qualifiers that can included wildcardscancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Gets the preferred profile for some qualifiers.
New in version 0.1.8.
- get_profile_for_qualifiers_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
a
Colord.ProfileorNone- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- get_profile_for_qualifiers_sync(qualifiers, cancellable)[source]¶
- Parameters:
qualifiers (
str) – a set of qualifiers that can included wildcardscancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
a
Colord.ProfileorNone- Return type:
Gets the preferred profile for some qualifiers.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.8.
- get_profile_relation(profile, cancellable, callback, *user_data)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Gets the property relationship to the device.
New in version 0.1.8.
- get_profile_relation_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- get_profile_relation_sync(profile, cancellable)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstance.cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Gets the property relationship to the device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.8.
- get_profiles()[source]¶
- Returns:
An array of
Colord.Profile's- Return type:
Gets the device profiles.
New in version 0.1.0.
- get_profiling_inhibitors()[source]¶
-
Gets any profiling inhibitors for the device.
New in version 0.1.17.
- get_scope()[source]¶
- Returns:
An object scope, e.g.
Colord.ObjectScope.TEMP- Return type:
Gets the device scope.
New in version 0.1.10.
- make_profile_default(profile, cancellable, callback, *user_data)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Makes an already added profile default for a device.
New in version 0.1.8.
- make_profile_default_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- make_profile_default_sync(profile, cancellable)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Makes an already added profile default for a device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.8.
- profiling_inhibit(cancellable, callback, *user_data)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Sets up the device for profiling and causes no profiles to be returned if
Colord.Device.get_profile_for_qualifiers_sync() is used.New in version 0.1.8.
- profiling_inhibit_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- profiling_inhibit_sync(cancellable)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone- Raises:
- Returns:
- Return type:
Sets up the device for profiling and causes no profiles to be returned if
Colord.Device.get_profile_for_qualifiers_sync() is used.WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.1.
- profiling_uninhibit(cancellable, callback, *user_data)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Restores the device after profiling and causes normal profiles to be returned if
Colord.Device.get_profile_for_qualifiers_sync() is used.New in version 0.1.8.
- profiling_uninhibit_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- profiling_uninhibit_sync(cancellable)[source]¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone- Raises:
- Returns:
- Return type:
Sets up the device for profiling and causes no profiles to be returned if
Colord.Device.get_profile_for_qualifiers_sync() is used.WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.1.
- remove_profile(profile, cancellable, callback, *user_data)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Removes a profile from a device.
New in version 0.1.8.
- remove_profile_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- remove_profile_sync(profile, cancellable)[source]¶
- Parameters:
profile (
Colord.Profile) – aColord.Profileinstancecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Removes a profile from a device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.2.
- set_colorspace_sync(colorspace, cancellable)[source]¶
- Parameters:
colorspace (
Colord.Colorspace) – The device colorspace, e.g.Colord.Colorspace.RGBcancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device kind.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.1.
- set_enabled(enabled, cancellable, callback, *user_data)[source]¶
- Parameters:
enabled (
bool) – the enabled statecancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Enables or disables a device.
New in version 0.1.26.
- set_enabled_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.26.
- set_enabled_sync(enabled, cancellable)[source]¶
- Parameters:
enabled (
bool) – the enabled statecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Enables or disables a device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.26.
- set_kind_sync(kind, cancellable)[source]¶
- Parameters:
kind (
Colord.DeviceKind) – The device kind, e.g.Colord.DeviceKind.DISPLAYcancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device kind.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.0.
- set_mode_sync(mode, cancellable)[source]¶
- Parameters:
mode (
Colord.DeviceMode) – The device kind, e.g.Colord.DeviceMode.VIRTUALcancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device mode.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.2.
- set_model_sync(value, cancellable)[source]¶
- Parameters:
value (
str) – The model.cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device model.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.0.
- set_object_path(object_path)[source]¶
- Parameters:
object_path (
str) – The colord object path.
Sets the object path of the device.
New in version 0.1.8.
- set_property(key, value, cancellable, callback, *user_data)[source]¶
- Parameters:
key (
str) – a property keyvalue (
str) – a property keycancellable (
Gio.CancellableorNone) – aGio.Cancellable, orNonecallback (
Gio.AsyncReadyCallbackorNone) – the function to run on completion
Sets a property on the device.
New in version 0.1.8.
- set_property_finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult) – theGio.AsyncResult- Raises:
- Returns:
success
- Return type:
Gets the result from the asynchronous function.
New in version 0.1.8.
- set_property_sync(key, value, cancellable)[source]¶
- Parameters:
key (
str) – The property keyvalue (
str) – The property valuecancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets an object property.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.8.
- set_serial_sync(value, cancellable)[source]¶
- Parameters:
value (
str) – The string value.cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device serial number.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.1.
- set_vendor_sync(value, cancellable)[source]¶
- Parameters:
value (
str) – The string value.cancellable (
Gio.CancellableorNone) – aGio.CancellableorNone
- Raises:
- Returns:
- Return type:
Sets the device vendor.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
New in version 0.1.1.
- to_string()[source]¶
- Returns:
text representation of
Colord.Device- Return type:
Converts the device to a string description.
New in version 0.1.0.
- do_changed() virtual¶
Signal Details¶
- Colord.Device.signals.changed(device)¶
- Signal Name:
changed- Flags:
- Parameters:
device (
Colord.Device) – The object which received the signal
The
::changedsignal is emitted when the device data has changed.New in version 0.1.0.
Property Details¶
- Colord.Device.props.colorspace¶
-
The device colorspace, e.g.
Colord.Colorspace.RGB.New in version 0.1.1.
- Colord.Device.props.connected¶
-
The if the object path has been connected as is valid for use.
New in version 0.1.9.
- Colord.Device.props.created¶
-
The time the device was created.
New in version 0.1.0.
- Colord.Device.props.embedded¶
-
If the device is embedded in the device and cannot be removed.
New in version 0.1.27.
- Colord.Device.props.enabled¶
-
The device enabled state.
New in version 0.1.26.
- Colord.Device.props.format¶
-
The device format.
New in version 0.1.9.
- Colord.Device.props.id¶
-
The device ID.
New in version 0.1.0.
- Colord.Device.props.kind¶
-
The device kind, e.g.
Colord.DeviceKind.DISPLAY.New in version 0.1.0.
- Colord.Device.props.mode¶
-
The device colorspace, e.g.
Colord.DeviceMode.VIRTUAL.New in version 0.1.2.
- Colord.Device.props.model¶
-
The device model.
New in version 0.1.0.
- Colord.Device.props.modified¶
-
The last time the device was modified.
New in version 0.1.1.
- Colord.Device.props.object_path¶
-
The object path of the remote object
New in version 0.1.8.
- Colord.Device.props.owner¶
-
The device owner, e.g. 500.
New in version 0.1.13.
- Colord.Device.props.profiling_inhibitors¶
- Colord.Device.props.scope¶
-
The device scope, e.g.
Colord.ObjectScope.TEMP.New in version 0.1.10.
- Colord.Device.props.seat¶
-
The device seat identifier.
New in version 0.1.24.
- Colord.Device.props.serial¶
-
The device serial number.
New in version 0.1.1.