StIcon

## StIcon StIcon — a simple styled icon actor |

## Synopsis

                        StIcon;
                        StIconClass;
    GIcon *             st_icon_get_gicon                   (StIcon *icon);
    const gchar *       st_icon_get_icon_name               (StIcon *icon);
    gint                st_icon_get_icon_size               (StIcon *icon);
    StIconType          st_icon_get_icon_type               (StIcon *icon);
    ClutterActor *      st_icon_new                         (void);
    void                st_icon_set_gicon                   (StIcon *icon,
                                                             GIcon *gicon);
    void                st_icon_set_icon_name               (StIcon *icon,
                                                             const gchar *icon_name);
    void                st_icon_set_icon_size               (StIcon *icon,
                                                             gint size);
    void                st_icon_set_icon_type               (StIcon *icon,
                                                             StIconType icon_type);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----StWidget
                         +----StIcon

## Implemented Interfaces

StIcon implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Properties

      "gicon"                    GIcon*                : Read / Write
      "icon-name"                gchar*                : Read / Write
      "icon-size"                gint                  : Read / Write
      "icon-type"                StIconType            : Read / Write

## Description

StIcon is a simple styled texture actor that displays an image from a stylesheet.

## Details

### StIcon

    typedef struct _StIcon StIcon;

The contents of this structure are private and should only be accessed through the public API.

### StIconClass

    typedef struct {
      StWidgetClass parent_class;

      /* padding for future expansion */
      void (*_padding_0) (void);
      void (*_padding_1) (void);
      void (*_padding_2) (void);
      void (*_padding_3) (void);
      void (*_padding_4) (void);
    } StIconClass;

### st_icon_get_gicon ()

    GIcon *             st_icon_get_gicon                   (StIcon *icon);

`icon` : | an icon
Returns : | the override GIcon, if set, or NULL. [transfer none]

### st_icon_get_icon_name ()

    const gchar *       st_icon_get_icon_name               (StIcon *icon);

### st_icon_get_icon_size ()

    gint                st_icon_get_icon_size               (StIcon *icon);

Gets the size explicit size on the icon. This is not necesariily the size that the icon will actually be displayed at.

`icon` : | an icon
Returns : | the size explicitly set, or -1 if no size has been set

### st_icon_get_icon_type ()

    StIconType          st_icon_get_icon_type               (StIcon *icon);

Gets the type of icon we'll look up to display in the actor. See `st_icon_set_icon_type()`.

`icon` : | a StIcon
Returns : | the icon type.

### st_icon_new ()

    ClutterActor *      st_icon_new                         (void);

Create a newly allocated StIcon

Returns : | A newly allocated StIcon

### st_icon_set_gicon ()

    void                st_icon_set_gicon                   (StIcon *icon,
                                                             GIcon *gicon);

`icon` : | an icon
`gicon` : | a GIcon to override :icon-name. [allow-none]

### st_icon_set_icon_name ()

    void                st_icon_set_icon_name               (StIcon *icon,
                                                             const gchar *icon_name);

### st_icon_set_icon_size ()

    void                st_icon_set_icon_size               (StIcon *icon,
                                                             gint size);

Sets an explicit size for the icon.

`icon` : | an icon
`size` : | if positive, the new size, otherwise the size will be derived from the current style

### st_icon_set_icon_type ()

    void                st_icon_set_icon_type               (StIcon *icon,
                                                             StIconType icon_type);

Sets the type of icon we'll look up to display in the actor. The icon type determines whether we use a symbolic icon or a full color icon and also is used for specific handling for application and document icons.

`icon` : | a StIcon
`icon_type` : | the type of icon to use

## Property Details

### The `"gicon"` property

      "gicon"                    GIcon*                : Read / Write

A GIcon to override :icon-name.

### The `"icon-name"` property

      "icon-name"                gchar*                : Read / Write

An icon name.

Default value: NULL

### The `"icon-size"` property

      "icon-size"                gint                  : Read / Write

The size if the icon, if positive. Otherwise the size will be derived from the current style.

Allowed values: >= G_MAXULONG

Default value: -1

### The `"icon-type"` property

      "icon-type"                StIconType            : Read / Write

The type of icon that should be used.

Default value: ST_ICON_SYMBOLIC