Colord.Client

g Colord.Client Colord.Client GObject.Object GObject.Object GObject.Object->Colord.Client

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_from_string (error_desc)

class

error_quark ()

class

error_to_string (error_enum)

class

new ()

connect (cancellable, callback, *user_data)

connect_finish (res)

connect_sync (cancellable)

create_device (id, scope, properties, cancellable, callback, *user_data)

create_device_finish (res)

create_device_sync (id, scope, properties, cancellable)

create_profile (id, scope, properties, cancellable, callback, *user_data)

create_profile_finish (res)

create_profile_for_icc (icc, scope, cancellable, callback, *user_data)

create_profile_for_icc_finish (res)

create_profile_for_icc_sync (icc, scope, cancellable)

create_profile_sync (id, scope, properties, cancellable)

delete_device (device, cancellable, callback, *user_data)

delete_device_finish (res)

delete_device_sync (device, cancellable)

delete_profile (profile, cancellable, callback, *user_data)

delete_profile_finish (res)

delete_profile_sync (profile, cancellable)

find_device (id, cancellable, callback, *user_data)

find_device_by_property (key, value, cancellable, callback, *user_data)

find_device_by_property_finish (res)

find_device_by_property_sync (key, value, cancellable)

find_device_finish (res)

find_device_sync (id, cancellable)

find_profile (id, cancellable, callback, *user_data)

find_profile_by_filename (filename, cancellable, callback, *user_data)

find_profile_by_filename_finish (res)

find_profile_by_filename_sync (filename, cancellable)

find_profile_by_property (key, value, cancellable, callback, *user_data)

find_profile_by_property_finish (res)

find_profile_by_property_sync (key, value, cancellable)

find_profile_finish (res)

find_profile_sync (id, cancellable)

find_sensor (id, cancellable, callback, *user_data)

find_sensor_finish (res)

find_sensor_sync (id, cancellable)

get_connected ()

get_daemon_version ()

get_devices (cancellable, callback, *user_data)

get_devices_by_kind (kind, cancellable, callback, *user_data)

get_devices_by_kind_finish (res)

get_devices_by_kind_sync (kind, cancellable)

get_devices_finish (res)

get_devices_sync (cancellable)

get_has_server ()

get_profiles (cancellable, callback, *user_data)

get_profiles_finish (res)

get_profiles_sync (cancellable)

get_sensors (cancellable, callback, *user_data)

get_sensors_finish (res)

get_sensors_sync (cancellable)

get_standard_space (standard_space, cancellable, callback, *user_data)

get_standard_space_finish (res)

get_standard_space_sync (standard_space, cancellable)

get_system_model ()

get_system_vendor ()

import_profile (file, cancellable, callback, *user_data)

import_profile_finish (res)

import_profile_sync (file, cancellable)

Virtual Methods

Inherited:

GObject.Object (7)

do_changed ()

do_device_added (device)

do_device_changed (device)

do_device_removed (device)

do_profile_added (profile)

do_profile_changed (profile)

do_profile_removed (profile)

do_sensor_added (sensor)

do_sensor_changed (sensor)

do_sensor_removed (sensor)

Properties

Name

Type

Flags

Short Description

connected

str

r

daemon-version

str

r

system-model

str

r

system-vendor

str

r

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

The ::changed signal is emitted when properties may have changed.

device-added

The ::device-added signal is emitted when a device is added.

device-changed

The ::device-changed signal is emitted when a device is changed.

device-removed

The ::device-removed signal is emitted when a device is removed.

profile-added

The ::profile-added signal is emitted when a profile is added.

profile-changed

The ::profile-changed signal is emitted when a profile is changed.

profile-removed

The ::profile-added signal is emitted when a profile is removed.

sensor-added

The ::sensor-added signal is emitted when a sensor is added.

sensor-changed

The ::sensor-changed signal is emitted when a sensor is changed.

sensor-removed

