EventController

open class EventController(pointer: <Error class: unknown class><<Error class: unknown class>>)

GtkEventController is the base class for event controllers.

These are ancillary objects associated to widgets, which react to GdkEvents, and possibly trigger actions as a consequence.

Event controllers are added to a widget with method@Gtk.Widget.add_controller. It is rarely necessary to explicitly remove a controller with method@Gtk.Widget.remove_controller.

See the chapter on input-handling.html for an overview of the basic concepts, such as the capture and bubble phases of event propagation.

Inheritors

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkEventControllerPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var name: String?

The name for this controller, typically used for debugging purposes.

Link copied to clipboard

The limit for which events this controller will handle.

Link copied to clipboard

The propagation phase at which this controller will handle events.

Link copied to clipboard
open val widget: Widget?

The widget receiving the GdkEvents that the controller will handle.

Functions

Link copied to clipboard
open fun getCurrentEvent(): <Error class: unknown class>?

Returns the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventDevice(): <Error class: unknown class>?

Returns the device of the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventState(): <Error class: unknown class>

Returns the modifier state of the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventTime(): <Error class: unknown class>

Returns the timestamp of the event that is currently being handled by the controller.

Link copied to clipboard
open fun reset()

Resets the @controller to a clean state.

Link copied to clipboard
open fun setStaticName(name: String? = null)

Sets a name on the controller that can be used for debugging.