1Tk_CoordsToWindow(3) Tk Library Procedures Tk_CoordsToWindow(3)
2
3
4
5______________________________________________________________________________
6
8 Tk_CoordsToWindow - Find window containing a point
9
11 #include <tk.h>
12
13 Tk_Window
14 Tk_CoordsToWindow(rootX, rootY, tkwin)
15
17 int rootX (in) X-coordinate (in root window coordi‐
18 nates).
19
20 int rootY (in) Y-coordinate (in root window coordi‐
21 nates).
22
23 Tk_Window tkwin (in) Token for window that identifies applica‐
24 tion.
25_________________________________________________________________
26
27
29 Tk_CoordsToWindow locates the window that contains a given point. The
30 point is specified in root coordinates with rootX and rootY (if a vir‐
31 tual-root window manager is in use then rootX and rootY are in the
32 coordinate system of the virtual root window). The return value from
33 the procedure is a token for the window that contains the given point.
34 If the point is not in any window, or if the containing window is not
35 in the same application as tkwin, then NULL is returned.
36
37 The containing window is decided using the same rules that determine
38 which window contains the mouse cursor: if a parent and a child both
39 contain the point then the child gets preference, and if two siblings
40 both contain the point then the highest one in the stacking order (i.e.
41 the one that's visible on the screen) gets preference.
42
43
45 containing, coordinates, root window
46
47
48
49Tk Tk_CoordsToWindow(3)