The ::sensor-added signal is emitted when a sensor is removed.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Colord.Client(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Colord.ClientClass

classmethod error_from_string(error_desc)[source]
Parameters:

error_desc (str) –

Returns:

enumerated value

Return type:

Colord.ClientError

Converts a string to a Colord.ClientError.

New in version 0.1.26.

classmethod error_quark()[source]
Returns:

An error quark.

Return type:

int

New in version 0.1.0.

classmethod error_to_string(error_enum)[source]
Parameters:

error_enum (Colord.ClientError) –

Returns:

identifier string

Return type:

str

Converts a Colord.ClientError to a string.

New in version 0.1.26.

classmethod new()[source]
Returns:

a new Colord.Client object.

Return type:

Colord.Client

Creates a new Colord.Client object.

New in version 0.1.0.

connect(cancellable, callback, *user_data)[source]
Parameters:

Connects to the colord daemon.

New in version 0.1.6.

connect_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

success

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.1.6.

connect_sync(cancellable)[source]
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

Raises:

GLib.Error

Returns:

True for success, else False.

Return type:

bool

Connects to the colord daemon.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

create_device(id, scope, properties, cancellable, callback, *user_data)[source]
Parameters:

Creates a color device.

New in version 0.1.8.

create_device_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Device or None

Return type:

Colord.Device

Gets the result from the asynchronous function.

New in version 0.1.8.

create_device_sync(id, scope, properties, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Device object, or None for error

Return type:

Colord.Device

Creates a color device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.2.

create_profile(id, scope, properties, cancellable, callback, *user_data)[source]
Parameters:

Creates a color profile.

New in version 0.1.8.

create_profile_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.8.

create_profile_for_icc(icc, scope, cancellable, callback, *user_data)[source]
Parameters:

Creates a color profile for an Colord.Icc Object.

New in version 1.1.1.

create_profile_for_icc_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 1.1.1.

create_profile_for_icc_sync(icc, scope, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Creates a color profile from a Colord.Icc object.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 1.1.1.

create_profile_sync(id, scope, properties, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Creates a color profile.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.2.

delete_device(device, cancellable, callback, *user_data)[source]
Parameters:

Deletes a device.

New in version 0.1.8.

delete_device_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

success

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.1.8.

delete_device_sync(device, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True is the device was deleted

Return type:

bool

Deletes a color device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.8.

delete_profile(profile, cancellable, callback, *user_data)[source]
Parameters:

Deletes a profile.

New in version 0.1.8.

delete_profile_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

success

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.1.8.

delete_profile_sync(profile, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True is the profile was deleted

Return type:

bool

Deletes a color profile.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.8.

find_device(id, cancellable, callback, *user_data)[source]
Parameters:

Finds a device by an ID.

New in version 0.1.8.

find_device_by_property(key, value, cancellable, callback, *user_data)[source]
Parameters:

Finds a color device that has a property value.

New in version 0.1.8.

find_device_by_property_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Device or None

Return type:

Colord.Device

Gets the result from the asynchronous function.

New in version 0.1.8.

find_device_by_property_sync(key, value, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Device object, or None for error

Return type:

Colord.Device

Finds a color device that has a property value.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.8.

find_device_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Device or None

Return type:

Colord.Device

Gets the result from the asynchronous function.

New in version 0.1.8.

find_device_sync(id, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Device object, or None for error

Return type:

Colord.Device

Finds a color device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

find_profile(id, cancellable, callback, *user_data)[source]
Parameters:

Finds a profile by an ID.

New in version 0.1.8.

find_profile_by_filename(filename, cancellable, callback, *user_data)[source]
Parameters:

Finds a profile by a filename.

New in version 0.1.8.

find_profile_by_filename_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.8.

find_profile_by_filename_sync(filename, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Finds a color profile from its filename.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.3.

find_profile_by_property(key, value, cancellable, callback, *user_data)[source]
Parameters:

Finds a color profile that has a property value.

New in version 0.1.24.

find_profile_by_property_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.24.

find_profile_by_property_sync(key, value, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Finds a color profile that has a property value.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.24.

find_profile_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.8.

find_profile_sync(id, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Finds a color profile from its id.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

find_sensor(id, cancellable, callback, *user_data)[source]
Parameters:

Finds a sensor by an ID.

New in version 0.1.26.

find_sensor_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Sensor or None

Return type:

Colord.Sensor

Gets the result from the asynchronous function.

New in version 0.1.26.

find_sensor_sync(id, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Sensor object, or None for error

Return type:

Colord.Sensor

Finds a color sensor.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.26.

get_connected()[source]
Returns:

True if properties are valid

Return type:

bool

Gets if the client has been connected.

New in version 0.1.9.

get_daemon_version()[source]
Returns:

string containing the daemon version, e.g. “0.1.0”

Return type:

str

Get colord daemon version.

New in version 0.1.0.

get_devices(cancellable, callback, *user_data)[source]
Parameters:

Gets an array of color devices.

New in version 0.1.8.

get_devices_by_kind(kind, cancellable, callback, *user_data)[source]
Parameters:

Gets an array of color devices.

New in version 0.1.8.

get_devices_by_kind_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the devices

Return type:

[Colord.Device]

Gets the result from the asynchronous function.

New in version 0.1.8.

get_devices_by_kind_sync(kind, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

an array of Colord.Device objects.

Return type:

[Colord.Device]

Get an array of the device objects of a specified kind.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

get_devices_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the devices

Return type:

[Colord.Device]

Gets the result from the asynchronous function.

New in version 0.1.8.

get_devices_sync(cancellable)[source]
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable, or None

Raises:

GLib.Error

Returns:

an array of Colord.Device objects.

Return type:

[Colord.Device]

Get an array of the device objects.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

get_has_server()[source]
Returns:

True if the colord process is running

Return type:

bool

Gets if the colord server is currently running. WARNING: This function may block for up to 5 seconds waiting for the daemon to start if it is not already running.

New in version 0.1.12.

get_profiles(cancellable, callback, *user_data)[source]
Parameters:

Gets an array of color profiles.

New in version 0.1.8.

get_profiles_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the profiles

Return type:

[Colord.Profile]

Gets the result from the asynchronous function.

New in version 0.1.8.

get_profiles_sync(cancellable)[source]
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable, or None

Raises:

GLib.Error

Returns:

an array of Colord.Profile objects.

Return type:

[Colord.Profile]

Get an array of the profile objects.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

get_sensors(cancellable, callback, *user_data)[source]
Parameters:

Gets an array of color sensors.

New in version 0.1.8.

get_sensors_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the sensors

Return type:

[Colord.Sensor]

Gets the result from the asynchronous function.

New in version 0.1.8.

get_sensors_sync(cancellable)[source]
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable, or None

Raises:

GLib.Error

Returns:

an array of Colord.Sensor objects.

Return type:

[Colord.Sensor]

Get an array of the sensor objects.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.0.

get_standard_space(standard_space, cancellable, callback, *user_data)[source]
Parameters:

Finds a standard profile space.

New in version 0.1.8.

get_standard_space_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.8.

get_standard_space_sync(standard_space, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Finds a standard colorspace.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.2.

get_system_model()[source]
Returns:

string containing the system model, e.g. “T61”

Return type:

str

Get system model.

New in version 1.0.2.

get_system_vendor()[source]
Returns:

string containing the system vendor, e.g. “Lenovo”

Return type:

str

Get system vendor.

New in version 1.0.2.

import_profile(file, cancellable, callback, *user_data)[source]
Parameters:

Imports a color profile into the users home directory.

If the profile should be accessible for all users, then call Colord.Profile.install_system_wide() on the result.

New in version 0.1.12.

import_profile_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

a Colord.Profile or None

Return type:

Colord.Profile

Gets the result from the asynchronous function.

New in version 0.1.12.

import_profile_sync(file, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A Colord.Profile object, or None for error

Return type:

Colord.Profile

Imports a color profile into the users home directory.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.1.12.

do_changed() virtual
do_device_added(device) virtual
Parameters:

device (Colord.Device) –

do_device_changed(device) virtual
Parameters:

device (Colord.Device) –

do_device_removed(device) virtual
Parameters:

device (Colord.Device) –

do_profile_added(profile) virtual
Parameters:

profile (Colord.Profile) –

do_profile_changed(profile) virtual
Parameters:

profile (Colord.Profile) –

do_profile_removed(profile) virtual
Parameters:

profile (Colord.Profile) –

do_sensor_added(sensor) virtual
Parameters:

sensor (Colord.Sensor) –

do_sensor_changed(sensor) virtual
Parameters:

sensor (Colord.Sensor) –

do_sensor_removed(sensor) virtual
Parameters:

sensor (Colord.Sensor) –

Signal Details

Colord.Client.signals.changed(client)
Signal Name:

changed

Flags:

RUN_LAST

Parameters:

client (Colord.Client) – The object which received the signal

The ::changed signal is emitted when properties may have changed.

New in version 0.1.0.

Colord.Client.signals.device_added(client, device)
Signal Name:

device-added

Flags:

RUN_LAST

Parameters:

The ::device-added signal is emitted when a device is added.

New in version 0.1.0.

Colord.Client.signals.device_changed(client, device)
Signal Name:

device-changed

Flags:

RUN_LAST

Parameters:

The ::device-changed signal is emitted when a device is changed.

New in version 0.1.2.

Colord.Client.signals.device_removed(client, device)
Signal Name:

device-removed

Flags:

RUN_LAST

Parameters:

The ::device-removed signal is emitted when a device is removed.

New in version 0.1.0.

Colord.Client.signals.profile_added(client, profile)
Signal Name:

profile-added

Flags:

RUN_LAST

Parameters:

The ::profile-added signal is emitted when a profile is added.

New in version 0.1.2.

Colord.Client.signals.profile_changed(client, profile)
Signal Name:

profile-changed

Flags:

RUN_LAST

Parameters:

The ::profile-changed signal is emitted when a profile is changed.

New in version 0.1.2.

Colord.Client.signals.profile_removed(client, profile)
Signal Name:

profile-removed

Flags:

RUN_LAST

Parameters:

The ::profile-added signal is emitted when a profile is removed.

New in version 0.1.2.

Colord.Client.signals.sensor_added(client, sensor)
Signal Name:

sensor-added

Flags:

RUN_LAST

Parameters:

The ::sensor-added signal is emitted when a sensor is added.

New in version 0.1.6.

Colord.Client.signals.sensor_changed(client, sensor)
Signal Name:

sensor-changed

Flags:

RUN_LAST

Parameters:

The ::sensor-changed signal is emitted when a sensor is changed.

New in version 0.1.6.

Colord.Client.signals.sensor_removed(client, sensor)
Signal Name:

sensor-removed

Flags:

RUN_LAST

Parameters:

The ::sensor-added signal is emitted when a sensor is removed.

New in version 0.1.6.

Property Details

Colord.Client.props.connected
Name:

connected

Type:

str

Default Value:

None

Flags:

READABLE

The if the object path has been connected as is valid for use.

New in version 0.1.9.

Colord.Client.props.daemon_version
Name:

daemon-version

Type:

str

Default Value:

None

Flags:

READABLE

The daemon version.

New in version 0.1.0.

Colord.Client.props.system_model
Name:

system-model

Type:

str

Default Value:

None

Flags:

READABLE

The system model.

New in version 1.0.2.

Colord.Client.props.system_vendor
Name:

system-vendor

Type:

str

Default Value:

None

Flags:

READABLE

The system vendor.

New in version 1.0.2.