1.61 <GtkEventControllerMotion>

Class: <GtkEventControllerMotion>

It derives from <GtkEventController>.

Tracks the pointer position.

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

Properties

Property: event-controller-motion:contains-pointer self

Whether the pointer is in the controllers widget or a descendant.

See also event-controller-motion:is-pointer.

When handling crossing events, this property is updated before event-controller-motion:enter, but after event-controller-motion:leave is emitted.

Its value is a boolean.

It is read only.

Property: event-controller-motion:is-pointer self

Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget.

See also event-controller-motion:contains-pointer.

When handling crossing events, this property is updated before event-controller-motion:enter, but after event-controller-motion:leave is emitted.

Its value is a boolean.

It is read only.

Procedures

Method: event-controller-motion:contains-pointer? self ⇒ %return
Method: contains-pointer? self ⇒ %return

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

self

Passed: a <GtkEventControllerMotion>.

a <GtkEventControllerMotion>

%return

Returned: a boolean.

#t if a pointer is within self or one of its children

Method: event-controller-motion:is-pointer? self ⇒ %return
Method: is-pointer? self ⇒ %return

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

self

Passed: a <GtkEventControllerMotion>.

a <GtkEventControllerMotion>

%return

Returned: a boolean.

#t if a pointer is within self but not one of its children

Procedure: event-controller-motion:new ⇒ %return

Creates a new event controller that will handle motion events.

%return

Returned: a <GtkEventController>.

a new <GtkEventControllerMotion>

Signals

Signal: event-controller-motion:enter

Connect a handler with (connect object event-controller-motion:enter handler). It is called as (handler self x y).

Signals that the pointer has entered the widget.

self

Passed: a <GtkEventControllerMotion>.

x

Passed: a real number.

coordinates of pointer location

y

Passed: a real number.

coordinates of pointer location

Signal: event-controller-motion:leave

Connect a handler with (connect object event-controller-motion:leave handler). It is called as (handler self).

Signals that the pointer has left the widget.

self

Passed: a <GtkEventControllerMotion>.

Signal: event-controller-motion:motion

Connect a handler with (connect object event-controller-motion:motion handler). It is called as (handler self x y).

Emitted when the pointer moves inside the widget.

self

Passed: a <GtkEventControllerMotion>.

x

Passed: a real number.

the x coordinate

y

Passed: a real number.

the y coordinate