org.gnu.gtk

Class SelectionData


public class SelectionData
extends GObject

Data used in Drag and drop operations

Field Summary

Fields inherited from class org.gnu.glib.GObject

eventsInitialized

Constructor Summary

SelectionData(Handle handle)

Method Summary

protected static String
getData(Handle selectionData)
protected static Handle
getDisplay(Handle selectionData)
int
getFormat()
protected static int
getFormat(Handle selectionData)
int
getLength()
protected static int
getLength(Handle selectionData)
Pixbuf
getPixbuf()
Atom
getSelection()
protected static Handle
getSelection(Handle selectionData)
Atom
getTarget()
protected static Handle
getTarget(Handle selectionData)
Atom[]
getTargets()
String
getText()
Atom
getType()
protected static Handle
getType(Handle selectionData)
String[]
getUris()
protected static Handle
gtk_selection_data_get_pixbuf(Handle selectionData)
protected static Handle[]
gtk_selection_data_get_targets(Handle selectionData)
protected static String
gtk_selection_data_get_text(Handle selectionData)
protected static String[]
gtk_selection_data_get_uris(Handle selectionData)
protected static boolean
gtk_selection_data_set_pixbuf(Handle selectionData, Handle pixbuf)
protected static boolean
gtk_selection_data_set_text(Handle selectionData, String str)
protected static boolean
gtk_selection_data_set_uris(Handle selectionData, String[] uris)
protected static boolean
gtk_selection_data_targets_include_text(Handle selectionData)
boolean
setPixbuf(Pixbuf pixbuf)
boolean
setText(String text)
boolean
setUris(String[] uris)
boolean
targetsIncludText()
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide text.
boolean
targetsIncludeImage(boolean writable)
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide a Pixbuf.

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hasProperty, hashCode, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

SelectionData

public SelectionData(Handle handle)

Method Details

getData

protected static final String getData(Handle selectionData)


getDisplay

protected static final Handle getDisplay(Handle selectionData)


getFormat

public int getFormat()


getFormat

protected static final int getFormat(Handle selectionData)


getLength

public int getLength()


getLength

protected static final int getLength(Handle selectionData)


getPixbuf

public Pixbuf getPixbuf()


getSelection

public Atom getSelection()


getSelection

protected static final Handle getSelection(Handle selectionData)


getTarget

public Atom getTarget()


getTarget

protected static final Handle getTarget(Handle selectionData)


getTargets

public Atom[] getTargets()


getText

public String getText()


getType

public Atom getType()


getType

protected static final Handle getType(Handle selectionData)


getUris

public String[] getUris()


gtk_selection_data_get_pixbuf

protected static final Handle gtk_selection_data_get_pixbuf(Handle selectionData)


gtk_selection_data_get_targets

protected static final Handle[] gtk_selection_data_get_targets(Handle selectionData)


gtk_selection_data_get_text

protected static final String gtk_selection_data_get_text(Handle selectionData)


gtk_selection_data_get_uris

protected static final String[] gtk_selection_data_get_uris(Handle selectionData)


gtk_selection_data_set_pixbuf

protected static final boolean gtk_selection_data_set_pixbuf(Handle selectionData,
                                                             Handle pixbuf)


gtk_selection_data_set_text

protected static final boolean gtk_selection_data_set_text(Handle selectionData,
                                                           String str)


gtk_selection_data_set_uris

protected static final boolean gtk_selection_data_set_uris(Handle selectionData,
                                                           String[] uris)


gtk_selection_data_targets_include_text

protected static final boolean gtk_selection_data_targets_include_text(Handle selectionData)


setPixbuf

public boolean setPixbuf(Pixbuf pixbuf)


setText

public boolean setText(String text)


setUris

public boolean setUris(String[] uris)


targetsIncludText

public boolean targetsIncludText()
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide text.

Returns:
TRUE if this SelectionData holds a list of targets, and a suitable target for text is included, otherwise FALSE.


targetsIncludeImage

public boolean targetsIncludeImage(boolean writable)

Parameters:
writable - Whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format.

Returns:
TRUE if this SelectionData holds a list of targets, and a suitable target for images is included, otherwise FALSE.