Class LoadableIcon

All Implemented Interfaces:
PointerInterface

public class LoadableIcon extends Interface
Extends the #GIcon interface and adds the ability to
load icons from streams.

https://docs.gtk.org/gio/iface.LoadableIcon.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • load

      public InputStream load(int size, @Nullable Strs type, @Nullable Cancellable cancellable) throws AllocationError
      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:
      AllocationError
    • loadAsync

      public void loadAsync(int size, @Nullable Cancellable cancellable, LoadableIcon.OnAsyncReadyCallback callback, @Nullable Pointer user_data)
      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
      user_data - the data to pass to callback function
    • loadFinish

      public InputStream loadFinish(@Nonnull AsyncResult res, @Nullable Strs type) throws AllocationError
      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:
      AllocationError
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()