ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



Tk_CoordsToWindow(3)                        Tk Library Procedures                       Tk_CoordsToWindow(3)



____________________________________________________________________________________________________________

NAME
       Tk_CoordsToWindow - Find window containing a point

SYNOPSIS
       #include <tk.h>

       Tk_Window
       Tk_CoordsToWindow(rootX, rootY, tkwin)

ARGUMENTS
       int         rootX   (in)      X-coordinate (in root window coordinates).

       int         rootY   (in)      Y-coordinate (in root window coordinates).

       Tk_Window   tkwin   (in)      Token for window that identifies application.
____________________________________________________________________________________________________________


DESCRIPTION
       Tk_CoordsToWindow  locates  the  window  that contains a given point.  The point is specified in root
       coordinates with rootX and rootY (if a virtual-root window manager is in use then rootX and rootY are
       in the coordinate system of the virtual root window).  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  contain-ing containing
       ing window is not in the same application as tkwin, then NULL is returned.

       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 visi-ble visible
       ble on the screen) gets preference.


KEYWORDS
       containing, coordinates, root window



Tk                                                                                      Tk_CoordsToWindow(3)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.