All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

set-clipboard

Function
Summary

Sets the contents of the system clipboard.

Package

capi

Signature

set-clipboard self value &optional string plist => result

Arguments

self

A displayed CAPI pane or interface.

value

A Lisp object (not necessarily a string) to make available within the local Lisp image.

string

The string representation of value to export, or nil. If nil and value is a string, then that will be exported as the string.

plist

A property list of additional format/value pairs to export. The currently supported formats are as described for clipboard . You can export more than one format simultaneously.

Values

result

A string, or nil.

Description

The function set-clipboard sets the contents of the system clipboard to be the text of string .

In Microsoft Windows applications (including LispWorks in Windows emulation mode), the contents of the system clipboard is usually accessed by the user with the Ctrl+V gesture.

The X clipboard can be accessed by the Ctrl+V gesture in KDE/Gnome emulation, or by running the program xclipboard or the Emacs function x-get-clipboard. The most likely explanation for apparent inconsistencies after set-clipboard is that the pasting application does not use the X clipboard.

In Cocoa applications (including LispWorks), the contents of the system clipboard is usually accessed by the user with the Command+V gesture.

Example

To export an image:

(capi:set-clipboard pane nil nil (list :image image ))

To export an image with a text description

(capi:set-clipboard pane
 nil nil
                    (list :image image
 
                          :string "my image"))
See also

clipboard
selection
text-input-pane-copy
Clipboard

 

CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex