Package: gtk

Function gtk-clipboard-for-display

Lambda List

gtk-clipboard-for-display (display selection)

Arguments

display -- the gdk-display object for which the clipboard is to be retrieved or created
selection -- a gdk-atom as a string which identifies the clipboard to use

Return Value

The appropriate gtk-clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard has been created, it is persistent.

Details

Returns the clipboard for the given selection. Cut/Copy/Paste menu items and keyboard shortcuts should use the default clipboard, returned by the "CLIPBOARD" atom for selection. The "NONE" atom is supported as a synonym for the "CLIPBOARD" atom for backwards compatibility reasons. The currently selected object or text should be provided on the clipboard identified by the "PRIMARY" atom. Cut/Copy/Paste menu items conceptually copy the contents of the "PRIMARY" clipboard to the default clipboard, i.e. they copy the selection to what the user sees as the clipboard.

It is possible to have arbitrary named clipboards. If you do invent new clipboards, you should prefix the selection name with an underscore, because the ICCCM requires that nonstandard atoms are underscore-prefixed, and namespace it as well. For example, if your application called "Foo" has a special purpose clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
 

See also

2021-10-6