Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
The GdkDrag struct contains only private fields and should not be accessed directly.
Synopsis
- newtype Drag = Drag (ManagedPtr Drag)
- class (GObject o, IsDescendantOf Drag o) => IsDrag o
- toDrag :: (MonadIO m, IsDrag o) => o -> m Drag
- noDrag :: Maybe Drag
- dragBegin :: (HasCallStack, MonadIO m, IsSurface a, IsDevice b, IsContentProvider c) => a -> b -> c -> [DragAction] -> Int32 -> Int32 -> m (Maybe Drag)
- dragDropDone :: (HasCallStack, MonadIO m, IsDrag a) => a -> Bool -> m ()
- dragGetActions :: (HasCallStack, MonadIO m, IsDrag a) => a -> m [DragAction]
- dragGetDevice :: (HasCallStack, MonadIO m, IsDrag a) => a -> m Device
- dragGetDisplay :: (HasCallStack, MonadIO m, IsDrag a) => a -> m Display
- dragGetDragSurface :: (HasCallStack, MonadIO m, IsDrag a) => a -> m (Maybe Surface)
- dragGetFormats :: (HasCallStack, MonadIO m, IsDrag a) => a -> m ContentFormats
- dragGetSelectedAction :: (HasCallStack, MonadIO m, IsDrag a) => a -> m [DragAction]
- dragSetHotspot :: (HasCallStack, MonadIO m, IsDrag a) => a -> Int32 -> Int32 -> m ()
- constructDragActions :: IsDrag o => [DragAction] -> IO (GValueConstruct o)
- getDragActions :: (MonadIO m, IsDrag o) => o -> m [DragAction]
- setDragActions :: (MonadIO m, IsDrag o) => o -> [DragAction] -> m ()
- constructDragContent :: (IsDrag o, IsContentProvider a) => a -> IO (GValueConstruct o)
- getDragContent :: (MonadIO m, IsDrag o) => o -> m (Maybe ContentProvider)
- constructDragDevice :: (IsDrag o, IsDevice a) => a -> IO (GValueConstruct o)
- getDragDevice :: (MonadIO m, IsDrag o) => o -> m Device
- getDragDisplay :: (MonadIO m, IsDrag o) => o -> m Display
- constructDragFormats :: IsDrag o => ContentFormats -> IO (GValueConstruct o)
- getDragFormats :: (MonadIO m, IsDrag o) => o -> m ContentFormats
- constructDragSelectedAction :: IsDrag o => [DragAction] -> IO (GValueConstruct o)
- getDragSelectedAction :: (MonadIO m, IsDrag o) => o -> m [DragAction]
- setDragSelectedAction :: (MonadIO m, IsDrag o) => o -> [DragAction] -> m ()
- constructDragSurface :: (IsDrag o, IsSurface a) => a -> IO (GValueConstruct o)
- getDragSurface :: (MonadIO m, IsDrag o) => o -> m (Maybe Surface)
- type C_DragCancelCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type DragCancelCallback = DragCancelReason -> IO ()
- afterDragCancel :: (IsDrag a, MonadIO m) => a -> DragCancelCallback -> m SignalHandlerId
- genClosure_DragCancel :: MonadIO m => DragCancelCallback -> m (GClosure C_DragCancelCallback)
- mk_DragCancelCallback :: C_DragCancelCallback -> IO (FunPtr C_DragCancelCallback)
- noDragCancelCallback :: Maybe DragCancelCallback
- onDragCancel :: (IsDrag a, MonadIO m) => a -> DragCancelCallback -> m SignalHandlerId
- wrap_DragCancelCallback :: DragCancelCallback -> C_DragCancelCallback
- type C_DragDndFinishedCallback = Ptr () -> Ptr () -> IO ()
- type DragDndFinishedCallback = IO ()
- afterDragDndFinished :: (IsDrag a, MonadIO m) => a -> DragDndFinishedCallback -> m SignalHandlerId
- genClosure_DragDndFinished :: MonadIO m => DragDndFinishedCallback -> m (GClosure C_DragDndFinishedCallback)
- mk_DragDndFinishedCallback :: C_DragDndFinishedCallback -> IO (FunPtr C_DragDndFinishedCallback)
- noDragDndFinishedCallback :: Maybe DragDndFinishedCallback
- onDragDndFinished :: (IsDrag a, MonadIO m) => a -> DragDndFinishedCallback -> m SignalHandlerId
- wrap_DragDndFinishedCallback :: DragDndFinishedCallback -> C_DragDndFinishedCallback
- type C_DragDropPerformedCallback = Ptr () -> Ptr () -> IO ()
- type DragDropPerformedCallback = IO ()
- afterDragDropPerformed :: (IsDrag a, MonadIO m) => a -> DragDropPerformedCallback -> m SignalHandlerId
- genClosure_DragDropPerformed :: MonadIO m => DragDropPerformedCallback -> m (GClosure C_DragDropPerformedCallback)
- mk_DragDropPerformedCallback :: C_DragDropPerformedCallback -> IO (FunPtr C_DragDropPerformedCallback)
- noDragDropPerformedCallback :: Maybe DragDropPerformedCallback
- onDragDropPerformed :: (IsDrag a, MonadIO m) => a -> DragDropPerformedCallback -> m SignalHandlerId
- wrap_DragDropPerformedCallback :: DragDropPerformedCallback -> C_DragDropPerformedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Drag Source # | |
GObject Drag Source # | |
Defined in GI.Gdk.Objects.Drag gobjectType :: IO GType # | |
IsGValue Drag Source # | Convert |
HasParentTypes Drag Source # | |
Defined in GI.Gdk.Objects.Drag | |
type ParentTypes Drag Source # | |
Defined in GI.Gdk.Objects.Drag |
class (GObject o, IsDescendantOf Drag o) => IsDrag o Source #
Instances
(GObject o, IsDescendantOf Drag o) => IsDrag o Source # | |
Defined in GI.Gdk.Objects.Drag |
Methods
Overloaded methods
begin
:: (HasCallStack, MonadIO m, IsSurface a, IsDevice b, IsContentProvider c) | |
=> a |
|
-> b |
|
-> c |
|
-> [DragAction] |
|
-> Int32 |
|
-> Int32 |
|
-> m (Maybe Drag) |
Starts a drag and creates a new drag context for it.
This function is called by the drag source.
dropDone
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> Bool |
|
-> m () |
Inform GDK if the drop ended successfully. Passing False
for success
may trigger a drag cancellation animation.
This function is called by the drag source, and should
be the last call before dropping the reference to the
drag
.
The Drag
will only take the first dragDropDone
call as effective, if this function is called multiple times,
all subsequent calls will be ignored.
getActions
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> m [DragAction] | Returns: the |
Determines the bitmask of possible actions proposed by the source.
getDevice
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> m Device | Returns: The |
Returns the Device
associated to the GdkDrag object.
getDisplay
Gets the Display
that the drag object was created for.
getDragSurface
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> m (Maybe Surface) | Returns: the drag surface, or |
Returns the surface on which the drag icon should be rendered
during the drag operation. Note that the surface may not be
available until the drag operation has begun. GDK will move
the surface in accordance with the ongoing drag operation.
The surface is owned by drag
and will be destroyed when
the drag operation is over.
getFormats
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> m ContentFormats | Returns: a |
Retrieves the formats supported by this GdkDrag object.
getSelectedAction
dragGetSelectedAction Source #
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> m [DragAction] | Returns: a |
Determines the action chosen by the drag destination.
setHotspot
:: (HasCallStack, MonadIO m, IsDrag a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the position of the drag surface that will be kept under the cursor hotspot. Initially, the hotspot is at the top left corner of the drag surface.
Properties
actions
No description available in the introspection data.
constructDragActions :: IsDrag o => [DragAction] -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “actions
” property. This is rarely needed directly, but it is used by new
.
getDragActions :: (MonadIO m, IsDrag o) => o -> m [DragAction] Source #
Get the value of the “actions
” property.
When overloading is enabled, this is equivalent to
get
drag #actions
setDragActions :: (MonadIO m, IsDrag o) => o -> [DragAction] -> m () Source #
Set the value of the “actions
” property.
When overloading is enabled, this is equivalent to
set
drag [ #actions:=
value ]
content
The ContentProvider
.
constructDragContent :: (IsDrag o, IsContentProvider a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “content
” property. This is rarely needed directly, but it is used by new
.
getDragContent :: (MonadIO m, IsDrag o) => o -> m (Maybe ContentProvider) Source #
Get the value of the “content
” property.
When overloading is enabled, this is equivalent to
get
drag #content
device
The Device
that is performing the drag.
constructDragDevice :: (IsDrag o, IsDevice a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “device
” property. This is rarely needed directly, but it is used by new
.
getDragDevice :: (MonadIO m, IsDrag o) => o -> m Device Source #
Get the value of the “device
” property.
When overloading is enabled, this is equivalent to
get
drag #device
display
The Display
that the drag belongs to.
getDragDisplay :: (MonadIO m, IsDrag o) => o -> m Display Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
drag #display
formats
The possible formats that the drag can provide its data in.
constructDragFormats :: IsDrag o => ContentFormats -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “formats
” property. This is rarely needed directly, but it is used by new
.
getDragFormats :: (MonadIO m, IsDrag o) => o -> m ContentFormats Source #
Get the value of the “formats
” property.
When overloading is enabled, this is equivalent to
get
drag #formats
selectedAction
No description available in the introspection data.
constructDragSelectedAction :: IsDrag o => [DragAction] -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “selected-action
” property. This is rarely needed directly, but it is used by new
.
getDragSelectedAction :: (MonadIO m, IsDrag o) => o -> m [DragAction] Source #
Get the value of the “selected-action
” property.
When overloading is enabled, this is equivalent to
get
drag #selectedAction
setDragSelectedAction :: (MonadIO m, IsDrag o) => o -> [DragAction] -> m () Source #
Set the value of the “selected-action
” property.
When overloading is enabled, this is equivalent to
set
drag [ #selectedAction:=
value ]
surface
No description available in the introspection data.
constructDragSurface :: (IsDrag o, IsSurface a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “surface
” property. This is rarely needed directly, but it is used by new
.
getDragSurface :: (MonadIO m, IsDrag o) => o -> m (Maybe Surface) Source #
Get the value of the “surface
” property.
When overloading is enabled, this is equivalent to
get
drag #surface
Signals
cancel
type C_DragCancelCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DragCancelCallback Source #
= DragCancelReason |
|
-> IO () |
The drag operation was cancelled.
afterDragCancel :: (IsDrag a, MonadIO m) => a -> DragCancelCallback -> 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
drag #cancel callback
genClosure_DragCancel :: MonadIO m => DragCancelCallback -> m (GClosure C_DragCancelCallback) Source #
Wrap the callback into a GClosure
.
mk_DragCancelCallback :: C_DragCancelCallback -> IO (FunPtr C_DragCancelCallback) Source #
Generate a function pointer callable from C code, from a C_DragCancelCallback
.
noDragCancelCallback :: Maybe DragCancelCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DragCancelCallback
onDragCancel :: (IsDrag a, MonadIO m) => a -> DragCancelCallback -> 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
drag #cancel callback
wrap_DragCancelCallback :: DragCancelCallback -> C_DragCancelCallback Source #
Wrap a DragCancelCallback
into a C_DragCancelCallback
.
dndFinished
type C_DragDndFinishedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DragDndFinishedCallback = IO () Source #
The drag operation was finished, the destination finished reading all data. The drag object can now free all miscellaneous data.
afterDragDndFinished :: (IsDrag a, MonadIO m) => a -> DragDndFinishedCallback -> 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
drag #dndFinished callback
genClosure_DragDndFinished :: MonadIO m => DragDndFinishedCallback -> m (GClosure C_DragDndFinishedCallback) Source #
Wrap the callback into a GClosure
.
mk_DragDndFinishedCallback :: C_DragDndFinishedCallback -> IO (FunPtr C_DragDndFinishedCallback) Source #
Generate a function pointer callable from C code, from a C_DragDndFinishedCallback
.
noDragDndFinishedCallback :: Maybe DragDndFinishedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DragDndFinishedCallback
onDragDndFinished :: (IsDrag a, MonadIO m) => a -> DragDndFinishedCallback -> 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
drag #dndFinished callback
wrap_DragDndFinishedCallback :: DragDndFinishedCallback -> C_DragDndFinishedCallback Source #
Wrap a DragDndFinishedCallback
into a C_DragDndFinishedCallback
.
dropPerformed
type C_DragDropPerformedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DragDropPerformedCallback = IO () Source #
The drag operation was performed on an accepting client.
afterDragDropPerformed :: (IsDrag a, MonadIO m) => a -> DragDropPerformedCallback -> 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
drag #dropPerformed callback
genClosure_DragDropPerformed :: MonadIO m => DragDropPerformedCallback -> m (GClosure C_DragDropPerformedCallback) Source #
Wrap the callback into a GClosure
.
mk_DragDropPerformedCallback :: C_DragDropPerformedCallback -> IO (FunPtr C_DragDropPerformedCallback) Source #
Generate a function pointer callable from C code, from a C_DragDropPerformedCallback
.
noDragDropPerformedCallback :: Maybe DragDropPerformedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DragDropPerformedCallback
onDragDropPerformed :: (IsDrag a, MonadIO m) => a -> DragDropPerformedCallback -> 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
drag #dropPerformed callback