diff options
author | das <das> | 2007-10-12 03:14:47 (GMT) |
---|---|---|
committer | das <das> | 2007-10-12 03:14:47 (GMT) |
commit | acc2acbb288f8a715cce7905093615b3a7fcbc47 (patch) | |
tree | eb61b1b1e215cb3c0ce151014bd73b7b63db5257 /macosx/tkMacOSXPrivate.h | |
parent | d0945ac2cb3d92090109d0c3899b51284660db69 (diff) | |
download | tk-acc2acbb288f8a715cce7905093615b3a7fcbc47.zip tk-acc2acbb288f8a715cce7905093615b3a7fcbc47.tar.gz tk-acc2acbb288f8a715cce7905093615b3a7fcbc47.tar.bz2 |
* macosx/tkMacOSXDraw.c: replace all (internal) use of QD region
* macosx/tkMacOSXSubwindows.c: API by HIShape API, with conversion to
* macosx/tkMacOSXWindowEvent.c QD regions only when required by legacy
* macosx/tkMacOSXPrivate.h: Carbon or Tk API.
* macosx/tkMacOSXRegion.c:
* macosx/tkMacOSXDebug.c:
* macosx/tkMacOSXDebug.h:
* macosx/tkMacOSXInt.h: replace MacDrawable's QD RgnHandles
* macosx/tkMacOSXEmbed.c: clipRgn, aboveClipRgn & drawRgn by
* macosx/tkMacOSXMenu.c: HIShapeRefs visRgn & aboveVisRgn and
* macosx/tkMacOSXSubwindows.c: CGRect drawRect.
* macosx/tkMacOSXWindowEvent.c: remove use of QD port vis rgn in window
* macosx/tkMacOSXSubwindows.c: update rgn calculation, manually excise
* macosx/tkMacOSXWm.c: growbox from toplevel clip rgn instead.
* macosx/tkMacOSXDraw.c: replace use of QD port clip rgn by new
* macosx/tkMacOSXPrivate.h: clipRgn fld in TkMacOSXDrawingContext;
handle QD/CG drawing mismatches in
XCopyArea, XCopyPlane and TkPutImage;
cleanup/speedup CGContext setup in
TkMacOSXSetupDrawingContext().
* macosx/tkMacOSXDraw.c: change TkMacOSXSetupDrawingContext() to
* macosx/tkMacOSXEntry.c: return boolean indicating whether
* macosx/tkMacOSXFont.c: drawing is allowed (and was setup) or
* macosx/tkMacOSXMenu.c: not (e.g. when clipRgn is empty).
* macosx/ttkMacOSXTheme.c:
* macosx/tkMacOSXSubwindows.c: signal that drawable is a pixmap via
* macosx/tkMacOSXInt.h: new explicit TK_IS_PIXMAP flag instead
of a NULL cligRgn field.
* macosx/tkMacOSXRegion.c: add wrappers for missing/buggy HIShape
* macosx/tkMacOSXPrivate.h: API, and private helpers to operate on
HIShapeRefs & convert to/from TkRegion.
* macosx/tkMacOSXRegion.c: add Tkp{Retain,Release}Region() API for
* macosx/tkMacOSXInt.h: TkRegion.
Diffstat (limited to 'macosx/tkMacOSXPrivate.h')
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 1861c16..3951e52 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXPrivate.h,v 1.2 2007/08/23 10:44:57 das Exp $ + * RCS: @(#) $Id: tkMacOSXPrivate.h,v 1.3 2007/10/12 03:14:48 das Exp $ */ #ifndef _TKMACPRIV @@ -252,6 +252,7 @@ typedef struct TkMacOSXDrawingContext { CGrafPtr port, savePort; ThemeDrawingState saveState; RgnHandle saveClip; + HIShapeRef clipRgn; PixPatHandle penPat; Rect portBounds; Boolean portChanged; @@ -265,6 +266,33 @@ MODULE_SCOPE RgnHandle tkMacOSXtmpQdRgn; MODULE_SCOPE int tkMacOSXUseCGDrawing; /* + * Prototypes for TkMacOSXRegion.c. + */ + +#if 0 +MODULE_SCOPE void TkMacOSXEmtpyRegion(TkRegion r); +MODULE_SCOPE int TkMacOSXIsEmptyRegion(TkRegion r); +#endif +MODULE_SCOPE HIShapeRef TkMacOSXGetNativeRegion(TkRegion r); +MODULE_SCOPE void TkMacOSXSetWithNativeRegion(TkRegion r, HIShapeRef rgn); +MODULE_SCOPE void TkMacOSXOffsetRegion(TkRegion r, short dx, short dy); +MODULE_SCOPE HIShapeRef TkMacOSXHIShapeCreateEmpty(void); +MODULE_SCOPE HIMutableShapeRef TkMacOSXHIShapeCreateMutableWithRect( + const CGRect *inRect); +MODULE_SCOPE OSStatus TkMacOSXHIShapeSetWithShape( + HIMutableShapeRef inDestShape, HIShapeRef inSrcShape); +#if 0 +MODULE_SCOPE OSStatus TkMacOSXHIShapeSetWithRect(HIMutableShapeRef inShape, + const CGRect *inRect); +#endif +MODULE_SCOPE OSStatus TkMacOSHIShapeDifferenceWithRect( + HIMutableShapeRef inShape, const CGRect *inRect); +MODULE_SCOPE OSStatus TkMacOSHIShapeUnionWithRect(HIMutableShapeRef inShape, + const CGRect *inRect); +MODULE_SCOPE OSStatus TkMacOSHIShapeUnion(HIShapeRef inShape1, + HIShapeRef inShape2, HIMutableShapeRef outResult); + +/* * Prototypes of TkAqua internal procs. */ @@ -285,8 +313,8 @@ MODULE_SCOPE int TkMacOSXIsWindowZoomed(TkWindow *winPtr); MODULE_SCOPE int TkGenerateButtonEventForXPointer(Window window); MODULE_SCOPE EventModifiers TkMacOSXModifierState(void); MODULE_SCOPE int TkMacOSXSetupDrawingContext(Drawable d, GC gc, int useCG, - TkMacOSXDrawingContext *dc); -MODULE_SCOPE void TkMacOSXRestoreDrawingContext(TkMacOSXDrawingContext *dc); + TkMacOSXDrawingContext *dcPtr); +MODULE_SCOPE void TkMacOSXRestoreDrawingContext(TkMacOSXDrawingContext *dcPtr); MODULE_SCOPE void TkMacOSXSetColorInPort(unsigned long pixel, int fg, PixPatHandle penPat, CGrafPtr port); MODULE_SCOPE void TkMacOSXSetColorInContext(unsigned long pixel, @@ -303,5 +331,7 @@ MODULE_SCOPE int TkMacOSXMakeFullscreen(TkWindow *winPtr, WindowRef window, MODULE_SCOPE void TkMacOSXEnterExitFullscreen(TkWindow *winPtr, int active); MODULE_SCOPE void TkMacOSXBringWindowForward(WindowRef wRef); MODULE_SCOPE WindowRef TkMacOSXDrawableWindow(Drawable drawable); +MODULE_SCOPE void TkMacOSXWinCGBounds(TkWindow *winPtr, CGRect *bounds); +MODULE_SCOPE HIShapeRef TkMacOSXGetClipRgn(Drawable drawable); #endif /* _TKMACPRIV */ |