Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype DropControllerMotion = DropControllerMotion (ManagedPtr DropControllerMotion)
- class (GObject o, IsDescendantOf DropControllerMotion o) => IsDropControllerMotion o
- toDropControllerMotion :: (MonadIO m, IsDropControllerMotion o) => o -> m DropControllerMotion
- dropControllerMotionContainsPointer :: (HasCallStack, MonadIO m, IsDropControllerMotion a) => a -> m Bool
- dropControllerMotionGetDrop :: (HasCallStack, MonadIO m, IsDropControllerMotion a) => a -> m (Maybe Drop)
- dropControllerMotionIsPointer :: (HasCallStack, MonadIO m, IsDropControllerMotion a) => a -> m Bool
- dropControllerMotionNew :: (HasCallStack, MonadIO m) => m DropControllerMotion
- getDropControllerMotionContainsPointer :: (MonadIO m, IsDropControllerMotion o) => o -> m Bool
- getDropControllerMotionDrop :: (MonadIO m, IsDropControllerMotion o) => o -> m (Maybe Drop)
- getDropControllerMotionIsPointer :: (MonadIO m, IsDropControllerMotion o) => o -> m Bool
- type DropControllerMotionEnterCallback = Double -> Double -> IO ()
- afterDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionEnterCallback) -> m SignalHandlerId
- onDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionEnterCallback) -> m SignalHandlerId
- type DropControllerMotionLeaveCallback = IO ()
- afterDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionLeaveCallback) -> m SignalHandlerId
- onDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionLeaveCallback) -> m SignalHandlerId
- type DropControllerMotionMotionCallback = Double -> Double -> IO ()
- afterDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionMotionCallback) -> m SignalHandlerId
- onDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> ((?self :: a) => DropControllerMotionMotionCallback) -> m SignalHandlerId
Exported types
newtype DropControllerMotion Source #
Memory-managed wrapper type.
DropControllerMotion (ManagedPtr DropControllerMotion) |
Instances
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
(GObject o, IsDescendantOf DropControllerMotion o) => IsDropControllerMotion o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, containsPointer, forceFloating, freezeNotify, getv, isFloating, isPointer, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getData, getDrop, getName, getPropagationLimit, getPropagationPhase, getProperty, getQdata, getWidget.
Setters
setData, setDataFull, setName, setPropagationLimit, setPropagationPhase, setProperty, setStaticName.
containsPointer
dropControllerMotionContainsPointer Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m Bool | Returns: |
Returns if a Drag-and-Drop operation is within the widget
self
or one of its children.
getDrop
dropControllerMotionGetDrop Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m (Maybe Drop) | Returns: The |
Returns the GdkDrop
of a current Drag-and-Drop operation
over the widget of self
.
isPointer
dropControllerMotionIsPointer Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m Bool | Returns: |
Returns if a Drag-and-Drop operation is within the widget
self
, not one of its children.
new
dropControllerMotionNew Source #
:: (HasCallStack, MonadIO m) | |
=> m DropControllerMotion | Returns: a new |
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 #
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 #
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