Enums¶
Details¶
- class AppStreamCompose.ComposeError(value)¶
Bases:
GObject.GEnumA metadata composition error.
Added in version 0.13.0.
- FAILED = 0¶
Generic failure.
- class AppStreamCompose.IconState(value)¶
Bases:
GObject.GEnumDesignated state for an icon of a given size.
Added in version 0.15.2.
- classmethod from_string(state_str)¶
- Parameters:
state_str (
str) – the string.- Returns:
- Return type:
Converts the text representation to an enumerated value.
Added in version 1.0.2.
- classmethod to_string(istate)¶
- Parameters:
istate (
AppStreamCompose.IconState) – theAppStreamCompose.IconState.- Returns:
string version of istate
- Return type:
Converts the enumerated value to an text representation.
Added in version 1.0.2.
- 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.ImageFormat(value)¶
Bases:
GObject.GEnumFile format of an image.
All of these formats can be read, but renditions are only ever written as
AppStreamCompose.ImageFormat.PNGorAppStreamCompose.ImageFormat.JXL- the other values are for classifying input data.Added in version 0.14.0.
- classmethod from_filename(fname)¶
- Parameters:
fname (
str) – the filename.- Returns:
a
AppStreamCompose.ImageFormatorAppStreamCompose.ImageFormat.UNKNOWNfor unknown- Return type:
Returns the image format type based on the given file’s filename.
Added in version 0.13.0.
- classmethod from_string(str)¶
- Parameters:
str (
str) – the string.- Returns:
a
AppStreamCompose.ImageFormatorAppStreamCompose.ImageFormat.UNKNOWNfor unknown- Return type:
Converts the text representation to an enumerated value.
Added in version 0.13.0.
- classmethod to_string(format)¶
- Parameters:
format (
AppStreamCompose.ImageFormat) – theAppStreamCompose.ImageFormat.- Returns:
string version of format
- Return type:
Converts the enumerated value to an text representation.
Added in version 0.13.0.
- UNKNOWN = 0¶
Unknown image format.
- PNG = 1¶
PNG format
- JXL = 2¶
JPEG-XL format
- SVG = 3¶
SVG format
- SVGZ = 4¶
Compressed SVG format
- AVIF = 5¶
AVIF format
- WEBP = 6¶
WebP format
- JPEG = 7¶
JPEG format
- GIF = 8¶
GIF format
- class AppStreamCompose.ImageScaleMode(value)¶
Bases:
GObject.GEnumHow an image rendition should be scaled. Every mode preserves the aspect ratio of the source image - an image is never stretched or cropped to fill a target size.
Added in version 1.2.0.
- NONE = 0¶
Keep the original (loaded) image size.
- PAD = 1¶
Scale to fit the target dimensions and center the result on a transparent canvas of exactly that size.
- FIT_WIDTH = 2¶
Scale proportionally to match the target width.
- FIT_HEIGHT = 3¶
Scale proportionally to match the target height.
- class AppStreamCompose.MediaError(value)¶
Bases:
GObject.GEnumA media processing error.
Added in version 1.2.0.
- classmethod is_worker_failure(error)¶
- Parameters:
error (
GLib.ErrororNone) – AGLib.Errorreturned by a media operation.- Returns:
Trueif the worker misbehaved.- Return type:
Check whether the given error indicates that the media worker itself malfunctioned, as opposed to the processed media simply being broken. Only the former should be reported to users as a worker problem.
Added in version 1.2.0.
- FAILED = 0¶
Generic failure.
- DEAD_WORKER = 1¶
The media worker process crashed or could not be spawned.
- TIMEOUT = 2¶
A media operation took too long and was aborted.
- PROTOCOL = 3¶
Communication with the media worker was corrupted.
- UNSUPPORTED = 4¶
The requested operation or image type was not supported.