Skip to main content

Type Alias: GtkDropTargetAsyncProps

GtkDropTargetAsyncProps = EventControllerBaseProps & object

Defined in: generated/jsx.ts:10128

Props for the GtkDropTargetAsync controller element.

Type Declaration

NameTypeDescriptionDefined in
actions?Gdk.DragActionThe GdkDragActions that this drop target supports.generated/jsx.ts:10130
formats?Gdk.ContentFormats | nullThe GdkContentFormats that determines the supported data formats.generated/jsx.ts:10132
onAccept()?(drop, self) => boolean | nullEmitted on the drop site when a drop operation is about to begin. If the drop is not accepted, %FALSE will be returned and the drop target will ignore the drop. If %TRUE is returned, the drop is accepted for now but may be rejected later via a call to DropTargetAsync.reject_drop or ultimately by returning %FALSE from a DropTargetAsync.:drop handler. The default handler for this signal decides whether to accept the drop based on the formats provided by the drop. If the decision whether the drop will be accepted or rejected needs further processing, such as inspecting the data, this function should return %TRUE and proceed as is drop was accepted and if it decides to reject the drop later, it should call DropTargetAsync.reject_drop.generated/jsx.ts:10150
onDragEnter()?(drop, x, y, self) => Gdk.DragAction | nullEmitted on the drop site when the pointer enters the widget. It can be used to set up custom highlighting.generated/jsx.ts:10156
onDragLeave()?(drop, self) => void | nullEmitted on the drop site when the pointer leaves the widget. Its main purpose it to undo things done in GtkDropTargetAsync::drag-enter.generated/jsx.ts:10163
onDragMotion()?(drop, x, y, self) => Gdk.DragAction | nullEmitted while the pointer is moving over the drop target.generated/jsx.ts:10165
onDrop()?(drop, x, y, self) => boolean | nullEmitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the pointer position is in a drop zone or not. If it is not in a drop zone, it returns %FALSE and no further processing is necessary. Otherwise, the handler returns %TRUE. In this case, this handler will accept the drop. The handler must ensure that GdkDrop.finish is called to let the source know that the drop is done. The call to GdkDrop.finish must only be done when all data has been received. To receive the data, use one of the read functions provided by GdkDrop such as GdkDrop.read_async or GdkDrop.read_value_async.generated/jsx.ts:10182
ref?Ref<Gtk.DropTargetAsync>-generated/jsx.ts:10183