EventControllerMotion

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

GtkEventControllerMotion is an event controller tracking the pointer position.

The event controller offers signal@Gtk.EventControllerMotion::enter and signal@Gtk.EventControllerMotion::leave signals, as well as property@Gtk.EventControllerMotion:is-pointer and property@Gtk.EventControllerMotion:contains-pointer properties which are updated to reflect changes in the pointer position as it moves over the widget.

Skipped during bindings generation

  • method contains-pointer: Property has no getter nor setter

  • method is-pointer: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor()

Creates a new event controller that will handle motion events.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkEventControllerMotionPointer: <Error class: unknown class><<Error class: unknown class>>
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
fun connectEnter(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

Signals that the pointer has entered the widget.

Link copied to clipboard
fun connectLeave(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Signals that the pointer has left the widget.

Link copied to clipboard
fun connectMotion(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

Emitted when the pointer moves inside the widget.

Link copied to clipboard

Returns if a pointer is within @self or one of its children.

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 isPointer(): Boolean

Returns if a pointer is within @self, but not one of its children.

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.