DropTargetProtocol
public protocol DropTargetProtocol : EventControllerProtocol
GtkDropTarget
is an event controller to receive Drag-and-Drop operations.
The most basic way to use a GtkDropTarget
to receive drops on a
widget is to create it via [ctorGtk.DropTarget.new
], passing in the
GType
of the data you want to receive and connect to the
[signalGtk.DropTarget::drop
] signal to receive the data:
static gboolean
on_drop (GtkDropTarget *target,
const GValue *value,
double x,
double y,
gpointer data)
{
MyWidget *self = data;
// Call the appropriate setter depending on the type of data
// that we received
if (G_VALUE_HOLDS (value, G_TYPE_FILE))
my_widget_set_file (self, g_value_get_object (value));
else if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF))
my_widget_set_pixbuf (self, g_value_get_object (value));
else
return FALSE;
return TRUE;
}
static void
my_widget_init (MyWidget *self)
{
GtkDropTarget *target =
gtk_drop_target_new (G_TYPE_INVALID, GDK_ACTION_COPY);
// This widget accepts two types of drop types: GFile objects
// and GdkPixbuf objects
gtk_drop_target_set_gtypes (target, (GTypes [2]) {
G_TYPE_FILE,
GDK_TYPE_PIXBUF,
}, 2);
gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (target));
}
GtkDropTarget
supports more options, such as:
- rejecting potential drops via the [signal
Gtk.DropTarget::accept
] signal and the [methodGtk.DropTarget.reject
] function to let other drop targets handle the drop - tracking an ongoing drag operation before the drop via the
[signal
Gtk.DropTarget::enter
], [signalGtk.DropTarget::motion
] and [signalGtk.DropTarget::leave
] signals - configuring how to receive data by setting the
[property
Gtk.DropTarget:preload
] property and listening for its availability via the [propertyGtk.DropTarget:value
] property
However, GtkDropTarget
is ultimately modeled in a synchronous way
and only supports data transferred via GType
. If you want full control
over an ongoing drop, the [classGtk.DropTargetAsync
] object gives you
this ability.
While a pointer is dragged over the drop target’s widget and the drop
has not been rejected, that widget will receive the
GTK_STATE_FLAG_DROP_ACTIVE
state, which can be used to style the widget.
If you are not interested in receiving the drop, but just want to update
UI state during a Drag-and-Drop operation (e.g. switching tabs), you can
use [classGtk.DropControllerMotion
].
The DropTargetProtocol
protocol exposes the methods and properties of an underlying GtkDropTarget
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see DropTarget
.
Alternatively, use DropTargetRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkDropTarget
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
drop_target_ptr
Default implementationTyped pointer to the underlying
GtkDropTarget
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkDropTarget
instance.Declaration
Swift
var drop_target_ptr: UnsafeMutablePointer<GtkDropTarget>! { get }
-
Required Initialiser for types conforming to
DropTargetProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
DropTargetPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: DropTargetPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a DropTarget property
Declaration
Swift
@inlinable func get(property: DropTargetPropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a DropTarget property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: DropTargetPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
connect(signal:
Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
DropTargetSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: DropTargetSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
DropTargetSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: DropTargetSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onAccept(flags:
Extension methodhandler: ) Emitted 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. Iftrue
is returned, the drop is accepted for now but may be rejected later via a call to [methodGtk.DropTarget.reject
] or ultimately by returningfalse
from a [signalGtk.DropTarget::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 depends on the data, this function should return
true
, the [propertyGtk.DropTarget:preload
] property should be set and the value should be inspected via thenotify:value
signal, calling [methodGtk.DropTarget.reject
] if required.Note
This represents the underlyingaccept
signalDeclaration
Swift
@discardableResult @inlinable func onAccept(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ drop: Gdk.DropRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
drop
the
GdkDrop
handler
true
ifdrop
is accepted Run the given callback whenever theaccept
signal is emitted -
acceptSignal
Extension methodTyped
accept
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var acceptSignal: DropTargetSignalName { get }
-
onDrop(flags:
Extension methodhandler: ) Emitted 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 is responsible for using the givenvalue
and performing the drop operation.Note
This represents the underlyingdrop
signalDeclaration
Swift
@discardableResult @inlinable func onDrop(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ value: GLibObject.ValueRef, _ x: Double, _ y: Double) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
value
the
GValue
being droppedx
the x coordinate of the current pointer position
y
the y coordinate of the current pointer position
handler
whether the drop was accepted at the given pointer position Run the given callback whenever the
drop
signal is emitted -
dropSignal
Extension methodTyped
drop
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var dropSignal: DropTargetSignalName { get }
-
onEnter(flags:
Extension methodhandler: ) Emitted on the drop site when the pointer enters the widget.
It can be used to set up custom highlighting.
Note
This represents the underlyingenter
signalDeclaration
Swift
@discardableResult @inlinable func onEnter(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ x: Double, _ y: Double) -> Gdk.DragAction) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
x
the x coordinate of the current pointer position
y
the y coordinate of the current pointer position
handler
Preferred action for this drag operation or 0 if dropping is not supported at the current
x
,y
location. Run the given callback whenever theenter
signal is emitted -
enterSignal
Extension methodTyped
enter
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var enterSignal: DropTargetSignalName { get }
-
onLeave(flags:
Extension methodhandler: ) Emitted on the drop site when the pointer leaves the widget.
Its main purpose it to undo things done in [signal
Gtk.DropTarget::enter
].Note
This represents the underlyingleave
signalDeclaration
Swift
@discardableResult @inlinable func onLeave(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
leave
signal is emitted -
leaveSignal
Extension methodTyped
leave
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var leaveSignal: DropTargetSignalName { get }
-
onMotion(flags:
Extension methodhandler: ) Emitted while the pointer is moving over the drop target.
Note
This represents the underlyingmotion
signalDeclaration
Swift
@discardableResult @inlinable func onMotion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ x: Double, _ y: Double) -> Gdk.DragAction) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
x
the x coordinate of the current pointer position
y
the y coordinate of the current pointer position
handler
Preferred action for this drag operation or 0 if dropping is not supported at the current
x
,y
location. Run the given callback whenever themotion
signal is emitted -
motionSignal
Extension methodTyped
motion
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var motionSignal: DropTargetSignalName { get }
-
onNotifyActions(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::actions
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyActions(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyActions
signal is emitted -
notifyActionsSignal
Extension methodTyped
notify::actions
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyActionsSignal: DropTargetSignalName { get }
-
onNotifyCurrentDrop(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::current-drop
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCurrentDrop(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCurrentDrop
signal is emitted -
notifyCurrentDropSignal
Extension methodTyped
notify::current-drop
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyCurrentDropSignal: DropTargetSignalName { get }
-
onNotifyDrop(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::drop
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyDrop(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyDrop
signal is emitted -
notifyDropSignal
Extension methodTyped
notify::drop
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyDropSignal: DropTargetSignalName { get }
-
onNotifyFormats(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::formats
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyFormats(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyFormats
signal is emitted -
notifyFormatsSignal
Extension methodTyped
notify::formats
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyFormatsSignal: DropTargetSignalName { get }
-
onNotifyPreload(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::preload
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPreload(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPreload
signal is emitted -
notifyPreloadSignal
Extension methodTyped
notify::preload
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPreloadSignal: DropTargetSignalName { get }
-
onNotifyValue(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::value
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyValue(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: DropTargetRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyValue
signal is emitted -
notifyValueSignal
Extension methodTyped
notify::value
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyValueSignal: DropTargetSignalName { get }
-
getActions()
Extension methodGets the actions that this drop target supports.
Declaration
Swift
@inlinable func getActions() -> Gdk.DragAction
-
getCurrentDrop()
Extension methodGets the currently handled drop operation.
If no drop operation is going on,
nil
is returned.Declaration
Swift
@inlinable func getCurrentDrop() -> Gdk.DropRef!
-
getDrop()
Extension methodGets the currently handled drop operation.
If no drop operation is going on,
nil
is returned.get_drop is deprecated: Use [method@Gtk.DropTarget.get_current_drop] instead
Declaration
Swift
@available(*, deprecated) @inlinable func getDrop() -> Gdk.DropRef!
-
getFormats()
Extension methodGets the data formats that this drop target accepts.
If the result is
nil
, all formats are expected to be supported.Declaration
Swift
@inlinable func getFormats() -> Gdk.ContentFormatsRef!
-
getGtypes(nTypes:
Extension method) Gets the list of supported
GType
s that can be dropped on the target.If no types have been set,
NULL
will be returned.Declaration
Swift
@inlinable func getGtypes(nTypes: UnsafeMutablePointer<gsize>! = nil) -> UnsafePointer<GType>!
-
getPreload()
Extension methodGets whether data should be preloaded on hover.
Declaration
Swift
@inlinable func getPreload() -> Bool
-
getValue()
Extension methodGets the current drop data, as a
GValue
.Declaration
Swift
@inlinable func getValue() -> GLibObject.ValueRef!
-
reject()
Extension methodRejects the ongoing drop operation.
If no drop operation is ongoing, i.e when [property
Gtk.DropTarget:current-drop
] isnil
, this function does nothing.This function should be used when delaying the decision on whether to accept a drag or not until after reading the data.
Declaration
Swift
@inlinable func reject()
-
set(actions:
Extension method) Sets the actions that this drop target supports.
Declaration
Swift
@inlinable func set(actions: Gdk.DragAction)
-
setGtypes(types:
Extension methodnTypes: ) Sets the supported
GTypes
for this drop target.Declaration
Swift
@inlinable func setGtypes(types: UnsafeMutablePointer<GType>! = nil, nTypes: Int)
-
set(preload:
Extension method) Sets whether data should be preloaded on hover.
Declaration
Swift
@inlinable func set(preload: Bool)
-
actions
Extension methodThe
GdkDragActions
that this drop target supports.Declaration
Swift
@inlinable var actions: Gdk.DragAction { get nonmutating set }
-
currentDrop
Extension methodGets the currently handled drop operation.
If no drop operation is going on,
nil
is returned.Declaration
Swift
@inlinable var currentDrop: Gdk.DropRef! { get }
-
drop
Extension methodThe
GdkDrop
that is currently being performed.drop is deprecated: Use [property@Gtk.DropTarget:current-drop] instead
Declaration
Swift
@inlinable var drop: Gdk.DropRef! { get }
-
formats
Extension methodThe
GdkContentFormats
that determine the supported data formats.Declaration
Swift
@inlinable var formats: Gdk.ContentFormatsRef! { get }
-
preload
Extension methodWhether the drop data should be preloaded when the pointer is only hovering over the widget but has not been released.
Setting this property allows finer grained reaction to an ongoing drop at the cost of loading more data.
The default value for this property is
false
to avoid downloading huge amounts of data by accident.For example, if somebody drags a full document of gigabytes of text from a text editor across a widget with a preloading drop target, this data will be downloaded, even if the data is ultimately dropped elsewhere.
For a lot of data formats, the amount of data is very small (like
GDK_TYPE_RGBA
), so enabling this property does not hurt at all. And for local-only Drag-and-Drop operations, no data transfer is done, so enabling it there is free.Declaration
Swift
@inlinable var preload: Bool { get nonmutating set }
-
value
Extension methodThe value for this drop operation.
This is
nil
if the data has not been loaded yet or no drop operation is going on.Data may be available before the [signal
Gtk.DropTarget::drop
] signal gets emitted - for example when the [propertyGtk.DropTarget:preload
] property is set. You can use thenotify
signal to be notified of available data.Declaration
Swift
@inlinable var value: GLibObject.ValueRef! { get }