AsImage

AsImage — Object representing a single image used in a screenshot.

Synopsis

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);

Object Hierarchy

  GObject
   +----AsImage

Description

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

Details

struct AsImage

struct AsImage;


struct AsImageClass

struct AsImageClass {
	GObjectClass		parent_class;
};


enum AsImageKind

typedef enum {
	AS_IMAGE_KIND_UNKNOWN,
	AS_IMAGE_KIND_SOURCE,
	AS_IMAGE_KIND_THUMBNAIL,
} AsImageKind;

The image type.

AS_IMAGE_KIND_UNKNOWN

Type invalid or not known

AS_IMAGE_KIND_SOURCE

The source image at full resolution

AS_IMAGE_KIND_THUMBNAIL

A thumbnail at reduced resolution

as_image_new ()

AsImage *           as_image_new                        (void);

Creates a new AsImage.

Returns :

a AsImage. [transfer full]

as_image_kind_from_string ()

AsImageKind         as_image_kind_from_string           (const gchar *kind);

Converts the text representation to an enumerated value.

kind :

the string.

Returns :

a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown. [transfer full]

as_image_kind_to_string ()

const gchar *       as_image_kind_to_string             (AsImageKind kind);

Converts the enumerated value to an text representation.

kind :

the AsImageKind.

Returns :

string version of kind

as_image_get_url ()

const gchar *       as_image_get_url                    (AsImage *image);

Gets the full qualified URL for the image, usually pointing at some mirror.

image :

a AsImage instance.

Returns :

URL

as_image_get_width ()

guint               as_image_get_width                  (AsImage *image);

Gets the image width.

image :

a AsImage instance.

Returns :

width in pixels

as_image_get_height ()

guint               as_image_get_height                 (AsImage *image);

Gets the image height.

image :

a AsImage instance.

Returns :

height in pixels

as_image_get_kind ()

AsImageKind         as_image_get_kind                   (AsImage *image);

Gets the image kind.

image :

a AsImage instance.

Returns :

the AsImageKind

as_image_set_url ()

void                as_image_set_url                    (AsImage *image,
                                                         const gchar *url);

Sets the fully-qualified mirror URL to use for the image.

image :

a AsImage instance.

url :

the URL.

as_image_set_width ()

void                as_image_set_width                  (AsImage *image,
                                                         guint width);

Sets the image width.

image :

a AsImage instance.

width :

the width in pixels.

as_image_set_height ()

void                as_image_set_height                 (AsImage *image,
                                                         guint height);

Sets the image height.

image :

a AsImage instance.

height :

the height in pixels.

as_image_set_kind ()

void                as_image_set_kind                   (AsImage *image,
                                                         AsImageKind kind);

Sets the image kind.

image :

a AsImage instance.

kind :

the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL.