diff options
author | das <das> | 2004-11-13 03:42:10 (GMT) |
---|---|---|
committer | das <das> | 2004-11-13 03:42:10 (GMT) |
commit | 3e09838c17de0af3b68e1501bf177d62ad4a5ec8 (patch) | |
tree | 7b9efe17b7a1f99b4e38d656988156268eabac92 /macosx/tkMacOSXXStubs.c | |
parent | 1b0a6008e4e1e527bade0054e2cf169a7082a2bc (diff) | |
download | tk-3e09838c17de0af3b68e1501bf177d62ad4a5ec8.zip tk-3e09838c17de0af3b68e1501bf177d62ad4a5ec8.tar.gz tk-3e09838c17de0af3b68e1501bf177d62ad4a5ec8.tar.bz2 |
* macosx/tkMacOSXXStubs.c: implemented XGetGeometry().
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 4d83c7b..5e913d1 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.3 2004/05/03 22:23:09 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.4 2004/11/13 03:42:10 das Exp $ */ #include "tkInt.h" @@ -419,9 +419,29 @@ XGetGeometry(display, d, root_return, x_return, y_return, width_return, unsigned int* border_width_return; unsigned int* depth_return; { - /* Used in tkCanvPs.c & wm code */ - Debugger(); - return 0; + TkWindow *winPtr = ((MacDrawable *) d)->winPtr; + + display->request++; + *root_return = ROOT_ID; + if (winPtr) { + *x_return = Tk_X(winPtr); + *y_return = Tk_Y(winPtr); + *width_return = Tk_Width(winPtr); + *height_return = Tk_Height(winPtr); + *border_width_return = winPtr->changes.border_width; + *depth_return = Tk_Depth(winPtr); + } else { + Rect boundsRect; + CGrafPtr destPort = TkMacOSXGetDrawablePort(d); + GetPortBounds(destPort,&boundsRect); + *x_return = boundsRect.left; + *y_return = boundsRect.top; + *width_return = boundsRect.right - boundsRect.left; + *height_return = boundsRect.bottom - boundsRect.top; + *border_width_return = 0; + *depth_return = 32; + } + return 1; } void |