package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Drag

type t = [ `drag | `object_ ] Gobject.obj
val set_hotspot : t -> int -> int -> unit

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.

val get_surface : t -> [ `surface | `object_ ] Gobject.obj

Returns the `GdkSurface` where the drag originates.

val get_selected_action : t -> Gdk_enums.dragaction

Determines the action chosen by the drag destination.

val get_formats : t -> [ `content_formats ] Gobject.obj

Retrieves the formats supported by this `GdkDrag` object.

val get_drag_surface : t -> [ `surface | `object_ ] Gobject.obj option

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.

val get_display : t -> [ `display | `object_ ] Gobject.obj

Gets the `GdkDisplay` that the drag object was created for.

val get_device : t -> [ `device | `object_ ] Gobject.obj

Returns the `GdkDevice` associated to the `GdkDrag` object.

val get_content : t -> [ `content_provider | `object_ ] Gobject.obj

Returns the `GdkContentProvider` associated to the `GdkDrag` object.

val get_actions : t -> Gdk_enums.dragaction

Determines the bitmask of possible actions proposed by the source.

val drop_done : t -> bool -> unit

Informs GDK that the drop ended.

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 `GdkDrag` will only take the first method@Gdk.Drag.drop_done call as effective, if this function is called multiple times, all subsequent calls will be ignored.

val on_cancel : ?after:bool -> t -> callback:(reason:Gdk_enums.dragcancelreason -> unit) -> Gobject.Signal.handler_id
val on_dnd_finished : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_drop_performed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id