Class PixbufLoader.Builder<B extends PixbufLoader.Builder<B>>

java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gdkpixbuf.PixbufLoader.Builder<B>
Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
PixbufLoader

public static class PixbufLoader.Builder<B extends PixbufLoader.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public PixbufLoader build()
      Finish building the PixbufLoader object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to PixbufLoader.
      Overrides:
      build in class GObject.Builder<B extends PixbufLoader.Builder<B>>
      Returns:
      a new instance of PixbufLoader with the properties that were set in the Builder object.
    • onAreaPrepared

      public B onAreaPrepared(PixbufLoader.AreaPreparedCallback handler)

      This signal is emitted when the pixbuf loader has allocated the pixbuf in the desired size.

      After this signal is emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to fetch the partially-loaded pixbuf.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onAreaUpdated

      public B onAreaUpdated(PixbufLoader.AreaUpdatedCallback handler)

      This signal is emitted when a significant area of the image being loaded has been updated.

      Normally it means that a complete scanline has been read in, but it could be a different area as well.

      Applications can use this signal to know when to repaint areas of an image that is being loaded.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onClosed

      public B onClosed(PixbufLoader.ClosedCallback handler)

      This signal is emitted when gdk_pixbuf_loader_close() is called.

      It can be used by different parts of an application to receive notification when an image loader is closed by the code that drives it.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onSizePrepared

      public B onSizePrepared(PixbufLoader.SizePreparedCallback handler)

      This signal is emitted when the pixbuf loader has been fed the initial amount of data that is required to figure out the size of the image that it will create.

      Applications can call gdk_pixbuf_loader_set_size() in response to this signal to set the desired size to which the image should be scaled.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: