Interface LoadableIcon

All Superinterfaces:
Icon, Proxy
All Known Implementing Classes:
BytesIcon, DmabufTexture, FileIcon, GLTexture, LoadableIcon.LoadableIcon$Impl, MemoryTexture, Pixbuf, Texture, Texture.Texture$Impl

@Generated("org.javagi.JavaGI") public interface LoadableIcon extends Proxy, Icon
GLoadableIcon extends the Icon interface and adds the ability to load icons from streams.
  • Method Details

    • getType

      static @Nullable Type getType()
      Get the GType of the LoadableIcon class.
      Returns:
      the GType
    • 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, null to ignore.
      cancellable - optional GCancellable object, null to ignore.
      Returns:
      a GInputStream to read the icon from.
      Throws:
      GErrorException - see GError
    • 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 - optional GCancellable object, null to ignore.
      callback - a GAsyncReadyCallback to call when the request is satisfied
    • loadFinish

      default InputStream loadFinish(AsyncResult res, @Nullable Out<String> type) throws GErrorException
      Finishes an asynchronous icon load started in g_loadable_icon_load_async().
      Parameters:
      res - a GAsyncResult.
      type - a location to store the type of the loaded icon, null to ignore.
      Returns:
      a GInputStream to read the icon from.
      Throws:
      GErrorException - see GError