SelectionData

Constructors

this
this(GtkSelectionData* gtkSelectionData, bool ownedRef)

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

Members

Functions

copy
SelectionData copy()

Makes a copy of a #GtkSelectionData-struct and its data.

free
void free()

Frees a #GtkSelectionData-struct returned from gtk_selection_data_copy().

getData
char* getData()

Retrieves the raw data of the selection.

getDataType
GdkAtom getDataType()

Retrieves the data type of the selection.

getDataWithLength
char[] getDataWithLength()

Retrieves the raw data of the selection along with its length.

getDisplay
Display getDisplay()

Retrieves the display of the selection.

getFormat
int getFormat()

Retrieves the format of the selection.

getLength
int getLength()

Retrieves the length of the raw data of the selection.

getPixbuf
Pixbuf getPixbuf()

Gets the contents of the selection data as a #GdkPixbuf.

getSelection
GdkAtom getSelection()

Retrieves the selection #GdkAtom of the selection data.

getSelectionDataStruct
GtkSelectionData* getSelectionDataStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getTarget
GdkAtom getTarget()

Retrieves the target of the selection.

getTargets
bool getTargets(GdkAtom[] targets)

Gets the contents of @selection_data as an array of targets. This can be used to interpret the results of getting the standard TARGETS target that is always supplied for any selection.

getText
string getText()

Gets the contents of the selection data as a UTF-8 string.

getUris
string[] getUris()

Gets the contents of the selection data as array of URIs.

set
void set(GdkAtom type, int format, char[] data)

Stores new data into a #GtkSelectionData object. Should only be called from a selection handler callback. Zero-terminates the stored data.

setPixbuf
bool setPixbuf(Pixbuf pixbuf)

Sets the contents of the selection from a #GdkPixbuf The pixbuf is converted to the form determined by @selection_data->target.

setText
bool setText(string str, int len)

Sets the contents of the selection from a UTF-8 encoded string. The string is converted to the form determined by @selection_data->target.

setUris
bool setUris(string[] uris)

Sets the contents of the selection from a list of URIs. The string is converted to the form determined by @selection_data->target.

targetsIncludeImage
bool targetsIncludeImage(bool writable)

Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in @targets can be used to provide a #GdkPixbuf.

targetsIncludeRichText
bool targetsIncludeRichText(TextBuffer buffer)

Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in @targets can be used to provide rich text.

targetsIncludeText
bool targetsIncludeText()

Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in @targets can be used to provide text.

targetsIncludeUri
bool targetsIncludeUri()

Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in @targets can be used to provide a list or URIs.

Static functions

addTarget
void addTarget(Widget widget, GdkAtom selection, GdkAtom target, uint info)

Appends a specified target to the list of supported targets for a given widget and selection.

addTargets
void addTargets(Widget widget, GdkAtom selection, TargetEntry[] targets)

Prepends a table of targets to the list of supported targets for a given widget and selection.

clearTargets
void clearTargets(Widget widget, GdkAtom selection)

Remove all targets registered for the given selection for the widget.

convert
bool convert(Widget widget, GdkAtom selection, GdkAtom target, uint time)

Requests the contents of a selection. When received, a “selection-received” signal will be generated.

getType
GType getType()
ownerSet
bool ownerSet(Widget widget, GdkAtom selection, uint time)

Claims ownership of a given selection for a particular widget, or, if @widget is %NULL, release ownership of the selection.

ownerSetForDisplay
bool ownerSetForDisplay(Display display, Widget widget, GdkAtom selection, uint time)

Claim ownership of a given selection for a particular widget, or, if @widget is %NULL, release ownership of the selection.

removeAll
void removeAll(Widget widget)

Removes all handlers and unsets ownership of all selections for a widget. Called when widget is being destroyed. This function will not generally be called by applications.

Variables

gtkSelectionData
GtkSelectionData* gtkSelectionData;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta