📄 clipboard.3
字号:
'\"'\" Copyright (c) 1994 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) Clipboard.3 1.5 96/03/26 18:04:10'\" .so man.macros.TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures".BS.SH NAMETk_ClipboardClear, Tk_ClipboardAppend \- Manage the clipboard.SH SYNOPSIS.nf\fB#include <tk.h>\fR.spint\fBTk_ClipboardClear\fR(\fIinterp, tkwin\fR).spint\fBTk_ClipboardAppend\fR(\fIinterp, tkwin, target, format, buffer\fR).SH ARGUMENTS.AS Tk_ClipboardClear tkwin.AP Tcl_Interp *interp inInterpreter to use for reporting errors..AP Tk_Window tkwin inWindow that determines which display's clipboard to manipulate..AP Atom target inConversion type for this clipboard item; has same meaning as\fItarget\fR argument to \fBTk_CreateSelHandler\fR..AP Atom format inRepresentation to use when data is retrieved; has same meaning as\fIformat\fR argument to \fBTk_CreateSelHandler\fR..AP char *buffer inNull terminated string containing the data to be appended to the clipboard..BE.SH DESCRIPTION.PPThese two procedures manage the clipboard for Tk.The clipboard is typically managed by calling \fBTk_ClipboardClear\fRonce, then calling \fBTk_ClipboardAppend\fR to add data for anynumber of targets..PP\fBTk_ClipboardClear\fR claims the CLIPBOARD selection and frees anydata items previously stored on the clipboard in this application. It normally returns TCL_OK, but if an error occurs it returnsTCL_ERROR and leaves an error message in \fIinterp->result\fR.\fBTk_ClipboardClear\fR must be called before a sequence of\fBTk_ClipboardAppend\fR calls can be issued..PP\fBTk_ClipboardAppend\fR appends a buffer of data to the clipboard.The first buffer for a given \fItarget\fR determines the \fIformat\fRfor that \fItarget\fR.Any successive appends for that \fItarget\fR must havethe same format or an error will be returned.\fBTk_ClipboardAppend\fR returns TCL_OK if the buffer issuccessfully copied onto the clipboard. If the clipboard is notcurrently owned by the application, eitherbecause \fBTk_ClipboardClear\fR has not been called or becauseownership of the clipboard has changed since the last call to\fBTk_ClipboardClear\fR,\fBTk_ClipboardAppend\fR returns TCL_ERROR and leaves an error message in\fIinterp->result\fR..PPIn order to guarantee atomicity, no event handling should occurbetween \fBTk_ClipboardClear\fR and the following\fBTk_ClipboardAppend\fR calls (otherwise someone could retrievea partially completed clipboard or claim ownership away fromthis application)..PP\fBTk_ClipboardClear\fR may invoke callbacks, including arbitraryTcl scripts, as a result of losing the CLIPBOARD selection, soany calling function should take care to be reentrant at the point\fBTk_ClipboardClear\fR is invoked..SH KEYWORDSappend, clipboard, clear, format, type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -