## AsScreenshot AsScreenshot — Object representing a single screenshot |

## Functions

AsScreenshotKind | as_screenshot_kind_from_string ()
const gchar * | as_screenshot_kind_to_string ()
gboolean | as_screenshot_is_valid ()
AsScreenshot * | as_screenshot_new ()
AsScreenshotKind | as_screenshot_get_kind ()
void | as_screenshot_set_kind ()
const gchar * | as_screenshot_get_caption ()
void | as_screenshot_set_caption ()
GPtrArray * | as_screenshot_get_images_all ()
GPtrArray * | as_screenshot_get_images ()
void | as_screenshot_add_image ()
const gchar * | as_screenshot_get_active_locale ()
void | as_screenshot_set_active_locale ()

## 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_kind_from_string ()

    AsScreenshotKind
    as_screenshot_kind_from_string (const gchar *kind);

Converts the text representation to an enumerated value.

#### Parameters

kind | the string. |

#### Returns

a `AsScreenshotKind`, or `AS_SCREENSHOT_KIND_UNKNOWN` if not known.

### as_screenshot_kind_to_string ()

    const gchar *
    as_screenshot_kind_to_string (AsScreenshotKind kind);

Converts the enumerated value to an text representation.

#### Parameters

kind | the AsScreenshotKind. |

#### Returns

string version of `kind`

### as_screenshot_is_valid ()

    gboolean
    as_screenshot_is_valid (AsScreenshot *screenshot);

Performs a quick validation on this screenshot

#### Parameters

screenshot | a AsScreenshot instance. |

#### Returns

TRUE if the screenshot is a complete AsScreenshot

### as_screenshot_new ()

    AsScreenshot *
    as_screenshot_new (void);

Creates a new AsScreenshot.

#### Returns

a AsScreenshot.

[transfer full]

### as_screenshot_get_kind ()

    AsScreenshotKind
    as_screenshot_get_kind (AsScreenshot *screenshot);

Gets the screenshot kind.

#### Parameters

screenshot | a AsScreenshot instance. |

#### Returns

a AsScreenshotKind

### as_screenshot_set_kind ()

    void
    as_screenshot_set_kind (AsScreenshot *screenshot,
                            AsScreenshotKind kind);

Sets the screenshot kind.

#### Parameters

screenshot | a AsScreenshot instance. |
kind | the AsScreenshotKind. |

### as_screenshot_get_caption ()

    const gchar *
    as_screenshot_get_caption (AsScreenshot *screenshot);

Gets the image caption

#### Parameters

screenshot | a AsScreenshot instance. |

#### Returns

the caption

### as_screenshot_set_caption ()

    void
    as_screenshot_set_caption (AsScreenshot *screenshot,
                               const gchar *caption,
                               const gchar *locale);

Sets a caption on the screenshot

#### Parameters

screenshot | a AsScreenshot instance. |
caption | the caption text. |

### as_screenshot_get_images_all ()

    GPtrArray *
    as_screenshot_get_images_all (AsScreenshot *screenshot);

Returns an array of all images we have, regardless of their size and language.

#### Parameters

screenshot | an AsScreenshot instance. |

#### Returns

an array.

[transfer none][element-type AsImage]

Since: 0.10

### as_screenshot_get_images ()

    GPtrArray *
    as_screenshot_get_images (AsScreenshot *screenshot);

Gets the images for this screenshots. Only images valid for the current language are returned. We return all sizes.

#### Parameters

screenshot | a AsScreenshot instance. |

#### Returns

an array.

[transfer none][element-type AsImage]

### as_screenshot_add_image ()

    void
    as_screenshot_add_image (AsScreenshot *screenshot,
                             AsImage *image);

Adds an image to the screenshot.

#### Parameters

screenshot | a AsScreenshot instance. |
image | a AsImage instance. |

### as_screenshot_get_active_locale ()

    const gchar *
    as_screenshot_get_active_locale (AsScreenshot *screenshot);

Get the current active locale, which is used to get localized messages.

### as_screenshot_set_active_locale ()

    void
    as_screenshot_set_active_locale (AsScreenshot *screenshot,
                                     const gchar *locale);

Set the current active locale, which is used to get localized messages. If the AsComponent linking this AsScreenshot was fetched from a localized database, usually only one locale is available.

## Types and Values

### AS_TYPE_SCREENSHOT

    #define AS_TYPE_SCREENSHOT (as_screenshot_get_type ())

### struct AsScreenshotClass

    struct AsScreenshotClass {
    	GObjectClass		parent_class;
    };

### enum AsScreenshotKind

The screenshot type.

#### Members

AS_SCREENSHOT_KIND_UNKNOWN | Type invalid or not known |
AS_SCREENSHOT_KIND_DEFAULT | The primary screenshot to show by default |
AS_SCREENSHOT_KIND_EXTRA | Optional screenshot |

### AsScreenshot

    typedef struct _AsScreenshot AsScreenshot;