Debian Codegraph @

pod/pTk/OwnSelect.pod

raw
1 # Copyright (c) 1990-1994 The Regents of the University of California.
2 # Copyright (c) 1994-1996 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 Tk_OwnSelection - make a window the owner of the primary selection
11
12 =for category C Programming
13
14 =head1 SYNOPSIS
15
16 B<#include E<lt>tk.hE<gt>>
17
18 B<Tk_OwnSelection>(I<tkwin, selection, proc, clientData>)
19
20 =head1 ARGUMENTS
21
22 =over 4
23
24 =item Tk_Window tkwin (in)
25
26 Window that is to become new selection owner.
27
28 =item Atom selection (in)
29
30 The name of the selection to be owned, such as XA_PRIMARY.
31
32 =item Tk_LostSelProc *proc (in)
33
34 Procedure to invoke when I<tkwin> loses selection ownership later.
35
36 =item ClientData clientData (in)
37
38 Arbitrary one-word value to pass to I<proc>.
39
40 =back
41
42 =head1 DESCRIPTION
43
44 B<Tk_OwnSelection> arranges for I<tkwin> to become the
45 new owner of the selection specified by the atom
46 I<selection>. After this call completes, future requests
47 for the selection will be directed to handlers created for
48 I<tkwin> using B<Tk_CreateSelHandler>. When I<tkwin>
49 eventually loses the selection ownership, I<proc> will be
50 invoked so that the window can clean itself up (e.g. by
51 unhighlighting the selection). I<Proc> should have arguments and
52 result that match the type B<Tk_LostSelProc>:
53
54 typedef void Tk_LostSelProc(ClientData clientData);
55
56 The I<clientData> parameter to I<proc> is a copy of the
57 I<clientData> argument given to B<Tk_OwnSelection>, and is
58 usually a pointer to a data structure containing application-specific
59 information about I<tkwin>.
60
61 =head1 KEYWORDS
62
63 own, selection owner