67 lines
2.5 KiB
Groff
67 lines
2.5 KiB
Groff
|
'\"
|
||
|
'\" Copyright (c) 1990-1993 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/CoordToWin.3,v 1.4 93/04/01 09:41:11 ouster Exp $ SPRITE (Berkeley)
|
||
|
'\"
|
||
|
.so man.macros
|
||
|
.HS Tk_CoordsToWindow tkc
|
||
|
.BS
|
||
|
.SH NAME
|
||
|
Tk_CoordsToWindow \- Find window containing a point
|
||
|
.SH SYNOPSIS
|
||
|
.nf
|
||
|
\fB#include <tk.h>\fR
|
||
|
.sp
|
||
|
Tk_Window
|
||
|
\fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR)
|
||
|
.SH ARGUMENTS
|
||
|
.AS Tk_Window tkwin
|
||
|
.AP int rootX in
|
||
|
X-coordinate (in root window coordinates).
|
||
|
.AP int rootY in
|
||
|
Y-coordinate (in root window coordinates).
|
||
|
.AP Tk_Window tkwin in
|
||
|
Token for window that identifies application.
|
||
|
.BE
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
.PP
|
||
|
\fBTk_CoordsToWindow\fR locates the window that contains a given point.
|
||
|
The point is specified in root coordinates with \fIrootX\fR and
|
||
|
.VS
|
||
|
\fIrootY\fR (if a virtual-root window manager is in use then
|
||
|
\fIrootX\fR and \fIrootY\fR are in the coordinate system of the
|
||
|
virtual root window).
|
||
|
.VE
|
||
|
The return value from the procedure is a token for the window that
|
||
|
contains the given point.
|
||
|
If the point is not in any window, or if the containing window
|
||
|
is not in the same application as \fItkwin\fR, then NULL is
|
||
|
returned.
|
||
|
.PP
|
||
|
The containing window is decided using the same rules that determine
|
||
|
which window contains the mouse cursor: if a parent and a child both
|
||
|
contain the point then the child gets preference, and if two siblings
|
||
|
both contain the point then the highest one in the stacking order
|
||
|
(i.e. the one that's visible on the screen) gets preference.
|
||
|
|
||
|
.SH KEYWORDS
|
||
|
containing, coordinates, root window
|