gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.DropControllerMotion

Description

DropControllerMotion is an event controller meant for tracking the pointer hovering over a widget during a drag and drop operation.

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

The drop 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

Overloaded methods

containsPointer

dropControllerMotionContainsPointer Source #

Arguments

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

self: a DropControllerMotion

-> m Bool

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

Returns the value of the GtkDropControllerMotion:contains-pointer property.

getDrop

dropControllerMotionGetDrop Source #

Arguments

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

self: a DropControllerMotion

-> m (Maybe Drop)

Returns: The Drop currently happening within self or Nothing if none

Returns the value of the GtkDropControllerMotion:drop property.

isPointer

dropControllerMotionIsPointer Source #

Arguments

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

self: a EventControllerKey

-> m Bool

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

Returns the value of the GtkDropControllerMotion:is-pointer property.

new

dropControllerMotionNew Source #

Arguments

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

Returns: a new DropControllerMotion

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:is-pointer.

When handling crossing events, this property is updated before enter but after 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 enter but after 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:contains-pointer.

When handling crossing events, this property is updated before enter but after 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 C_DropControllerMotionEnterCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

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 -> 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

onDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => 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 C_DropControllerMotionLeaveCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type DropControllerMotionLeaveCallback = IO () Source #

Signals that the pointer has left the widget.

afterDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => 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

onDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => 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 C_DropControllerMotionMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

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 -> 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

onDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => 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