org.gnu.gtk
Class Clipboard
The Clipboard object represents a clipboard of data shared between different
processes or between different widgets in the same process.
TODO: This requires gdk.Selections
TODO: callback functions
addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addListener , collect , freezeNotify , getBooleanProperty , getData , getDoubleProperty , getEventListenerClass , getEventType , getFloatProperty , getGObjectFromHandle , getIntProperty , getJavaObjectProperty , getLongProperty , getPixbufProperty , getProperty , getStringProperty , hasProperty , notify , removeEventHandler , removeListener , setBooleanProperty , setData , setDoubleProperty , setFloatProperty , setIntProperty , setJavaObjectProperty , setLongProperty , setPixbufProperty , setProperty , setStringProperty , thawNotify |
clear
public void clear()
Clear the contents of the clipboard.
get
public static Clipboard get(Atom atom)
atom
- a Atom
which identifies the clipboard to use
- the appropriate clipboard object. If no clipboard already exists,
a new one will be created. Once a clipboard object has been
created, it is persistent for all time and cannot be freed.
getContents
public SelectionData getContents(Atom atom)
atom
- an Atom
representing the form into which the clipboard
owner should convert the selection
- a newly-allocated
SelectionData
object or
NULL
if retrieving the given target failed
TODO: write the JNI
getDisplay
public Display getDisplay()
Gets the
Display
associated with clipboard.
- the
Display
associated with clipboard
getForDisplay
public static Clipboard getForDisplay(Display display,
Atom atom)
display
- the display for which the clipboard is to be retrieved or
createdatom
- a Atom
which identifies the clipboard to use
- he appropriate clipboard object. If no clipboard already exists,
a new one will be created. Once a clipboard object has been
created, it is persistent for all time and cannot be freed.
getImage
public Pixbuf getImage()
getText
public String getText()
Requests the contents of the clipboard as text.
isImageAvailable
public boolean isImageAvailable()
isTextAvailable
public boolean isTextAvailable()
setCanStore
public void setCanStore(TargetEntry[] targets)
setImage
public void setImage(Pixbuf pixbuf)
setText
public void setText(String text)
Set the contents of the clipboard.