Package ch.bailu.gtk.gdk
Klasse Device
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gdk.Device
- Alle implementierten Schnittstellen:
PointerInterface
Represents an input device, such as a keyboard, mouse or touchpad.
See the [class@Gdk.Seat] documentation for more information
about the various kinds of devices, and their relationships.
See the [class@Gdk.Seat] documentation for more information
about the various kinds of devices, and their relationships.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Retrieves the index of the active layout of the keyboard.boolean
Retrieves whether the Caps Lock modifier of the keyboard is locked.static ClassHandler
Retrieves the current tool for @device.int
Returns the direction of effective layout of the keyboard.Returns the `GdkDisplay` to which @device pertains.boolean
Determines whether the pointer follows device motion.static int
int
Retrieves the current modifier state of the keyboard.getName()
The name of the device, suitable for showing in a user interface.boolean
Retrieves whether the Num Lock modifier of the keyboard is locked.int
Retrieves the number of touch points associated to @device.static long
static TypeSystem.TypeSize
Returns the product ID of this device.boolean
Retrieves whether the Scroll Lock modifier of the keyboard is locked.getSeat()
Returns the `GdkSeat` the device belongs to.int
Determines the type of the device.int
Returns the timestamp of the last activity for this device.static long
static TypeSystem.TypeSize
Returns the vendor ID of this device.boolean
Determines if layouts for both right-to-left and
left-to-right languages are in use on the keyboard.onChanged
(Device.OnChanged signal) Connect to signal "changed".onToolChanged
(Device.OnToolChanged signal) Connect to signal "tool-changed".Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_CHANGED
- Siehe auch:
-
SIGNAL_ON_TOOL_CHANGED
- Siehe auch:
-
-
Konstruktordetails
-
Device
-
-
Methodendetails
-
getClassHandler
-
getActiveLayoutIndex
public int getActiveLayoutIndex()Retrieves the index of the active layout of the keyboard.
If there is no valid active layout for the `GdkDevice`, this function will
return -1;
This is only relevant for keyboard devices.- Gibt zurück:
- The layout index of the active layout or -1.
-
getCapsLockState
public boolean getCapsLockState()Retrieves whether the Caps Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.- Gibt zurück:
- %TRUE if Caps Lock is on for @device
-
getDeviceTool
Retrieves the current tool for @device.- Gibt zurück:
- the `GdkDeviceTool`
-
getDirection
public int getDirection()Returns the direction of effective layout of the keyboard.
This is only relevant for keyboard devices.
The direction of a layout is the direction of the majority
of its symbols. See [func@Pango.unichar_direction].- Gibt zurück:
- %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL if it can determine the direction. %PANGO_DIRECTION_NEUTRAL otherwise
-
getDisplay
Returns the `GdkDisplay` to which @device pertains.- Gibt zurück:
- a `GdkDisplay`
-
getHasCursor
public boolean getHasCursor()Determines whether the pointer follows device motion.
This is not meaningful for keyboard devices, which
don't have a pointer.- Gibt zurück:
- %TRUE if the pointer follows device motion
-
getModifierState
public int getModifierState()Retrieves the current modifier state of the keyboard.
This is only relevant for keyboard devices.- Gibt zurück:
- the current modifier state
-
getName
The name of the device, suitable for showing in a user interface.- Gibt zurück:
- a name
-
getNumLockState
public boolean getNumLockState()Retrieves whether the Num Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.- Gibt zurück:
- %TRUE if Num Lock is on for @device
-
getNumTouches
public int getNumTouches()Retrieves the number of touch points associated to @device.- Gibt zurück:
- the number of touch points
-
getProductId
Returns the product ID of this device.
This ID is retrieved from the device, and does not change.
See [method@Gdk.Device.get_vendor_id] for more information.- Gibt zurück:
- the product ID
-
getScrollLockState
public boolean getScrollLockState()Retrieves whether the Scroll Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.- Gibt zurück:
- %TRUE if Scroll Lock is on for @device
-
getSeat
Returns the `GdkSeat` the device belongs to.- Gibt zurück:
- a `GdkSeat`
-
getSource
public int getSource()Determines the type of the device.- Gibt zurück:
- a `GdkInputSource`
-
getTimestamp
public int getTimestamp()Returns the timestamp of the last activity for this device.
In practice, this means the timestamp of the last event that was
received from the OS for this device. (GTK may occasionally produce
events for a device that are not received from the OS, and will not
update the timestamp).- Gibt zurück:
- the timestamp of the last activity for this device
-
getVendorId
Returns the vendor ID of this device.
This ID is retrieved from the device, and does not change.
This function, together with [method@Gdk.Device.get_product_id],
can be used to eg. compose `GSettings` paths to store settings
for this device.
```c
static GSettings *
get_device_settings (GdkDevice *device)
{
const char *vendor, *product;
GSettings *settings;
GdkDevice *device;
char *path;
vendor = gdk_device_get_vendor_id (device);
product = gdk_device_get_product_id (device);
path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product);
settings = g_settings_new_with_path (DEVICE_SCHEMA, path);
g_free (path);
return settings;
}
```- Gibt zurück:
- the vendor ID
-
hasBidiLayouts
public boolean hasBidiLayouts()Determines if layouts for both right-to-left and
left-to-right languages are in use on the keyboard.
This is only relevant for keyboard devices.- Gibt zurück:
- %TRUE if there are layouts with both directions, %FALSE otherwise
-
onChanged
Connect to signal "changed".
SeeDevice.OnChanged.onChanged()
for signal description.
FieldSIGNAL_ON_CHANGED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onToolChanged
Connect to signal "tool-changed".
SeeDevice.OnToolChanged.onToolChanged(ch.bailu.gtk.gdk.DeviceTool)
for signal description.
FieldSIGNAL_ON_TOOL_CHANGED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-