OSDN Git Service

touched all tk files to ease next import
[pf3gnuchains/pf3gnuchains4x.git] / tk / doc / CoordToWin.3
1 '\"
2 '\" Copyright (c) 1990-1993 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4 '\"
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 '\" 
8 '\" RCS: @(#) $Id$
9 '\" 
10 .so man.macros
11 .TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
12 .BS
13 .SH NAME
14 Tk_CoordsToWindow \- Find window containing a point
15 .SH SYNOPSIS
16 .nf
17 \fB#include <tk.h>\fR
18 .sp
19 Tk_Window
20 \fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR)
21 .SH ARGUMENTS
22 .AS Tk_Window tkwin
23 .AP int rootX in
24 X-coordinate (in root window coordinates).
25 .AP int rootY in
26 Y-coordinate (in root window coordinates).
27 .AP Tk_Window tkwin in
28 Token for window that identifies application.
29 .BE
30
31 .SH DESCRIPTION
32 .PP
33 \fBTk_CoordsToWindow\fR locates the window that contains a given point.
34 The point is specified in root coordinates with \fIrootX\fR and
35 \fIrootY\fR (if a virtual-root window manager is in use then
36 \fIrootX\fR and \fIrootY\fR are in the coordinate system of the
37 virtual root window).
38 The return value from the procedure is a token for the window that
39 contains the given point.
40 If the point is not in any window, or if the containing window
41 is not in the same application as \fItkwin\fR, then NULL is
42 returned.
43 .PP
44 The containing window is decided using the same rules that determine
45 which window contains the mouse cursor:  if a parent and a child both
46 contain the point then the child gets preference, and if two siblings
47 both contain the point then the highest one in the stacking order
48 (i.e. the one that's visible on the screen) gets preference.
49
50 .SH KEYWORDS
51 containing, coordinates, root window
52