gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.DropControllerMotion

Description

GtkDropControllerMotion is an event controller tracking the pointer during Drag-and-Drop operations.

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

This controller is not able to accept drops, use DropTarget for that purpose.

Synopsis

Exported types

class (GObject o, IsDescendantOf DropControllerMotion o) => IsDropControllerMotion o Source #

Type class for types which can be safely cast to DropControllerMotion, for instance with toDropControllerMotion.

Instances

Instances details
(GObject o, IsDescendantOf DropControllerMotion o) => IsDropControllerMotion o Source # 
Instance details

Defined in GI.Gtk.Objects.DropControllerMotion

toDropControllerMotion :: (MonadIO m, IsDropControllerMotion o) => o -> m DropControllerMotion Source #

Cast to DropControllerMotion, for types for which this is known to be safe. For general casts, use castTo.

Methods

containsPointer

dropControllerMotionContainsPointer Source #

Arguments

:: (HasCallStack, MonadIO m, IsDropControllerMotion a) 
=> a

self: a GtkDropControllerMotion

-> m Bool

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

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

getDrop

dropControllerMotionGetDrop Source #

Arguments

:: (HasCallStack, MonadIO m, IsDropControllerMotion a) 
=> a

self: a GtkDropControllerMotion

-> m (Maybe Drop)

Returns: The GdkDrop currently happening within self

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

isPointer

dropControllerMotionIsPointer Source #

Arguments

:: (HasCallStack, MonadIO m, IsDropControllerMotion a) 
=> a

self: a GtkDropControllerMotion

-> m Bool

Returns: True if a dragging pointer is within self but not one of its children

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

new

dropControllerMotionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m DropControllerMotion

Returns: a new GtkDropControllerMotion

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

Properties

containsPointer

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

See also DropControllerMotion:isPointer.

When handling crossing events, this property is updated before DropControllerMotion::enter, but after DropControllerMotion::leave is emitted.

getDropControllerMotionContainsPointer :: (MonadIO m, IsDropControllerMotion o) => o -> m Bool Source #

Get the value of the “contains-pointer” property. When overloading is enabled, this is equivalent to

get dropControllerMotion #containsPointer

drop

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

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

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 DropControllerMotion::enter, but after DropControllerMotion::leave is emitted.

getDropControllerMotionDrop :: (MonadIO m, IsDropControllerMotion o) => o -> m (Maybe Drop) Source #

Get the value of the “drop” property. When overloading is enabled, this is equivalent to

get dropControllerMotion #drop

isPointer

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

See also DropControllerMotion:containsPointer.

When handling crossing events, this property is updated before DropControllerMotion::enter, but after DropControllerMotion::leave is emitted.

getDropControllerMotionIsPointer :: (MonadIO m, IsDropControllerMotion o) => o -> m Bool Source #

Get the value of the “is-pointer” property. When overloading is enabled, this is equivalent to

get dropControllerMotion #isPointer

Signals

enter

type DropControllerMotionEnterCallback Source #

Arguments

 = Double

x: coordinates of pointer location

-> Double

y: coordinates of pointer location

-> IO () 

Signals that the pointer has entered the widget.

afterDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionEnterCallback) -> m SignalHandlerId Source #

Connect a signal handler for the enter signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after dropControllerMotion #enter callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionEnterCallback) -> m SignalHandlerId Source #

Connect a signal handler for the enter signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on dropControllerMotion #enter callback

leave

type DropControllerMotionLeaveCallback = IO () Source #

Signals that the pointer has left the widget.

afterDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionLeaveCallback) -> m SignalHandlerId Source #

Connect a signal handler for the leave signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after dropControllerMotion #leave callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionLeaveCallback) -> m SignalHandlerId Source #

Connect a signal handler for the leave signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on dropControllerMotion #leave callback

motion

type DropControllerMotionMotionCallback Source #

Arguments

 = Double

x: the x coordinate

-> Double

y: the y coordinate

-> IO () 

Emitted when the pointer moves inside the widget.

afterDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionMotionCallback) -> m SignalHandlerId Source #

Connect a signal handler for the motion signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after dropControllerMotion #motion callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionMotionCallback) -> m SignalHandlerId Source #

Connect a signal handler for the motion signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on dropControllerMotion #motion callback