home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / OwnSelect.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.7 KB  |  70 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/OwnSelect.3,v 1.6 93/04/01 09:41:47 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_OwnSelection tkc
  25. .BS
  26. .SH NAME
  27. Tk_OwnSelection \- make a window the owner of the primary selection
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. \fBTk_OwnSelection\fR(\fItkwin, proc, clientData\fR)
  33. .SH ARGUMENTS
  34. .AS Tk_LostSelProc clientData
  35. .AP Tk_Window tkwin in
  36. Window that is to become new selection owner.
  37. .AP Tk_LostSelProc *proc in
  38. Procedure to invoke when \fItkwin\fR loses selection ownership later.
  39. .AP ClientData clientData in
  40. Arbitrary one-word value to pass to \fIproc\fR.
  41. .BE
  42.  
  43. .SH DESCRIPTION
  44. .PP
  45. \fBTk_OwnSelection\fR arranges for \fItkwin\fR to become the
  46. new owner of the primary selection.  After this call completes, future requests
  47. for the selection will be directed to handlers created for
  48. \fItkwin\fR using \fBTk_CreateSelHandler\fR.  When \fItkwin\fR
  49. eventually loses the selection ownership, \fIproc\fR will be
  50. invoked so that the window can clean itself up (e.g. by
  51. unhighlighting the selection).  \fIProc\fR should have arguments and
  52. result that match the type \fBTk_LostSelProc\fR:
  53. .nf
  54. .RS
  55. typedef void Tk_LostSelProc(ClientData \fIclientData\fR);
  56. .RE
  57. .fi
  58. The \fIclientData\fP parameter to \fIproc\fR is a copy of the
  59. \fIclientData\fP argument given to \fBTk_OwnSelection\fR, and is
  60. usually a pointer to a data structure containing application-specific
  61. information about \fItkwin\fR.
  62. .PP
  63. Once a window has become selection owner, it will remain owner until
  64. either the window is deleted or until some other window claims
  65. ownership.  There is no way for a window to disavow ownership of the
  66. selection once it has received it.
  67.  
  68. .SH KEYWORDS
  69. own, selection owner
  70.