Class Seat

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
Seat.Seat$Impl

@Generated("org.javagi.JavaGI") public abstract class Seat extends GObject
Represents a collection of input devices that belong to a user.
  • Constructor Details

    • Seat

      public Seat(MemorySegment address)
      Create a Seat instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Seat

      public Seat()
      Create a new Seat.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Seat class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Seat asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getCapabilities

      public Set<SeatCapabilities> getCapabilities()
      Returns the capabilities this GdkSeat currently has.
      Returns:
      the seat capabilities
    • getDevices

      public List<Device> getDevices(Set<SeatCapabilities> capabilities)
      Returns the devices that match the given capabilities.
      Parameters:
      capabilities - capabilities to get devices for
      Returns:
      A list of GdkDevices. The list must be freed with g_list_free(), the elements are owned by GTK and must not be freed.
    • getDevices

      public List<Device> getDevices(SeatCapabilities... capabilities)
      Returns the devices that match the given capabilities.
      Parameters:
      capabilities - capabilities to get devices for
      Returns:
      A list of GdkDevices. The list must be freed with g_list_free(), the elements are owned by GTK and must not be freed.
    • getDisplay

      public Display getDisplay()
      Returns the GdkDisplay this seat belongs to.
      Returns:
      a GdkDisplay. This object is owned by GTK and must not be freed.
    • getKeyboard

      public @Nullable Device getKeyboard()
      Returns the device that routes keyboard events.
      Returns:
      a GdkDevice with keyboard capabilities. This object is owned by GTK and must not be freed.
    • getPointer

      public @Nullable Device getPointer()
      Returns the device that routes pointer events.
      Returns:
      a GdkDevice with pointer capabilities. This object is owned by GTK and must not be freed.
    • getTools

      public List<DeviceTool> getTools()
      Returns all GdkDeviceTools that are known to the application.
      Returns:
      A list of tools. Free with g_list_free().
    • onDeviceAdded

      Emitted when a new input device is related to this seat.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitDeviceAdded

      public void emitDeviceAdded(@Nullable Device device)
      Emits the "device-added" signal. See onDeviceAdded(Seat.DeviceAddedCallback).
    • onDeviceRemoved

      Emitted when an input device is removed (e.g. unplugged).
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitDeviceRemoved

      public void emitDeviceRemoved(@Nullable Device device)
      Emits the "device-removed" signal. See onDeviceRemoved(Seat.DeviceRemovedCallback).
    • onToolAdded

      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:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitToolAdded

      public void emitToolAdded(@Nullable DeviceTool tool)
      Emits the "tool-added" signal. See onToolAdded(Seat.ToolAddedCallback).
    • onToolRemoved

      Emitted whenever a tool is no longer known to this seat.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitToolRemoved

      public void emitToolRemoved(@Nullable DeviceTool tool)
      Emits the "tool-removed" signal. See onToolRemoved(Seat.ToolRemovedCallback).