AppStreamGlib.Screenshot¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.Screenshot(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod kind_from_string(kind)[source]¶
- Parameters:
kind (
str
) – the string.- Returns:
a
AppStreamGlib.ScreenshotKind
, orAppStreamGlib.ScreenshotKind.UNKNOWN
if not known.- Return type:
Converts the text representation to an enumerated value.
New in version 0.1.0.
- classmethod kind_to_string(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.ScreenshotKind
) – theAppStreamGlib.ScreenshotKind
.- Returns:
string version of kind
- Return type:
Converts the enumerated value to an text representation.
New in version 0.1.0.
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.Screenshot
.New in version 0.1.0.
- add_image(image)[source]¶
- Parameters:
image (
AppStreamGlib.Image
) – aAppStreamGlib.Image
instance.
Adds an image to the screenshot.
New in version 0.1.0.
- equal(screenshot2)[source]¶
- Parameters:
screenshot2 (
AppStreamGlib.Screenshot
) – aAppStreamGlib.Screenshot
instance.- Returns:
True
for success- Return type:
Checks if two screenshots are the same.
New in version 0.5.7.
- Parameters:
- Returns:
the caption
- Return type:
Gets the image caption for a specific locale.
New in version 0.1.0.
- get_image(width, height)[source]¶
- Parameters:
- Returns:
an
AppStreamGlib.Image
, orNone
- Return type:
Gets the
AppStreamGlib.Image
closest to the target size. TheAppStreamGlib.Image
may not actually be the requested size, and the application may have to pad / rescale the image to make it fit.New in version 0.2.2.
- get_image_for_locale(locale, width, height)[source]¶
- Parameters:
- Returns:
an
AppStreamGlib.Image
, orNone
- Return type:
Gets the
AppStreamGlib.Image
closest to the target size with the specified locale. TheAppStreamGlib.Image
may not actually be the requested size, and the application may have to pad / rescale the image to make it fit.FIXME: This function assumes the images are ordered in preference order, e.g. “en_GB -> en ->
None
"New in version 0.5.14.
- get_images()[source]¶
- Returns:
an array
- Return type:
Gets the images included in the screenshot of all sizes and locales.
New in version 0.1.0.
- get_images_for_locale(locale)[source]¶
- Parameters:
locale (
str
) – a locale, e.g.en_GB
- Returns:
an array
- Return type:
Returns all images of all sizes that are compatible with a specific locale.
New in version 0.5.14.
- get_priority()[source]¶
- Returns:
a priority value
- Return type:
Gets the screenshot priority.
New in version 0.3.1.
- get_source()[source]¶
- Returns:
an
AppStreamGlib.Image
, orNone
- Return type:
Gets the source image (the unscaled version) for the screenshot
New in version 0.1.6.
- Parameters:
Sets a caption on the screenshot for a specific locale.
New in version 0.1.0.
- set_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.ScreenshotKind
) – theAppStreamGlib.ScreenshotKind
.
Sets the screenshot kind.
New in version 0.1.0.