summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2019-06-21 12:01:41 (GMT)
committerKevin Walzer <kw@codebykevin.com>2019-06-21 12:01:41 (GMT)
commitfa95af8befdf1f0cbeb26ca20e96a10c91af5e6f (patch)
tree817465bb1a662da81c2b004db5ddd2ae71417800 /macosx
parent30fc8288f30a0b85762005fe52e18d254044d43b (diff)
downloadtk-fa95af8befdf1f0cbeb26ca20e96a10c91af5e6f.zip
tk-fa95af8befdf1f0cbeb26ca20e96a10c91af5e6f.tar.gz
tk-fa95af8befdf1f0cbeb26ca20e96a10c91af5e6f.tar.bz2
Documentation cleanup and removal of redundant constants; thanks to Christopher Chavez for reports and patch
Diffstat (limited to 'macosx')
-rw-r--r--macosx/README10
-rw-r--r--macosx/tkMacOSXConstants.h14
2 files changed, 5 insertions, 19 deletions
diff --git a/macosx/README b/macosx/README
index bed8d22..f35c128 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.
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