Colord.Profile

g Colord.Profile Colord.Profile GObject.Object GObject.Object GObject.Object->Colord.Profile

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

kind_from_string (profile_kind)

class

kind_to_string (profile_kind)

class

new ()

class

new_with_object_path (object_path)

class

quality_from_string (quality)

class

quality_to_string (quality_enum)

class

warning_from_string (type)

class

warning_to_string (kind_enum)

connect (cancellable, callback, *user_data)

connect_finish (res)

connect_sync (cancellable)

equal (profile2)

get_age ()

get_colorspace ()

get_connected ()

get_created ()

get_filename ()

get_format ()

get_has_vcgt ()

get_id ()

get_is_system_wide ()

get_kind ()

get_metadata ()

get_metadata_item (key)

get_object_path ()

get_owner ()

get_qualifier ()

get_scope ()

get_title ()

get_warnings ()

has_access ()

install_system_wide (cancellable, callback, *user_data)

install_system_wide_finish (res)

install_system_wide_sync (cancellable)

load_icc (flags, cancellable)

set_object_path (object_path)

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

set_property_finish (res)

set_property_sync (key, value, cancellable)

to_string ()

Virtual Methods

Inherited:

GObject.Object (7)

do_changed ()

Properties

Name

Type

Flags

Short Description

colorspace

str

r

connected

str

r

created

int

r

filename

str

r

format

str

r

has-vcgt

str

r

id

str

r

is-system-wide

str

r

kind

str

r

object-path

str

r/w/c

owner

int

r

qualifier

str

r

scope

int

r

title

str

r

warnings

[str]

r

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

The ::changed signal is emitted when the profile data has changed.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Colord.Profile(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Colord.ProfileClass

classmethod error_from_string(error_desc)[source]
Parameters:

error_desc (str) –

Returns:

enumerated value

Return type:

Colord.ProfileError

Converts a string to a Colord.ProfileError.

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.ProfileError) –

Returns:

identifier string

Return type:

str

Converts a Colord.ProfileError to a string.

New in version 0.1.26.

classmethod kind_from_string(profile_kind)[source]
Parameters:

profile_kind (str) –

Return type:

Colord.ProfileKind

New in version 2.91.1.

classmethod kind_to_string(profile_kind)[source]
Parameters:

profile_kind (Colord.ProfileKind) –

Return type:

str

New in version 2.91.1.

classmethod new()[source]
Returns:

a new Colord.Profile object.

Return type:

Colord.Profile

Creates a new Colord.Profile object.

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 profile object.

Return type:

Colord.Profile

Creates a new Colord.Profile object with a known object path.

New in version 0.1.8.

classmethod quality_from_string(quality)[source]
Parameters:

quality (str) –

Returns:

enumerated value

Return type:

Colord.ProfileQuality

Converts a string to a Colord.ProfileQuality.

New in version 0.1.27.

classmethod quality_to_string(quality_enum)[source]
Parameters:

quality_enum (Colord.ProfileQuality) –

Returns:

identifier string

Return type:

str

Converts a Colord.ProfileQuality to a string.

New in version 0.1.27.

classmethod warning_from_string(type)[source]
Parameters:

type (str) –

Returns:

enumerated value

Return type:

Colord.ProfileWarning

Converts a string to a Colord.ProfileWarning.

New in version 0.1.25.

classmethod warning_to_string(kind_enum)[source]
Parameters:

kind_enum (Colord.ProfileWarning) –

Returns:

identifier string

Return type:

str

Converts a Colord.ProfileWarning to a string.

New in version 0.1.25.

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

Connects to the object and fills up initial properties.

New in version 0.1.8.

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.8.

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 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(profile2)[source]
Parameters:

profile2 (Colord.Profile) – another Colord.Profile instance.

Returns:

True if the profiles are the same device

Return type:

bool

Tests two profiles for equality.

New in version 0.1.8.

get_age()[source]
Returns:

A UNIX time, or 0 if the profile has no creation date

Return type:

int

Gets the profile age in seconds relative to the current time.

New in version 0.1.8.

get_colorspace()[source]
Returns:

A Colord.Colorspace, e.g. Colord.Colorspace.RGB

Return type:

Colord.Colorspace

Gets the profile colorspace.

New in version 0.1.2.

get_connected()[source]
Returns:

True if properties are valid

Return type:

bool

Gets if the profile has been connected.

New in version 0.1.9.

get_created()[source]
Returns:

A UNIX time, or 0 if the profile has no creation date

Return type:

int

Gets the profile created date and time.

New in version 0.1.8.

get_filename()[source]
Returns:

A string, or None for invalid

Return type:

str

Gets the profile filename.

New in version 0.1.0.

get_format()[source]
Returns:

A string, or None for invalid

Return type:

str

Gets the profile format.

New in version 0.1.4.

get_has_vcgt()[source]
Returns:

True if VCGT is valid.

Return type:

bool

Returns if the profile has a VCGT table.

New in version 0.1.2.

get_id()[source]
Returns:

A string, or None for invalid

Return type:

str

Gets the profile ID.

New in version 0.1.0.

get_is_system_wide()[source]
Returns:

