diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-10 08:35:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-10 08:35:36 (GMT) |
commit | 9b5a0a65cda71b616889415001c0f8e70b3a6348 (patch) | |
tree | 214b9446bb681e45ce27182210f4e461d4a2333e /macosx | |
parent | 026a39b14c1538892fa947031085b20587398a8a (diff) | |
parent | d04037e2ec5c24ef18b159dc174f9c3d6b73a0f7 (diff) | |
download | tk-9b5a0a65cda71b616889415001c0f8e70b3a6348.zip tk-9b5a0a65cda71b616889415001c0f8e70b3a6348.tar.gz tk-9b5a0a65cda71b616889415001c0f8e70b3a6348.tar.bz2 |
Merge 8.7
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXConfig.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 39 | ||||
-rw-r--r-- | macosx/tkMacOSXInt.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 22 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 12 |
11 files changed, 49 insertions, 50 deletions
diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c index 1588d21..cf90577 100644 --- a/macosx/tkMacOSXConfig.c +++ b/macosx/tkMacOSXConfig.c @@ -17,7 +17,7 @@ /* *---------------------------------------------------------------------- * - * TkpGetSystemDefault -- + * Tk_GetSystemDefault -- * * Given a dbName and className for a configuration option, * return a string representation of the option. @@ -34,7 +34,7 @@ */ Tcl_Obj * -TkpGetSystemDefault( +Tk_GetSystemDefault( Tk_Window tkwin, /* A window to use. */ const char *dbName, /* The option database name. */ const char *className) /* The name of the option class. */ diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index e8fb9dd..5ea2b4c 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1563,7 +1563,7 @@ TkMacOSXGetClipRgn( /* *---------------------------------------------------------------------- * - * TkpClipDrawableToRect -- + * Tk_ClipDrawableToRect -- * * Clip all drawing into the drawable d to the given rectangle. If width * or height are negative, reset to no clipping. @@ -1578,7 +1578,7 @@ TkMacOSXGetClipRgn( */ void -TkpClipDrawableToRect( +Tk_ClipDrawableToRect( TCL_UNUSED(Display *), Drawable d, int x, int y, @@ -1679,7 +1679,7 @@ TkMacOSXMakeStippleMap( /* *---------------------------------------------------------------------- * - * TkpDrawHighlightBorder -- + * Tk_DrawHighlightBorder -- * * This procedure draws a rectangular ring around the outside of a widget * to indicate that it has received the input focus. @@ -1701,7 +1701,7 @@ TkMacOSXMakeStippleMap( */ void -TkpDrawHighlightBorder ( +Tk_DrawHighlightBorder ( Tk_Window tkwin, GC fgGC, GC bgGC, diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 029624d..3f5d0a4 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -75,16 +75,17 @@ static void EmbedWindowDeleted(TkWindow *winPtr); */ Window -TkpMakeWindow( - TkWindow *winPtr, +Tk_MakeWindow( + Tk_Window tkwin, Window parent) { MacDrawable *macWin; + TkWindow *winPtr = (TkWindow *)tkwin; (void)parent; /* * If this window is marked as embedded then the window structure should - * have already been created in the TkpUseWindow function. + * have already been created in the Tk_UseWindow function. */ if (Tk_IsEmbedded(winPtr)) { @@ -178,7 +179,7 @@ TkpScanWindowId( /* *---------------------------------------------------------------------- * - * TkpUseWindow -- + * Tk_UseWindow -- * * This procedure causes a Tk window to use a given X window as its * parent window, rather than the root window for the screen. It is @@ -198,7 +199,7 @@ TkpScanWindowId( */ int -TkpUseWindow( +Tk_UseWindow( Tcl_Interp *interp, /* If not NULL, used for error reporting if * string is bogus. */ Tk_Window tkwin, /* Tk window that does not yet have an @@ -322,7 +323,7 @@ TkpUseWindow( /* *---------------------------------------------------------------------- * - * TkpMakeContainer -- + * Tk_MakeContainer -- * * This procedure is called to indicate that a particular window will be * a container for an embedded application. This changes certain aspects @@ -339,7 +340,7 @@ TkpUseWindow( */ void -TkpMakeContainer( +Tk_MakeContainer( Tk_Window tkwin) /* Token for a window that is about to become * a container. */ { @@ -440,7 +441,7 @@ TkMacOSXGetHostToplevel( if (!Tk_IsEmbedded(topWinPtr)) { return winPtr->privatePtr->toplevel; } - contWinPtr = TkpGetOtherWindow(topWinPtr); + contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)topWinPtr); /* * TODO: Here we should handle out of process embedding. @@ -637,13 +638,13 @@ TkpRedirectKeyEvent( /* *---------------------------------------------------------------------- * - * TkpGetOtherWindow -- + * Tk_GetOtherWindow -- * * If both the container and embedded window are in the same process, * this procedure will return either one, given the other. * * Results: - * If winPtr is a container, the return value is the token for the + * If tkwin is a container, the return value is the token for the * embedded window, and vice versa. If the "other" window isn't in this * process, NULL is returned. * @@ -653,28 +654,28 @@ TkpRedirectKeyEvent( *---------------------------------------------------------------------- */ -TkWindow * -TkpGetOtherWindow( - TkWindow *winPtr) /* Tk's structure for a container or embedded +Tk_Window +Tk_GetOtherWindow( + Tk_Window tkwin) /* Tk's structure for a container or embedded * window. */ { Container *containerPtr; /* - * TkpGetOtherWindow returns NULL if both windows are not in the same + * Tk_GetOtherWindow returns NULL if both windows are not in the same * process... */ - if (!(winPtr->flags & TK_BOTH_HALVES)) { + if (!(((TkWindow *)tkwin)->flags & TK_BOTH_HALVES)) { return NULL; } for (containerPtr = firstContainerPtr; containerPtr != NULL; containerPtr = containerPtr->nextPtr) { - if (containerPtr->embeddedPtr == winPtr) { - return containerPtr->parentPtr; - } else if (containerPtr->parentPtr == winPtr) { - return containerPtr->embeddedPtr; + if ((Tk_Window)containerPtr->embeddedPtr == tkwin) { + return (Tk_Window)containerPtr->parentPtr; + } else if ((Tk_Window)containerPtr->parentPtr == tkwin) { + return (Tk_Window)containerPtr->embeddedPtr; } } return NULL; diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h index b0af85b..145e7c0 100644 --- a/macosx/tkMacOSXInt.h +++ b/macosx/tkMacOSXInt.h @@ -160,8 +160,6 @@ typedef struct TkWindowPrivate MacDrawable; */ MODULE_SCOPE void TkMacOSXDefaultStartupScript(void); -MODULE_SCOPE void TkpClipDrawableToRect(Display *display, Drawable d, int x, - int y, int width, int height); MODULE_SCOPE void TkpRetainRegion(Region r); MODULE_SCOPE void TkpReleaseRegion(Region r); MODULE_SCOPE void TkpShiftButton(NSButton *button, NSPoint delta); diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 794e704..b60c15f 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -665,7 +665,7 @@ setXEventPoint( int win_x, win_y; if (Tk_IsEmbedded(winPtr)) { - TkWindow *contPtr = TkpGetOtherWindow(winPtr); + TkWindow *contPtr = (TkWindow *)Tk_GetOtherWindow(tkwin); if (Tk_IsTopLevel(contPtr)) { local.x -= contPtr->wmInfoPtr->xInParent; local.y -= contPtr->wmInfoPtr->yInParent; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 8ffccfa..fbfb856 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -1103,7 +1103,7 @@ TkpSetWindowMenuBar( /* *---------------------------------------------------------------------- * - * TkpSetMainMenubar -- + * Tk_SetMainMenubar -- * * Puts the menu associated with a window into the menubar. Should only be * called when the window is in front. @@ -1123,7 +1123,7 @@ TkpSetWindowMenuBar( */ void -TkpSetMainMenubar( +Tk_SetMainMenubar( Tcl_Interp *interp, /* The interpreter of the application */ Tk_Window tkwin, /* The frame we are setting up */ const char *menuName) /* The name of the menu to put in front. */ diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 0624f30..891421f 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -361,7 +361,7 @@ enum { local.x = floor(local.x); local.y = floor(eventWindow.frame.size.height - local.y); if (Tk_IsEmbedded(winPtr)) { - TkWindow *contPtr = TkpGetOtherWindow(winPtr); + TkWindow *contPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (Tk_IsTopLevel(contPtr)) { local.x -= contPtr->wmInfoPtr->xInParent; local.y -= contPtr->wmInfoPtr->yInParent; diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 6ed53ee..abf2073 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -293,7 +293,7 @@ TkpDisplayScrollbar( } else { fgGC = bgGC; } - TkpDrawHighlightBorder(tkwin, fgGC, bgGC, scrollPtr->highlightWidth, + Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, scrollPtr->highlightWidth, (Pixmap) macWin); } diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index afadb32..5c6a746 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -198,14 +198,14 @@ XMapWindow( Tk_UpdatePointer((Tk_Window) winPtr, x, y, [NSApp tkButtonState]); } } else { - TkWindow *contWinPtr = TkpGetOtherWindow(winPtr); + Tk_Window contWinPtr = Tk_GetOtherWindow((Tk_Window)winPtr); /* * Rebuild the container's clipping region and display * the window. */ - TkMacOSXInvalClipRgns((Tk_Window)contWinPtr); + TkMacOSXInvalClipRgns(contWinPtr); TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW); } TkMacOSXInvalClipRgns((Tk_Window)winPtr); @@ -546,7 +546,7 @@ MoveResizeWindow( */ if (Tk_IsEmbedded(macWin->winPtr)) { - TkWindow *contWinPtr = TkpGetOtherWindow(macWin->winPtr); + TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->winPtr); if (contWinPtr) { macParent = contWinPtr->privatePtr; @@ -804,7 +804,7 @@ TkMacOSXSetDrawingEnabled( */ if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr) { TkMacOSXSetDrawingEnabled(childPtr, flag); @@ -885,7 +885,7 @@ TkMacOSXUpdateClipRgn( ChkErr(TkMacOSHIShapeDifferenceWithRect, rgn, &bounds); } } else if (Tk_IsEmbedded(winPtr)) { - win2Ptr = TkpGetOtherWindow(winPtr); + win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (win2Ptr) { TkMacOSXUpdateClipRgn(win2Ptr); ChkErr(HIShapeIntersect, @@ -918,7 +918,7 @@ TkMacOSXUpdateClipRgn( } if (Tk_IsContainer(winPtr)) { - win2Ptr = TkpGetOtherWindow(winPtr); + win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (win2Ptr) { if (Tk_IsMapped(win2Ptr)) { TkMacOSXWinCGBounds(win2Ptr, &bounds); @@ -952,7 +952,7 @@ TkMacOSXUpdateClipRgn( if (!Tk_IsTopLevel(winPtr)) { TkMacOSXUpdateClipRgn(winPtr->parentPtr); } else if (Tk_IsEmbedded(winPtr)) { - win2Ptr = TkpGetOtherWindow(winPtr); + win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (win2Ptr) { TkMacOSXUpdateClipRgn(win2Ptr); } @@ -1115,7 +1115,7 @@ Tk_MacOSXGetNSWindowForDrawable( macWin->winPtr->wmInfoPtr->window) { result = macWin->winPtr->wmInfoPtr->window; } else if (macWin->toplevel && (macWin->toplevel->flags & TK_EMBEDDED)) { - TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr); + TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->toplevel->winPtr); if (contWinPtr) { result = TkMacOSXGetNSWindowForDrawable((Drawable)contWinPtr->privatePtr); @@ -1161,7 +1161,7 @@ TkMacOSXGetRootControl( } else if (!(macWin->toplevel->flags & TK_EMBEDDED)) { result = macWin->toplevel->view; } else { - TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr); + TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->toplevel->winPtr); if (contWinPtr) { result = TkMacOSXGetRootControl((Drawable)contWinPtr->privatePtr); @@ -1243,7 +1243,7 @@ TkMacOSXInvalClipRgns( */ if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr) { TkMacOSXInvalClipRgns((Tk_Window)childPtr); @@ -1398,7 +1398,7 @@ UpdateOffsets( } if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr != NULL) { UpdateOffsets(childPtr,deltaX,deltaY); } diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 56d69b2..cae3d02 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -572,7 +572,7 @@ GenerateUpdates( */ if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr != NULL && Tk_IsMapped(childPtr)) { GenerateUpdates(updateBounds, childPtr); } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 3aaf423..74ea7cf 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -4456,7 +4456,7 @@ UpdateGeometryInfo( */ if (Tk_IsEmbedded(winPtr)) { - TkWindow *contWinPtr = TkpGetOtherWindow(winPtr); + Tk_Window contWinPtr = Tk_GetOtherWindow((Tk_Window)winPtr); /* * TODO: Here we should handle out of process embedding. @@ -4473,7 +4473,7 @@ UpdateGeometryInfo( wmPtr->x = wmPtr->y = 0; wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y); - Tk_GeometryRequest((Tk_Window)contWinPtr, width, height); + Tk_GeometryRequest(contWinPtr, width, height); } return; } @@ -4746,7 +4746,7 @@ Tk_GetRootCoords( break; } - otherPtr = TkpGetOtherWindow(winPtr); + otherPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (otherPtr == NULL) { break; } @@ -4829,7 +4829,7 @@ Tk_CoordsToWindow( */ if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr != NULL) { if (Tk_IsMapped(childPtr)) { tmpx = x - childPtr->changes.x; @@ -4925,7 +4925,7 @@ Tk_TopCoordsToWindow( */ if (Tk_IsContainer(winPtr)) { - childPtr = TkpGetOtherWindow(winPtr); + childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (childPtr != NULL) { if (Tk_IsMapped(childPtr) && x > childPtr->changes.x && @@ -6275,7 +6275,7 @@ TkMacOSXMakeRealWindowExist( */ if (Tk_IsEmbedded(winPtr)) { - TkWindow *contWinPtr = TkpGetOtherWindow(winPtr); + TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); if (contWinPtr != NULL) { TkMacOSXMakeRealWindowExist( |