summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-10 08:10:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-10 08:10:29 (GMT)
commit7b3b30d439640b2474a81ff1b97c8ae264811165 (patch)
tree05e00c4d3ff33c3693eecf185af839c020854fc1 /macosx
parent3d9f5433b611ddba5d4c1f219d61bfcde319034f (diff)
parent44cdf94725d440ad4b97077853722891d2d9cd7d (diff)
downloadtk-7b3b30d439640b2474a81ff1b97c8ae264811165.zip
tk-7b3b30d439640b2474a81ff1b97c8ae264811165.tar.gz
tk-7b3b30d439640b2474a81ff1b97c8ae264811165.tar.bz2
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
*** POTENTIAL INCOMPATIBILITY *** on Windows only: gcc/clang/MSVC will generate new warnings in extensions when the "None" symbol is used incorrectly. Those warnings are all fixed in the core, that's what most of this commit is doing.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDefault.h4
-rw-r--r--macosx/tkMacOSXDialog.c4
-rw-r--r--macosx/tkMacOSXEmbed.c6
-rw-r--r--macosx/tkMacOSXEntry.c4
-rw-r--r--macosx/tkMacOSXImage.c2
-rw-r--r--macosx/tkMacOSXInit.c2
-rw-r--r--macosx/tkMacOSXMenu.c4
-rw-r--r--macosx/tkMacOSXMouseEvent.c4
-rw-r--r--macosx/tkMacOSXNotify.c6
-rw-r--r--macosx/tkMacOSXPrivate.h2
-rw-r--r--macosx/tkMacOSXScrlbr.c10
-rw-r--r--macosx/tkMacOSXWm.c6
12 files changed, 27 insertions, 27 deletions
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index b749673..a0b6a79 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -37,7 +37,7 @@
#define ACTIVE_BG "systemButtonFacePressed"
#define ACTIVE_FG "systemPushButtonPressedText"
#define SELECT_BG "systemHighlight"
-#define SELECT_FG None
+#define SELECT_FG NULL
#define INACTIVE_SELECT_BG "systemHighlightSecondary"
#define TROUGH "#c3c3c3"
#define INDICATOR "#b03060"
@@ -282,7 +282,7 @@
#define DEF_MENU_ENTRY_ACTIVE_FG NULL
#define DEF_MENU_ENTRY_ACCELERATOR NULL
#define DEF_MENU_ENTRY_BG NULL
-#define DEF_MENU_ENTRY_BITMAP None
+#define DEF_MENU_ENTRY_BITMAP NULL
#define DEF_MENU_ENTRY_COLUMN_BREAK "0"
#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index e828b39..c3778f1 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -1194,12 +1194,12 @@ TkAboutDlg(void)
NSString *year = [dateFormatter stringFromDate:[NSDate date]];
[dateFormatter release];
-
+
/*
* This replaces the old about dialog with a standard alert that displays
* correctly on 10.14.
*/
-
+
NSString *version = @"Tcl " TCL_PATCH_LEVEL " & Tk " TCL_PATCH_LEVEL;
NSString *url = @"www.tcl-lang.org";
NSTextView *credits = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,300,300)];
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index f6c32b3..589475c 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -494,7 +494,7 @@ TkMacOSXContainerId(
}
}
Tcl_Panic("TkMacOSXContainerId couldn't find window");
- return None;
+ return NULL;
}
/*
@@ -530,8 +530,8 @@ TkMacOSXGetHostToplevel(
* TODO: Here we should handle out of process embedding.
*/
- if (contWinPtr == NULL) {
- return None;
+ if (!contWinPtr) {
+ return NULL;
}
return TkMacOSXGetHostToplevel(contWinPtr);
}
diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index 4ab3111..a1c5d60 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -156,10 +156,10 @@ TkpDrawEntryBorderAndFocus(
bounds.size.height = Tk_Height(tkwin) - 2*MAC_OSX_FOCUS_WIDTH;
if (!TkMacOSXSetupDrawingContext(d, NULL, 1, &dc)) {
- /*
+ /*
* No graphics context is available. If the widget is a Spinbox, we
* must restore its width before returning 0. (Ticket [273b6a4996].)
- */
+ */
if (isSpinbox) {
Tk_Width(tkwin) = oldWidth;
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 0c9fcb3..38f4a70 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -100,7 +100,7 @@ TkMacOSXCreateCGImageWithXImage(
/*
* CGCreateImage complains on early macOS releases.
*/
-
+
return NULL;
}
bitsPerComponent = 8;
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 817b68b..9d4d487 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -374,7 +374,7 @@ TkpInit(
* if displayed before main window. This places console in background and it
* accepts input after being raised.
*/
-
+
while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {}
return TCL_OK;
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index ec32a78..8f3be9f 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -1481,10 +1481,10 @@ TkpMenuInit(void)
#undef observe
[NSMenuItem setUsesUserKeyEquivalents:NO];
- tkColPtr = TkpGetColor(None, DEF_MENU_BG_COLOR);
+ tkColPtr = TkpGetColor(NULL, DEF_MENU_BG_COLOR);
defaultBg = tkColPtr->color.pixel;
ckfree(tkColPtr);
- tkColPtr = TkpGetColor(None, DEF_MENU_FG);
+ tkColPtr = TkpGetColor(NULL, DEF_MENU_FG);
defaultFg = tkColPtr->color.pixel;
ckfree(tkColPtr);
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index f02df1d..7b83679 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -125,8 +125,8 @@ enum {
return theEvent; /* Give up. No window for this event. */
} else {
winPtr = (TkWindow *)tkwin;
- }
-
+ }
+
local.x -= winPtr->wmInfoPtr->xInParent;
local.y -= winPtr->wmInfoPtr->yInParent;
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 88e7c76..3a32527 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -84,7 +84,7 @@ InspectQueueRestrictProc(
const char *name;
long serial = ve->serial;
long time = eventPtr->xkey.time;
-
+
if (eventPtr->type == VirtualEvent) {
name = ve->name;
} else {
@@ -137,14 +137,14 @@ void DebugPrintQueue(void)
/*
* Since the contentView is the first responder for a Tk Window, it is
* responsible for sending events up the responder chain. We also check
- * the pasteboard here.
+ * the pasteboard here.
*/
- (void) sendEvent: (NSEvent *) theEvent
{
[super sendEvent:theEvent];
[NSApp tkCheckPasteboard];
#ifdef TK_MAC_DEBUG_EVENTS
- fprintf(stderr, "Sending event of type %d\n", (int)[theEvent type]);
+ fprintf(stderr, "Sending event of type %d\n", (int)[theEvent type]);
DebugPrintQueue();
#endif
}
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 27fe6d8..105317d 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -342,7 +342,7 @@ VISIBILITY_HIDDEN
@interface TKContentView(TKWindowEvent)
- (void) drawRect: (NSRect) rect;
-- (void) generateExposeEvents: (HIShapeRef) shape;
+- (void) generateExposeEvents: (HIShapeRef) shape;
- (void) tkToolbarButton: (id) sender;
- (BOOL) isOpaque;
- (BOOL) wantsDefaultClipping;
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index d1287bb..4a108db 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -48,7 +48,7 @@ typedef struct MacScrollbar {
TkScrollbar information; /* Generic scrollbar info. */
GC troughGC; /* For drawing trough. */
GC copyGC; /* Used for copying from pixmap onto screen. */
- Bool buttonDown; /* Is the mouse button down? */
+ Bool buttonDown; /* Is the mouse button down? */
Bool mouseOver; /* Is the pointer over the scrollbar. */
HIThemeTrackDrawInfo info; /* Controls how the scrollbar is drawn. */
} MacScrollbar;
@@ -119,11 +119,11 @@ TkpCreateScrollbar(
MacScrollbar *scrollPtr = (MacScrollbar *)ckalloc(sizeof(MacScrollbar));
- scrollPtr->troughGC = None;
- scrollPtr->copyGC = None;
+ scrollPtr->troughGC = NULL;
+ scrollPtr->copyGC = NULL;
scrollPtr->info = defaultInfo;
scrollPtr->buttonDown = false;
-
+
Tk_CreateEventHandler(tkwin,
ExposureMask |
StructureNotifyMask |
@@ -561,7 +561,7 @@ static int
ScrollbarEvent(TkScrollbar *scrollPtr, XEvent *eventPtr)
{
MacScrollbar *msPtr = (MacScrollbar *)scrollPtr;
-
+
/* The pressState does not indicate whether the moused button was
* pressed at some location in the Scrollbar. Rather, it indicates
* that the scrollbar should appear as if it were pressed in that
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index eb826a6..a5e1564 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -627,7 +627,7 @@ FrontWindowAtPoint(
* title bar are not considered to be contained in the
* window.
*/
-
+
if ((wmPtr->hints.initial_state == NormalState ||
wmPtr->hints.initial_state == ZoomState)) {
if (NSMouseInRect(p, contentFrame, NO)) {
@@ -2633,7 +2633,7 @@ WmIconwindowCmd(
/*
* The old icon should be withdrawn.
*/
-
+
TkpWmSetState(oldIcon, WithdrawnState);
[win orderOut:nil];
[win setExcludedFromWindowsMenu:YES];
@@ -4407,7 +4407,7 @@ Tk_CoordsToWindow(
* that contains point. */
int x, y; /* Coordinates in winPtr. */
int tmpx, tmpy, bd;
-
+
/*
* Step 1: find the top-level window that contains the desired point.
*/