Package org.gnome.gio
Interface LoadableIcon
- All Known Implementing Classes:
BytesIcon
,DmabufTexture
,FileIcon
,GLTexture
,LoadableIcon.LoadableIconImpl
,MemoryTexture
,Pixbuf
,Texture
,Texture.TextureImpl
GLoadableIcon
extends the Icon
interface and adds the ability
to load icons from streams.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Interface for icons that can be loaded as a stream.static class
The LoadableIconImpl type represents a native instance of the LoadableIcon interface.Nested classes/interfaces inherited from interface org.gnome.gio.Icon
Icon.IconIface, Icon.IconImpl
-
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the LoadableIcon classdefault InputStream
load
(int size, @Nullable Out<String> type, @Nullable Cancellable cancellable) Loads a loadable icon.default void
loadAsync
(int size, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Loads an icon asynchronously.default InputStream
loadFinish
(AsyncResult res, @Nullable Out<String> type) Finishes an asynchronous icon load started in g_loadable_icon_load_async().
-
Method Details
-
getType
-
load
default InputStream load(int size, @Nullable @Nullable Out<String> type, @Nullable @Nullable Cancellable cancellable) throws GErrorException Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async().- Parameters:
size
- an integer.type
- a location to store the type of the loaded icon,null
to ignore.cancellable
- optionalGCancellable
object,null
to ignore.- Returns:
- a
GInputStream
to read the icon from. - Throws:
GErrorException
- seeGError
-
loadAsync
default void loadAsync(int size, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) 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().- Parameters:
size
- an integer.cancellable
- optionalGCancellable
object,null
to ignore.callback
- aGAsyncReadyCallback
to call when the request is satisfied
-
loadFinish
default InputStream loadFinish(AsyncResult res, @Nullable @Nullable Out<String> type) throws GErrorException Finishes an asynchronous icon load started in g_loadable_icon_load_async().- Parameters:
res
- aGAsyncResult
.type
- a location to store the type of the loaded icon,null
to ignore.- Returns:
- a
GInputStream
to read the icon from. - Throws:
GErrorException
- seeGError
-