TargetList

Description The selection mechanism provides the basis for different types of communication between processes. In particular, drag and drop and GtkClipboard work via selections. You will very seldom or never need to use most of the functions in this section directly; GtkClipboard provides a nicer interface to the same functionality. Some of the datatypes defined this section are used in the GtkClipboard and drag-and-drop API's as well. The GtkTargetEntry structure and GtkTargetList objects represent lists of data types that are supported when sending or receiving data. The GtkSelectionData object is used to store a chunk of data along with the data type and other associated information.

Constructors

this
this(GtkTargetList* gtkTargetList)

Sets our main struct and passes it to the parent class

this
this(GtkTargetEntry[] targets)

Creates a new GtkTargetList from an array of GtkTargetEntry.

Members

Functions

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

Appends another target to a GtkTargetList.

addImageTargets
void addImageTargets(uint info, int writable)

Appends the image targets supported by GtkSelection to the target list. All targets are added with the same info. Since 2.6

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

Appends the rich text targets registered with gtk_text_buffer_register_serialize_format() or gtk_text_buffer_register_deserialize_format() to the target list. All targets are added with the same info. Since 2.10

addTable
void addTable(GtkTargetEntry[] targets)

Prepends a table of GtkTargetEntry to a target list.

addTextTargets
void addTextTargets(uint info)

Appends the text targets supported by GtkSelection to the target list. All targets are added with the same info. Since 2.6

addUriTargets
void addUriTargets(uint info)

Appends the URI targets supported by GtkSelection to the target list. All targets are added with the same info. Since 2.6

doref
TargetList doref()

Increases the reference count of a GtkTargetList by one.

find
int find(GdkAtom target, uint info)

Looks up a given target in a GtkTargetList.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTargetListStruct
GtkTargetList* getTargetListStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
gtkTargetTableNewFromList
GtkTargetEntry[] gtkTargetTableNewFromList()

This function creates an GtkTargetEntry 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. Since 2.10

remove
void remove(GdkAtom target)

Removes a target from a target list.

unref
void unref()

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

Static functions

gtkTargetTableFree
void gtkTargetTableFree(GtkTargetEntry[] targets, int nTargets)

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

gtkTargetsIncludeImage
int gtkTargetsIncludeImage(GdkAtom[] targets, int writable)

Determines if any of the targets in targets can be used to provide a GdkPixbuf. Since 2.10

gtkTargetsIncludeRichText
int gtkTargetsIncludeRichText(GdkAtom[] targets, TextBuffer buffer)

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

gtkTargetsIncludeText
int gtkTargetsIncludeText(GdkAtom[] targets)

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

gtkTargetsIncludeUri
int gtkTargetsIncludeUri(GdkAtom[] targets)

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

Variables

gtkTargetList
GtkTargetList* gtkTargetList;

the main Gtk struct

Inherited Members

From Boxed

boxedCopy
void* boxedCopy(GType boxedType, void* srcBoxed)

Provide a copy of a boxed structure src_boxed which is of type boxed_type.

boxedFree
void boxedFree(GType boxedType, void* boxed)

Free the boxed structure boxed which is of type boxed_type.

boxedTypeRegisterStatic
GType boxedTypeRegisterStatic(string name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree)

This function creates a new G_TYPE_BOXED derived type id for a new boxed type with name name. Boxed type handling functions have to be provided to copy and free opaque boxed structures of this type.

pointerTypeRegisterStatic
GType pointerTypeRegisterStatic(string name)

Creates a new G_TYPE_POINTER derived type id for a new pointer type with name name.

Meta