diff options
author | das <das> | 2007-06-29 03:20:00 (GMT) |
---|---|---|
committer | das <das> | 2007-06-29 03:20:00 (GMT) |
commit | 4e181c63c986a017ea3fc207a5e1db60e3cf421a (patch) | |
tree | 05f288d4eecbd4785ba86178ba73ebfc79a81895 /macosx/tkMacOSXWm.c | |
parent | d866846c0db267970930ce4e9dad80d17ad5be93 (diff) | |
download | tk-4e181c63c986a017ea3fc207a5e1db60e3cf421a.zip tk-4e181c63c986a017ea3fc207a5e1db60e3cf421a.tar.gz tk-4e181c63c986a017ea3fc207a5e1db60e3cf421a.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 respect it for ATSUI font drawing.
* 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:
* macosx/ttkMacOSXTheme.c:
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 0f5abf3..d307bce 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -13,10 +13,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.54 2007/06/09 17:09:41 das Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.55 2007/06/29 03:20:02 das Exp $ */ -#include "tkMacOSXInt.h" +#include "tkMacOSXPrivate.h" #include "tkScrollbar.h" #include "tkMacOSXWm.h" #include "tkMacOSXEvent.h" @@ -997,7 +997,7 @@ WmAttributesCmd( if (!TkMacOSXHostToplevelExists(winPtr)) { TkMacOSXMakeRealWindowExist(winPtr); } - macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); + macWindow = TkMacOSXDrawableWindow(winPtr->window); if (objc == 3) { /* wm attributes $win */ Tcl_Obj *result = Tcl_NewListObj(0,0); @@ -1648,8 +1648,8 @@ WmIconbitmapCmd( if (!TkMacOSXHostToplevelExists(winPtr)) { TkMacOSXMakeRealWindowExist(winPtr); } - if (WmSetAttribute(winPtr, GetWindowFromPort(TkMacOSXGetDrawablePort( - winPtr->window)), interp, WMATT_TITLEPATH, objv[3]) == TCL_OK) { + if (WmSetAttribute(winPtr, TkMacOSXDrawableWindow(winPtr->window), interp, + WMATT_TITLEPATH, objv[3]) == TCL_OK) { if (!len) { if (wmPtr->hints.icon_pixmap != None) { Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap); @@ -4074,7 +4074,7 @@ TkWmRestackToplevel( TkWmMapWindow(winPtr); } - macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); + macWindow = TkMacOSXDrawableWindow(winPtr->window); /* * Get the window in which a raise or lower is in relation to. @@ -4086,8 +4086,7 @@ TkWmRestackToplevel( if (otherPtr->wmInfoPtr->flags & WM_NEVER_MAPPED) { TkWmMapWindow(otherPtr); } - otherMacWindow = GetWindowFromPort(TkMacOSXGetDrawablePort( - otherPtr->window)); + otherMacWindow = TkMacOSXDrawableWindow(otherPtr->window); } else { otherMacWindow = NULL; } @@ -4572,8 +4571,7 @@ TkSetWMName( title = CFStringCreateWithBytes(NULL, (const unsigned char*) titleUid, strlen(titleUid), kCFStringEncodingUTF8, false); if (title) { - WindowRef macWin = GetWindowFromPort( - TkMacOSXGetDrawablePort(winPtr->window)); + WindowRef macWin = TkMacOSXDrawableWindow(winPtr->window); SetWindowTitleWithCFString(macWin, title); CFRelease(title); @@ -4695,8 +4693,7 @@ TkMacOSXIsWindowZoomed( idealSize.v = maxHeight; } - return IsWindowInStandardState( - GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)), + return IsWindowInStandardState(TkMacOSXDrawableWindow(winPtr->window), &idealSize, NULL); } @@ -5442,7 +5439,7 @@ TkpWmSetState(winPtr, state) return; } - macWin = GetWindowFromPort(TkMacOSXGetDrawablePort (winPtr->window)); + macWin = TkMacOSXDrawableWindow(winPtr->window); if (state == WithdrawnState) { Tk_UnmapWindow((Tk_Window) winPtr); @@ -5694,7 +5691,7 @@ WmStackorderToplevelWrapperMap( if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && (winPtr->display == display)) { - macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); + macWindow = TkMacOSXDrawableWindow(winPtr->window); hPtr = Tcl_CreateHashEntry(table, (const char *) macWindow, &newEntry); @@ -5831,8 +5828,7 @@ ApplyWindowClassAttributeChanges( return; } } - macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort( - winPtr->window)); + macWindow = TkMacOSXDrawableWindow(winPtr->window); } if (wmPtr->macClass != oldClass) { TK_IF_MAC_OS_X_API (4, HIWindowChangeClass, @@ -5934,7 +5930,7 @@ ApplyMasterOverrideChanges( if (!TkMacOSXHostToplevelExists(winPtr)) { return; } - macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); + macWindow = TkMacOSXDrawableWindow(winPtr->window); } if (macWindow) { Tcl_Obj *val; |