:right-sidebar: True LoadableIcon =================================================================== .. currentmodule:: gi.repository.Gio .. class:: LoadableIcon(*args, **kwargs) :no-contents-entry: Implementations: :class:`~gi.repository.Gio.BytesIcon`, :class:`~gi.repository.Gio.FileIcon` ``GLoadableIcon`` extends the :obj:`~gi.repository.Gio.Icon` interface and adds the ability to load icons from streams. Methods ------- .. rst-class:: interim-class .. class:: LoadableIcon :no-index: .. method:: load(size: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~typing.Tuple[~gi.repository.Gio.InputStream, str] Loads a loadable icon. For the asynchronous version of this function, see :func:`~gi.repository.Gio.LoadableIcon.load_async`. :param size: an integer. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: load_async(size: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Loads an icon asynchronously. To finish this function, see :func:`~gi.repository.Gio.LoadableIcon.load_finish`. For the synchronous, blocking version of this function, see :func:`~gi.repository.Gio.LoadableIcon.load`. :param size: an integer. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: load_finish(res: ~gi.repository.Gio.AsyncResult) -> ~typing.Tuple[~gi.repository.Gio.InputStream, str] Finishes an asynchronous icon load started in :func:`~gi.repository.Gio.LoadableIcon.load_async`. :param res: a :obj:`~gi.repository.Gio.AsyncResult`\. Virtual Methods --------------- .. rst-class:: interim-class .. class:: LoadableIcon :no-index: .. method:: do_load(size: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~typing.Tuple[~gi.repository.Gio.InputStream, str] Loads a loadable icon. For the asynchronous version of this function, see :func:`~gi.repository.Gio.LoadableIcon.load_async`. :param size: an integer. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: do_load_async(size: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Loads an icon asynchronously. To finish this function, see :func:`~gi.repository.Gio.LoadableIcon.load_finish`. For the synchronous, blocking version of this function, see :func:`~gi.repository.Gio.LoadableIcon.load`. :param size: an integer. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: do_load_finish(res: ~gi.repository.Gio.AsyncResult) -> ~typing.Tuple[~gi.repository.Gio.InputStream, str] Finishes an asynchronous icon load started in :func:`~gi.repository.Gio.LoadableIcon.load_async`. :param res: a :obj:`~gi.repository.Gio.AsyncResult`\.