summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/CanvTkwin.32
-rw-r--r--doc/ParseArgv.310
-rw-r--r--generic/tkImgPhInstance.c4
-rw-r--r--generic/tkTextDisp.c11
-rw-r--r--generic/ttk/ttkDefaultTheme.c4
-rw-r--r--macosx/tkMacOSXDefault.h52
-rw-r--r--macosx/tkMacOSXDialog.c4
-rw-r--r--macosx/tkMacOSXFont.c6
-rw-r--r--macosx/tkMacOSXInit.c13
-rw-r--r--macosx/tkMacOSXMenu.c13
-rw-r--r--macosx/tkMacOSXNotify.c5
-rw-r--r--macosx/tkMacOSXPrivate.h65
-rw-r--r--macosx/tkMacOSXWindowEvent.c3
-rw-r--r--macosx/tkMacOSXWm.c11
-rw-r--r--tests/text.test10
-rw-r--r--unix/tkUnixDefault.h52
-rw-r--r--win/tkWinDefault.h52
17 files changed, 162 insertions, 155 deletions
diff --git a/doc/CanvTkwin.3 b/doc/CanvTkwin.3
index 6ae3d97..5cb29fa 100644
--- a/doc/CanvTkwin.3
+++ b/doc/CanvTkwin.3
@@ -144,7 +144,7 @@ like this:
.PP
.CS
static const Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc,
- Tk_CanvasTagsPrintProc, (ClientData) NULL
+ Tk_CanvasTagsPrintProc, NULL
};
static const Tk_ConfigSpec configSpecs[] = {
diff --git a/doc/ParseArgv.3 b/doc/ParseArgv.3
index b6362bd..4d85d15 100644
--- a/doc/ParseArgv.3
+++ b/doc/ParseArgv.3
@@ -314,14 +314,14 @@ Boolean exec = FALSE;
Tk_ArgvInfo argTable[] = {
{"\-X", TK_ARGV_CONSTANT, (char *) 1, (char *) &debugFlag,
"Turn on debugging printfs"},
- {"\-N", TK_ARGV_INT, (char *) NULL, (char *) &numReps,
+ {"\-N", TK_ARGV_INT, NULL, (char *) &numReps,
"Number of repetitions"},
- {"\-of", TK_ARGV_STRING, (char *) NULL, (char *) &fileName,
+ {"\-of", TK_ARGV_STRING, NULL, (char *) &fileName,
"Name of file for output"},
- {"x", TK_ARGV_REST, (char *) NULL, (char *) &exec,
+ {"x", TK_ARGV_REST, NULL, (char *) &exec,
"File to exec, followed by any arguments (must be last argument)."},
- {(char *) NULL, TK_ARGV_END, (char *) NULL, (char *) NULL,
- (char *) NULL}
+ {NULL, TK_ARGV_END, NULL, NULL,
+ NULL}
};
main(argc, argv)
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index cbf8222..12bdb7b 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -33,7 +33,7 @@ extern int _XInitImageFuncPtrs(XImage *image);
* Forward declarations
*/
-#ifndef TKPUTIMAGE_CAN_BLEND
+#ifndef TKPUTIMAGE_CAN_BLEND
static void BlendComplexAlpha(XImage *bgImg, PhotoInstance *iPtr,
int xOffset, int yOffset, int width, int height);
#endif
@@ -615,7 +615,7 @@ TkImgPhotoDisplay(
#ifndef TKPUTIMAGE_CAN_BLEND
XVisualInfo visInfo = instancePtr->visualInfo;
#endif
-
+
/*
* If there's no pixmap, it means that an error occurred while creating
* the image instance so it can't be displayed.
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 5db96e8..1a31e93 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -213,7 +213,7 @@ typedef struct TextStyle {
#define LOG(toVar,what) \
if (OK_TO_LOG) \
Tcl_SetVar2(textPtr->interp, toVar, NULL, (what), \
- TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT)
+ TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT)
#define CLEAR(var) \
if (OK_TO_LOG) \
Tcl_SetVar2(interp, var, NULL, "", TCL_GLOBAL_ONLY)
@@ -3135,11 +3135,11 @@ GenerateWidgetViewSyncEvent(
* like a mouse click is received. But that extra drawing corrupts the
* data that the test suite is trying to collect.
*/
-
+
if (!tkTextDebug) {
FORCE_DISPLAY(textPtr->tkwin);
}
-
+
TkSendVirtualEvent(textPtr->tkwin, "WidgetViewSync",
Tcl_NewBooleanObj(InSync));
}
@@ -5261,7 +5261,7 @@ TkTextRelayoutWindow(
AsyncUpdateLineMetrics, textPtr);
inSync = 0;
}
-
+
if (!inSync) {
GenerateWidgetViewSyncEvent(textPtr, 0);
}
@@ -6290,7 +6290,8 @@ TkTextPendingsync(
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
return (
- ((dInfoPtr->metricEpoch == TCL_AUTO_LENGTH) &&
+ (!(dInfoPtr->flags & REDRAW_PENDING) &&
+ (dInfoPtr->metricEpoch == TCL_AUTO_LENGTH) &&
(dInfoPtr->lastMetricUpdateLine == dInfoPtr->currentMetricUpdateLine)) ?
0 : 1);
}
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index fd08344..0b46db0 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -621,12 +621,12 @@ static void IndicatorElementDraw(
* not use the Tk memory manager in its implementation of XDestroyImage,
* even though that would be an extremely strange thing to do.
*/
-
+
#if defined(IGNORES_VISUAL)
ckfree(img->data);
img->data = NULL;
#endif
-
+
XDestroyImage(img);
}
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index cc2886d..ce41751 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -78,7 +78,7 @@
//#else
#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
//#endif
-#define DEF_BUTTON_IMAGE ((char *) NULL)
+#define DEF_BUTTON_IMAGE NULL
#define DEF_BUTTON_INDICATOR "1"
#define DEF_BUTTON_JUSTIFY "center"
#define DEF_BUTTON_OFF_VALUE "0"
@@ -105,10 +105,10 @@
#define DEF_BUTTON_REPEAT_INTERVAL "0"
#define DEF_BUTTON_SELECT_COLOR INDICATOR
#define DEF_BUTTON_SELECT_MONO BLACK
-#define DEF_BUTTON_SELECT_IMAGE ((char *) NULL)
+#define DEF_BUTTON_SELECT_IMAGE NULL
#define DEF_BUTTON_STATE "normal"
#define DEF_LABEL_TAKE_FOCUS "0"
-#define DEF_BUTTON_TAKE_FOCUS ((char *) NULL)
+#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_UNDERLINE "-1"
@@ -146,7 +146,7 @@
#define DEF_CANVAS_SELECT_BD_MONO "0"
#define DEF_CANVAS_SELECT_FG_COLOR SELECT_FG
#define DEF_CANVAS_SELECT_FG_MONO WHITE
-#define DEF_CANVAS_TAKE_FOCUS ((char *) NULL)
+#define DEF_CANVAS_TAKE_FOCUS NULL
#define DEF_CANVAS_WIDTH "10c"
#define DEF_CANVAS_X_SCROLL_CMD ""
#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
@@ -204,9 +204,9 @@
#define DEF_ENTRY_SELECT_BD_MONO "0"
#define DEF_ENTRY_SELECT_FG_COLOR SELECT_FG
#define DEF_ENTRY_SELECT_FG_MONO WHITE
-#define DEF_ENTRY_SHOW ((char *) NULL)
+#define DEF_ENTRY_SHOW NULL
#define DEF_ENTRY_STATE "normal"
-#define DEF_ENTRY_TAKE_FOCUS ((char *) NULL)
+#define DEF_ENTRY_TAKE_FOCUS NULL
#define DEF_ENTRY_TEXT_VARIABLE ""
#define DEF_ENTRY_WIDTH "20"
@@ -273,36 +273,36 @@
#define DEF_LISTBOX_SELECT_MODE "browse"
#define DEF_LISTBOX_SET_GRID "0"
#define DEF_LISTBOX_STATE "normal"
-#define DEF_LISTBOX_TAKE_FOCUS ((char *) NULL)
+#define DEF_LISTBOX_TAKE_FOCUS NULL
#define DEF_LISTBOX_WIDTH "20"
/*
* Defaults for individual entries of menus:
*/
-#define DEF_MENU_ENTRY_ACTIVE_BG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACTIVE_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACCELERATOR ((char *) NULL)
-#define DEF_MENU_ENTRY_BG ((char *) NULL)
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#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_COLUMN_BREAK "0"
-#define DEF_MENU_ENTRY_COMMAND ((char *) NULL)
+#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
-#define DEF_MENU_ENTRY_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_FONT ((char *) NULL)
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
-#define DEF_MENU_ENTRY_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_IMAGE NULL
#define DEF_MENU_ENTRY_INDICATOR "1"
-#define DEF_MENU_ENTRY_LABEL ((char *) NULL)
-#define DEF_MENU_ENTRY_MENU ((char *) NULL)
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
#define DEF_MENU_ENTRY_OFF_VALUE "0"
#define DEF_MENU_ENTRY_ON_VALUE "1"
-#define DEF_MENU_ENTRY_SELECT_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
#define DEF_MENU_ENTRY_STATE "normal"
-#define DEF_MENU_ENTRY_VALUE ((char *) NULL)
-#define DEF_MENU_ENTRY_CHECK_VARIABLE ((char *) NULL)
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
-#define DEF_MENU_ENTRY_SELECT ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT NULL
#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
@@ -329,7 +329,7 @@
#define DEF_MENU_SELECT_MONO BLACK
#define DEF_MENU_TAKE_FOCUS "0"
#define DEF_MENU_TEAROFF "0"
-#define DEF_MENU_TEAROFF_CMD ((char *) NULL)
+#define DEF_MENU_TEAROFF_CMD NULL
#define DEF_MENU_TITLE ""
#define DEF_MENU_TYPE "normal"
@@ -357,7 +357,7 @@
#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
#define DEF_MENUBUTTON_HIGHLIGHT BLACK
#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
-#define DEF_MENUBUTTON_IMAGE ((char *) NULL)
+#define DEF_MENUBUTTON_IMAGE NULL
#define DEF_MENUBUTTON_INDICATOR "1"
#define DEF_MENUBUTTON_JUSTIFY "left"
#define DEF_MENUBUTTON_MENU ""
@@ -466,7 +466,7 @@
#define DEF_SCALE_SLIDER_LENGTH "30"
#define DEF_SCALE_SLIDER_RELIEF "raised"
#define DEF_SCALE_STATE "normal"
-#define DEF_SCALE_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCALE_TAKE_FOCUS NULL
#define DEF_SCALE_TICK_INTERVAL "0"
#define DEF_SCALE_TO "100"
#define DEF_SCALE_VARIABLE ""
@@ -493,7 +493,7 @@
#define DEF_SCROLLBAR_RELIEF "flat"
#define DEF_SCROLLBAR_REPEAT_DELAY "300"
#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
-#define DEF_SCROLLBAR_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
#define DEF_SCROLLBAR_TROUGH_MONO WHITE
#define DEF_SCROLLBAR_WIDTH "15"
@@ -541,7 +541,7 @@
#define DEF_TEXT_STATE "normal"
#define DEF_TEXT_TABS ""
#define DEF_TEXT_TABSTYLE "tabular"
-#define DEF_TEXT_TAKE_FOCUS ((char *) NULL)
+#define DEF_TEXT_TAKE_FOCUS NULL
#define DEF_TEXT_UNDO "0"
#define DEF_TEXT_WIDTH "80"
#define DEF_TEXT_WRAP "char"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index f8453c7..e828b39 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -182,10 +182,6 @@ static NSURL *getFileURL(NSString *directory, NSString *filename) {
#pragma mark TKApplication(TKDialog)
-@interface NSColorPanel(TKDialog)
-- (void) _setUseModalAppearance: (BOOL) flag;
-@end
-
@implementation TKApplication(TKDialog)
- (void) tkFilePanelDidEnd: (NSSavePanel *) panel
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 30e318c..353ad6b 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -95,12 +95,6 @@ static void DrawCharsInContext(Display *display, Drawable drawable, GC gc,
Tk_Font tkfont, const char *source, int numBytes, int rangeStart,
int rangeLength, int x, int y, double angle);
-@interface NSFont(TKFont)
-- (NSFont *) bestMatchingFontForCharacters: (const UTF16Char *) characters
- length: (NSUInteger) length attributes: (NSDictionary *) attributes
- actualCoveredLength: (NSUInteger *) coveredLength;
-@end
-
#pragma mark -
#pragma mark Font Helpers:
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 033a767..65534ae 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -30,19 +30,6 @@ static char scriptPath[PATH_MAX + 1] = "";
#pragma mark TKApplication(TKInit)
-@interface TKApplication(TKKeyboard)
-- (void) keyboardChanged: (NSNotification *) notification;
-@end
-
-#define TKApplication_NSApplicationDelegate <NSApplicationDelegate>
-@interface TKApplication(TKWindowEvent) TKApplication_NSApplicationDelegate
-- (void) _setupWindowNotifications;
-@end
-
-@interface TKApplication(TKMenus)
-- (void) _setupMenus;
-@end
-
@implementation TKApplication
@synthesize poolLock = _poolLock;
@synthesize macMinorVersion = _macMinorVersion;
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index d5865f6..590402a 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -110,6 +110,11 @@ static int ModifierCharWidth(Tk_Font tkfont);
#pragma mark TKMenu
+/*
+ * This interface is not declared in tkMacOSXPrivate.h because it requires
+ * tkMenu.h.
+ */
+
@interface TKMenu(TKMenuPrivate)
- (id) initWithTkMenu: (TkMenu *) tkMenu;
- (TkMenu *) tkMenu;
@@ -117,10 +122,6 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (void) insertItem: (NSMenuItem *) newItem atTkIndex: (NSInteger) index;
@end
-#define TKMenu_NSMenuDelegate <NSMenuDelegate>
-@interface TKMenu(TKMenuDelegate) TKMenu_NSMenuDelegate
-@end
-
@implementation TKMenu
- (void) setSpecial: (NSUInteger) special
{
@@ -367,10 +368,6 @@ static int ModifierCharWidth(Tk_Font tkfont);
#pragma mark TKApplication(TKMenu)
-@interface NSApplication(TKMenu)
-- (void) setAppleMenu: (NSMenu *) menu;
-@end
-
@implementation TKApplication(TKMenu)
- (void) menuBeginTracking: (NSNotification *) notification
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 7cbd248..8c01fe3 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -113,11 +113,6 @@ void DebugPrintQueue(void)
#pragma mark TKApplication(TKNotify)
-@interface NSApplication(TKNotify)
-/* We need to declare this hidden method. */
-- (void) _modalSession: (NSModalSession) session sendEvent: (NSEvent *) event;
-@end
-
@implementation TKApplication(TKNotify)
/*
* Earlier versions of Tk would override nextEventMatchingMask here, adding a
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index f3228c4..a2a7a8f 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -250,6 +250,9 @@ VISIBILITY_HIDDEN
- (BOOL)isSpecial:(NSUInteger)special;
@end
+@interface TKMenu(TKMenuDelegate) <NSMenuDelegate>
+@end
+
VISIBILITY_HIDDEN
@interface TKApplication : NSApplication {
@private
@@ -278,6 +281,22 @@ VISIBILITY_HIDDEN
- (void)_lockAutoreleasePool;
- (void)_unlockAutoreleasePool;
@end
+@interface TKApplication(TKKeyboard)
+- (void) keyboardChanged: (NSNotification *) notification;
+@end
+@interface TKApplication(TKWindowEvent) <NSApplicationDelegate>
+- (void) _setupWindowNotifications;
+@end
+@interface TKApplication(TKMenu)
+- (void)tkSetMainMenu:(TKMenu *)menu;
+@end
+@interface TKApplication(TKMenus)
+- (void) _setupMenus;
+@end
+@interface NSApplication(TKNotify)
+/* We need to declare this hidden method. */
+- (void) _modalSession: (NSModalSession) session sendEvent: (NSEvent *) event;
+@end
@interface TKApplication(TKEvent)
- (NSEvent *)tkProcessEvent:(NSEvent *)theEvent;
@end
@@ -287,9 +306,6 @@ VISIBILITY_HIDDEN
@interface TKApplication(TKKeyEvent)
- (NSEvent *)tkProcessKeyEvent:(NSEvent *)theEvent;
@end
-@interface TKApplication(TKMenu)
-- (void)tkSetMainMenu:(TKMenu *)menu;
-@end
@interface TKApplication(TKClipboard)
- (void)tkProvidePasteboard:(TkDisplay *)dispPtr;
- (void)tkCheckPasteboard;
@@ -314,13 +330,8 @@ VISIBILITY_HIDDEN
@end
VISIBILITY_HIDDEN
-@interface TKContentView : NSView <NSTextInput> {
-@private
- /*Remove private API calls.*/
-#if 0
- id _savedSubviews;
- BOOL _subviewsSetAside;
-#endif
+@interface TKContentView : NSView <NSTextInput>
+{
NSString *privateWorkingText;
}
@end
@@ -348,6 +359,12 @@ VISIBILITY_HIDDEN
- (NSPoint) tkConvertPointFromScreen:(NSPoint)point;
@end
+@interface NSDrawerWindow : NSWindow
+{
+ id _i1, _i2;
+}
+@end
+
#pragma mark NSMenu & NSMenuItem Utilities
@interface NSMenu(TKUtils)
@@ -376,4 +393,32 @@ VISIBILITY_HIDDEN
keyEquivalentModifierMask:(NSUInteger)keyEquivalentModifierMask;
@end
+@interface NSColorPanel(TKDialog)
+- (void) _setUseModalAppearance: (BOOL) flag;
+@end
+
+@interface NSFont(TKFont)
+- (NSFont *) bestMatchingFontForCharacters: (const UTF16Char *) characters
+ length: (NSUInteger) length attributes: (NSDictionary *) attributes
+ actualCoveredLength: (NSUInteger *) coveredLength;
+@end
+
+/*
+ * This method of NSApplication is not declared in NSApplication.h so we
+ * declare it here to be a method of the TKMenu category.
+ */
+
+@interface NSApplication(TKMenu)
+- (void) setAppleMenu: (NSMenu *) menu;
+@end
+
#endif /* _TKMACPRIV */
+
+/*
+ * Local Variables:
+ * mode: objc
+ * c-basic-offset: 4
+ * fill-column: 79
+ * coding: utf-8
+ * End:
+ */
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 9503447..ba2134d 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -981,9 +981,6 @@ ConfigureRestrictProc(
HIShapeRef shape = HIShapeCreateWithRect(&bounds);
[self generateExposeEvents: shape];
[w displayIfNeeded];
- if ([NSApp macMinorVersion] > 13) {
- [NSApp setIsDrawing:NO];
- }
/*
* Finally, unlock the main autoreleasePool.
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 003dfe7..f6577ce 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -379,13 +379,6 @@ static void RemapWindows(TkWindow *winPtr,
#pragma mark TKWindow(TKWm)
-@interface NSDrawerWindow : NSWindow
-{
- id _i1, _i2;
-}
-@end
-
-
@implementation TKWindow: NSWindow
#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
@@ -6374,7 +6367,9 @@ ApplyWindowAttributeFlagChanges(
*/
#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
- b |= NSWindowCollectionBehaviorFullScreenPrimary;
+ if (!(macWindow.styleMask & NSWindowStyleMaskUtilityWindow)) {
+ b |= NSWindowCollectionBehaviorFullScreenPrimary;
+ }
#endif
if (newAttributes & tkCanJoinAllSpacesAttribute) {
diff --git a/tests/text.test b/tests/text.test
index 3d89350..621a9eb 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3040,17 +3040,17 @@ test text-11a.22 {TextWidgetCmd procedure, "sync" option with -command} -setup {
}
.top.yt insert 1.0 $content
# first case: line metrics calculation still running when launching 'sync -command'
- lappend res [.top.yt pendingsync]
+ lappend res [.top.yt pendingsync] ; # {1}
.top.yt sync -command [list set ::x 1]
- lappend res $::x
+ lappend res $::x ; # {1 0}
# now finish line metrics calculations
while {[.top.yt pendingsync]} {update}
- lappend res [.top.yt pendingsync] $::x
+ lappend res [.top.yt pendingsync] $::x ; # {1 0 0 1}
# second case: line metrics calculation completed when launching 'sync -command'
.top.yt sync -command [list set ::x 2]
- lappend res $::x
+ lappend res $::x ; # {1 0 0 1 1}
vwait ::x
- lappend res $::x
+ lappend res $::x ; # {1 0 0 1 1 2}
} -cleanup {
destroy .top.yt .top
} -result {1 0 0 1 1 2}
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index 6e0b005..a5bcf4d 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -64,7 +64,7 @@
#define DEF_BUTTON_HIGHLIGHT BLACK
#define DEF_LABEL_HIGHLIGHT_WIDTH "0"
#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
-#define DEF_BUTTON_IMAGE ((char *) NULL)
+#define DEF_BUTTON_IMAGE NULL
#define DEF_BUTTON_INDICATOR "1"
#define DEF_BUTTON_JUSTIFY "center"
#define DEF_BUTTON_OFF_VALUE "0"
@@ -81,10 +81,10 @@
#define DEF_BUTTON_REPEAT_INTERVAL "0"
#define DEF_BUTTON_SELECT_COLOR CHECK_INDICATOR
#define DEF_BUTTON_SELECT_MONO BLACK
-#define DEF_BUTTON_SELECT_IMAGE ((char *) NULL)
+#define DEF_BUTTON_SELECT_IMAGE NULL
#define DEF_BUTTON_STATE "normal"
#define DEF_LABEL_TAKE_FOCUS "0"
-#define DEF_BUTTON_TAKE_FOCUS ((char *) NULL)
+#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_UNDERLINE "-1"
@@ -122,7 +122,7 @@
#define DEF_CANVAS_SELECT_BD_MONO "0"
#define DEF_CANVAS_SELECT_FG_COLOR BLACK
#define DEF_CANVAS_SELECT_FG_MONO WHITE
-#define DEF_CANVAS_TAKE_FOCUS ((char *) NULL)
+#define DEF_CANVAS_TAKE_FOCUS NULL
#define DEF_CANVAS_WIDTH "10c"
#define DEF_CANVAS_X_SCROLL_CMD ""
#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
@@ -165,9 +165,9 @@
#define DEF_ENTRY_SELECT_BD_MONO "0"
#define DEF_ENTRY_SELECT_FG_COLOR BLACK
#define DEF_ENTRY_SELECT_FG_MONO WHITE
-#define DEF_ENTRY_SHOW ((char *) NULL)
+#define DEF_ENTRY_SHOW NULL
#define DEF_ENTRY_STATE "normal"
-#define DEF_ENTRY_TAKE_FOCUS ((char *) NULL)
+#define DEF_ENTRY_TAKE_FOCUS NULL
#define DEF_ENTRY_TEXT_VARIABLE ""
#define DEF_ENTRY_WIDTH "20"
@@ -235,36 +235,36 @@
#define DEF_LISTBOX_SELECT_MODE "browse"
#define DEF_LISTBOX_SET_GRID "0"
#define DEF_LISTBOX_STATE "normal"
-#define DEF_LISTBOX_TAKE_FOCUS ((char *) NULL)
+#define DEF_LISTBOX_TAKE_FOCUS NULL
#define DEF_LISTBOX_WIDTH "20"
/*
* Defaults for individual entries of menus:
*/
-#define DEF_MENU_ENTRY_ACTIVE_BG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACTIVE_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACCELERATOR ((char *) NULL)
-#define DEF_MENU_ENTRY_BG ((char *) NULL)
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#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_COLUMN_BREAK "0"
-#define DEF_MENU_ENTRY_COMMAND ((char *) NULL)
+#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
-#define DEF_MENU_ENTRY_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_FONT ((char *) NULL)
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
-#define DEF_MENU_ENTRY_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_IMAGE NULL
#define DEF_MENU_ENTRY_INDICATOR "1"
-#define DEF_MENU_ENTRY_LABEL ((char *) NULL)
-#define DEF_MENU_ENTRY_MENU ((char *) NULL)
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
#define DEF_MENU_ENTRY_OFF_VALUE "0"
#define DEF_MENU_ENTRY_ON_VALUE "1"
-#define DEF_MENU_ENTRY_SELECT_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
#define DEF_MENU_ENTRY_STATE "normal"
-#define DEF_MENU_ENTRY_VALUE ((char *) NULL)
-#define DEF_MENU_ENTRY_CHECK_VARIABLE ((char *) NULL)
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
-#define DEF_MENU_ENTRY_SELECT ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT NULL
#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
@@ -291,7 +291,7 @@
#define DEF_MENU_SELECT_MONO BLACK
#define DEF_MENU_TAKE_FOCUS "0"
#define DEF_MENU_TEAROFF "0"
-#define DEF_MENU_TEAROFF_CMD ((char *) NULL)
+#define DEF_MENU_TEAROFF_CMD NULL
#define DEF_MENU_TITLE ""
#define DEF_MENU_TYPE "normal"
@@ -319,7 +319,7 @@
#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
#define DEF_MENUBUTTON_HIGHLIGHT BLACK
#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
-#define DEF_MENUBUTTON_IMAGE ((char *) NULL)
+#define DEF_MENUBUTTON_IMAGE NULL
#define DEF_MENUBUTTON_INDICATOR "0"
#define DEF_MENUBUTTON_JUSTIFY "center"
#define DEF_MENUBUTTON_MENU ""
@@ -429,7 +429,7 @@
#define DEF_SCALE_SLIDER_LENGTH "30"
#define DEF_SCALE_SLIDER_RELIEF "raised"
#define DEF_SCALE_STATE "normal"
-#define DEF_SCALE_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCALE_TAKE_FOCUS NULL
#define DEF_SCALE_TICK_INTERVAL "0"
#define DEF_SCALE_TO "100"
#define DEF_SCALE_VARIABLE ""
@@ -456,7 +456,7 @@
#define DEF_SCROLLBAR_RELIEF "sunken"
#define DEF_SCROLLBAR_REPEAT_DELAY "300"
#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
-#define DEF_SCROLLBAR_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
#define DEF_SCROLLBAR_TROUGH_MONO WHITE
#define DEF_SCROLLBAR_WIDTH "11"
@@ -504,7 +504,7 @@
#define DEF_TEXT_STATE "normal"
#define DEF_TEXT_TABS ""
#define DEF_TEXT_TABSTYLE "tabular"
-#define DEF_TEXT_TAKE_FOCUS ((char *) NULL)
+#define DEF_TEXT_TAKE_FOCUS NULL
#define DEF_TEXT_UNDO "0"
#define DEF_TEXT_WIDTH "80"
#define DEF_TEXT_WRAP "char"
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index dc0abac..a1c8f88 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -68,7 +68,7 @@
#define DEF_BUTTON_HIGHLIGHT HIGHLIGHT
#define DEF_LABEL_HIGHLIGHT_WIDTH "0"
#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
-#define DEF_BUTTON_IMAGE ((char *) NULL)
+#define DEF_BUTTON_IMAGE NULL
#define DEF_BUTTON_INDICATOR "1"
#define DEF_BUTTON_JUSTIFY "center"
#define DEF_BUTTON_OFF_VALUE "0"
@@ -84,10 +84,10 @@
#define DEF_BUTTON_REPEAT_INTERVAL "0"
#define DEF_BUTTON_SELECT_COLOR INDICATOR
#define DEF_BUTTON_SELECT_MONO BLACK
-#define DEF_BUTTON_SELECT_IMAGE ((char *) NULL)
+#define DEF_BUTTON_SELECT_IMAGE NULL
#define DEF_BUTTON_STATE "normal"
#define DEF_LABEL_TAKE_FOCUS "0"
-#define DEF_BUTTON_TAKE_FOCUS ((char *) NULL)
+#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_TRISTATE_VALUE ""
@@ -126,7 +126,7 @@
#define DEF_CANVAS_SELECT_BD_MONO "0"
#define DEF_CANVAS_SELECT_FG_COLOR SELECT_FG
#define DEF_CANVAS_SELECT_FG_MONO WHITE
-#define DEF_CANVAS_TAKE_FOCUS ((char *) NULL)
+#define DEF_CANVAS_TAKE_FOCUS NULL
#define DEF_CANVAS_WIDTH "10c"
#define DEF_CANVAS_X_SCROLL_CMD ""
#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
@@ -169,9 +169,9 @@
#define DEF_ENTRY_SELECT_BD_MONO "0"
#define DEF_ENTRY_SELECT_FG_COLOR SELECT_FG
#define DEF_ENTRY_SELECT_FG_MONO WHITE
-#define DEF_ENTRY_SHOW ((char *) NULL)
+#define DEF_ENTRY_SHOW NULL
#define DEF_ENTRY_STATE "normal"
-#define DEF_ENTRY_TAKE_FOCUS ((char *) NULL)
+#define DEF_ENTRY_TAKE_FOCUS NULL
#define DEF_ENTRY_TEXT_VARIABLE ""
#define DEF_ENTRY_WIDTH "20"
@@ -238,36 +238,36 @@
#define DEF_LISTBOX_SELECT_MODE "browse"
#define DEF_LISTBOX_SET_GRID "0"
#define DEF_LISTBOX_STATE "normal"
-#define DEF_LISTBOX_TAKE_FOCUS ((char *) NULL)
+#define DEF_LISTBOX_TAKE_FOCUS NULL
#define DEF_LISTBOX_WIDTH "20"
/*
* Defaults for individual entries of menus:
*/
-#define DEF_MENU_ENTRY_ACTIVE_BG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACTIVE_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACCELERATOR ((char *) NULL)
-#define DEF_MENU_ENTRY_BG ((char *) NULL)
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#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_COLUMN_BREAK "0"
-#define DEF_MENU_ENTRY_COMMAND ((char *) NULL)
+#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
-#define DEF_MENU_ENTRY_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_FONT ((char *) NULL)
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
-#define DEF_MENU_ENTRY_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_IMAGE NULL
#define DEF_MENU_ENTRY_INDICATOR "1"
-#define DEF_MENU_ENTRY_LABEL ((char *) NULL)
-#define DEF_MENU_ENTRY_MENU ((char *) NULL)
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
#define DEF_MENU_ENTRY_OFF_VALUE "0"
#define DEF_MENU_ENTRY_ON_VALUE "1"
-#define DEF_MENU_ENTRY_SELECT_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
#define DEF_MENU_ENTRY_STATE "normal"
-#define DEF_MENU_ENTRY_VALUE ((char *) NULL)
-#define DEF_MENU_ENTRY_CHECK_VARIABLE ((char *) NULL)
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
-#define DEF_MENU_ENTRY_SELECT ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT NULL
#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
@@ -294,7 +294,7 @@
#define DEF_MENU_SELECT_MONO BLACK
#define DEF_MENU_TAKE_FOCUS "0"
#define DEF_MENU_TEAROFF "0"
-#define DEF_MENU_TEAROFF_CMD ((char *) NULL)
+#define DEF_MENU_TEAROFF_CMD NULL
#define DEF_MENU_TITLE ""
#define DEF_MENU_TYPE "normal"
@@ -322,7 +322,7 @@
#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
#define DEF_MENUBUTTON_HIGHLIGHT HIGHLIGHT
#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
-#define DEF_MENUBUTTON_IMAGE ((char *) NULL)
+#define DEF_MENUBUTTON_IMAGE NULL
#define DEF_MENUBUTTON_INDICATOR "0"
#define DEF_MENUBUTTON_JUSTIFY "center"
#define DEF_MENUBUTTON_MENU ""
@@ -432,7 +432,7 @@
#define DEF_SCALE_SLIDER_LENGTH "30"
#define DEF_SCALE_SLIDER_RELIEF "raised"
#define DEF_SCALE_STATE "normal"
-#define DEF_SCALE_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCALE_TAKE_FOCUS NULL
#define DEF_SCALE_TICK_INTERVAL "0"
#define DEF_SCALE_TO "100"
#define DEF_SCALE_VARIABLE ""
@@ -459,7 +459,7 @@
#define DEF_SCROLLBAR_RELIEF "sunken"
#define DEF_SCROLLBAR_REPEAT_DELAY "300"
#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
-#define DEF_SCROLLBAR_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
#define DEF_SCROLLBAR_TROUGH_MONO WHITE
#define DEF_SCROLLBAR_WIDTH "10"
@@ -507,7 +507,7 @@
#define DEF_TEXT_STATE "normal"
#define DEF_TEXT_TABS ""
#define DEF_TEXT_TABSTYLE "tabular"
-#define DEF_TEXT_TAKE_FOCUS ((char *) NULL)
+#define DEF_TEXT_TAKE_FOCUS NULL
#define DEF_TEXT_UNDO "0"
#define DEF_TEXT_WIDTH "80"
#define DEF_TEXT_WRAP "char"