Package org.gnome.gdk
Class Seat
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
Seat.SeatImpl
The
GdkSeat
object represents a collection of input devices
that belong to a user.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Seat.Builder<B extends Seat.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static interface
Functional interface declaration of theDeviceAddedCallback
callback.static interface
Functional interface declaration of theDeviceRemovedCallback
callback.static class
The SeatImpl type represents a native instance of the abstract Seat class.static interface
Functional interface declaration of theToolAddedCallback
callback.static interface
Functional interface declaration of theToolRemovedCallback
callback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionSeat
(MemorySegment address) Create a Seat proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected Seat
asParent()
Returns this instance as if it were its parent type.static Seat.Builder
<? extends Seat.Builder> builder()
ASeat.Builder
object constructs aSeat
with the specified properties.void
emitDeviceAdded
(Device device) Emits the "device-added" signal.void
emitDeviceRemoved
(Device device) Emits the "device-removed" signal.void
emitToolAdded
(DeviceTool tool) Emits the "tool-added" signal.void
emitToolRemoved
(DeviceTool tool) Emits the "tool-removed" signal.Returns the capabilities thisGdkSeat
currently has.getDevices
(Set<SeatCapabilities> capabilities) Returns the devices that match the given capabilities.getDevices
(SeatCapabilities... capabilities) Returns the devices that match the given capabilities.Returns theGdkDisplay
this seat belongs to.Returns the device that routes keyboard events.static MemoryLayout
The memory layout of the native struct.Returns the device that routes pointer events.getTools()
Returns allGdkDeviceTools
that are known to the application.static Type
getType()
Get the GType of the Seat classonDeviceAdded
(Seat.DeviceAddedCallback handler) Emitted when a new input device is related to this seat.Emitted when an input device is removed (e.g.onToolAdded
(Seat.ToolAddedCallback handler) Emitted whenever a new tool is made known to the seat.onToolRemoved
(Seat.ToolRemovedCallback handler) Emitted whenever a tool is no longer known to thisseat
.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Seat
Create a Seat proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getCapabilities
Returns the capabilities thisGdkSeat
currently has.- Returns:
- the seat capabilities
-
getDevices
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
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
Returns theGdkDisplay
this seat belongs to.- Returns:
- a
GdkDisplay
. This object is owned by GTK and must not be freed.
-
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
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
Returns allGdkDeviceTools
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
Emits the "device-added" signal. SeeonDeviceAdded(org.gnome.gdk.Seat.DeviceAddedCallback)
. -
onDeviceRemoved
public SignalConnection<Seat.DeviceRemovedCallback> onDeviceRemoved(Seat.DeviceRemovedCallback handler) 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
Emits the "device-removed" signal. SeeonDeviceRemoved(org.gnome.gdk.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
Emits the "tool-added" signal. SeeonToolAdded(org.gnome.gdk.Seat.ToolAddedCallback)
. -
onToolRemoved
Emitted whenever a tool is no longer known to thisseat
.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitToolRemoved
Emits the "tool-removed" signal. SeeonToolRemoved(org.gnome.gdk.Seat.ToolRemovedCallback)
. -
builder
ASeat.Builder
object constructs aSeat
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withSeat.Builder.build()
.
-