diff options
-rw-r--r-- | doc/CrtCmHdlr.3 | 2 | ||||
-rw-r--r-- | doc/CrtGenHdlr.3 | 2 | ||||
-rw-r--r-- | doc/EventHndlr.3 | 2 | ||||
-rw-r--r-- | doc/HandleEvent.3 | 2 | ||||
-rw-r--r-- | doc/MoveToplev.3 | 2 | ||||
-rw-r--r-- | doc/RestrictEv.3 | 6 | ||||
-rw-r--r-- | generic/tkCanvPs.c | 2 | ||||
-rw-r--r-- | generic/tkCanvas.c | 4 | ||||
-rw-r--r-- | generic/tkGrab.c | 2 | ||||
-rw-r--r-- | generic/tkPlace.c | 2 | ||||
-rw-r--r-- | generic/tkStyle.c | 2 | ||||
-rw-r--r-- | generic/tkText.c | 2 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 4 | ||||
-rw-r--r-- | generic/tkTextIndex.c | 18 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 | ||||
-rw-r--r-- | library/text.tcl | 2 | ||||
-rw-r--r-- | macosx/README | 12 | ||||
-rw-r--r-- | macosx/tkMacOSXConstants.h | 14 | ||||
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXInit.c | 34 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXServices.c | 5 | ||||
-rw-r--r-- | macosx/tkMacOSXTest.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 2 | ||||
-rw-r--r-- | tests/bind.test | 4 | ||||
-rw-r--r-- | unix/tkUnix3d.c | 2 | ||||
-rw-r--r-- | unix/tkUnixColor.c | 2 | ||||
-rw-r--r-- | win/tkWinFont.c | 2 | ||||
-rw-r--r-- | win/tkWinInit.c | 2 | ||||
-rw-r--r-- | win/tkWinTest.c | 5 |
30 files changed, 67 insertions, 86 deletions
diff --git a/doc/CrtCmHdlr.3 b/doc/CrtCmHdlr.3 index 98b93f7..bcc9493 100644 --- a/doc/CrtCmHdlr.3 +++ b/doc/CrtCmHdlr.3 @@ -31,7 +31,7 @@ drop applications. The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that -call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or +call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the diff --git a/doc/CrtGenHdlr.3 b/doc/CrtGenHdlr.3 index c2161d1..671d105 100644 --- a/doc/CrtGenHdlr.3 +++ b/doc/CrtGenHdlr.3 @@ -38,7 +38,7 @@ use with Tk, and so on. The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that -call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or +call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the diff --git a/doc/EventHndlr.3 b/doc/EventHndlr.3 index 97857fb..d06de86 100644 --- a/doc/EventHndlr.3 +++ b/doc/EventHndlr.3 @@ -38,7 +38,7 @@ by \fImask\fR occurs in the window specified by \fItkwin\fR. The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR; this mechanism only works in programs that dispatch events through \fBTk_HandleEvent\fR (or through other Tk procedures that -call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or +call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or \fBTk_MainLoop\fR). .PP \fIProc\fR should have arguments and result that match the diff --git a/doc/HandleEvent.3 b/doc/HandleEvent.3 index bc293b6..38b5660 100644 --- a/doc/HandleEvent.3 +++ b/doc/HandleEvent.3 @@ -25,7 +25,7 @@ that all unused fields of the structure be set to zero. .PP \fBTk_HandleEvent\fR is a lower-level procedure that deals with window events. It is called by \fBTcl_ServiceEvent\fR (and indirectly by -\fBTk_DoOneEvent\fR), and in a few other cases within Tk. +\fBTcl_DoOneEvent\fR), and in a few other cases within Tk. It makes callbacks to any window event handlers (created by calls to \fBTk_CreateEventHandler\fR) that match \fIeventPtr\fR and then returns. In some cases diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3 index effed29..00bbaa5 100644 --- a/doc/MoveToplev.3 +++ b/doc/MoveToplev.3 @@ -46,6 +46,6 @@ menus that want to appear at a particular place on the screen. When \fBTk_MoveToplevelWindow\fR is called it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, -using the \fBTk_DoWhenIdle\fR mechanism. +using the \fBTcl_DoWhenIdle\fR mechanism. .SH KEYWORDS position, top-level window, window manager diff --git a/doc/RestrictEv.3 b/doc/RestrictEv.3 index eb1f040..22014a7 100644 --- a/doc/RestrictEv.3 +++ b/doc/RestrictEv.3 @@ -30,7 +30,7 @@ Pointer to place to save argument to previous restrict procedure. .PP This procedure is useful in certain situations where applications are only prepared to receive certain X events. After -\fBTk_RestrictEvents\fR is called, \fBTk_DoOneEvent\fR (and +\fBTk_RestrictEvents\fR is called, \fBTcl_DoOneEvent\fR (and hence \fBTk_MainLoop\fR) will filter X input events through \fIproc\fR. \fIProc\fR indicates whether a given event is to be processed immediately, deferred until some @@ -48,7 +48,7 @@ to \fBTk_RestrictEvents\fR; it may be used to provide \fIproc\fR with information it needs to filter events. The \fIeventPtr\fR points to an event under consideration. \fIProc\fR returns a restrict action (enumerated type \fBTk_RestrictAction\fR) that indicates what -\fBTk_DoOneEvent\fR should do with the event. If the return value is +\fBTcl_DoOneEvent\fR should do with the event. If the return value is \fBTK_PROCESS_EVENT\fR, then the event will be handled immediately. If the return value is \fBTK_DEFER_EVENT\fR, then the event will be left on the event queue for later processing. If the return value is @@ -74,6 +74,6 @@ solution in these situations is to call \fBXNextEvent\fR or \fBXWindowEvent\fR, but these procedures cannot be used because Tk keeps its own event queue that is separate from the X event queue. Instead, call \fBTk_RestrictEvents\fR to set up a filter, -then call \fBTk_DoOneEvent\fR to retrieve the desired event(s). +then call \fBTcl_DoOneEvent\fR to retrieve the desired event(s). .SH KEYWORDS delay, event, filter, restriction diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index 2bfdcc5..4e41a2a 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -381,7 +381,7 @@ TkCanvPostscriptCmd( */ psInfo.chan = Tcl_GetChannel(interp, psInfo.channelName, &mode); - if (psInfo.chan == (Tcl_Channel) NULL) { + if (psInfo.chan == NULL) { result = TCL_ERROR; goto cleanup; } diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 414c6fb..4d260dc 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -698,7 +698,7 @@ Tk_CanvasObjCmd( canvasPtr->textInfo.cursorOn = 0; canvasPtr->insertOnTime = 0; canvasPtr->insertOffTime = 0; - canvasPtr->insertBlinkHandler = (Tcl_TimerToken) NULL; + canvasPtr->insertBlinkHandler = NULL; canvasPtr->xOrigin = canvasPtr->yOrigin = 0; canvasPtr->drawableXOrigin = canvasPtr->drawableYOrigin = 0; canvasPtr->bindingTable = NULL; @@ -5307,7 +5307,7 @@ CanvasFocusProc( } else { canvasPtr->textInfo.gotFocus = 0; canvasPtr->textInfo.cursorOn = 0; - canvasPtr->insertBlinkHandler = (Tcl_TimerToken) NULL; + canvasPtr->insertBlinkHandler = NULL; } EventuallyRedrawItem(canvasPtr, canvasPtr->textInfo.focusItemPtr); if (canvasPtr->highlightWidth > 0) { diff --git a/generic/tkGrab.c b/generic/tkGrab.c index 21c06a9..dc0e8fc 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -1382,7 +1382,7 @@ QueueGrabWindowChange( static int GrabWinEventProc( Tcl_Event *evPtr, /* Event of type NewGrabWinEvent. */ - int flags) /* Flags argument to Tk_DoOneEvent: indicates + int flags) /* Flags argument to Tcl_DoOneEvent: indicates * what kinds of events are being processed * right now. */ { diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 7aa9b04..59b8a2b 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -616,7 +616,7 @@ ConfigureSlave( Tk_SavedOptions savedOptions; int mask; Slave *slavePtr; - Tk_Window masterWin = (Tk_Window) NULL; + Tk_Window masterWin = NULL; TkWindow *master; if (Tk_TopWinHierarchy(tkwin)) { diff --git a/generic/tkStyle.c b/generic/tkStyle.c index e7401df..d9299d1 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -1360,7 +1360,7 @@ Tk_GetStyle( "style \"%s\" doesn't exist", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, NULL); } - return (Tk_Style) NULL; + return NULL; } stylePtr = Tcl_GetHashValue(entryPtr); diff --git a/generic/tkText.c b/generic/tkText.c index ab06089..7c62621 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -4927,7 +4927,7 @@ DumpLine( TkTextEmbWindow *ewPtr = &segPtr->body.ew; const char *pathname; - if (ewPtr->tkwin == (Tk_Window) NULL) { + if (ewPtr->tkwin == NULL) { pathname = ""; } else { pathname = Tk_PathName(ewPtr->tkwin); diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index fcefb9a..c848fd2 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -626,7 +626,7 @@ static void AsyncUpdateLineMetrics(ClientData clientData); static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync); static void AsyncUpdateYScrollbar(ClientData clientData); static int IsStartOfNotMergedLine(TkText *textPtr, - CONST TkTextIndex *indexPtr); + const TkTextIndex *indexPtr); /* * Result values returned by TextGetScrollInfoObj: @@ -6988,7 +6988,7 @@ FindDLine( static int IsStartOfNotMergedLine( TkText *textPtr, /* Widget record for text widget. */ - CONST TkTextIndex *indexPtr) /* Index to check. */ + const TkTextIndex *indexPtr) /* Index to check. */ { TkTextIndex indexPtr2; diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 582e1a8..7430197 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -40,9 +40,9 @@ static const char * StartEnd(TkText *textPtr, const char *string, static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr, TkText *textPtr, const char *string, TkTextIndex *indexPtr, int *canCachePtr); -static int IndexCountBytesOrdered(CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, - CONST TkTextIndex *indexPtr2); +static int IndexCountBytesOrdered(const TkText *textPtr, + const TkTextIndex *indexPtr1, + const TkTextIndex *indexPtr2); /* * The "textindex" Tcl_Obj definition: @@ -1636,9 +1636,9 @@ TkTextIndexForwChars( int TkTextIndexCountBytes( - CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, /* Index describing one location. */ - CONST TkTextIndex *indexPtr2) /* Index describing second location. */ + const TkText *textPtr, + const TkTextIndex *indexPtr1, /* Index describing one location. */ + const TkTextIndex *indexPtr2) /* Index describing second location. */ { int compare = TkTextIndexCmp(indexPtr1, indexPtr2); @@ -1653,11 +1653,11 @@ TkTextIndexCountBytes( static int IndexCountBytesOrdered( - CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, + const TkText *textPtr, + const TkTextIndex *indexPtr1, /* Index describing location of character from * which to count. */ - CONST TkTextIndex *indexPtr2) + const TkTextIndex *indexPtr2) /* Index describing location of last character * at which to stop the count. */ { diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 917d3bd..ee8e1a9 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -852,7 +852,7 @@ TkCreateMainWindow( * Create the basic TkWindow structure. */ - tkwin = CreateTopLevelWindow(interp, (Tk_Window) NULL, baseName, + tkwin = CreateTopLevelWindow(interp, NULL, baseName, screenName, /* flags */ 0); if (tkwin == NULL) { return NULL; diff --git a/library/text.tcl b/library/text.tcl index d53aa32..7d12e18 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -1212,6 +1212,6 @@ proc ::tk::TextScanDrag {w x y} { } if {[info exists Priv(mouseMoved)] && $Priv(mouseMoved)} { $w scan dragto $x $y - } + } } diff --git a/macosx/README b/macosx/README index bed8d22..7df4893 100644 --- a/macosx/README +++ b/macosx/README @@ -26,7 +26,7 @@ before asking on the list, many questions have already been answered). --------------------------- - There are two versions of Tk available on macOS: TkAqua using the native -aqua widgets and look&feel, and TkX11 using the traditional unix X11 wigets. +aqua widgets and look&feel, and TkX11 using the traditional unix X11 widgets. TkX11 requires an X11 server to be installed, such as Apple's X11 (which is available as an optional or default install on recent macOS). TkAqua and TkX11 can be distinguished at runtime via [tk windowingsystem]. @@ -490,7 +490,7 @@ The macOS Tk application does not call the [NSApp run] method at all. Instead it uses the event loop built in to Tk. So the application must take care to replicate the important features of the method ourselves. The way that autorelease pools are handled is -discussed in 4.2 below. Here we discuss the event handling itself. +discussed in 5.2 below. Here we discuss the event handling itself. The Tcl event loop simply consists of repeated calls to TclDoOneEvent. Each call to TclDoOneEvent begins by collecting all pending events from @@ -523,7 +523,7 @@ event to the Tcl queue. In order to carry out the job of managing autorelease pools, which would normally be handled by the [NSApp run] method, a private -NSAUtoreleasePool* property is added to the TkApplication subclass of +NSAutoreleasePool* property is added to the TkApplication subclass of NSApplication. The TkpInit function calls [NSApp _setup] which initializes this property by creating an NSAutoreleasePool prior to calling [NSApp finishLaunching]. This mimics the behavior of the @@ -548,7 +548,7 @@ in nested calls to CheckProc. One additional minor caveat for developers is that there are several steps of the Tk initialization which precede the call to TkpInit. Notably, the font package is initialized first. Since there is no -NSAUtoreleasePool in scope prior to calling TkpInit, the functions +NSAutoreleasePool in scope prior to calling TkpInit, the functions called in these preliminary stages need to create and drain their own NSAutoreleasePools whenever they call methods of Appkit objects (e.g. NSFont). @@ -568,7 +568,7 @@ window. (Normally, the clipping rectangle is the same as the bounding rectangle, but drawing can be clipped to a smaller rectangle by calling TkpClipDrawableToRect.) The aboveVisRgn is the intersection of the window's bounding rectangle with the bounding rectangle of the -parent window. Much of the code in tkMacOSXSubindows.c is devoted to +parent window. Much of the code in tkMacOSXSubwindows.c is devoted to rebuilding these clipping regions whenever something changes in the layout of the windows. This turns out to be a tricky thing to do and it is extremely prone to errors which can be difficult to trace. @@ -702,7 +702,7 @@ that LaunchServices is launching the correct Wish.app. Instructions for doing this are provided below. The command line tool which manages the LaunchServices database has -an amazingly unwieldy path name. So, first, run this command: +an amazingly unwieldy path name. So, first, run this command: alias lsregister='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister' diff --git a/macosx/tkMacOSXConstants.h b/macosx/tkMacOSXConstants.h index 0badf1a..8ef535c 100644 --- a/macosx/tkMacOSXConstants.h +++ b/macosx/tkMacOSXConstants.h @@ -79,22 +79,8 @@ #define NSInformationalAlertStyle NSAlertStyleInformational #define NSCriticalAlertStyle NSAlertStyleCritical #define NSCenterTextAlignment NSTextAlignmentCenter -#define NSDeviceIndependentModifierFlagsMask NSEventModifierFlagDeviceIndependentFlagsMask -#define NSCommandKeyMask NSEventModifierFlagCommand -#define NSShiftKeyMask NSEventModifierFlagShift -#define NSAlphaShiftKeyMask NSEventModifierFlagCapsLock -#define NSAlternateKeyMask NSEventModifierFlagOption -#define NSControlKeyMask NSEventModifierFlagControl -#define NSNumericPadKeyMask NSEventModifierFlagNumericPad -#define NSFunctionKeyMask NSEventModifierFlagFunction -#define NSKeyUp NSEventTypeKeyUp -#define NSKeyDown NSEventTypeKeyDown -#define NSFlagsChanged NSEventTypeFlagsChanged -#define NSAlphaShiftKeyMask NSEventModifierFlagCapsLock -#define NSShiftKeyMask NSEventModifierFlagShift #define NSAnyEventMask NSEventMaskAny #define NSApplicationDefinedMask NSEventMaskApplicationDefined -#define NSTexturedBackgroundWindowMask NSWindowStyleMaskTexturedBackground #define NSUtilityWindowMask NSWindowStyleMaskUtilityWindow #define NSNonactivatingPanelMask NSWindowStyleMaskNonactivatingPanel #define NSDocModalWindowMask NSWindowStyleMaskDocModalWindow diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index d2843a8..0f63ea6 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -126,7 +126,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); - (void) handlePrintDocumentsEvent: (NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent { - + NSString* file = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; const char *printFile=[file UTF8String]; @@ -134,7 +134,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); Tcl_DStringInit(&print); if (Tcl_FindCommand(_eventInterp, "::tk::mac::PrintDocument", NULL, 0)) { Tcl_DStringAppend(&print, "::tk::mac::PrintDocument", -1); - } + } Tcl_DStringAppendElement(&print, printFile); int tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&print), Tcl_DStringLength(&print), TCL_EVAL_GLOBAL); @@ -272,7 +272,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); Tcl_DStringInit(&launch); if (Tcl_FindCommand(_eventInterp, "::tk::mac::LaunchURL", NULL, 0)) { Tcl_DStringAppend(&launch, "::tk::mac::LaunchURL", -1); - } + } Tcl_DStringAppendElement(&launch, cURL); int tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&launch), Tcl_DStringLength(&launch), TCL_EVAL_GLOBAL); @@ -454,7 +454,7 @@ TkMacOSXInitAppleEvents( [aeManager setEventHandler:NSApp andSelector:@selector(handleURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; - + } } diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 3efe0c6..bf0b9f2 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -388,14 +388,14 @@ TkpInit( TkMacOSXRegisterServiceWidgetObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "::tk::mac::iconBitmap", TkMacOSXIconBitmapObjCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath,(ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); + Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath, NULL, NULL); /* * Initialize the NSServices object here. Apple's docs say to do this - * in applicationDidFinishLaunching, but the Tcl interpreter is not - * initialized until this function call. + * in applicationDidFinishLaunching, but the Tcl interpreter is not + * initialized until this function call. */ - + TkMacOSXServices_Init(interp); return TCL_OK; @@ -457,28 +457,28 @@ int TkMacOSXGetAppPath( ClientData cd, Tcl_Interp *ip, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) { CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - - /* - * Convert the URL reference into a string reference. + + /* + * Convert the URL reference into a string reference. */ - + CFStringRef appPath = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle); - - /* - * Get the system encoding method. + + /* + * Get the system encoding method. */ - + CFStringEncoding encodingMethod = CFStringGetSystemEncoding(); - - /* - * Convert the string reference into a C string. + + /* + * Convert the string reference into a C string. */ - + char *path = (char *) CFStringGetCStringPtr(appPath, encodingMethod); Tcl_SetResult(ip, path, NULL); diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index a67f894..98ee54f 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -431,7 +431,7 @@ VISIBILITY_HIDDEN #endif /* _TKMACPRIV */ -int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv[]); +int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]); /* * Local Variables: diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c index af40a91..809c708 100644 --- a/macosx/tkMacOSXServices.c +++ b/macosx/tkMacOSXServices.c @@ -1,6 +1,6 @@ /* * tkMacOSXServices.c -- - * + *\ * This file allows the integration of Tk and the Cocoa NSServices API. * * Copyright (c) 2010-2019 Kevin Walzer/WordTech Communications LLC. @@ -54,7 +54,6 @@ ServicesEventProc( NSArray *sendTypes = [NSArray arrayWithObjects:@"NSStringPboardType", @"NSPasteboardTypeString", nil]; [NSApp registerServicesMenuSendTypes:sendTypes returnTypes:sendTypes]; - NSUpdateDynamicServices(); return; } @@ -159,7 +158,7 @@ TkMacOSXRegisterServiceWidgetObjCmd( ClientData cd, Tcl_Interp *ip, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) { /* * Need proper number of args. diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c index eabc14e..f109b7a 100644 --- a/macosx/tkMacOSXTest.c +++ b/macosx/tkMacOSXTest.c @@ -50,8 +50,7 @@ TkplatformtestInit( */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1080 - Tcl_CreateObjCommand(interp, "debugger", DebuggerObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "debugger", DebuggerObjCmd, NULL, NULL); #endif return TCL_OK; diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index e7bcbdf..1353577 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1015,7 +1015,7 @@ TkWmDeadWindow( */ if (winPtr->parentPtr) { - while (Tk_DoOneEvent(TK_WINDOW_EVENTS|TK_DONT_WAIT)) {} + while (Tcl_DoOneEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT)) {} } [NSApp _resetAutoreleasePool]; #if DEBUG_ZOMBIES > 0 diff --git a/tests/bind.test b/tests/bind.test index 7c5ccf1..981ba32 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -5938,7 +5938,7 @@ test bind-28.8 {keysym names} -setup { } -result {X x {keysym X}} -test bind-29.1 {Tk_BackgroundError procedure} -setup { +test bind-29.1 {Tcl_BackgroundError procedure} -setup { proc bgerror msg { global x errorInfo set x [list $msg $errorInfo] @@ -5962,7 +5962,7 @@ test bind-29.1 {Tk_BackgroundError procedure} -setup { "error "This is a test"" (command bound to event)}} -test bind-29.2 {Tk_BackgroundError procedure} -setup { +test bind-29.2 {Tcl_BackgroundError procedure} -setup { proc do {} { event generate .t.f <Button> event generate .t.f <ButtonRelease> diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c index 2969de1..7ea67a1 100644 --- a/unix/tkUnix3d.c +++ b/unix/tkUnix3d.c @@ -443,7 +443,7 @@ TkpGetShadows( } if (borderPtr->shadow == None) { - borderPtr->shadow = Tk_GetBitmap((Tcl_Interp *) NULL, tkwin, + borderPtr->shadow = Tk_GetBitmap(NULL, tkwin, Tk_GetUid("gray50")); if (borderPtr->shadow == None) { Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border"); diff --git a/unix/tkUnixColor.c b/unix/tkUnixColor.c index 43500ad..ccc6f33 100644 --- a/unix/tkUnixColor.c +++ b/unix/tkUnixColor.c @@ -157,7 +157,7 @@ TkpGetColor( } if (strlen(name) > 99) { /* Don't bother to parse this. [Bug 2809525]*/ - return (TkColor *) NULL; + return NULL; } else if (XAllocNamedColor(display, colormap, name, &screen, &color) != 0) { DeleteStressedCmap(display, colormap); } else { diff --git a/win/tkWinFont.c b/win/tkWinFont.c index e47637c..6e8d3bd 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -1823,7 +1823,7 @@ AllocFontFamily( } if (encoding == NULL) { - encoding = Tcl_GetEncoding(NULL, "unicode"); + encoding = TkWinGetUnicodeEncoding(); familyPtr->textOutProc = (BOOL (WINAPI *)(HDC, int, int, TCHAR *, int)) TextOutW; familyPtr->getTextExtentPoint32Proc = diff --git a/win/tkWinInit.c b/win/tkWinInit.c index 780888a..e3c75de 100644 --- a/win/tkWinInit.c +++ b/win/tkWinInit.c @@ -199,7 +199,7 @@ TkWin32ErrorObj( } #ifdef _UNICODE - Tcl_WinTCharToUtf(lpBuffer, wcslen(lpBuffer) * sizeof (WCHAR), &ds); + Tcl_WinTCharToUtf(lpBuffer, -1, &ds); errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); #else diff --git a/win/tkWinTest.c b/win/tkWinTest.c index 6e79df3..04ecb97 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -175,12 +175,9 @@ AppendSystemError( } msg = msgBuf; } else { - Tcl_Encoding encoding; char *msgPtr; - encoding = Tcl_GetEncoding(NULL, "unicode"); - Tcl_ExternalToUtfDString(encoding, (char *) wMsgPtr, -1, &ds); - Tcl_FreeEncoding(encoding); + Tcl_WinTCharToUtf(wMsgPtr, -1, &ds); LocalFree(wMsgPtr); msgPtr = Tcl_DStringValue(&ds); |