OsinfoAvatarFormat: Libosinfo Reference Manual

## OsinfoAvatarFormat OsinfoAvatarFormat — The required format of avatar for an install script |

## Functions

OsinfoAvatarFormat * | osinfo_avatar_format_new ()
GList * | osinfo_avatar_format_get_mime_types ()
gint | osinfo_avatar_format_get_width ()
gint | osinfo_avatar_format_get_height ()
gboolean | osinfo_avatar_format_get_alpha ()

## Properties

gboolean | alpha | Read
gint | height | Read
gpointer | mime-types | Read
gint | width | Read

## Types and Values

#define | OSINFO_AVATAR_FORMAT_PROP_MIME_TYPE
#define | OSINFO_AVATAR_FORMAT_PROP_WIDTH
#define | OSINFO_AVATAR_FORMAT_PROP_HEIGHT
#define | OSINFO_AVATAR_FORMAT_PROP_ALPHA

## Object Hierarchy

        GObject
        ╰── OsinfoEntity
            ╰── OsinfoAvatarFormat

## Description

## Functions

### osinfo_avatar_format_new ()

    OsinfoAvatarFormat *
    osinfo_avatar_format_new (void);

Construct a new user avatar file for an OsinfoInstallScript.

#### Returns

the necessary information to create an avatar for an user.

[transfer full]

Since: 0.2.8

### osinfo_avatar_format_get_mime_types ()

    GList *
    osinfo_avatar_format_get_mime_types (OsinfoAvatarFormat *avatar);

#### Parameters

avatar | the avatar info |

#### Returns

the required mime-types of the avatar.

[transfer container][element-type utf8]

Since: 0.2.2

### osinfo_avatar_format_get_width ()

    gint
    osinfo_avatar_format_get_width (OsinfoAvatarFormat *avatar);

#### Parameters

avatar | the avatar info |

#### Returns

the required width (in pixels) of the avatar, or -1.

Since: 0.2.2

### osinfo_avatar_format_get_height ()

    gint
    osinfo_avatar_format_get_height (OsinfoAvatarFormat *avatar);

#### Parameters

avatar | the avatar info |

#### Returns

the required height (in pixels) of the avatar, or -1.

Since: 0.2.2

### osinfo_avatar_format_get_alpha ()

    gboolean
    osinfo_avatar_format_get_alpha (OsinfoAvatarFormat *avatar);

#### Parameters

avatar | the avatar info |

#### Returns

Whether alpha channel is supported in the avatar.

Since: 0.2.2

## Types and Values

### OSINFO_AVATAR_FORMAT_PROP_MIME_TYPE

    # define OSINFO_AVATAR_FORMAT_PROP_MIME_TYPE "mime-type"

### OSINFO_AVATAR_FORMAT_PROP_WIDTH

    # define OSINFO_AVATAR_FORMAT_PROP_WIDTH     "width"

### OSINFO_AVATAR_FORMAT_PROP_HEIGHT

    # define OSINFO_AVATAR_FORMAT_PROP_HEIGHT    "height"

### OSINFO_AVATAR_FORMAT_PROP_ALPHA

    # define OSINFO_AVATAR_FORMAT_PROP_ALPHA     "alpha"

## Property Details

### The `“alpha”` property

      “alpha”                    gboolean

Whether alpha channel is supported in the avatar.

Owner: OsinfoAvatarFormat

Flags: Read

Default value: TRUE

### The `“height”` property

      “height”                   gint

The required height (in pixels) of the avatar.

Owner: OsinfoAvatarFormat

Flags: Read

Allowed values: >= -1

Default value: -1

### The `“mime-types”` property

      “mime-types”               gpointer

The allowed mime-types for the avatar.

Type: GLib.List(utf8) Transfer: container

Owner: OsinfoAvatarFormat

Flags: Read

### The `“width”` property

      “width”                    gint

The required width (in pixels) of the avatar.

Owner: OsinfoAvatarFormat

Flags: Read

Allowed values: >= -1

Default value: -1

## See Also

OsinfoInstallScript