Package ch.bailu.gtk.gtk
Class EventControllerKey
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.EventController
ch.bailu.gtk.gtk.EventControllerKey
- All Implemented Interfaces:
PointerInterface
`GtkEventControllerKey` is an event controller that provides access
to key events.
to key events.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new event controller that will handle key events.EventControllerKey
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Forwards the current event of this @controller to a @widget.static ClassHandler
int
getGroup()
Gets the key group of the current event of this @controller.Gets the input method context of the key @controller.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
Connect to signal "im-update".Connect to signal "key-pressed".Connect to signal "key-released".Connect to signal "modifiers".void
setImContext
(IMContext im_context) Sets the input method context of the key @controller.Methods inherited from class ch.bailu.gtk.gtk.EventController
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getName, getPropagationLimit, getPropagationPhase, getWidget, reset, setName, setName, setPropagationLimit, setPropagationPhase, setStaticName, setStaticName
Methods inherited from class 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
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_IM_UPDATE
- See Also:
-
SIGNAL_ON_KEY_PRESSED
- See Also:
-
SIGNAL_ON_KEY_RELEASED
- See Also:
-
SIGNAL_ON_MODIFIERS
- See Also:
-
-
Constructor Details
-
EventControllerKey
-
EventControllerKey
public EventControllerKey()Creates a new event controller that will handle key events.
-
-
Method Details
-
getClassHandler
-
forward
Forwards the current event of this @controller to a @widget.
This function can only be used in handlers for the
[signal@Gtk.EventControllerKey::key-pressed],
[signal@Gtk.EventControllerKey::key-released]
or [signal@Gtk.EventControllerKey::modifiers] signals.- Parameters:
widget
- a `GtkWidget`- Returns:
- whether the @widget handled the event
-
getGroup
public int getGroup()Gets the key group of the current event of this @controller.
See [method@Gdk.KeyEvent.get_layout].- Returns:
- the key group
-
getImContext
Gets the input method context of the key @controller.- Returns:
- the `GtkIMContext`
-
setImContext
Sets the input method context of the key @controller.- Parameters:
im_context
- a `GtkIMContext`
-
onImUpdate
Connect to signal "im-update".
SeeEventControllerKey.OnImUpdate.onImUpdate()
for signal description.
FieldSIGNAL_ON_IM_UPDATE
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onKeyPressed
Connect to signal "key-pressed".
SeeEventControllerKey.OnKeyPressed.onKeyPressed(int, int, int)
for signal description.
FieldSIGNAL_ON_KEY_PRESSED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onKeyReleased
Connect to signal "key-released".
SeeEventControllerKey.OnKeyReleased.onKeyReleased(int, int, int)
for signal description.
FieldSIGNAL_ON_KEY_RELEASED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onModifiers
Connect to signal "modifiers".
SeeEventControllerKey.OnModifiers.onModifiers(int)
for signal description.
FieldSIGNAL_ON_MODIFIERS
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
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()
-