Enums

Details

class AppStreamCompose.CanvasError(value)

Bases: GObject.GEnum

A drawing error.

classmethod quark()
Returns:

An error quark.

Return type:

int

FAILED = 0

Generic failure.

DRAWING = 1

Drawing operation failed.

FONT = 2

Issue with font or font selection.

UNSUPPORTED = 3

The requested action was not supported.

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

JPEG = 2

JPEG format

GIF = 3

GIF format

SVG = 4

SVG format

SVGZ = 5

Compressed SVG format

WEBP = 6

WebP format

AVIF = 7

AVIF format

XPM = 8

XPM format