GEmblem

## GEmblem GEmblem — An object for emblems |

## Synopsis

    #include <gio/gio.h>

                        GEmblem;
    enum                GEmblemOrigin;
    GEmblem *           g_emblem_new                        (GIcon *icon);
    GEmblem *           g_emblem_new_with_origin            (GIcon *icon,
                                                             GEmblemOrigin origin);
    GIcon *             g_emblem_get_icon                   (GEmblem *emblem);
    GEmblemOrigin       g_emblem_get_origin                 (GEmblem *emblem);

## Object Hierarchy

      GObject
       +----GEmblem

## Implemented Interfaces

GEmblem implements GIcon.

## Properties

      "icon"                     GObject*              : Read / Write / Construct Only
      "origin"                   GEmblemOrigin         : Read / Write / Construct Only

## Description

GEmblem is an implementation of GIcon that supports having an emblem, which is an icon with additional properties. It can than be added to a GEmblemedIcon.

Currently, only metainformation about the emblem's origin is supported. More may be added in the future.

## Details

### GEmblem

    typedef struct _GEmblem GEmblem;

An object for Emblems

### enum GEmblemOrigin

    typedef enum  {
      G_EMBLEM_ORIGIN_UNKNOWN,
      G_EMBLEM_ORIGIN_DEVICE,
      G_EMBLEM_ORIGIN_LIVEMETADATA,
      G_EMBLEM_ORIGIN_TAG
    } GEmblemOrigin;

GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.

`G_EMBLEM_ORIGIN_UNKNOWN` | Emblem of unknown origin
`G_EMBLEM_ORIGIN_DEVICE` | Emblem adds device-specific information
`G_EMBLEM_ORIGIN_LIVEMETADATA` | Emblem depicts live metadata, such as "readonly"
`G_EMBLEM_ORIGIN_TAG` | Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)

Since 2.18

### g_emblem_new ()

    GEmblem *           g_emblem_new                        (GIcon *icon);

Creates a new emblem for `icon`.

`icon` : | a GIcon containing the icon.
Returns : | a new GEmblem.

Since 2.18

### g_emblem_new_with_origin ()

    GEmblem *           g_emblem_new_with_origin            (GIcon *icon,
                                                             GEmblemOrigin origin);

Creates a new emblem for `icon`.

`icon` : | a GIcon containing the icon.
`origin` : | a GEmblemOrigin enum defining the emblem's origin
Returns : | a new GEmblem.

Since 2.18

### g_emblem_get_icon ()

    GIcon *             g_emblem_get_icon                   (GEmblem *emblem);

Gives back the icon from `emblem`.

`emblem` : | a GEmblem from which the icon should be extracted.
Returns : | a GIcon. The returned object belongs to the emblem and should not be modified or freed.

Since 2.18

### g_emblem_get_origin ()

    GEmblemOrigin       g_emblem_get_origin                 (GEmblem *emblem);

Gets the origin of the emblem.

`emblem` : | a GEmblem
Returns : | the origin of the emblem

Since 2.18

## Property Details

### The `"icon"` property

      "icon"                     GObject*              : Read / Write / Construct Only

The actual icon of the emblem.

### The `"origin"` property

      "origin"                   GEmblemOrigin         : Read / Write / Construct Only

Tells which origin the emblem is derived from.

Default value: G_EMBLEM_ORIGIN_UNKNOWN

## See Also

GIcon, GEmblemedIcon, GLoadableIcon, GThemedIcon