1.49 <GtkDropControllerMotion>

Class: <GtkDropControllerMotion>

It derives from <GtkEventController>.

An event controller tracking the pointer during Drag-and-Drop operations.

It is modeled after <GtkEventControllerMotion> so if you have used that, this should feel really familiar.

This controller is not able to accept drops, use <GtkDropTarget> for that purpose.

Properties

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

Whether the pointer of a Drag-and-Drop operation is in the controller’s widget or a descendant.

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

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

Its value is a boolean.

It is read only.

Property: drop-controller-motion:drop self

The ongoing drop operation over the controller’s widget or its descendant.

If no drop operation is going on, this property returns #f.

The event controller should not modify the drop, but it might want to query its properties.

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

Its value is a <GdkDrop>, or #f.

It is read only.

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

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

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

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

Its value is a boolean.

It is read only.

Procedures

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

Returns if a Drag-and-Drop operation is within the widget self or one of its children.

self

Passed: a <GtkDropControllerMotion>.

a <GtkDropControllerMotion>

%return

Returned: a boolean.

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

Method: drop-controller-motion:get-drop self ⇒ %return
Method: get-drop self ⇒ %return

Returns the <GdkDrop> of a current Drag-and-Drop operation over the widget of self.

self

Passed: a <GtkDropControllerMotion>.

a <GtkDropControllerMotion>

%return

Returned: a <GdkDrop>, or #f.

The <GdkDrop> currently happening within self

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

Returns if a Drag-and-Drop operation is within the widget self, not one of its children.

self

Passed: a <GtkDropControllerMotion>.

a <GtkDropControllerMotion>

%return

Returned: a boolean.

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

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

Creates a new event controller that will handle pointer motion events during drag and drop.

%return

Returned: a <GtkEventController>.

a new <GtkDropControllerMotion>

Signals

Signal: drop-controller-motion:enter

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

Signals that the pointer has entered the widget.

self

Passed: a <GtkDropControllerMotion>.

x

Passed: a real number.

coordinates of pointer location

y

Passed: a real number.

coordinates of pointer location

Signal: drop-controller-motion:leave

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

Signals that the pointer has left the widget.

self

Passed: a <GtkDropControllerMotion>.

Signal: drop-controller-motion:motion

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

Emitted when the pointer moves inside the widget.

self

Passed: a <GtkDropControllerMotion>.

x

Passed: a real number.

the x coordinate

y

Passed: a real number.

the y coordinate