| LibAppStream Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct AsScreenshot; struct AsScreenshotClass; enum AsScreenshotKind; AsScreenshot * as_screenshot_new (void); AsScreenshotKind as_screenshot_kind_from_string (const gchar *kind); const gchar * as_screenshot_kind_to_string (AsScreenshotKind kind); gboolean as_screenshot_is_valid (AsScreenshot *sshot); AsScreenshotKind as_screenshot_get_kind (AsScreenshot *screenshot); const gchar * as_screenshot_get_caption (AsScreenshot *screenshot); GPtrArray * as_screenshot_get_images (AsScreenshot *screenshot); void as_screenshot_set_kind (AsScreenshot *screenshot,AsScreenshotKind kind); void as_screenshot_set_caption (AsScreenshot *screenshot,const gchar *caption); void as_screenshot_add_image (AsScreenshot *screenshot,AsImage *image);
Screenshots have a localized caption and also contain a number of images of different resolution.
See also: AsImage
typedef enum {
AS_SCREENSHOT_KIND_UNKNOWN,
AS_SCREENSHOT_KIND_NORMAL,
AS_SCREENSHOT_KIND_DEFAULT,
} AsScreenshotKind;
The screenshot type.
AsScreenshot * as_screenshot_new (void);
Creates a new AsScreenshot.
Returns : |
a AsScreenshot. [transfer full] |
AsScreenshotKind as_screenshot_kind_from_string (const gchar *kind);
Converts the text representation to an enumerated value.
|
the string. |
Returns : |
a AsScreenshotKind, or
AS_SCREENSHOT_KIND_UNKNOWN if not known. [transfer full]
|
const gchar * as_screenshot_kind_to_string (AsScreenshotKind kind);
Converts the enumerated value to an text representation.
|
the AsScreenshotKind. |
Returns : |
string version of kind
|
gboolean as_screenshot_is_valid (AsScreenshot *sshot);
Performs a quick validation on this screenshot
Returns : |
TRUE if the screenshot is a complete AsScreenshot |
AsScreenshotKind as_screenshot_get_kind (AsScreenshot *screenshot);
Gets the screenshot kind.
|
a AsScreenshot instance. |
Returns : |
a AsScreenshotKind |
const gchar * as_screenshot_get_caption (AsScreenshot *screenshot);
Gets the image caption
|
a AsScreenshot instance. |
Returns : |
the caption |
GPtrArray * as_screenshot_get_images (AsScreenshot *screenshot);
Gets the image sizes included in the screenshot.
|
a AsScreenshot instance. |
Returns : |
an array. [element-type AsImage][transfer none] |
void as_screenshot_set_kind (AsScreenshot *screenshot,AsScreenshotKind kind);
Sets the screenshot kind.
|
a AsScreenshot instance. |
|
the AsScreenshotKind. |
void as_screenshot_set_caption (AsScreenshot *screenshot,const gchar *caption);
Sets a caption on the screenshot
|
a AsScreenshot instance. |
|
the caption text. |
void as_screenshot_add_image (AsScreenshot *screenshot,AsImage *image);
Adds an image to the screenshot.
|
a AsScreenshot instance. |
|
a AsImage instance. |