Enums

Details

class AppStreamCompose.ComposeError(value)

Bases: GObject.GEnum

A metadata composition error.

classmethod quark()
Returns:

An error quark.

Return type:

int

FAILED = 0

Generic failure.

class AppStreamCompose.IconState(value)

Bases: GObject.GEnum

Designated state for an icon of a given size.

classmethod from_string(state_str)
Parameters:

state_str (str) – the string.

Returns:

a AppStreamCompose.IconState

Return type:

AppStreamCompose.IconState

Converts the text representation to an enumerated value.

classmethod to_string(istate)
Parameters:

istate (AppStreamCompose.IconState) – the AppStreamCompose.IconState.

Returns:

string version of istate

Return type:

str

Converts the enumerated value to an text representation.

IGNORED = 0

Ignore icons of this size.

CACHED_REMOTE = 1

Create cache for the icon, and provide remote link as well.

CACHED_ONLY = 2

Set if the icon should be stored in an icon tarball and be cached locally.

REMOTE_ONLY = 3

Set if this icon should be stored remotely and fetched on demand.

class AppStreamCompose.ImageError(value)

Bases: GObject.GEnum

An image processing error.

classmethod quark()
Returns:

An error quark.

Return type:

int

FAILED = 0

Generic failure.

UNSUPPORTED = 1

The graphic type is not supported.

class AppStreamCompose.ImageFormat(value)

Bases: GObject.GEnum

File format of an image.

classmethod from_filename(fname)
Parameters:

fname (str) – the filename.

Returns:

a AppStreamCompose.ImageFormat or AppStreamCompose.ImageFormat.UNKNOWN for unknown

Return type:

AppStreamCompose.ImageFormat

Returns the image format type based on the given file’s filename.

classmethod from_string(str)
Parameters:

str (str) – the string.

Returns:

a AppStreamCompose.ImageFormat or AppStreamCompose.ImageFormat.UNKNOWN for unknown

Return type:

AppStreamCompose.ImageFormat

Converts the text representation to an enumerated value.

classmethod to_string(format)
Parameters:

format (AppStreamCompose.ImageFormat) – the AppStreamCompose.ImageFormat.

Returns:

string version of format

Return type:

str

Converts the enumerated value to an text representation.

UNKNOWN = 0

Unknown image format.

PNG = 1

PNG format

JXL = 2

JPEG-XL format

AVIF = 3

AVIF format

WEBP = 4

WebP format

SVG = 5

SVG format

SVGZ = 6

Compressed SVG format

JPEG = 7

JPEG format

GIF = 8

GIF format

XPM = 9

XPM format