gi-gdk-3.0.11: Gdk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.DragContext

Contents

Description

 

Synopsis

Exported types

Methods

getActions

dragContextGetActions Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m [DragAction]

Returns: the DragAction flags

Determines the bitmask of actions proposed by the source if dragContextGetSuggestedAction returns DragActionAsk.

Since: 2.22

getDestWindow

dragContextGetDestWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m Window

Returns: a Window

Returns the destination windw for the DND operation.

Since: 3.0

getDevice

dragContextGetDevice Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m Device

Returns: The Device associated to context.

Returns the Device associated to the drag context.

getDragWindow

dragContextGetDragWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m (Maybe Window)

Returns: the drag window, or Nothing

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 #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m DragProtocol

Returns: the drag protocol

Returns the drag protocol thats used by this context.

Since: 3.0

getSelectedAction

dragContextGetSelectedAction Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m [DragAction]

Returns: a DragAction value

Determines the action chosen by the drag destination.

Since: 2.22

getSourceWindow

dragContextGetSourceWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m Window

Returns: a Window

Returns the Window where the DND operation started.

Since: 2.22

getSuggestedAction

dragContextGetSuggestedAction Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m [DragAction]

Returns: a DragAction value

Determines the suggested drag action of the context.

Since: 2.22

listTargets

dragContextListTargets Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> m [Atom]

Returns: a List of targets

Retrieves the list of targets of the context.

Since: 2.22

manageDnd

dragContextManageDnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) 
=> a

context: a DragContext

-> b

ipcWindow: Window to use for IPC messaging/events

-> [DragAction]

actions: the actions supported by the drag source

-> m Bool

Returns: TRUE if the drag and drop operation is managed.

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 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

dragContextSetDevice Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a, IsDevice b) 
=> a

context: a DragContext

-> b

device: a Device

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsDragContext a) 
=> a

context: a DragContext

-> Int32

hotX: x coordinate of the drag window hotspot

-> Int32

hotY: y coordinate of the drag window hotspot

-> 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

cancel

dndFinished

dropPerformed