### Interface

# Gio LoadableIcon

since: 2.0

#### Description

    interface Gio.LoadableIcon : Gio.Icon

`GLoadableIcon` extends the `GIcon` interface and adds the ability to load icons from streams.

Available since: 2.0

#### Prerequisite

In order to implement LoadableIcon, your type must inherit from`GIcon`.

#### Implementations

- GBytesIcon
- GFileIcon

#### Instance methods

###### g_loadable_icon_load

Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async().

since: 2.0

###### g_loadable_icon_load_async

Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load().

since: 2.0

###### g_loadable_icon_load_finish

Finishes an asynchronous icon load started in g_loadable_icon_load_async().

since: 2.0

#### Interface structure

    struct GioLoadableIconIface {
      GTypeInterface g_iface;
      GInputStream* (* load) (
        GLoadableIcon* icon,
        int size,
        char** type,
        GCancellable* cancellable,
        GError** error
      );
      void (* load_async) (
        GLoadableIcon* icon,
        int size,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      GInputStream* (* load_finish) (
        GLoadableIcon* icon,
        GAsyncResult* res,
        char** type,
        GError** error
      );

    }

Interface for icons that can be loaded as a stream.

###### Interface members

`g_iface` |
    GTypeInterface
| The parent interface.
`load` |
    GInputStream* (* load) (
        GLoadableIcon* icon,
        int size,
        char** type,
        GCancellable* cancellable,
        GError** error
      )
| Loads an icon.
`load_async` |
    void (* load_async) (
        GLoadableIcon* icon,
        int size,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )
| Loads an icon asynchronously.
`load_finish` |
    GInputStream* (* load_finish) (
        GLoadableIcon* icon,
        GAsyncResult* res,
        char** type,
        GError** error
      )
| Finishes an asynchronous icon load.

#### Virtual methods

###### Gio.LoadableIcon.load

Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async().

since: 2.0

###### Gio.LoadableIcon.load_async

Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load().

since: 2.0

###### Gio.LoadableIcon.load_finish

Finishes an asynchronous icon load started in g_loadable_icon_load_async().

since: 2.0