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 |
No description available in the introspection data.
Synopsis
- newtype DragContext = DragContext (ManagedPtr DragContext)
- class (GObject o, IsDescendantOf DragContext o) => IsDragContext o
- toDragContext :: (MonadIO m, IsDragContext o) => o -> m DragContext
- dragContextGetActions :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- dragContextGetDestWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Window
- dragContextGetDevice :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Device
- dragContextGetDragWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m (Maybe Window)
- dragContextGetProtocol :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m DragProtocol
- dragContextGetSelectedAction :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- dragContextGetSourceWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Window
- dragContextGetSuggestedAction :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- dragContextListTargets :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [Atom]
- dragContextManageDnd :: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) => a -> b -> [DragAction] -> m Bool
- dragContextSetDevice :: (HasCallStack, MonadIO m, IsDragContext a, IsDevice b) => a -> b -> m ()
- dragContextSetHotspot :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Int32 -> Int32 -> m ()
- type DragContextActionChangedCallback = [DragAction] -> IO ()
- afterDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextActionChangedCallback) -> m SignalHandlerId
- onDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextActionChangedCallback) -> m SignalHandlerId
- type DragContextCancelCallback = DragCancelReason -> IO ()
- afterDragContextCancel :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextCancelCallback) -> m SignalHandlerId
- onDragContextCancel :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextCancelCallback) -> m SignalHandlerId
- type DragContextDndFinishedCallback = IO ()
- afterDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDndFinishedCallback) -> m SignalHandlerId
- onDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDndFinishedCallback) -> m SignalHandlerId
- type DragContextDropPerformedCallback = Int32 -> IO ()
- afterDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDropPerformedCallback) -> m SignalHandlerId
- onDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDropPerformedCallback) -> m SignalHandlerId
Exported types
newtype DragContext Source #
Memory-managed wrapper type.
DragContext (ManagedPtr DragContext) |
Instances
Eq DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext (==) :: DragContext -> DragContext -> Bool # (/=) :: DragContext -> DragContext -> Bool # | |
GObject DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext | |
ManagedPtrNewtype DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext toManagedPtr :: DragContext -> ManagedPtr DragContext | |
TypedObject DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext | |
HasParentTypes DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext | |
IsGValue (Maybe DragContext) Source # | Convert |
Defined in GI.Gdk.Objects.DragContext gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe DragContext -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe DragContext) | |
type ParentTypes DragContext Source # | |
Defined in GI.Gdk.Objects.DragContext type ParentTypes DragContext = '[Object] |
class (GObject o, IsDescendantOf DragContext o) => IsDragContext o Source #
Type class for types which can be safely cast to DragContext
, for instance with toDragContext
.
Instances
(GObject o, IsDescendantOf DragContext o) => IsDragContext o Source # | |
Defined in GI.Gdk.Objects.DragContext |
toDragContext :: (MonadIO m, IsDragContext o) => o -> m DragContext Source #
Cast to DragContext
, 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, forceFloating, freezeNotify, getv, isFloating, listTargets, manageDnd, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActions, getData, getDestWindow, getDevice, getDragWindow, getProperty, getProtocol, getQdata, getSelectedAction, getSourceWindow, getSuggestedAction.
Setters
getActions
dragContextGetActions Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [DragAction] | Returns: the |
Determines the bitmask of actions proposed by the source if
dragContextGetSuggestedAction
returns DragActionAsk
.
Since: 2.22
getDestWindow
dragContextGetDestWindow Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Window | Returns: a |
Returns the destination window for the DND operation.
Since: 3.0
getDevice
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Device | Returns: The |
Returns the Device
associated to the drag context.
getDragWindow
dragContextGetDragWindow Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m (Maybe Window) | Returns: the drag window, or |
Returns the window on which the drag icon should be rendered
during the drag operation. Note that the window may not be
available until the drag operation has begun. GDK will move
the window in accordance with the ongoing drag operation.
The window is owned by context
and will be destroyed when
the drag operation is over.
Since: 3.20
getProtocol
dragContextGetProtocol Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m DragProtocol | Returns: the drag protocol |
Returns the drag protocol that is used by this context.
Since: 3.0
getSelectedAction
dragContextGetSelectedAction Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [DragAction] | Returns: a |
Determines the action chosen by the drag destination.
Since: 2.22
getSourceWindow
dragContextGetSourceWindow Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Window | Returns: a |
Returns the Window
where the DND operation started.
Since: 2.22
getSuggestedAction
dragContextGetSuggestedAction Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [DragAction] | Returns: a |
Determines the suggested drag action of the context.
Since: 2.22
listTargets
dragContextListTargets Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [Atom] | Returns: a |
Retrieves the list of targets of the context.
Since: 2.22
manageDnd
:: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) | |
=> a |
|
-> b |
|
-> [DragAction] |
|
-> m Bool | Returns: |
Requests the drag and drop operation to be managed by context
.
When a drag and drop operation becomes managed, the DragContext
will internally handle all input and source-side EventDND
events
as required by the windowing system.
Once the drag and drop operation is managed, the drag context will emit the following signals:
- The DragContext::actionChanged signal whenever the final action to be performed by the drag and drop operation changes.
- The DragContext::dropPerformed signal after the user performs the drag and drop gesture (typically by releasing the mouse button).
- The DragContext::dndFinished signal after the drag and drop
operation concludes (after all
GdkSelection
transfers happen). - The DragContext::cancel signal if the drag and drop operation is finished but doesn't happen over an accepting destination, or is cancelled through other means.
Since: 3.20
setDevice
:: (HasCallStack, MonadIO m, IsDragContext a, IsDevice b) | |
=> a |
|
-> b |
|
-> m () |
Associates a Device
to context
, so all Drag and Drop events
for context
are emitted as if they came from this device.
setHotspot
dragContextSetHotspot Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the position of the drag window that will be kept under the cursor hotspot. Initially, the hotspot is at the top left corner of the drag window.
Since: 3.20
Signals
actionChanged
type DragContextActionChangedCallback Source #
= [DragAction] |
|
-> IO () |
A new action is being chosen for the drag and drop operation.
This signal will only be emitted if the DragContext
manages
the drag and drop operation. See dragContextManageDnd
for more information.
Since: 3.20
afterDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextActionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the actionChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dragContext #actionChanged 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.
onDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextActionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the actionChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dragContext #actionChanged callback
cancel
type DragContextCancelCallback Source #
= DragCancelReason |
|
-> IO () |
The drag and drop operation was cancelled.
This signal will only be emitted if the DragContext
manages
the drag and drop operation. See dragContextManageDnd
for more information.
Since: 3.20
afterDragContextCancel :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextCancelCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dragContext #cancel 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.
onDragContextCancel :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextCancelCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dragContext #cancel callback
dndFinished
type DragContextDndFinishedCallback = IO () Source #
The drag and drop operation was finished, the drag destination finished reading all data. The drag source can now free all miscellaneous data.
This signal will only be emitted if the DragContext
manages
the drag and drop operation. See dragContextManageDnd
for more information.
Since: 3.20
afterDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDndFinishedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the dndFinished signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dragContext #dndFinished 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.
onDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDndFinishedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the dndFinished signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dragContext #dndFinished callback
dropPerformed
type DragContextDropPerformedCallback Source #
The drag and drop operation was performed on an accepting client.
This signal will only be emitted if the DragContext
manages
the drag and drop operation. See dragContextManageDnd
for more information.
Since: 3.20
afterDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDropPerformedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the dropPerformed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dragContext #dropPerformed 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.
onDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> ((?self :: a) => DragContextDropPerformedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the dropPerformed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dragContext #dropPerformed callback