TargetList

A [GtkTargetList-struct|GtkTargetList-struct] is a reference counted list of GtkTargetPair and should be treated as opaque.

Constructors

this
this(GtkTargetList* gtkTargetList, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(TargetEntry[] targets)

Creates a new gtk.TargetList from an array of gtk.TargetEntry

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

add
void add(GdkAtom target, uint flags, uint info)

Appends another target to a gtk.TargetList

addImageTargets
void addImageTargets(uint info, bool writable)

Appends the image targets supported by gtk.SelectionData to the target list. All targets are added with the same info.

addRichTextTargets
void addRichTextTargets(uint info, bool deserializable, TextBuffer buffer)

Appends the rich text targets registered with TextBuffer.registerSerializeFormat or TextBuffer.registerDeserializeFormat to the target list. All targets are added with the same info.

addTable
void addTable(TargetEntry[] targets)

Prepends a table of gtk.TargetEntry to a target list.

addTextTargets
void addTextTargets(uint info)

Appends the text targets supported by gtk.SelectionData to the target list. All targets are added with the same info.

addUriTargets
void addUriTargets(uint info)

Appends the URI targets supported by gtk.SelectionData to the target list. All targets are added with the same info.

find
bool find(GdkAtom target, uint info)

Looks up a given target in a gtk.TargetList

getStruct
void* getStruct()

the main Gtk struct as a void*

getTargetListStruct
GtkTargetList* getTargetListStruct(bool transferOwnership)

Get the main Gtk struct

ref_
TargetList ref_()

Increases the reference count of a gtk.TargetList by one.

remove
void remove(GdkAtom target)

Removes a target from a target list.

unref
void unref()

Decreases the reference count of a gtk.TargetList by one. If the resulting reference count is zero, frees the list.

Static functions

getType
GType getType()
includeImage
bool includeImage(GdkAtom[] targets, bool writable)

Determines if any of the targets in targets can be used to provide a gdk.Pixbuf

includeRichTex
bool includeRichTex(GdkAtom[] targets, TextBuffer buffer)

Determines if any of the targets in targets can be used to provide rich text.

includeText
bool includeText(GdkAtom[] targets)

Determines if any of the targets in targets can be used to provide text.

includeUri
bool includeUri(GdkAtom[] targets)

Determines if any of the targets in targets can be used to provide an uri list.

targetTableFree
void targetTableFree(TargetEntry[] targets)

This function frees a target table as returned by gtk_target_table_new_from_list()

targetTableNewFromList
TargetEntry[] targetTableNewFromList(TargetList list)

This function creates an gtk.TargetEntry array that contains the same targets as the passed list. The returned table is newly allocated and should be freed using gtk_target_table_free() when no longer needed.

Variables

gtkTargetList
GtkTargetList* gtkTargetList;

the main Gtk struct