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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfaceNested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new event controller that will handle key events.EventControllerKey(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionbooleanForwards the current event of this @controller to a @widget.static ClassHandlerintgetGroup()Gets the key group of the current event of this @controller.Gets the input method context of the key @controller.static intstatic longstatic TypeSystem.TypeSizestatic longstatic TypeSystem.TypeSizeConnect to signal "im-update".Connect to signal "key-pressed".Connect to signal "key-released".Connect to signal "modifiers".voidsetImContext(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, setStaticNameMethods 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, weakUnrefMethods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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_UPDATEcontains 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_PRESSEDcontains 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_RELEASEDcontains 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_MODIFIERScontains 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()
-