'\" '\" Copyright (c) 1990 The Regents of the University of California. '\" All rights reserved. '\" '\" Permission is hereby granted, without written agreement and without '\" license or royalty fees, to use, copy, modify, and distribute this '\" documentation for any purpose, provided that the above copyright '\" notice and the following two paragraphs appear in all copies. '\" '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. '\" '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY '\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. '\" '\" $Header: /user6/ouster/wish/man/RCS/OwnSelect.3,v 1.6 93/04/01 09:41:47 ouster Exp $ SPRITE (Berkeley) '\" .so man.macros .HS Tk_OwnSelection tkc .BS .SH NAME Tk_OwnSelection \- make a window the owner of the primary selection .SH SYNOPSIS .nf \fB#include \fR .sp \fBTk_OwnSelection\fR(\fItkwin, proc, clientData\fR) .SH ARGUMENTS .AS Tk_LostSelProc clientData .AP Tk_Window tkwin in Window that is to become new selection owner. .AP Tk_LostSelProc *proc in Procedure to invoke when \fItkwin\fR loses selection ownership later. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION .PP \fBTk_OwnSelection\fR arranges for \fItkwin\fR to become the new owner of the primary selection. After this call completes, future requests for the selection will be directed to handlers created for \fItkwin\fR using \fBTk_CreateSelHandler\fR. When \fItkwin\fR eventually loses the selection ownership, \fIproc\fR will be invoked so that the window can clean itself up (e.g. by unhighlighting the selection). \fIProc\fR should have arguments and result that match the type \fBTk_LostSelProc\fR: .nf .RS typedef void Tk_LostSelProc(ClientData \fIclientData\fR); .RE .fi The \fIclientData\fP parameter to \fIproc\fR is a copy of the \fIclientData\fP argument given to \fBTk_OwnSelection\fR, and is usually a pointer to a data structure containing application-specific information about \fItkwin\fR. .PP Once a window has become selection owner, it will remain owner until either the window is deleted or until some other window claims ownership. There is no way for a window to disavow ownership of the selection once it has received it. .SH KEYWORDS own, selection owner