diff options
author | das <das> | 2007-06-29 03:22:00 (GMT) |
---|---|---|
committer | das <das> | 2007-06-29 03:22:00 (GMT) |
commit | ee37ce0c65271d0a9fc3ea750b0087b9116329b4 (patch) | |
tree | c06cbd1a38889e6a8b8630f5eceab1c1b9d60f13 /macosx/tkMacOSXRegion.c | |
parent | bebeb7fa1104cbd7384ebb725235542228b06b21 (diff) | |
download | tk-ee37ce0c65271d0a9fc3ea750b0087b9116329b4.zip tk-ee37ce0c65271d0a9fc3ea750b0087b9116329b4.tar.gz tk-ee37ce0c65271d0a9fc3ea750b0087b9116329b4.tar.bz2 |
* macosx/tkMacOSXScrlbr.c: correct int <-> dobule conversion issues
that could lead to Carbon getting confused about scrollbar thumb size.
* macosx/tkMacOSXDraw.c (XCopyArea, XCopyPlane, TkPutImage) use
TkMacOSX{Setup,Restore}DrawingContext() to setup/restore clip & colors.
(TkMacOSXSetupDrawingContext, TkMacOSXRestoreDrawingContext): add save
and restore of QD port clip region; factor out clip region code common
to CG and QD branches; check for port and context validity; handle
tkPictureIsOpen flag during QD port setup.
(TkScrollWindow): remove unnecessary scroll region manipulation
* macosx/tkMacOSXDraw.c: remove second global QD temp region
* macosx/tkMacOSXInt.h: (no longer necessary) and rename
* macosx/tkMacOSXRegion.c: remaining global QD temp region.
* macosx/tkMacOSXSubwindows.c:
* macosx/tkMacOSXWindowEvent.c:
* macosx/tkMacOSXDraw.c: make useCGDrawing variable MODULE_SCOPE
* macosx/tkMacOSXFont.c: and sync formatting with HEAD.
* macosx/tkMacOSXButton.c: reduce reliance on current QD port
* macosx/tkMacOSXColor.c: setting and remove unnecessary
* macosx/tkMacOSXDebug.c: references to a drawable's QD port,
* macosx/tkMacOSXDebug.h: notably replace GetWindowFromPort(
* macosx/tkMacOSXDialog.c: TkMacOSXGetDrawablePort()) idiom by new
* macosx/tkMacOSXDraw.c: TkMacOSXDrawableWindow() and change
* macosx/tkMacOSXKeyEvent.c: TkMacOSXSetColorInPort() to take a port
* macosx/tkMacOSXMenu.c: argument.
* macosx/tkMacOSXMenubutton.c:
* macosx/tkMacOSXMouseEvent.c:
* macosx/tkMacOSXScale.c:
* macosx/tkMacOSXScrlbr.c:
* macosx/tkMacOSXSubwindows.c:
* macosx/tkMacOSXWindowEvent.c:
* macosx/tkMacOSXWm.c:
* macosx/tkMacOSXInt.h: factor out macros, declarations
* macosx/tkMacOSXPrivate.h (new): and prototypes that are purely
internal and private to the 'macosx' sources into a new internal header
file that does _not_ get installed into Tk.framework/PrivateHeaders.
* macosx/tkMacOSXButton.c: #include new tkMacOSXPrivate.h
* macosx/tkMacOSXCarbonEvents.c: instead of tkMacOSXInt.h.
* macosx/tkMacOSXClipboard.c:
* macosx/tkMacOSXColor.c:
* macosx/tkMacOSXCursor.c:
* macosx/tkMacOSXDebug.c:
* macosx/tkMacOSXDialog.c:
* macosx/tkMacOSXDraw.c:
* macosx/tkMacOSXEntry.c:
* macosx/tkMacOSXEvent.c:
* macosx/tkMacOSXFont.c:
* macosx/tkMacOSXHLEvents.c:
* macosx/tkMacOSXInit.c:
* macosx/tkMacOSXKeyEvent.c:
* macosx/tkMacOSXMenu.c:
* macosx/tkMacOSXMenubutton.c:
* macosx/tkMacOSXMenus.c:
* macosx/tkMacOSXMouseEvent.c:
* macosx/tkMacOSXNotify.c:
* macosx/tkMacOSXRegion.c:
* macosx/tkMacOSXScale.c:
* macosx/tkMacOSXScrlbr.c:
* macosx/tkMacOSXSubwindows.c:
* macosx/tkMacOSXWindowEvent.c:
* macosx/tkMacOSXWm.c:
* macosx/tkMacOSXXStubs.c:
Diffstat (limited to 'macosx/tkMacOSXRegion.c')
-rw-r--r-- | macosx/tkMacOSXRegion.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c index e3cb4a9..4920958 100644 --- a/macosx/tkMacOSXRegion.c +++ b/macosx/tkMacOSXRegion.c @@ -10,10 +10,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXRegion.c,v 1.2.2.5 2007/06/09 17:10:22 das Exp $ + * RCS: @(#) $Id: tkMacOSXRegion.c,v 1.2.2.6 2007/06/29 03:22:02 das Exp $ */ -#include "tkMacOSXInt.h" +#include "tkMacOSXPrivate.h" /* @@ -139,12 +139,12 @@ TkUnionRectWithRegion( TkRegion src_region, TkRegion dest_region_return) { - TkMacOSXCheckTmpRgnEmpty(1); - SetRectRgn(tkMacOSXtmpRgn1, rectangle->x, rectangle->y, + TkMacOSXCheckTmpQdRgnEmpty(); + SetRectRgn(tkMacOSXtmpQdRgn, rectangle->x, rectangle->y, rectangle->x + rectangle->width, rectangle->y + rectangle->height); - UnionRgn((RgnHandle) src_region, tkMacOSXtmpRgn1, + UnionRgn((RgnHandle) src_region, tkMacOSXtmpQdRgn, (RgnHandle) dest_region_return); - SetEmptyRgn(tkMacOSXtmpRgn1); + SetEmptyRgn(tkMacOSXtmpQdRgn); } /* @@ -174,17 +174,17 @@ TkRectInRegion( { int result; - TkMacOSXCheckTmpRgnEmpty(1); - SetRectRgn(tkMacOSXtmpRgn1, x, y, x + width, y + height); - SectRgn((RgnHandle) region, tkMacOSXtmpRgn1, tkMacOSXtmpRgn1); - if (EmptyRgn(tkMacOSXtmpRgn1)) { + TkMacOSXCheckTmpQdRgnEmpty(); + SetRectRgn(tkMacOSXtmpQdRgn, x, y, x + width, y + height); + SectRgn((RgnHandle) region, tkMacOSXtmpQdRgn, tkMacOSXtmpQdRgn); + if (EmptyRgn(tkMacOSXtmpQdRgn)) { result = RectangleOut; - } else if (EqualRgn((RgnHandle) region, tkMacOSXtmpRgn1)) { + } else if (EqualRgn((RgnHandle) region, tkMacOSXtmpQdRgn)) { result = RectangleIn; } else { result = RectanglePart; } - SetEmptyRgn(tkMacOSXtmpRgn1); + SetEmptyRgn(tkMacOSXtmpQdRgn); return result; } |