SnapdMedia

SnapdMedia — Media information

Functions

Properties

guint height Read / Write / Construct Only
gchar * type Read / Write / Construct Only
gchar * url Read / Write / Construct Only
guint width Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── SnapdMedia

Includes

#include <snapd-glib/snapd-glib.h>

Description

A SnapdMedia represents media (icons, screenshots etc) that are associated with a snap. Snap media can be queried using snapd_snap_get_media().

Functions

snapd_media_get_media_type ()

const gchar *
snapd_media_get_media_type (SnapdMedia *media);

Get the type for this media, e.g. "icon" or "screenshot".

Parameters

media

a SnapdMedia.

 

Returns

a type name

Since: 1.45


snapd_media_get_url ()

const gchar *
snapd_media_get_url (SnapdMedia *media);

Get the URL for this media, e.g. "http://example.com/media.png"

Parameters

media

a SnapdMedia.

 

Returns

a URL

Since: 1.45


snapd_media_get_width ()

guint
snapd_media_get_width (SnapdMedia *media);

Get the width of the media in pixels or 0 if unknown.

Return: a width

Parameters

media

a SnapdMedia.

 

Since: 1.45


snapd_media_get_height ()

guint
snapd_media_get_height (SnapdMedia *media);

Get the height of the media in pixels or 0 if unknown.

Return: a height

Parameters

media

a SnapdMedia.

 

Since: 1.45

Types and Values

SnapdMedia

typedef struct _SnapdMedia SnapdMedia;

SnapdMedia contains media information.

Since: 1.45

Property Details

The “height” property

  “height”                   guint

Height of media in pixels.

Flags: Read / Write / Construct Only

Default value: 0


The “type” property

  “type”                     gchar *

Type for this media.

Flags: Read / Write / Construct Only

Default value: NULL


The “url” property

  “url”                      gchar *

URL for this media.

Flags: Read / Write / Construct Only

Default value: NULL


The “width” property

  “width”                    guint

Width of media in pixels.

Flags: Read / Write / Construct Only

Default value: 0