package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Drop/index.html

Module Wrappers.Drop

type t = [ `drop | `object_ ] Gobject.obj
val status : t -> Gdk_enums.dragaction -> Gdk_enums.dragaction -> unit

Selects all actions that are potentially supported by the destination.

When calling this function, do not restrict the passed in actions to the ones provided by method@Gdk.Drop.get_actions. Those actions may change in the future, even depending on the actions you provide here.

The @preferred action is a hint to the drag-and-drop mechanism about which action to use when multiple actions are possible.

This function should be called by drag destinations in response to %GDK_DRAG_ENTER or %GDK_DRAG_MOTION events. If the destination does not yet know the exact actions it supports, it should set any possible actions first and then later call this function again.

Finishes an async drop read.

See method@Gdk.Drop.read_value_async.

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

Returns the `GdkSurface` performing the drop.

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

Returns the `GdkContentFormats` that the drop offers the data to be read in.

val get_drag : t -> [ `drag | `object_ ] Gobject.obj option

If this is an in-app drag-and-drop operation, returns the `GdkDrag` that corresponds to this drop.

If it is not, %NULL is returned.

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

Gets the `GdkDisplay` that @self was created for.

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

Returns the `GdkDevice` performing the drop.

val get_actions : t -> Gdk_enums.dragaction

Returns the possible actions for this `GdkDrop`.

If this value contains multiple actions - i.e. func@Gdk.DragAction.is_unique returns %FALSE for the result - method@Gdk.Drop.finish must choose the action to use when accepting the drop. This will only happen if you passed %GDK_ACTION_ASK as one of the possible actions in method@Gdk.Drop.status. %GDK_ACTION_ASK itself will not be included in the actions returned by this function.

This value may change over the lifetime of the class@Gdk.Drop both as a response to source side actions as well as to calls to method@Gdk.Drop.status or method@Gdk.Drop.finish. The source side will not change this value anymore once a drop has started.

val finish : t -> Gdk_enums.dragaction -> unit

Ends the drag operation after a drop.

The @action must be a single action selected from the actions available via method@Gdk.Drop.get_actions.