Package org.gnome.gio
Interface LoadableIcon
- All Known Implementing Classes:
BytesIcon,DmabufTexture,FileIcon,GLTexture,LoadableIcon.LoadableIcon$Impl,MemoryTexture,Pixbuf,Texture,Texture.Texture$Impl
GLoadableIcon extends the Icon interface and adds the ability
to load icons from streams.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe LoadableIcon$Impl type represents a native instance of the LoadableIcon interface.static classInterface for icons that can be loaded as a stream.Nested classes/interfaces inherited from interface org.gnome.gio.Icon
Icon.Icon$Impl, Icon.IconIface -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypegetType()Get the GType of the LoadableIcon classdefault InputStreamload(int size, @Nullable Out<String> type, @Nullable Cancellable cancellable) Loads a loadable icon.default voidloadAsync(int size, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Loads an icon asynchronously.default InputStreamloadFinish(AsyncResult res, @Nullable Out<String> type) Finishes an asynchronous icon load started in g_loadable_icon_load_async().Methods inherited from interface org.gnome.gio.Icon
equal, hash, serialize, serializeToString
-
Method Details
-
getType
-
load
default InputStream load(int size, @Nullable Out<String> type, @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,nullto ignore.cancellable- optionalGCancellableobject,nullto ignore.- Returns:
- a
GInputStreamto read the icon from. - Throws:
GErrorException- seeGError
-
loadAsync
default void loadAsync(int size, @Nullable Cancellable cancellable, @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- optionalGCancellableobject,nullto ignore.callback- aGAsyncReadyCallbackto call when the request is satisfied
-
loadFinish
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,nullto ignore.- Returns:
- a
GInputStreamto read the icon from. - Throws:
GErrorException- seeGError
-