Class Seat.Builder<B extends Seat.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Seat

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

      public B setDisplay(Display display)
      GdkDisplay of this seat.
      Parameters:
      display - the value for the display property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDeviceAdded

      public B onDeviceAdded(Seat.DeviceAddedCallback handler)
      Emitted when a new input device is related to this seat.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onDeviceRemoved

      public B onDeviceRemoved(Seat.DeviceRemovedCallback handler)
      Emitted when an input device is removed (e.g. unplugged).
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onToolAdded

      public B onToolAdded(Seat.ToolAddedCallback handler)

      Emitted whenever a new tool is made known to the seat.

      The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Gdk.Device::tool-changed signal accordingly.

      A same tool may be used by several devices.

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

      public B onToolRemoved(Seat.ToolRemovedCallback handler)
      Emitted whenever a tool is no longer known to this seat.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: