![]() |
![]() |
![]() |
LibAppStream Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct AsImage; struct AsImageClass; enum AsImageKind; AsImage * as_image_new (void
); AsImageKind as_image_kind_from_string (const gchar *kind
); const gchar * as_image_kind_to_string (AsImageKind kind
); const gchar * as_image_get_url (AsImage *image
); guint as_image_get_width (AsImage *image
); guint as_image_get_height (AsImage *image
); AsImageKind as_image_get_kind (AsImage *image
); void as_image_set_url (AsImage *image
,const gchar *url
); void as_image_set_width (AsImage *image
,guint width
); void as_image_set_height (AsImage *image
,guint height
); void as_image_set_kind (AsImage *image
,AsImageKind kind
);
Screenshot may have multiple versions of an image in different resolutions or aspect ratios. This object allows access to the location and size of a single image.
See also: AsScreenshot
typedef enum { AS_IMAGE_KIND_UNKNOWN, AS_IMAGE_KIND_SOURCE, AS_IMAGE_KIND_THUMBNAIL, } AsImageKind;
The image type.
AsImage * as_image_new (void
);
Creates a new AsImage.
Returns : |
a AsImage. [transfer full] |
AsImageKind as_image_kind_from_string (const gchar *kind
);
Converts the text representation to an enumerated value.
|
the string. |
Returns : |
a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown. [transfer full]
|
const gchar * as_image_kind_to_string (AsImageKind kind
);
Converts the enumerated value to an text representation.
|
the AsImageKind. |
Returns : |
string version of kind
|
const gchar * as_image_get_url (AsImage *image
);
Gets the full qualified URL for the image, usually pointing at some mirror.
|
a AsImage instance. |
Returns : |
URL |
guint as_image_get_width (AsImage *image
);
Gets the image width.
|
a AsImage instance. |
Returns : |
width in pixels |
guint as_image_get_height (AsImage *image
);
Gets the image height.
|
a AsImage instance. |
Returns : |
height in pixels |
AsImageKind as_image_get_kind (AsImage *image
);
Gets the image kind.
|
a AsImage instance. |
Returns : |
the AsImageKind |
void as_image_set_url (AsImage *image
,const gchar *url
);
Sets the fully-qualified mirror URL to use for the image.
|
a AsImage instance. |
|
the URL. |
void as_image_set_width (AsImage *image
,guint width
);
Sets the image width.
|
a AsImage instance. |
|
the width in pixels. |
void as_image_set_height (AsImage *image
,guint height
);
Sets the image height.
|
a AsImage instance. |
|
the height in pixels. |
void as_image_set_kind (AsImage *image
,AsImageKind kind
);
Sets the image kind.
|
a AsImage instance. |
|
the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL . |