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

  1. '\"
  2. '\" Copyright (c) 1990-1993 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/CoordToWin.3,v 1.4 93/04/01 09:41:11 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_CoordsToWindow tkc
  25. .BS
  26. .SH NAME
  27. Tk_CoordsToWindow \- Find window containing a point
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. Tk_Window
  33. \fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR)
  34. .SH ARGUMENTS
  35. .AS Tk_Window tkwin
  36. .AP int rootX in
  37. X-coordinate (in root window coordinates).
  38. .AP int rootY in
  39. Y-coordinate (in root window coordinates).
  40. .AP Tk_Window tkwin in
  41. Token for window that identifies application.
  42. .BE
  43.  
  44. .SH DESCRIPTION
  45. .PP
  46. \fBTk_CoordsToWindow\fR locates the window that contains a given point.
  47. The point is specified in root coordinates with \fIrootX\fR and
  48. .VS
  49. \fIrootY\fR (if a virtual-root window manager is in use then
  50. \fIrootX\fR and \fIrootY\fR are in the coordinate system of the
  51. virtual root window).
  52. .VE
  53. The return value from the procedure is a token for the window that
  54. contains the given point.
  55. If the point is not in any window, or if the containing window
  56. is not in the same application as \fItkwin\fR, then NULL is
  57. returned.
  58. .PP
  59. The containing window is decided using the same rules that determine
  60. which window contains the mouse cursor:  if a parent and a child both
  61. contain the point then the child gets preference, and if two siblings
  62. both contain the point then the highest one in the stacking order
  63. (i.e. the one that's visible on the screen) gets preference.
  64.  
  65. .SH KEYWORDS
  66. containing, coordinates, root window
  67.