Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype DragContext = DragContext (ManagedPtr DragContext)
- class GObject o => IsDragContext o
- toDragContext :: IsDragContext o => o -> IO DragContext
- noDragContext :: Maybe DragContext
- data DragContextGetActionsMethodInfo
- dragContextGetActions :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- data DragContextGetDestWindowMethodInfo
- dragContextGetDestWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Window
- data DragContextGetDeviceMethodInfo
- dragContextGetDevice :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Device
- data DragContextGetDragWindowMethodInfo
- dragContextGetDragWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m (Maybe Window)
- data DragContextGetProtocolMethodInfo
- dragContextGetProtocol :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m DragProtocol
- data DragContextGetSelectedActionMethodInfo
- dragContextGetSelectedAction :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- data DragContextGetSourceWindowMethodInfo
- dragContextGetSourceWindow :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Window
- data DragContextGetSuggestedActionMethodInfo
- dragContextGetSuggestedAction :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [DragAction]
- data DragContextListTargetsMethodInfo
- dragContextListTargets :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m [Atom]
- data DragContextManageDndMethodInfo
- dragContextManageDnd :: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) => a -> b -> [DragAction] -> m Bool
- data DragContextSetDeviceMethodInfo
- dragContextSetDevice :: (HasCallStack, MonadIO m, IsDragContext a, IsDevice b) => a -> b -> m ()
- data DragContextSetHotspotMethodInfo
- dragContextSetHotspot :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Int32 -> Int32 -> m ()
- type C_DragContextActionChangedCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type DragContextActionChangedCallback = [DragAction] -> IO ()
- data DragContextActionChangedSignalInfo
- afterDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
- genClosure_DragContextActionChanged :: DragContextActionChangedCallback -> IO Closure
- mk_DragContextActionChangedCallback :: C_DragContextActionChangedCallback -> IO (FunPtr C_DragContextActionChangedCallback)
- noDragContextActionChangedCallback :: Maybe DragContextActionChangedCallback
- onDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
- wrap_DragContextActionChangedCallback :: DragContextActionChangedCallback -> Ptr () -> CUInt -> Ptr () -> IO ()
- type C_DragContextCancelCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type DragContextCancelCallback = DragCancelReason -> IO ()
- data DragContextCancelSignalInfo
- afterDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
- genClosure_DragContextCancel :: DragContextCancelCallback -> IO Closure
- mk_DragContextCancelCallback :: C_DragContextCancelCallback -> IO (FunPtr C_DragContextCancelCallback)
- noDragContextCancelCallback :: Maybe DragContextCancelCallback
- onDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
- wrap_DragContextCancelCallback :: DragContextCancelCallback -> Ptr () -> CUInt -> Ptr () -> IO ()
- type C_DragContextDndFinishedCallback = Ptr () -> Ptr () -> IO ()
- type DragContextDndFinishedCallback = IO ()
- data DragContextDndFinishedSignalInfo
- afterDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
- genClosure_DragContextDndFinished :: DragContextDndFinishedCallback -> IO Closure
- mk_DragContextDndFinishedCallback :: C_DragContextDndFinishedCallback -> IO (FunPtr C_DragContextDndFinishedCallback)
- noDragContextDndFinishedCallback :: Maybe DragContextDndFinishedCallback
- onDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
- wrap_DragContextDndFinishedCallback :: DragContextDndFinishedCallback -> Ptr () -> Ptr () -> IO ()
- type C_DragContextDropPerformedCallback = Ptr () -> Int32 -> Ptr () -> IO ()
- type DragContextDropPerformedCallback = Int32 -> IO ()
- data DragContextDropPerformedSignalInfo
- afterDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
- genClosure_DragContextDropPerformed :: DragContextDropPerformedCallback -> IO Closure
- mk_DragContextDropPerformedCallback :: C_DragContextDropPerformedCallback -> IO (FunPtr C_DragContextDropPerformedCallback)
- noDragContextDropPerformedCallback :: Maybe DragContextDropPerformedCallback
- onDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
- wrap_DragContextDropPerformedCallback :: DragContextDropPerformedCallback -> Ptr () -> Int32 -> Ptr () -> IO ()
Exported types
newtype DragContext Source #
GObject DragContext Source # | |
IsObject DragContext Source # | |
IsDragContext DragContext Source # | |
((~) * info (ResolveDragContextMethod t DragContext), MethodInfo * info DragContext p) => IsLabel t (DragContext -> p) Source # | |
((~) * info (ResolveDragContextMethod t DragContext), MethodInfo * info DragContext p) => IsLabelProxy t (DragContext -> p) Source # | |
HasAttributeList * DragContext Source # | |
type AttributeList DragContext Source # | |
type SignalList DragContext Source # | |
class GObject o => IsDragContext o Source #
toDragContext :: IsDragContext o => o -> IO DragContext Source #
Methods
getActions
data DragContextGetActionsMethodInfo Source #
((~) * signature (m [DragAction]), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetActionsMethodInfo a signature Source # | |
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
data DragContextGetDestWindowMethodInfo Source #
((~) * signature (m Window), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetDestWindowMethodInfo a signature Source # | |
dragContextGetDestWindow Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Window | Returns: a |
Returns the destination windw for the DND operation.
Since: 3.0
getDevice
data DragContextGetDeviceMethodInfo Source #
((~) * signature (m Device), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetDeviceMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Device | Returns: The |
Returns the Device
associated to the drag context.
getDragWindow
data DragContextGetDragWindowMethodInfo Source #
((~) * signature (m (Maybe Window)), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetDragWindowMethodInfo a signature Source # | |
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
data DragContextGetProtocolMethodInfo Source #
((~) * signature (m DragProtocol), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetProtocolMethodInfo a signature Source # | |
dragContextGetProtocol Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m DragProtocol | Returns: the drag protocol |
Returns the drag protocol thats used by this context.
Since: 3.0
getSelectedAction
data DragContextGetSelectedActionMethodInfo Source #
((~) * signature (m [DragAction]), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetSelectedActionMethodInfo a signature Source # | |
dragContextGetSelectedAction Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [DragAction] | Returns: a |
Determines the action chosen by the drag destination.
Since: 2.22
getSourceWindow
data DragContextGetSourceWindowMethodInfo Source #
((~) * signature (m Window), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetSourceWindowMethodInfo a signature Source # | |
dragContextGetSourceWindow Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Window | Returns: a |
Returns the Window
where the DND operation started.
Since: 2.22
getSuggestedAction
data DragContextGetSuggestedActionMethodInfo Source #
((~) * signature (m [DragAction]), MonadIO m, IsDragContext a) => MethodInfo * DragContextGetSuggestedActionMethodInfo a signature Source # | |
dragContextGetSuggestedAction Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [DragAction] | Returns: a |
Determines the suggested drag action of the context.
Since: 2.22
listTargets
data DragContextListTargetsMethodInfo Source #
((~) * signature (m [Atom]), MonadIO m, IsDragContext a) => MethodInfo * DragContextListTargetsMethodInfo a signature Source # | |
dragContextListTargets Source #
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m [Atom] | Returns: a |
Retrieves the list of targets of the context.
Since: 2.22
manageDnd
data DragContextManageDndMethodInfo Source #
((~) * signature (b -> [DragAction] -> m Bool), MonadIO m, IsDragContext a, IsWindow b) => MethodInfo * DragContextManageDndMethodInfo a signature Source # | |
:: (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
::action-changed
signal whenever the final action to be performed by the drag and drop operation changes. - The
DragContext
::drop-performed
signal after the user performs the drag and drop gesture (typically by releasing the mouse button). - The
DragContext
::dnd-finished
signal after the drag and drop operation concludes (after allGdkSelection
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
data DragContextSetDeviceMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsDragContext a, IsDevice b) => MethodInfo * DragContextSetDeviceMethodInfo a signature Source # | |
:: (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
data DragContextSetHotspotMethodInfo Source #
((~) * signature (Int32 -> Int32 -> m ()), MonadIO m, IsDragContext a) => MethodInfo * DragContextSetHotspotMethodInfo a signature Source # | |
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 = [DragAction] -> IO () Source #
afterDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId Source #
mk_DragContextActionChangedCallback :: C_DragContextActionChangedCallback -> IO (FunPtr C_DragContextActionChangedCallback) Source #
onDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId Source #
wrap_DragContextActionChangedCallback :: DragContextActionChangedCallback -> Ptr () -> CUInt -> Ptr () -> IO () Source #
cancel
type DragContextCancelCallback = DragCancelReason -> IO () Source #
afterDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId Source #
mk_DragContextCancelCallback :: C_DragContextCancelCallback -> IO (FunPtr C_DragContextCancelCallback) Source #
onDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId Source #
wrap_DragContextCancelCallback :: DragContextCancelCallback -> Ptr () -> CUInt -> Ptr () -> IO () Source #
dndFinished
type DragContextDndFinishedCallback = IO () Source #
afterDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId Source #
mk_DragContextDndFinishedCallback :: C_DragContextDndFinishedCallback -> IO (FunPtr C_DragContextDndFinishedCallback) Source #
onDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId Source #
wrap_DragContextDndFinishedCallback :: DragContextDndFinishedCallback -> Ptr () -> Ptr () -> IO () Source #
dropPerformed
type DragContextDropPerformedCallback = Int32 -> IO () Source #
afterDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId Source #
mk_DragContextDropPerformedCallback :: C_DragContextDropPerformedCallback -> IO (FunPtr C_DragContextDropPerformedCallback) Source #
onDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId Source #
wrap_DragContextDropPerformedCallback :: DragContextDropPerformedCallback -> Ptr () -> Int32 -> Ptr () -> IO () Source #