AppstreamScreenshot

AppstreamScreenshot — Class to store data describing a screenshot

Synopsis

#define             APPSTREAM_TYPE_SCREENSHOT
gchar *             appstream_screenshot_get_url_for_size
                                                        (AppstreamScreenshot *self,
                                                         const gchar *size_id);
gchar *             appstream_screenshot_get_thumbnail_url_for_size
                                                        (AppstreamScreenshot *self,
                                                         const gchar *size_id);
gchar **            appstream_screenshot_get_available_sizes
                                                        (AppstreamScreenshot *self);
gchar **            appstream_screenshot_get_available_thumbnail_sizes
                                                        (AppstreamScreenshot *self);
void                appstream_screenshot_add_url        (AppstreamScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);
void                appstream_screenshot_add_thumbnail_url
                                                        (AppstreamScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);
gboolean            appstream_screenshot_is_default     (AppstreamScreenshot *self);
void                appstream_screenshot_set_default    (AppstreamScreenshot *self,
                                                         gboolean b);
gboolean            appstream_screenshot_is_valid       (AppstreamScreenshot *self);
AppstreamScreenshot * appstream_screenshot_new          (void);
const gchar *       appstream_screenshot_get_caption    (AppstreamScreenshot *self);
void                appstream_screenshot_set_caption    (AppstreamScreenshot *self,
                                                         const gchar *value);
struct              AppstreamScreenshot;
struct              AppstreamScreenshotClass;

Description

Details

APPSTREAM_TYPE_SCREENSHOT

#define APPSTREAM_TYPE_SCREENSHOT (appstream_screenshot_get_type ())

The type for AppstreamScreenshot.


appstream_screenshot_get_url_for_size ()

gchar *             appstream_screenshot_get_url_for_size
                                                        (AppstreamScreenshot *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 AppstreamScreenshot instance

size_id :

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

Returns :

url of the screenshot as string

appstream_screenshot_get_thumbnail_url_for_size ()

gchar *             appstream_screenshot_get_thumbnail_url_for_size
                                                        (AppstreamScreenshot *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 AppstreamScreenshot instance

size_id :

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

Returns :

url of the thumbnail image as string

appstream_screenshot_get_available_sizes ()

gchar **            appstream_screenshot_get_available_sizes
                                                        (AppstreamScreenshot *self);

Returns a list of available screenshot sizes.

self :

the AppstreamScreenshot instance

Returns :

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

appstream_screenshot_get_available_thumbnail_sizes ()

gchar **            appstream_screenshot_get_available_thumbnail_sizes
                                                        (AppstreamScreenshot *self);

Returns a list of available thumbnail sizes.

self :

the AppstreamScreenshot instance

Returns :

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

appstream_screenshot_add_url ()

void                appstream_screenshot_add_url        (AppstreamScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);

self :

the AppstreamScreenshot instance

size_id :

 

url :

 

appstream_screenshot_add_thumbnail_url ()

void                appstream_screenshot_add_thumbnail_url
                                                        (AppstreamScreenshot *self,
                                                         const gchar *size_id,
                                                         const gchar *url);

self :

the AppstreamScreenshot instance

size_id :

 

url :

 

appstream_screenshot_is_default ()

gboolean            appstream_screenshot_is_default     (AppstreamScreenshot *self);

self :

the AppstreamScreenshot instance

Returns :

TRUE if the screenshot is the default screenshot for this application

appstream_screenshot_set_default ()

void                appstream_screenshot_set_default    (AppstreamScreenshot *self,
                                                         gboolean b);

self :

the AppstreamScreenshot instance

b :

 

appstream_screenshot_is_valid ()

gboolean            appstream_screenshot_is_valid       (AppstreamScreenshot *self);

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

self :

the AppstreamScreenshot instance

appstream_screenshot_new ()

AppstreamScreenshot * appstream_screenshot_new          (void);

appstream_screenshot_get_caption ()

const gchar *       appstream_screenshot_get_caption    (AppstreamScreenshot *self);

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

self :

the AppstreamScreenshot instance to query

Returns :

the value of the "caption" property

appstream_screenshot_set_caption ()

void                appstream_screenshot_set_caption    (AppstreamScreenshot *self,
                                                         const gchar *value);

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

self :

the AppstreamScreenshot instance to modify

value :

the new value of the "caption" property

struct AppstreamScreenshot

struct AppstreamScreenshot {
	GObject parent_instance;
	AppstreamScreenshotPrivate * priv;
	GHashTable* urls;
	GHashTable* thumbnail_urls;
};

Class to store data describing a screenshot


struct AppstreamScreenshotClass

struct AppstreamScreenshotClass {
	GObjectClass parent_class;
};

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

GObjectClass parent_class;

the parent class structure