2
'\" Copyright (c) 1990-1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8
'\" RCS: @(#) $Id: OwnSelect.3,v 1.2 1998/09/14 18:22:53 stanton Exp $
11
.TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures"
14
Tk_OwnSelection \- make a window the owner of the primary selection
19
\fBTk_OwnSelection\fR(\fItkwin, selection, proc, clientData\fR)
21
.AS Tk_LostSelProc clientData
22
.AP Tk_Window tkwin in
23
Window that is to become new selection owner.
25
The name of the selection to be owned, such as XA_PRIMARY.
26
.AP Tk_LostSelProc *proc in
27
Procedure to invoke when \fItkwin\fR loses selection ownership later.
28
.AP ClientData clientData in
29
Arbitrary one-word value to pass to \fIproc\fR.
34
\fBTk_OwnSelection\fR arranges for \fItkwin\fR to become the
35
new owner of the selection specified by the atom
36
\fIselection\fR. After this call completes, future requests
37
for the selection will be directed to handlers created for
38
\fItkwin\fR using \fBTk_CreateSelHandler\fR. When \fItkwin\fR
39
eventually loses the selection ownership, \fIproc\fR will be
40
invoked so that the window can clean itself up (e.g. by
41
unhighlighting the selection). \fIProc\fR should have arguments and
42
result that match the type \fBTk_LostSelProc\fR:
44
typedef void Tk_LostSelProc(ClientData \fIclientData\fR);
46
The \fIclientData\fR parameter to \fIproc\fR is a copy of the
47
\fIclientData\fR argument given to \fBTk_OwnSelection\fR, and is
48
usually a pointer to a data structure containing application-specific
49
information about \fItkwin\fR.