Gio.LoadableIcon

g GObject.GInterface GObject.GInterface Gio.LoadableIcon Gio.LoadableIcon GObject.GInterface->Gio.LoadableIcon

Implementations:

Gio.BytesIcon, Gio.FileIcon

Methods

load (size, cancellable)

load_async (size, cancellable, callback, *user_data)

load_finish (res)

Virtual Methods

do_load (size, cancellable)

do_load_async (size, cancellable, callback, *user_data)

do_load_finish (res)

Properties

None

Signals

None

Fields

None

Class Details

class Gio.LoadableIcon
Bases:

GObject.GInterface

Structure:

Gio.LoadableIconIface

Extends the Gio.Icon interface and adds the ability to load icons from streams.

load(size, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

a Gio.InputStream to read the icon from.

type:

a location to store the type of the loaded icon, None to ignore.

Return type:

(Gio.InputStream, type: str)

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

load_async(size, cancellable, callback, *user_data)[source]
Parameters:

Loads an icon asynchronously. To finish this function, see Gio.LoadableIcon.load_finish(). For the synchronous, blocking version of this function, see Gio.LoadableIcon.load().

load_finish(res)[source]
Parameters:

res (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

a Gio.InputStream to read the icon from.

type:

a location to store the type of the loaded icon, None to ignore.

Return type:

(Gio.InputStream, type: str)

Finishes an asynchronous icon load started in Gio.LoadableIcon.load_async().

do_load(size, cancellable) virtual
Parameters:
Returns:

a Gio.InputStream to read the icon from.

type:

a location to store the type of the loaded icon, None to ignore.

Return type:

(Gio.InputStream, type: str)

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

do_load_async(size, cancellable, callback, *user_data) virtual
Parameters:

Loads an icon asynchronously. To finish this function, see Gio.LoadableIcon.load_finish(). For the synchronous, blocking version of this function, see Gio.LoadableIcon.load().

do_load_finish(res) virtual
Parameters:

res (Gio.AsyncResult) – a Gio.AsyncResult.

Returns:

a Gio.InputStream to read the icon from.

type:

a location to store the type of the loaded icon, None to ignore.

Return type:

(Gio.InputStream, type: str)

Finishes an asynchronous icon load started in Gio.LoadableIcon.load_async().