True if system wide.

Return type:

bool

Returns if the profile is installed system wide and available for all users.

New in version 0.1.2.

get_kind()[source]
Returns:

A Colord.ProfileKind, e.g. Colord.ProfileKind.DISPLAY_DEVICE

Return type:

Colord.ProfileKind

Gets the profile kind.

New in version 0.1.1.

get_metadata()[source]
Returns:

a GLib.HashTable.

Return type:

{str: str}

Returns the profile metadata.

New in version 0.1.2.

get_metadata_item(key)[source]
Parameters:

key (str) – a key for the metadata dictionary

Returns:

the metadata value, or None if not set.

Return type:

str

Returns the profile metadata for a specific key.

New in version 0.1.5.

get_object_path()[source]
Returns:

the object path, or None

Return type:

str

Gets the object path for the profile.

New in version 0.1.0.

get_owner()[source]
Returns:

The UID of the user that created the device

Return type:

int

Gets the profile owner.

New in version 0.1.13.

get_qualifier()[source]
Returns:

A string, or None for invalid

Return type:

str

Gets the profile qualifier.

New in version 0.1.0.

get_scope()[source]
Returns:

A Colord.ObjectScope, e.g. Colord.ObjectScope.UNKNOWN

Return type:

Colord.ObjectScope

Gets the profile scope.

New in version 0.1.10.

get_title()[source]
Returns:

A string, or None for invalid

Return type:

str

Gets the profile title.

New in version 0.1.0.

get_warnings()[source]
Returns:

Any profile warnings, e.g. “vcgt-non-monotonic”

Return type:

[str]

Gets the profile warnings as a string array.

New in version 0.1.25.

has_access()[source]
Returns:

A string, or None for invalid

Return type:

bool

Gets if the current user has access permissions to the profile.

New in version 0.1.13.

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

Sets the profile system wide.

New in version 0.1.8.

install_system_wide_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.

install_system_wide_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

Sets the profile system wide.

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

New in version 0.1.8.

load_icc(flags, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

A new Colord.Icc object, or None for error

Return type:

Colord.Icc

Loads a local ICC object from the abstract profile.

New in version 0.1.32.

set_object_path(object_path)[source]
Parameters:

object_path (str) – The colord object path.

Sets the object path of the profile.

New in version 0.1.8.

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

Deletes a color device.

New in version 0.1.8.

set_property_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.

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

GLib.Error

Returns:

True for success, else False.

Return type:

bool

Sets properties on an object

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

New in version 0.1.8.

to_string()[source]
Returns:

text representation of Colord.Profile

Return type:

str

Converts the profile to a string description.

New in version 0.1.0.

do_changed() virtual

Signal Details

Colord.Profile.signals.changed(profile)
Signal Name:

changed

Flags:

RUN_LAST

Parameters:

profile (Colord.Profile) – The object which received the signal

The ::changed signal is emitted when the profile data has changed.

New in version 0.1.0.

Property Details

Colord.Profile.props.colorspace
Name:

colorspace

Type:

str

Default Value:

None

Flags:

READABLE

The profile colorspace.

New in version 0.1.2.

Colord.Profile.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.Profile.props.created
Name:

created

Type:

int

Default Value:

0

Flags:

READABLE

When the profile was created.

New in version 0.1.8.

Colord.Profile.props.filename
Name:

filename

Type:

str

Default Value:

None

Flags:

READABLE

The profile filename.

New in version 0.1.0.

Colord.Profile.props.format
Name:

format

Type:

str

Default Value:

None

Flags:

READABLE

The profile format.

New in version 0.1.4.

Colord.Profile.props.has_vcgt
Name:

has-vcgt

Type:

str

Default Value:

None

Flags:

READABLE

If the profile has a VCGT table.

New in version 0.1.2.

Colord.Profile.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE

The profile ID.

New in version 0.1.0.

Colord.Profile.props.is_system_wide
Name:

is-system-wide

Type:

str

Default Value:

None

Flags:

READABLE

If the profile is installed system wide for all users.

New in version 0.1.2.

Colord.Profile.props.kind
Name:

kind

Type:

str

Default Value:

None

Flags:

READABLE

The profile kind.

New in version 0.1.1.

Colord.Profile.props.object_path
Name:

object-path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The object path of the remote object

New in version 0.1.8.

Colord.Profile.props.owner
Name:

owner

Type:

int

Default Value:

0

Flags:

READABLE

The profile owner, e.g. %500.

New in version 0.1.13.

Colord.Profile.props.qualifier
Name:

qualifier

Type:

str

Default Value:

None

Flags:

READABLE

The profile qualifier.

New in version 0.1.0.

Colord.Profile.props.scope
Name:

scope

Type:

int

Default Value:

0

Flags:

READABLE

The profile scope, e.g. Colord.ObjectScope.TEMP.

New in version 0.1.10.

Colord.Profile.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE

The profile title.

New in version 0.1.0.

Colord.Profile.props.warnings
Name:

warnings

Type:

[str]

Default Value:

[]

Flags:

READABLE

The profile warnings, e.g. “vcgt-non-monotonic”.

New in version 0.1.25.