AsScreenshot

AsScreenshot — Class to store data describing a screenshot

Synopsis

#define             AS_TYPE_SCREENSHOT
gchar *             as_screenshot_get_url_for_size      (AsScreenshot *self,
                                                         const gchar *size_id);
gchar *             as_screenshot_get_thumbnail_url_for_size
                                                        (AsScreenshot *self,
                                                         const gchar *size_id);
gchar **            as_screenshot_get_available_sizes   (AsScreenshot *self);
gchar **            as_screenshot_get_available_thumbnail_sizes
                                                        (AsScreenshot *self);
void                as_screenshot_add_url               (AsScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);
void                as_screenshot_add_thumbnail_url     (AsScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);
gboolean            as_screenshot_is_default            (AsScreenshot *self);
void                as_screenshot_set_default           (AsScreenshot *self,
                                                         gboolean b);
gboolean            as_screenshot_is_valid              (AsScreenshot *self);
AsScreenshot *      as_screenshot_new                   (void);
const gchar *       as_screenshot_get_caption           (AsScreenshot *self);
void                as_screenshot_set_caption           (AsScreenshot *self,
                                                         const gchar *value);
struct              AsScreenshot;
struct              AsScreenshotClass;

Description

Details

AS_TYPE_SCREENSHOT

#define AS_TYPE_SCREENSHOT (as_screenshot_get_type ())

The type for AsScreenshot.


as_screenshot_get_url_for_size ()

gchar *             as_screenshot_get_url_for_size      (AsScreenshot *self,
                                                         const gchar *size_id);

Returns a screenshot url for the given size. Returns NULL if no url exists for the given size.

self :

the AsScreenshot instance

size_id :

 . a screenshot size, like "800x600", "1400x1600" etc. [in]

Returns :

url of the screenshot as string

as_screenshot_get_thumbnail_url_for_size ()

gchar *             as_screenshot_get_thumbnail_url_for_size
                                                        (AsScreenshot *self,
                                                         const gchar *size_id);

Returns a thumbnail url for the given size. Returns NULL if no url exists for the given size.

self :

the AsScreenshot instance

size_id :

 . a thumbnail size, like "800x600", "1400x1600" etc. [in]

Returns :

url of the thumbnail image as string

as_screenshot_get_available_sizes ()

gchar **            as_screenshot_get_available_sizes   (AsScreenshot *self);

Returns a list of available screenshot sizes.

self :

the AsScreenshot instance

Returns :

zero-terminated string array of available sizes. [array length=result_length1]

as_screenshot_get_available_thumbnail_sizes ()

gchar **            as_screenshot_get_available_thumbnail_sizes
                                                        (AsScreenshot *self);

Returns a list of available thumbnail sizes.

self :

the AsScreenshot instance

Returns :

zero-terminated string array of available sizes. [array length=result_length1]

as_screenshot_add_url ()

void                as_screenshot_add_url               (AsScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);

self :

the AsScreenshot instance

size_id :

 

url :

 

as_screenshot_add_thumbnail_url ()

void                as_screenshot_add_thumbnail_url     (AsScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);

self :

the AsScreenshot instance

size_id :

 

url :

 

as_screenshot_is_default ()

gboolean            as_screenshot_is_default            (AsScreenshot *self);

self :

the AsScreenshot instance

Returns :

TRUE if the screenshot is the default screenshot for this application

as_screenshot_set_default ()

void                as_screenshot_set_default           (AsScreenshot *self,
                                                         gboolean b);

self :

the AsScreenshot instance

b :

 

as_screenshot_is_valid ()

gboolean            as_screenshot_is_valid              (AsScreenshot *self);

Sanity check to see if we have a valid screenshot object here.

self :

the AsScreenshot instance

as_screenshot_new ()

AsScreenshot *      as_screenshot_new                   (void);

as_screenshot_get_caption ()

const gchar *       as_screenshot_get_caption           (AsScreenshot *self);

Get and return the current value of the "caption" property.

self :

the AsScreenshot instance to query

Returns :

the value of the "caption" property

as_screenshot_set_caption ()

void                as_screenshot_set_caption           (AsScreenshot *self,
                                                         const gchar *value);

Set the value of the "caption" property to value.

self :

the AsScreenshot instance to modify

value :

the new value of the "caption" property

struct AsScreenshot

struct AsScreenshot {
	GObject parent_instance;
	AsScreenshotPrivate * priv;
	GHashTable* urls;
	GHashTable* thumbnail_urls;
};

Class to store data describing a screenshot


struct AsScreenshotClass

struct AsScreenshotClass {
	GObjectClass parent_class;
};

The class structure for AS_TYPE_SCREENSHOT. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure