Skip to content

Gio.LoadableIcon

interface

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

Methods

load

def load(self, size: int, cancellable: Cancellable | None = ...) -> tuple[InputStream, str]

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

Parameters:

  • size — an integer.
  • cancellable — optional Cancellable object, None to ignore.

load_async

def load_async(self, size: int, cancellable: Cancellable | None = ..., callback: Callable[[LoadableIcon | None, AsyncResult], None] | None = ...) -> None

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

Parameters:

  • size — an integer.
  • cancellable — optional Cancellable object, None to ignore.
  • callback — a GAsyncReadyCallback to call when the request is satisfied

load_finish

def load_finish(self, res: AsyncResult) -> tuple[InputStream, str]

Finishes an asynchronous icon load started in LoadableIcon.load_async.

Parameters:

Virtual methods

do_load

def do_load(self, size: int, cancellable: Cancellable | None = ...) -> tuple[InputStream, str]

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

Parameters:

  • size — an integer.
  • cancellable — optional Cancellable object, None to ignore.

do_load_async

def do_load_async(self, size: int, cancellable: Cancellable | None = ..., callback: Callable[[LoadableIcon | None, AsyncResult], None] | None = ...) -> None

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

Parameters:

  • size — an integer.
  • cancellable — optional Cancellable object, None to ignore.
  • callback — a GAsyncReadyCallback to call when the request is satisfied

do_load_finish

def do_load_finish(self, res: AsyncResult) -> tuple[InputStream, str]

Finishes an asynchronous icon load started in LoadableIcon.load_async.

Parameters: