Top |
Functions
AsScreenshot * | as_screenshot_new () |
AsScreenshotKind | as_screenshot_kind_from_string () |
const gchar * | as_screenshot_kind_to_string () |
AsScreenshotKind | as_screenshot_get_kind () |
gint | as_screenshot_get_priority () |
const gchar * | as_screenshot_get_caption () |
GPtrArray * | as_screenshot_get_images () |
GPtrArray * | as_screenshot_get_images_for_locale () |
AsImage * | as_screenshot_get_image () |
AsImage * | as_screenshot_get_image_for_locale () |
AsImage * | as_screenshot_get_source () |
void | as_screenshot_set_kind () |
void | as_screenshot_set_priority () |
void | as_screenshot_set_caption () |
void | as_screenshot_add_image () |
gboolean | as_screenshot_equal () |
Types and Values
#define | AS_TYPE_SCREENSHOT |
struct | AsScreenshotClass |
enum | AsScreenshotKind |
AsScreenshot |
Description
Screenshots have a localized caption and also contain a number of images of different resolution.
See also: AsImage
Functions
as_screenshot_new ()
AsScreenshot *
as_screenshot_new (void
);
Creates a new AsScreenshot.
Since: 0.1.0
as_screenshot_kind_from_string ()
AsScreenshotKind
as_screenshot_kind_from_string (const gchar *kind
);
Converts the text representation to an enumerated value.
Since: 0.1.0
as_screenshot_kind_to_string ()
const gchar *
as_screenshot_kind_to_string (AsScreenshotKind kind
);
Converts the enumerated value to an text representation.
Since: 0.1.0
as_screenshot_get_kind ()
AsScreenshotKind
as_screenshot_get_kind (AsScreenshot *screenshot
);
Gets the screenshot kind.
Since: 0.1.0
as_screenshot_get_priority ()
gint
as_screenshot_get_priority (AsScreenshot *screenshot
);
Gets the screenshot priority.
Since: 0.3.1
as_screenshot_get_caption ()
const gchar * as_screenshot_get_caption (AsScreenshot *screenshot
,const gchar *locale
);
Gets the image caption for a specific locale.
Since: 0.1.0
as_screenshot_get_images ()
GPtrArray *
as_screenshot_get_images (AsScreenshot *screenshot
);
Gets the images included in the screenshot of all sizes and locales.
Since: 0.1.0
as_screenshot_get_images_for_locale ()
GPtrArray * as_screenshot_get_images_for_locale (AsScreenshot *screenshot
,const gchar *locale
);
Returns all images of all sizes that are compatible with a specific locale.
Since: 0.5.14
as_screenshot_get_image ()
AsImage * as_screenshot_get_image (AsScreenshot *screenshot
,guint width
,guint height
);
Gets the AsImage closest to the target size. The AsImage may not actually be the requested size, and the application may have to pad / rescale the image to make it fit.
Since: 0.2.2
as_screenshot_get_image_for_locale ()
AsImage * as_screenshot_get_image_for_locale (AsScreenshot *screenshot
,const gchar *locale
,guint width
,guint height
);
Gets the AsImage closest to the target size with the specified locale. The AsImage 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 -> NULL"
Parameters
screenshot |
a AsScreenshot instance. |
|
locale |
locale, e.g. "en_GB". |
[nullable] |
width |
target width |
|
height |
target height |
Since: 0.5.14
as_screenshot_get_source ()
AsImage *
as_screenshot_get_source (AsScreenshot *screenshot
);
Gets the source image (the unscaled version) for the screenshot
Since: 0.1.6
as_screenshot_set_kind ()
void as_screenshot_set_kind (AsScreenshot *screenshot
,AsScreenshotKind kind
);
Sets the screenshot kind.
Since: 0.1.0
as_screenshot_set_priority ()
void as_screenshot_set_priority (AsScreenshot *screenshot
,gint priority
);
Sets the screenshot priority. Higher numbers are better.
Since: 0.3.1
as_screenshot_set_caption ()
void as_screenshot_set_caption (AsScreenshot *screenshot
,const gchar *locale
,const gchar *caption
);
Sets a caption on the screenshot for a specific locale.
Parameters
screenshot |
a AsScreenshot instance. |
|
locale |
the locale, or |
[nullable] |
caption |
the caption text. |
Since: 0.1.0
as_screenshot_add_image ()
void as_screenshot_add_image (AsScreenshot *screenshot
,AsImage *image
);
Adds an image to the screenshot.
Since: 0.1.0
as_screenshot_equal ()
gboolean as_screenshot_equal (AsScreenshot *screenshot1
,AsScreenshot *screenshot2
);
Checks if two screenshots are the same.
Since: 0.5.7