Drop
Object Hierarchy:
Gdk.Drop
Gdk.Drop
Gdk.Drop
GLib.Object
GLib.Object
GLib.Object->Gdk.Drop
Description:
[ CCode ( type_id = "gdk_drop_get_type ()" ) ]public abstract class Drop : Object
The `GdkDrop` object represents the target of an ongoing DND operation.
Possible drop sites get informed about the status of the ongoing drag operation with events of type
gdk_drag_enter , gdk_drag_leave , gdk_drag_motion and
gdk_drop_start . The `GdkDrop` object can be obtained from these [[email protected] ] types using [
[email protected] _drop].
The actual data transfer is initiated from the target side via an async read, using one of the `GdkDrop` methods for this purpose: [
[email protected] _async] or [[email protected] _value_async].
GTK provides a higher level abstraction based on top of these functions, and so they are not normally needed in GTK applications. See the
"Drag and Drop" section of the GTK documentation for more information.
Content:
Properties:
public DragAction actions { get ; construct ; }
The possible actions for this drop
public Device device { get ; construct ; }
The `GdkDevice` performing the drop
public Display display { get ; }
The `GdkDisplay` that the drop belongs to.
public Drag drag { get ; construct ; }
The `GdkDrag` that initiated this drop
public ContentFormats formats { get ; construct ; }
The possible formats that the drop can provide its data in.
public Surface surface { get ; construct ; }
The `GdkSurface` the drop happens on
Creation methods:
Methods:
public void finish (DragAction action)
Ends the drag operation after a drop.
public DragAction get_actions ()
Returns the possible actions for this `GdkDrop`.
public unowned Device get_device ()
Returns the `GdkDevice` performing the drop.
public unowned Display get_display ()
Gets the `GdkDisplay` that this was
created for.
public unowned Drag ? get_drag ()
If this is an in-app drag-and-drop operation, returns the `GdkDrag`
that corresponds to this drop.
public unowned ContentFormats get_formats ()
Returns the `GdkContentFormats` that the drop offers the data to be
read in.
public unowned Surface get_surface ()
Returns the `GdkSurface` performing the drop.
public async InputStream ? read_async (string [] mime_types, int io_priority, Cancellable ? cancellable, out string out_mime_type) throws Error
Asynchronously read the dropped data from a `GdkDrop` in a format that
complies with one of the mime types.
public async unowned Value ? read_value_async (Type type, int io_priority, Cancellable ? cancellable) throws Error
Asynchronously request the drag operation's contents converted to the
given type
.
public void status (DragAction actions, DragAction preferred)
Selects all actions that are potentially supported by the destination.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref