Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- 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 C_DropControllerMotionEnterCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type DropControllerMotionEnterCallback = Double -> Double -> IO ()
- afterDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionEnterCallback -> m SignalHandlerId
- genClosure_DropControllerMotionEnter :: MonadIO m => DropControllerMotionEnterCallback -> m (GClosure C_DropControllerMotionEnterCallback)
- mk_DropControllerMotionEnterCallback :: C_DropControllerMotionEnterCallback -> IO (FunPtr C_DropControllerMotionEnterCallback)
- noDropControllerMotionEnterCallback :: Maybe DropControllerMotionEnterCallback
- onDropControllerMotionEnter :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionEnterCallback -> m SignalHandlerId
- wrap_DropControllerMotionEnterCallback :: DropControllerMotionEnterCallback -> C_DropControllerMotionEnterCallback
- type C_DropControllerMotionLeaveCallback = Ptr () -> Ptr () -> IO ()
- type DropControllerMotionLeaveCallback = IO ()
- afterDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionLeaveCallback -> m SignalHandlerId
- genClosure_DropControllerMotionLeave :: MonadIO m => DropControllerMotionLeaveCallback -> m (GClosure C_DropControllerMotionLeaveCallback)
- mk_DropControllerMotionLeaveCallback :: C_DropControllerMotionLeaveCallback -> IO (FunPtr C_DropControllerMotionLeaveCallback)
- noDropControllerMotionLeaveCallback :: Maybe DropControllerMotionLeaveCallback
- onDropControllerMotionLeave :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionLeaveCallback -> m SignalHandlerId
- wrap_DropControllerMotionLeaveCallback :: DropControllerMotionLeaveCallback -> C_DropControllerMotionLeaveCallback
- type C_DropControllerMotionMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type DropControllerMotionMotionCallback = Double -> Double -> IO ()
- afterDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionMotionCallback -> m SignalHandlerId
- genClosure_DropControllerMotionMotion :: MonadIO m => DropControllerMotionMotionCallback -> m (GClosure C_DropControllerMotionMotionCallback)
- mk_DropControllerMotionMotionCallback :: C_DropControllerMotionMotionCallback -> IO (FunPtr C_DropControllerMotionMotionCallback)
- noDropControllerMotionMotionCallback :: Maybe DropControllerMotionMotionCallback
- onDropControllerMotionMotion :: (IsDropControllerMotion a, MonadIO m) => a -> DropControllerMotionMotionCallback -> m SignalHandlerId
- wrap_DropControllerMotionMotionCallback :: DropControllerMotionMotionCallback -> C_DropControllerMotionMotionCallback
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.
containsPointer
dropControllerMotionContainsPointer Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m Bool | Returns: |
Returns the value of the GtkDropControllerMotion:contains-pointer property.
getDrop
dropControllerMotionGetDrop Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m (Maybe Drop) | Returns: The |
Returns the value of the GtkDropControllerMotion:drop property.
isPointer
dropControllerMotionIsPointer Source #
:: (HasCallStack, MonadIO m, IsDropControllerMotion a) | |
=> a |
|
-> m Bool | Returns: |
Returns the value of the GtkDropControllerMotion:is-pointer property.
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
: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 #
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
genClosure_DropControllerMotionEnter :: MonadIO m => DropControllerMotionEnterCallback -> m (GClosure C_DropControllerMotionEnterCallback) Source #
Wrap the callback into a GClosure
.
mk_DropControllerMotionEnterCallback :: C_DropControllerMotionEnterCallback -> IO (FunPtr C_DropControllerMotionEnterCallback) Source #
Generate a function pointer callable from C code, from a C_DropControllerMotionEnterCallback
.
noDropControllerMotionEnterCallback :: Maybe DropControllerMotionEnterCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DropControllerMotionEnterCallback
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
wrap_DropControllerMotionEnterCallback :: DropControllerMotionEnterCallback -> C_DropControllerMotionEnterCallback Source #
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
genClosure_DropControllerMotionLeave :: MonadIO m => DropControllerMotionLeaveCallback -> m (GClosure C_DropControllerMotionLeaveCallback) Source #
Wrap the callback into a GClosure
.
mk_DropControllerMotionLeaveCallback :: C_DropControllerMotionLeaveCallback -> IO (FunPtr C_DropControllerMotionLeaveCallback) Source #
Generate a function pointer callable from C code, from a C_DropControllerMotionLeaveCallback
.
noDropControllerMotionLeaveCallback :: Maybe DropControllerMotionLeaveCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DropControllerMotionLeaveCallback
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
wrap_DropControllerMotionLeaveCallback :: DropControllerMotionLeaveCallback -> C_DropControllerMotionLeaveCallback Source #
motion
type C_DropControllerMotionMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DropControllerMotionMotionCallback Source #
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
genClosure_DropControllerMotionMotion :: MonadIO m => DropControllerMotionMotionCallback -> m (GClosure C_DropControllerMotionMotionCallback) Source #
Wrap the callback into a GClosure
.
mk_DropControllerMotionMotionCallback :: C_DropControllerMotionMotionCallback -> IO (FunPtr C_DropControllerMotionMotionCallback) Source #
Generate a function pointer callable from C code, from a C_DropControllerMotionMotionCallback
.
noDropControllerMotionMotionCallback :: Maybe DropControllerMotionMotionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DropControllerMotionMotionCallback
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