AppStream.Screenshot¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStream.Screenshot(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
Creates a new
AppStream.Screenshot
.
- add_image(image)¶
- Parameters:
image (
AppStream.Image
) – aAppStream.Image
instance.
Adds an image to the screenshot.
- add_video(video)¶
- Parameters:
video (
AppStream.Video
) – aAppStream.Video
instance.
Adds a video to the screenshot.
- clear_images()¶
Remove all images associated with this screenshot.
New in version 0.15.4.
- Returns:
the caption
- Return type:
Gets the image caption
- get_context()¶
- Returns:
the
AppStream.Context
used by this screenshot.- Return type:
Returns the
AppStream.Context
associated with this screenshot. This function may returnNone
if no context is set.New in version 0.11.2.
- get_environment()¶
- Returns:
The GUI environment ID the screenshot was recorded in, or
None
if none set.- Return type:
Get the GUI environment ID of this screenshot, if any is associated with it. E.g. “plasma-mobile” or “gnome:dark”.
- get_image(width, height, scale)¶
- Parameters:
- Returns:
an
AppStream.Image
, orNone
- Return type:
Gets the
AppStream.Image
closest to the target size. TheAppStream.Image
may not actually be the requested size, and the application may have to pad / rescale the image to make it fit. Only images for the current active locale (or fallback, if images are not localized) are considered.New in version 0.14.0.
- get_images()¶
- Returns:
an array
- Return type:
Gets the images for this screenshots. Only images valid for the current language are returned. We return all sizes.
- get_images_all()¶
- Returns:
an array
- Return type:
Returns an array of all images we have, regardless of their size and language.
New in version 0.10.
- get_kind()¶
- Returns:
- Return type:
Gets the screenshot kind.
- get_media_kind()¶
- Returns:
- Return type:
Gets the screenshot media kind.
- get_videos()¶
- Returns:
an array
- Return type:
Gets the videos for this screenshots. Only videos valid for the current language selection are returned. We return all sizes.
- get_videos_all()¶
- Returns:
an array
- Return type:
Returns an array of all screencast videos we have, regardless of their size and locale.
- is_valid()¶
- Returns:
True
if the screenshot is a completeAppStream.Screenshot
- Return type:
Performs a quick validation on this screenshot
- set_context(context)¶
- Parameters:
context (
AppStream.Context
) – theAppStream.Context
.
Sets the document context this screenshot is associated with.
New in version 0.11.2.
- set_environment(env_id)¶
-
Sets the GUI environment ID of this screenshot.
- set_kind(kind)¶
- Parameters:
kind (
AppStream.ScreenshotKind
) – theAppStream.ScreenshotKind
.
Sets the screenshot kind.