| 1 |
# Copyright (c) 1990 The Regents of the University of California. |
| 2 |
# Copyright (c) 1994-1996 Sun Microsystems, Inc. |
| 3 |
# See the file "license.terms" for information on usage and redistribution |
| 4 |
# of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 5 |
# |
| 6 |
# |
| 7 |
|
| 8 |
=head1 NAME |
| 9 |
|
| 10 |
Tk_GetRootCoords - Compute root-window coordinates of window |
| 11 |
|
| 12 |
=for category C Programming |
| 13 |
|
| 14 |
=head1 SYNOPSIS |
| 15 |
|
| 16 |
B<#include E<lt>tk.hE<gt>> |
| 17 |
|
| 18 |
B<Tk_GetRootCoords>(I<tkwin, xPtr, yPtr>) |
| 19 |
|
| 20 |
=head1 ARGUMENTS |
| 21 |
|
| 22 |
=over 4 |
| 23 |
|
| 24 |
=item Tk_Window tkwin (in) |
| 25 |
|
| 26 |
Token for window. |
| 27 |
|
| 28 |
=item int *xPtr (out) |
| 29 |
|
| 30 |
Pointer to location in which to store root-window x-coordinate |
| 31 |
corresponding to left edge of I<tkwin>'s border. |
| 32 |
|
| 33 |
=item int *yPtr (out) |
| 34 |
|
| 35 |
Pointer to location in which to store root-window y-coordinate |
| 36 |
corresponding to top edge of I<tkwin>'s border. |
| 37 |
|
| 38 |
=back |
| 39 |
|
| 40 |
=head1 DESCRIPTION |
| 41 |
|
| 42 |
This procedure scans through the structural information maintained |
| 43 |
by Tk to compute the root-window coordinates corresponding to |
| 44 |
the upper-left corner of I<tkwin>'s border. If I<tkwin> has |
| 45 |
no border, then B<Tk_GetRootCoords> returns the root-window |
| 46 |
coordinates corresponding to location (0,0) in I<tkwin>. |
| 47 |
B<Tk_GetRootCoords> is relatively efficient, since it doesn't have to |
| 48 |
communicate with the X server. |
| 49 |
|
| 50 |
=head1 KEYWORDS |
| 51 |
|
| 52 |
coordinates, root window |