summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-04 14:25:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-04 14:25:37 (GMT)
commit2fa48e044573693869cc6412efc1aaf4a51917bd (patch)
tree0750a60250a5adc1651eeff5c7a69e90892295ca
parent6115c6c774ebf6d95e16b18fd3378d691f26722d (diff)
downloadtk-2fa48e044573693869cc6412efc1aaf4a51917bd.zip
tk-2fa48e044573693869cc6412efc1aaf4a51917bd.tar.gz
tk-2fa48e044573693869cc6412efc1aaf4a51917bd.tar.bz2
Make TCL_UNUSED() macro usable in Tk 8.6
-rw-r--r--generic/tkInt.h23
-rw-r--r--macosx/tkMacOSXColor.c32
-rw-r--r--macosx/tkMacOSXColor.h326
-rw-r--r--macosx/tkMacOSXMenu.c14
-rw-r--r--macosx/tkMacOSXXStubs.c283
5 files changed, 312 insertions, 366 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 6f40078..2f64f99 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -59,6 +59,21 @@
# endif
#endif
+#ifndef JOIN
+# define JOIN(a,b) JOIN1(a,b)
+# define JOIN1(a,b) a##b
+#endif
+
+#ifndef TCL_UNUSED
+# if defined(__cplusplus)
+# define TCL_UNUSED(T) T
+# elif defined(__GNUC__) && (__GNUC__ > 2)
+# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused))
+# else
+# define TCL_UNUSED(T) T JOIN(dummy, __LINE__)
+# endif
+#endif
+
#if defined(_WIN32) && (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
# if TCL_UTF_MAX > 3
# define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf((TCHAR *)(a),(b)*sizeof(WCHAR),c)
@@ -1041,6 +1056,10 @@ void Tcl_Panic(const char *, ...) __attribute__((analyzer_noreturn));
#include "tkIntDecls.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Themed widget set init function:
*/
@@ -1324,6 +1343,10 @@ MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp);
MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TKINT */
/*
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 64c9cf2..89bddb9 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -194,7 +194,7 @@ GetEntryFromPixel(
unsigned long pixel)
{
MacPixel p;
- unsigned int index = rgbColorIndex;
+ int index = rgbColorIndex;
p.ulong = pixel;
if (p.pixel.colortype != rgbColor) {
@@ -757,7 +757,7 @@ TkpGetColor(
}
validXColor:
- tkColPtr = ckalloc(sizeof(TkColor));
+ tkColPtr = (TkColor *)ckalloc(sizeof(TkColor));
tkColPtr->colormap = colormap;
tkColPtr->color = color;
return tkColPtr;
@@ -787,11 +787,11 @@ validXColor:
TkColor *
TkpGetColorByValue(
- Tk_Window tkwin, /* Window in which color will be used. */
+ TCL_UNUSED(Tk_Window), /* Window in which color will be used. */
XColor *colorPtr) /* Red, green, and blue fields indicate
* desired color. */
{
- TkColor *tkColPtr = ckalloc(sizeof(TkColor));
+ TkColor *tkColPtr = (TkColor *)ckalloc(sizeof(TkColor));
tkColPtr->color.red = colorPtr->red;
tkColPtr->color.green = colorPtr->green;
@@ -820,7 +820,7 @@ TkpGetColorByValue(
Status
XAllocColor(
Display *display, /* Display. */
- Colormap map, /* Not used. */
+ TCL_UNUSED(Colormap), /* Not used. */
XColor *colorPtr) /* XColor struct to modify. */
{
display->request++;
@@ -830,10 +830,10 @@ XAllocColor(
Colormap
XCreateColormap(
- Display *display, /* Display. */
- Window window, /* X window. */
- Visual *visual, /* Not used. */
- int alloc) /* Not used. */
+ TCL_UNUSED(Display *), /* Display. */
+ TCL_UNUSED(Window), /* X window. */
+ TCL_UNUSED(Visual *), /* Not used. */
+ TCL_UNUSED(int)) /* Not used. */
{
static Colormap index = 16;
@@ -846,19 +846,19 @@ XCreateColormap(
int
XFreeColormap(
- Display* display, /* Display. */
- Colormap colormap) /* Colormap. */
+ TCL_UNUSED(Display *), /* Display. */
+ TCL_UNUSED(Colormap)) /* Colormap. */
{
return Success;
}
int
XFreeColors(
- Display* display, /* Display. */
- Colormap colormap, /* Colormap. */
- unsigned long* pixels, /* Array of pixels. */
- int npixels, /* Number of pixels. */
- unsigned long planes) /* Number of pixel planes. */
+ TCL_UNUSED(Display *), /* Display. */
+ TCL_UNUSED(Colormap), /* Colormap. */
+ TCL_UNUSED(unsigned long *), /* Array of pixels. */
+ TCL_UNUSED(int), /* Number of pixels. */
+ TCL_UNUSED(unsigned long)) /* Number of pixel planes. */
{
/*
* Nothing needs to be done to release colors as there really is no
diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h
index 89d147d..535d15d 100644
--- a/macosx/tkMacOSXColor.h
+++ b/macosx/tkMacOSXColor.h
@@ -74,7 +74,7 @@ typedef struct {
const char *name;
enum colorType type;
int value;
- char *macName;
+ const char *macName;
/* Fields below are filled in after or during construction of the hash table. */
int index;
NSString *selector;
@@ -88,181 +88,181 @@ typedef struct {
*/
static SystemColorDatum systemColorData[] = {
-{"Pixel", rgbColor, 0 },
-{"Transparent", clearColor, 0 },
+{"Pixel", rgbColor, 0, NULL, 0, NULL },
+{"Transparent", clearColor, 0, NULL, 0, NULL },
-{"Highlight", HIBrush, kThemeBrushPrimaryHighlightColor },
-{"HighlightSecondary", HIBrush, kThemeBrushSecondaryHighlightColor },
-{"HighlightText", HIBrush, kThemeBrushBlack },
-{"HighlightAlternate", HIBrush, kThemeBrushAlternatePrimaryHighlightColor },
-{"PrimaryHighlightColor", HIBrush, kThemeBrushPrimaryHighlightColor },
-{"ButtonFace", HIBrush, kThemeBrushButtonFaceActive },
-{"SecondaryHighlightColor", HIBrush, kThemeBrushSecondaryHighlightColor },
-{"ButtonFrame", HIBrush, kThemeBrushButtonFrameActive },
-{"AlternatePrimaryHighlightColor", HIBrush, kThemeBrushAlternatePrimaryHighlightColor },
-{"WindowBody", HIBrush, kThemeBrushDocumentWindowBackground },
-{"SheetBackground", HIBrush, kThemeBrushSheetBackground },
-{"MenuActive", HIBrush, kThemeBrushMenuBackgroundSelected },
-{"Menu", HIBrush, kThemeBrushMenuBackground },
-{"DialogBackgroundInactive", HIBrush, kThemeBrushDialogBackgroundInactive },
-{"DialogBackgroundActive", HIBrush, kThemeBrushDialogBackgroundActive },
-{"AlertBackgroundActive", HIBrush, kThemeBrushAlertBackgroundActive },
-{"AlertBackgroundInactive", HIBrush, kThemeBrushAlertBackgroundInactive },
-{"ModelessDialogBackgroundActive", HIBrush, kThemeBrushModelessDialogBackgroundActive },
-{"ModelessDialogBackgroundInactive", HIBrush, kThemeBrushModelessDialogBackgroundInactive },
-{"UtilityWindowBackgroundActive", HIBrush, kThemeBrushUtilityWindowBackgroundActive },
-{"UtilityWindowBackgroundInactive", HIBrush, kThemeBrushUtilityWindowBackgroundInactive },
-{"ListViewSortColumnBackground", HIBrush, kThemeBrushListViewSortColumnBackground },
-{"ListViewBackground", HIBrush, kThemeBrushListViewBackground },
-{"IconLabelBackground", HIBrush, kThemeBrushIconLabelBackground },
-{"ListViewSeparator", HIBrush, kThemeBrushListViewSeparator },
-{"ChasingArrows", HIBrush, kThemeBrushChasingArrows },
-{"DragHilite", HIBrush, kThemeBrushDragHilite },
-{"DocumentWindowBackground", HIBrush, kThemeBrushDocumentWindowBackground },
-{"FinderWindowBackground", HIBrush, kThemeBrushFinderWindowBackground },
-{"ScrollBarDelimiterActive", HIBrush, kThemeBrushScrollBarDelimiterActive },
-{"ScrollBarDelimiterInactive", HIBrush, kThemeBrushScrollBarDelimiterInactive },
-{"FocusHighlight", HIBrush, kThemeBrushFocusHighlight },
-{"PopupArrowActive", HIBrush, kThemeBrushPopupArrowActive },
-{"PopupArrowPressed", HIBrush, kThemeBrushPopupArrowPressed },
-{"PopupArrowInactive", HIBrush, kThemeBrushPopupArrowInactive },
-{"AppleGuideCoachmark", HIBrush, kThemeBrushAppleGuideCoachmark },
-{"IconLabelBackgroundSelected", HIBrush, kThemeBrushIconLabelBackgroundSelected },
-{"StaticAreaFill", HIBrush, kThemeBrushStaticAreaFill },
-{"ActiveAreaFill", HIBrush, kThemeBrushActiveAreaFill },
-{"ButtonFrameActive", HIBrush, kThemeBrushButtonFrameActive },
-{"ButtonFrameInactive", HIBrush, kThemeBrushButtonFrameInactive },
-{"ButtonFaceActive", HIBrush, kThemeBrushButtonFaceActive },
-{"ButtonFaceInactive", HIBrush, kThemeBrushButtonFaceInactive },
-{"ButtonFacePressed", HIBrush, kThemeBrushButtonFacePressed },
-{"ButtonActiveDarkShadow", HIBrush, kThemeBrushButtonActiveDarkShadow },
-{"ButtonActiveDarkHighlight", HIBrush, kThemeBrushButtonActiveDarkHighlight },
-{"ButtonActiveLightShadow", HIBrush, kThemeBrushButtonActiveLightShadow },
-{"ButtonActiveLightHighlight", HIBrush, kThemeBrushButtonActiveLightHighlight },
-{"ButtonInactiveDarkShadow", HIBrush, kThemeBrushButtonInactiveDarkShadow },
-{"ButtonInactiveDarkHighlight", HIBrush, kThemeBrushButtonInactiveDarkHighlight },
-{"ButtonInactiveLightShadow", HIBrush, kThemeBrushButtonInactiveLightShadow },
-{"ButtonInactiveLightHighlight", HIBrush, kThemeBrushButtonInactiveLightHighlight },
-{"ButtonPressedDarkShadow", HIBrush, kThemeBrushButtonPressedDarkShadow },
-{"ButtonPressedDarkHighlight", HIBrush, kThemeBrushButtonPressedDarkHighlight },
-{"ButtonPressedLightShadow", HIBrush, kThemeBrushButtonPressedLightShadow },
-{"ButtonPressedLightHighlight", HIBrush, kThemeBrushButtonPressedLightHighlight },
-{"BevelActiveLight", HIBrush, kThemeBrushBevelActiveLight },
-{"BevelActiveDark", HIBrush, kThemeBrushBevelActiveDark },
-{"BevelInactiveLight", HIBrush, kThemeBrushBevelInactiveLight },
-{"BevelInactiveDark", HIBrush, kThemeBrushBevelInactiveDark },
-{"NotificationWindowBackground", HIBrush, kThemeBrushNotificationWindowBackground },
-{"MovableModalBackground", HIBrush, kThemeBrushMovableModalBackground },
-{"SheetBackgroundOpaque", HIBrush, kThemeBrushSheetBackgroundOpaque },
-{"DrawerBackground", HIBrush, kThemeBrushDrawerBackground },
-{"ToolbarBackground", HIBrush, kThemeBrushToolbarBackground },
-{"SheetBackgroundTransparent", HIBrush, kThemeBrushSheetBackgroundTransparent },
-{"MenuBackground", HIBrush, kThemeBrushMenuBackground },
-{"MenuBackgroundSelected", HIBrush, kThemeBrushMenuBackgroundSelected },
-{"ListViewOddRowBackground", HIBrush, kThemeBrushListViewOddRowBackground },
-{"ListViewEvenRowBackground", HIBrush, kThemeBrushListViewEvenRowBackground },
-{"ListViewColumnDivider", HIBrush, kThemeBrushListViewColumnDivider },
+{"Highlight", HIBrush, kThemeBrushPrimaryHighlightColor, NULL, 0, NULL },
+{"HighlightSecondary", HIBrush, kThemeBrushSecondaryHighlightColor, NULL, 0, NULL },
+{"HighlightText", HIBrush, kThemeBrushBlack, NULL, 0, NULL },
+{"HighlightAlternate", HIBrush, kThemeBrushAlternatePrimaryHighlightColor, NULL, 0, NULL },
+{"PrimaryHighlightColor", HIBrush, kThemeBrushPrimaryHighlightColor, NULL, 0, NULL },
+{"ButtonFace", HIBrush, kThemeBrushButtonFaceActive, NULL, 0, NULL },
+{"SecondaryHighlightColor", HIBrush, kThemeBrushSecondaryHighlightColor, NULL, 0, NULL },
+{"ButtonFrame", HIBrush, kThemeBrushButtonFrameActive, NULL, 0, NULL },
+{"AlternatePrimaryHighlightColor", HIBrush, kThemeBrushAlternatePrimaryHighlightColor, NULL, 0, NULL },
+{"WindowBody", HIBrush, kThemeBrushDocumentWindowBackground, NULL, 0, NULL },
+{"SheetBackground", HIBrush, kThemeBrushSheetBackground, NULL, 0, NULL },
+{"MenuActive", HIBrush, kThemeBrushMenuBackgroundSelected, NULL, 0, NULL },
+{"Menu", HIBrush, kThemeBrushMenuBackground, NULL, 0, NULL },
+{"DialogBackgroundInactive", HIBrush, kThemeBrushDialogBackgroundInactive, NULL, 0, NULL },
+{"DialogBackgroundActive", HIBrush, kThemeBrushDialogBackgroundActive, NULL, 0, NULL },
+{"AlertBackgroundActive", HIBrush, kThemeBrushAlertBackgroundActive, NULL, 0, NULL },
+{"AlertBackgroundInactive", HIBrush, kThemeBrushAlertBackgroundInactive, NULL, 0, NULL },
+{"ModelessDialogBackgroundActive", HIBrush, kThemeBrushModelessDialogBackgroundActive, NULL, 0, NULL },
+{"ModelessDialogBackgroundInactive", HIBrush, kThemeBrushModelessDialogBackgroundInactive, NULL, 0, NULL },
+{"UtilityWindowBackgroundActive", HIBrush, kThemeBrushUtilityWindowBackgroundActive, NULL, 0, NULL },
+{"UtilityWindowBackgroundInactive", HIBrush, kThemeBrushUtilityWindowBackgroundInactive, NULL, 0, NULL },
+{"ListViewSortColumnBackground", HIBrush, kThemeBrushListViewSortColumnBackground, NULL, 0, NULL },
+{"ListViewBackground", HIBrush, kThemeBrushListViewBackground, NULL, 0, NULL },
+{"IconLabelBackground", HIBrush, kThemeBrushIconLabelBackground, NULL, 0, NULL },
+{"ListViewSeparator", HIBrush, kThemeBrushListViewSeparator, NULL, 0, NULL },
+{"ChasingArrows", HIBrush, kThemeBrushChasingArrows, NULL, 0, NULL },
+{"DragHilite", HIBrush, kThemeBrushDragHilite, NULL, 0, NULL },
+{"DocumentWindowBackground", HIBrush, kThemeBrushDocumentWindowBackground, NULL, 0, NULL },
+{"FinderWindowBackground", HIBrush, kThemeBrushFinderWindowBackground, NULL, 0, NULL },
+{"ScrollBarDelimiterActive", HIBrush, kThemeBrushScrollBarDelimiterActive, NULL, 0, NULL },
+{"ScrollBarDelimiterInactive", HIBrush, kThemeBrushScrollBarDelimiterInactive, NULL, 0, NULL },
+{"FocusHighlight", HIBrush, kThemeBrushFocusHighlight, NULL, 0, NULL },
+{"PopupArrowActive", HIBrush, kThemeBrushPopupArrowActive, NULL, 0, NULL },
+{"PopupArrowPressed", HIBrush, kThemeBrushPopupArrowPressed, NULL, 0, NULL },
+{"PopupArrowInactive", HIBrush, kThemeBrushPopupArrowInactive, NULL, 0, NULL },
+{"AppleGuideCoachmark", HIBrush, kThemeBrushAppleGuideCoachmark, NULL, 0, NULL },
+{"IconLabelBackgroundSelected", HIBrush, kThemeBrushIconLabelBackgroundSelected, NULL, 0, NULL },
+{"StaticAreaFill", HIBrush, kThemeBrushStaticAreaFill, NULL, 0, NULL },
+{"ActiveAreaFill", HIBrush, kThemeBrushActiveAreaFill, NULL, 0, NULL },
+{"ButtonFrameActive", HIBrush, kThemeBrushButtonFrameActive, NULL, 0, NULL },
+{"ButtonFrameInactive", HIBrush, kThemeBrushButtonFrameInactive, NULL, 0, NULL },
+{"ButtonFaceActive", HIBrush, kThemeBrushButtonFaceActive, NULL, 0, NULL },
+{"ButtonFaceInactive", HIBrush, kThemeBrushButtonFaceInactive, NULL, 0, NULL },
+{"ButtonFacePressed", HIBrush, kThemeBrushButtonFacePressed, NULL, 0, NULL },
+{"ButtonActiveDarkShadow", HIBrush, kThemeBrushButtonActiveDarkShadow, NULL, 0, NULL },
+{"ButtonActiveDarkHighlight", HIBrush, kThemeBrushButtonActiveDarkHighlight, NULL, 0, NULL },
+{"ButtonActiveLightShadow", HIBrush, kThemeBrushButtonActiveLightShadow, NULL, 0, NULL },
+{"ButtonActiveLightHighlight", HIBrush, kThemeBrushButtonActiveLightHighlight, NULL, 0, NULL },
+{"ButtonInactiveDarkShadow", HIBrush, kThemeBrushButtonInactiveDarkShadow, NULL, 0, NULL },
+{"ButtonInactiveDarkHighlight", HIBrush, kThemeBrushButtonInactiveDarkHighlight, NULL, 0, NULL },
+{"ButtonInactiveLightShadow", HIBrush, kThemeBrushButtonInactiveLightShadow, NULL, 0, NULL },
+{"ButtonInactiveLightHighlight", HIBrush, kThemeBrushButtonInactiveLightHighlight, NULL, 0, NULL },
+{"ButtonPressedDarkShadow", HIBrush, kThemeBrushButtonPressedDarkShadow, NULL, 0, NULL },
+{"ButtonPressedDarkHighlight", HIBrush, kThemeBrushButtonPressedDarkHighlight, NULL, 0, NULL },
+{"ButtonPressedLightShadow", HIBrush, kThemeBrushButtonPressedLightShadow, NULL, 0, NULL },
+{"ButtonPressedLightHighlight", HIBrush, kThemeBrushButtonPressedLightHighlight, NULL, 0, NULL },
+{"BevelActiveLight", HIBrush, kThemeBrushBevelActiveLight, NULL, 0, NULL },
+{"BevelActiveDark", HIBrush, kThemeBrushBevelActiveDark, NULL, 0, NULL },
+{"BevelInactiveLight", HIBrush, kThemeBrushBevelInactiveLight, NULL, 0, NULL },
+{"BevelInactiveDark", HIBrush, kThemeBrushBevelInactiveDark, NULL, 0, NULL },
+{"NotificationWindowBackground", HIBrush, kThemeBrushNotificationWindowBackground, NULL, 0, NULL },
+{"MovableModalBackground", HIBrush, kThemeBrushMovableModalBackground, NULL, 0, NULL },
+{"SheetBackgroundOpaque", HIBrush, kThemeBrushSheetBackgroundOpaque, NULL, 0, NULL },
+{"DrawerBackground", HIBrush, kThemeBrushDrawerBackground, NULL, 0, NULL },
+{"ToolbarBackground", HIBrush, kThemeBrushToolbarBackground, NULL, 0, NULL },
+{"SheetBackgroundTransparent", HIBrush, kThemeBrushSheetBackgroundTransparent, NULL, 0, NULL },
+{"MenuBackground", HIBrush, kThemeBrushMenuBackground, NULL, 0, NULL },
+{"MenuBackgroundSelected", HIBrush, kThemeBrushMenuBackgroundSelected, NULL, 0, NULL },
+{"ListViewOddRowBackground", HIBrush, kThemeBrushListViewOddRowBackground, NULL, 0, NULL },
+{"ListViewEvenRowBackground", HIBrush, kThemeBrushListViewEvenRowBackground, NULL, 0, NULL },
+{"ListViewColumnDivider", HIBrush, kThemeBrushListViewColumnDivider, NULL, 0, NULL },
-{"ButtonText", HIText, kThemeTextColorPushButtonActive },
-{"MenuActiveText", HIText, kThemeTextColorMenuItemSelected },
-{"MenuDisabled", HIText, kThemeTextColorMenuItemDisabled },
-{"MenuText", HIText, kThemeTextColorMenuItemActive },
-{"BlackText", HIText, kThemeTextColorBlack },
-{"DialogActiveText", HIText, kThemeTextColorDialogActive },
-{"DialogInactiveText", HIText, kThemeTextColorDialogInactive },
-{"AlertActiveText", HIText, kThemeTextColorAlertActive },
-{"AlertInactiveText", HIText, kThemeTextColorAlertInactive },
-{"ModelessDialogActiveText", HIText, kThemeTextColorModelessDialogActive },
-{"ModelessDialogInactiveText", HIText, kThemeTextColorModelessDialogInactive },
-{"WindowHeaderActiveText", HIText, kThemeTextColorWindowHeaderActive },
-{"WindowHeaderInactiveText", HIText, kThemeTextColorWindowHeaderInactive },
-{"PlacardActiveText", HIText, kThemeTextColorPlacardActive },
-{"PlacardInactiveText", HIText, kThemeTextColorPlacardInactive },
-{"PlacardPressedText", HIText, kThemeTextColorPlacardPressed },
-{"PushButtonActiveText", HIText, kThemeTextColorPushButtonActive },
-{"PushButtonInactiveText", HIText, kThemeTextColorPushButtonInactive },
-{"PushButtonPressedText", HIText, kThemeTextColorPushButtonPressed },
-{"BevelButtonActiveText", HIText, kThemeTextColorBevelButtonActive },
-{"BevelButtonInactiveText", HIText, kThemeTextColorBevelButtonInactive },
-{"BevelButtonPressedText", HIText, kThemeTextColorBevelButtonPressed },
-{"PopupButtonActiveText", HIText, kThemeTextColorPopupButtonActive },
-{"PopupButtonInactiveText", HIText, kThemeTextColorPopupButtonInactive },
-{"PopupButtonPressedText", HIText, kThemeTextColorPopupButtonPressed },
-{"IconLabelText", HIText, kThemeTextColorIconLabel },
-{"ListViewText", HIText, kThemeTextColorListView },
-{"DocumentWindowTitleActiveText", HIText, kThemeTextColorDocumentWindowTitleActive },
-{"DocumentWindowTitleInactiveText", HIText, kThemeTextColorDocumentWindowTitleInactive },
-{"MovableModalWindowTitleActiveText", HIText, kThemeTextColorMovableModalWindowTitleActive },
-{"MovableModalWindowTitleInactiveText", HIText, kThemeTextColorMovableModalWindowTitleInactive },
-{"UtilityWindowTitleActiveText", HIText, kThemeTextColorUtilityWindowTitleActive },
-{"UtilityWindowTitleInactiveText", HIText, kThemeTextColorUtilityWindowTitleInactive },
-{"PopupWindowTitleActiveText", HIText, kThemeTextColorPopupWindowTitleActive },
-{"PopupWindowTitleInactiveText", HIText, kThemeTextColorPopupWindowTitleInactive },
-{"RootMenuActiveText", HIText, kThemeTextColorRootMenuActive },
-{"RootMenuSelectedText", HIText, kThemeTextColorRootMenuSelected },
-{"RootMenuDisabledText", HIText, kThemeTextColorRootMenuDisabled },
-{"MenuItemActiveText", HIText, kThemeTextColorMenuItemActive },
-{"MenuItemSelectedText", HIText, kThemeTextColorMenuItemSelected },
-{"MenuItemDisabledText", HIText, kThemeTextColorMenuItemDisabled },
-{"PopupLabelActiveText", HIText, kThemeTextColorPopupLabelActive },
-{"PopupLabelInactiveText", HIText, kThemeTextColorPopupLabelInactive },
-{"TabFrontActiveText", HIText, kThemeTextColorTabFrontActive },
-{"TabNonFrontActiveText", HIText, kThemeTextColorTabNonFrontActive },
-{"TabNonFrontPressedText", HIText, kThemeTextColorTabNonFrontPressed },
-{"TabFrontInactiveText", HIText, kThemeTextColorTabFrontInactive },
-{"TabNonFrontInactiveText", HIText, kThemeTextColorTabNonFrontInactive },
-{"IconLabelSelectedText", HIText, kThemeTextColorIconLabelSelected },
-{"BevelButtonStickyActiveText", HIText, kThemeTextColorBevelButtonStickyActive },
-{"BevelButtonStickyInactiveText", HIText, kThemeTextColorBevelButtonStickyInactive },
-{"NotificationText", HIText, kThemeTextColorNotification },
-{"SystemDetailText", HIText, kThemeTextColorSystemDetail },
-{"PlacardBackground", HIBackground, kThemeBackgroundPlacard },
-{"WindowHeaderBackground", HIBackground, kThemeBackgroundWindowHeader },
-{"ListViewWindowHeaderBackground", HIBackground, kThemeBackgroundListViewWindowHeader },
-{"MetalBackground", HIBackground, kThemeBackgroundMetal },
+{"ButtonText", HIText, kThemeTextColorPushButtonActive, NULL, 0, NULL },
+{"MenuActiveText", HIText, kThemeTextColorMenuItemSelected, NULL, 0, NULL },
+{"MenuDisabled", HIText, kThemeTextColorMenuItemDisabled, NULL, 0, NULL },
+{"MenuText", HIText, kThemeTextColorMenuItemActive, NULL, 0, NULL },
+{"BlackText", HIText, kThemeTextColorBlack, NULL, 0, NULL },
+{"DialogActiveText", HIText, kThemeTextColorDialogActive, NULL, 0, NULL },
+{"DialogInactiveText", HIText, kThemeTextColorDialogInactive, NULL, 0, NULL },
+{"AlertActiveText", HIText, kThemeTextColorAlertActive, NULL, 0, NULL },
+{"AlertInactiveText", HIText, kThemeTextColorAlertInactive, NULL, 0, NULL },
+{"ModelessDialogActiveText", HIText, kThemeTextColorModelessDialogActive, NULL, 0, NULL },
+{"ModelessDialogInactiveText", HIText, kThemeTextColorModelessDialogInactive, NULL, 0, NULL },
+{"WindowHeaderActiveText", HIText, kThemeTextColorWindowHeaderActive, NULL, 0, NULL },
+{"WindowHeaderInactiveText", HIText, kThemeTextColorWindowHeaderInactive, NULL, 0, NULL },
+{"PlacardActiveText", HIText, kThemeTextColorPlacardActive, NULL, 0, NULL },
+{"PlacardInactiveText", HIText, kThemeTextColorPlacardInactive, NULL, 0, NULL },
+{"PlacardPressedText", HIText, kThemeTextColorPlacardPressed, NULL, 0, NULL },
+{"PushButtonActiveText", HIText, kThemeTextColorPushButtonActive, NULL, 0, NULL },
+{"PushButtonInactiveText", HIText, kThemeTextColorPushButtonInactive, NULL, 0, NULL },
+{"PushButtonPressedText", HIText, kThemeTextColorPushButtonPressed, NULL, 0, NULL },
+{"BevelButtonActiveText", HIText, kThemeTextColorBevelButtonActive, NULL, 0, NULL },
+{"BevelButtonInactiveText", HIText, kThemeTextColorBevelButtonInactive, NULL, 0, NULL },
+{"BevelButtonPressedText", HIText, kThemeTextColorBevelButtonPressed, NULL, 0, NULL },
+{"PopupButtonActiveText", HIText, kThemeTextColorPopupButtonActive, NULL, 0, NULL },
+{"PopupButtonInactiveText", HIText, kThemeTextColorPopupButtonInactive, NULL, 0, NULL },
+{"PopupButtonPressedText", HIText, kThemeTextColorPopupButtonPressed, NULL, 0, NULL },
+{"IconLabelText", HIText, kThemeTextColorIconLabel, NULL, 0, NULL },
+{"ListViewText", HIText, kThemeTextColorListView, NULL, 0, NULL },
+{"DocumentWindowTitleActiveText", HIText, kThemeTextColorDocumentWindowTitleActive, NULL, 0, NULL },
+{"DocumentWindowTitleInactiveText", HIText, kThemeTextColorDocumentWindowTitleInactive, NULL, 0, NULL },
+{"MovableModalWindowTitleActiveText", HIText, kThemeTextColorMovableModalWindowTitleActive, NULL, 0, NULL },
+{"MovableModalWindowTitleInactiveText", HIText, kThemeTextColorMovableModalWindowTitleInactive, NULL, 0, NULL },
+{"UtilityWindowTitleActiveText", HIText, kThemeTextColorUtilityWindowTitleActive, NULL, 0, NULL },
+{"UtilityWindowTitleInactiveText", HIText, kThemeTextColorUtilityWindowTitleInactive, NULL, 0, NULL },
+{"PopupWindowTitleActiveText", HIText, kThemeTextColorPopupWindowTitleActive, NULL, 0, NULL },
+{"PopupWindowTitleInactiveText", HIText, kThemeTextColorPopupWindowTitleInactive, NULL, 0, NULL },
+{"RootMenuActiveText", HIText, kThemeTextColorRootMenuActive, NULL, 0, NULL },
+{"RootMenuSelectedText", HIText, kThemeTextColorRootMenuSelected, NULL, 0, NULL },
+{"RootMenuDisabledText", HIText, kThemeTextColorRootMenuDisabled, NULL, 0, NULL },
+{"MenuItemActiveText", HIText, kThemeTextColorMenuItemActive, NULL, 0, NULL },
+{"MenuItemSelectedText", HIText, kThemeTextColorMenuItemSelected, NULL, 0, NULL },
+{"MenuItemDisabledText", HIText, kThemeTextColorMenuItemDisabled, NULL, 0, NULL },
+{"PopupLabelActiveText", HIText, kThemeTextColorPopupLabelActive, NULL, 0, NULL },
+{"PopupLabelInactiveText", HIText, kThemeTextColorPopupLabelInactive, NULL, 0, NULL },
+{"TabFrontActiveText", HIText, kThemeTextColorTabFrontActive, NULL, 0, NULL },
+{"TabNonFrontActiveText", HIText, kThemeTextColorTabNonFrontActive, NULL, 0, NULL },
+{"TabNonFrontPressedText", HIText, kThemeTextColorTabNonFrontPressed, NULL, 0, NULL },
+{"TabFrontInactiveText", HIText, kThemeTextColorTabFrontInactive, NULL, 0, NULL },
+{"TabNonFrontInactiveText", HIText, kThemeTextColorTabNonFrontInactive, NULL, 0, NULL },
+{"IconLabelSelectedText", HIText, kThemeTextColorIconLabelSelected, NULL, 0, NULL },
+{"BevelButtonStickyActiveText", HIText, kThemeTextColorBevelButtonStickyActive, NULL, 0, NULL },
+{"BevelButtonStickyInactiveText", HIText, kThemeTextColorBevelButtonStickyInactive, NULL, 0, NULL },
+{"NotificationText", HIText, kThemeTextColorNotification, NULL, 0, NULL },
+{"SystemDetailText", HIText, kThemeTextColorSystemDetail, NULL, 0, NULL },
+{"PlacardBackground", HIBackground, kThemeBackgroundPlacard, NULL, 0, NULL },
+{"WindowHeaderBackground", HIBackground, kThemeBackgroundWindowHeader, NULL, 0, NULL },
+{"ListViewWindowHeaderBackground", HIBackground, kThemeBackgroundListViewWindowHeader, NULL, 0, NULL },
+{"MetalBackground", HIBackground, kThemeBackgroundMetal, NULL, 0, NULL },
-{"SecondaryGroupBoxBackground", HIBackground, kThemeBackgroundSecondaryGroupBox },
-{"TabPaneBackground", HIBackground, kThemeBackgroundTabPane },
-{"WhiteText", HIText, kThemeTextColorWhite },
-{"Black", HIBrush, kThemeBrushBlack },
-{"White", HIBrush, kThemeBrushWhite },
+{"SecondaryGroupBoxBackground", HIBackground, kThemeBackgroundSecondaryGroupBox, NULL, 0, NULL },
+{"TabPaneBackground", HIBackground, kThemeBackgroundTabPane, NULL, 0, NULL },
+{"WhiteText", HIText, kThemeTextColorWhite, NULL, 0, NULL },
+{"Black", HIBrush, kThemeBrushBlack, NULL, 0, NULL },
+{"White", HIBrush, kThemeBrushWhite, NULL, 0, NULL },
/*
* Dynamic Colors
*/
-{"WindowBackgroundColor", ttkBackground, 0 },
-{"WindowBackgroundColor1", ttkBackground, 1 },
-{"WindowBackgroundColor2", ttkBackground, 2 },
-{"WindowBackgroundColor3", ttkBackground, 3 },
-{"WindowBackgroundColor4", ttkBackground, 4 },
-{"WindowBackgroundColor5", ttkBackground, 5 },
-{"WindowBackgroundColor6", ttkBackground, 6 },
-{"WindowBackgroundColor7", ttkBackground, 7 },
+{"WindowBackgroundColor", ttkBackground, 0, NULL, 0, NULL },
+{"WindowBackgroundColor1", ttkBackground, 1, NULL, 0, NULL },
+{"WindowBackgroundColor2", ttkBackground, 2, NULL, 0, NULL },
+{"WindowBackgroundColor3", ttkBackground, 3, NULL, 0, NULL },
+{"WindowBackgroundColor4", ttkBackground, 4, NULL, 0, NULL },
+{"WindowBackgroundColor5", ttkBackground, 5, NULL, 0, NULL },
+{"WindowBackgroundColor6", ttkBackground, 6, NULL, 0, NULL },
+{"WindowBackgroundColor7", ttkBackground, 7, NULL, 0, NULL },
/* Apple's SecondaryLabelColor is the same as their LabelColor so we roll our own. */
-{"SecondaryLabelColor", ttkBackground, 14 },
+{"SecondaryLabelColor", ttkBackground, 14, NULL, 0, NULL },
-{"TextColor", semantic, 0, "textColor" },
-{"SelectedTextColor", semantic, 0, "selectedTextColor" },
-{"LabelColor", semantic, 0, "textColor"},
-{"LabelColor", semantic, 0, "labelColor"},
-{"ControlTextColor", semantic, 0, "controlTextColor" },
-{"DisabledControlTextColor", semantic, 0, "disabledControlTextColor" },
+{"TextColor", semantic, 0, "textColor", 0, NULL },
+{"SelectedTextColor", semantic, 0, "selectedTextColor", 0, NULL },
+{"LabelColor", semantic, 0, "textColor", 0, NULL },
+{"LabelColor", semantic, 0, "labelColor", 0, NULL },
+{"ControlTextColor", semantic, 0, "controlTextColor", 0, NULL },
+{"DisabledControlTextColor", semantic, 0, "disabledControlTextColor", 0, NULL },
#if MAC_OS_X_VERSION_MAX_ALLOWED > 1060
-{"SelectedTabTextColor", semantic, 0, "whiteColor" },
+{"SelectedTabTextColor", semantic, 0, "whiteColor", 0, NULL },
#else
-{"SelectedTabTextColor", semantic, 0, "blackColor" },
+{"SelectedTabTextColor", semantic, 0, "blackColor", 0, NULL },
#endif
-{"TextBackgroundColor", semantic, 0, "textBackgroundColor" },
-{"SelectedTextBackgroundColor", semantic, 0, "selectedTextBackgroundColor" },
-{"ControlAccentColor", semantic, 0, "controlAccentColor" },
-{"LinkColor", semantic, 0, "blueColor" },
-{"LinkColor", semantic, 0, "linkColor" },
-{"PlaceholderTextColor", semantic, 0, "grayColor" },
-{"PlaceholderTextColor", semantic, 0, "placeholderTextColor" },
-{"SeparatorColor", semantic, 0, "grayColor" },
-{"SeparatorColor", semantic, 0, "separatorColor" },
-{NULL, 0, 0 }
+{"TextBackgroundColor", semantic, 0, "textBackgroundColor", 0, NULL },
+{"SelectedTextBackgroundColor", semantic, 0, "selectedTextBackgroundColor", 0, NULL },
+{"ControlAccentColor", semantic, 0, "controlAccentColor", 0, NULL },
+{"LinkColor", semantic, 0, "blueColor", 0, NULL },
+{"LinkColor", semantic, 0, "linkColor", 0, NULL },
+{"PlaceholderTextColor", semantic, 0, "grayColor", 0, NULL },
+{"PlaceholderTextColor", semantic, 0, "placeholderTextColor", 0, NULL },
+{"SeparatorColor", semantic, 0, "grayColor", 0, NULL },
+{"SeparatorColor", semantic, 0, "separatorColor", 0, NULL },
+{NULL, 0, 0, NULL, 0, NULL }
};
#endif
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index dceb051..379e25c 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -124,7 +124,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
* the menu was posted. For example, opening a menu during the Rube Goldberg
* demo would cause the animation to stop. This was also the case for
* menubuttons.
- *
+ *
* The TKBackground object below works around this problem, and allows a Tk
* event loop to run while a menu is open. It is a subclass of NSThread which
* inserts requests to call [NSApp _runBackgroundLoop] onto the queue
@@ -142,25 +142,25 @@ static int ModifierCharWidth(Tk_Font tkfont);
NSArray *modeArray = [NSArray arrayWithObjects: NSEventTrackingRunLoopMode,
nil];
while(1) {
-
+
/*
* Queue a request to process Tk events during event tracking.
*/
-
- [NSApp performSelectorOnMainThread:@selector(_runBackgroundLoop)
+
+ [NSApp performSelectorOnMainThread:@selector(_runBackgroundLoop)
withObject:nil
- waitUntilDone:true
+ waitUntilDone:true
modes:modeArray];
if (self.cancelled) {
[NSThread exit];
}
-
+
/*
* Allow the tracked events to be processed too.
*/
[NSThread sleepForTimeInterval:0.001];
- }
+ }
}
@end
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index dc9ea32..e183ca7 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -201,8 +201,8 @@ TkpOpenDisplay(
}
}
- display = ckalloc(sizeof(Display));
- screen = ckalloc(sizeof(Screen));
+ display = (Display *)ckalloc(sizeof(Display));
+ screen = (Screen *)ckalloc(sizeof(Screen));
bzero(display, sizeof(Display));
bzero(screen, sizeof(Screen));
@@ -254,7 +254,7 @@ TkpOpenDisplay(
screen->white_pixel = 0x00FFFFFF;
screen->ext_data = (XExtData *) &maxBounds;
- screen->root_visual = ckalloc(sizeof(Visual));
+ screen->root_visual = (Visual *)ckalloc(sizeof(Visual));
screen->root_visual->visualid = 0;
screen->root_visual->c_class = TrueColor;
screen->root_visual->red_mask = 0x00FF0000;
@@ -269,7 +269,7 @@ TkpOpenDisplay(
TkMacOSXDisplayChanged(display);
- gMacDisplay = ckalloc(sizeof(TkDisplay));
+ gMacDisplay = (TkDisplay *)ckalloc(sizeof(TkDisplay));
/*
* This is the quickest way to make sure that all the *Init flags get
@@ -387,7 +387,7 @@ TkClipCleanup(
static XID
MacXIdAlloc(
- Display *display) /* Display for which to allocate. */
+ TCL_UNUSED(Display *)) /* Display for which to allocate. */
{
static long int cur_id = 100;
/*
@@ -417,8 +417,8 @@ MacXIdAlloc(
static int
DefaultErrorHandler(
- Display* display,
- XErrorEvent* err_evt)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(XErrorEvent *))
{
/*
* This call should never be called. Tk replaces it with its own error
@@ -431,8 +431,8 @@ DefaultErrorHandler(
char *
XGetAtomName(
- Display * display,
- Atom atom)
+ Display *display,
+ TCL_UNUSED(Atom))
{
display->request++;
return NULL;
@@ -440,7 +440,7 @@ XGetAtomName(
XErrorHandler
XSetErrorHandler(
- XErrorHandler handler)
+ TCL_UNUSED(XErrorHandler))
{
return DefaultErrorHandler;
}
@@ -448,7 +448,7 @@ XSetErrorHandler(
Window
XRootWindow(
Display *display,
- int screen_number)
+ TCL_UNUSED(int))
{
display->request++;
return ROOT_ID;
@@ -491,14 +491,14 @@ XGetGeometry(
int
XChangeProperty(
- Display* display,
- Window w,
- Atom property,
- Atom type,
- int format,
- int mode,
- _Xconst unsigned char* data,
- int nelements)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Atom),
+ TCL_UNUSED(Atom),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(_Xconst unsigned char *),
+ TCL_UNUSED(int))
{
Debugger();
return Success;
@@ -506,9 +506,9 @@ XChangeProperty(
int
XSelectInput(
- Display* display,
- Window w,
- long event_mask)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(long))
{
Debugger();
return Success;
@@ -516,40 +516,16 @@ XSelectInput(
int
XBell(
- Display* display,
- int percent)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(int))
{
NSBeep();
return Success;
}
-#if 0
-void
-XSetWMNormalHints(
- Display* display,
- Window w,
- XSizeHints* hints)
-{
- /*
- * Do nothing. Shouldn't even be called.
- */
-}
-
-XSizeHints *
-XAllocSizeHints(void)
-{
- /*
- * Always return NULL. Tk code checks to see if NULL is returned & does
- * nothing if it is.
- */
-
- return NULL;
-}
-#endif
-
GContext
XGContextFromGC(
- GC gc)
+ TCL_UNUSED(GC))
{
/*
* TODO: currently a no-op
@@ -560,11 +536,11 @@ XGContextFromGC(
Status
XSendEvent(
- Display* display,
- Window w,
- Bool propagate,
- long event_mask,
- XEvent* event_send)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Bool),
+ TCL_UNUSED(long),
+ TCL_UNUSED(XEvent *))
{
Debugger();
return 0;
@@ -572,56 +548,31 @@ XSendEvent(
int
XClearWindow(
- Display* display,
- Window w)
-{
- return Success;
-}
-
-/*
-int
-XDrawPoint(
- Display* display,
- Drawable d,
- GC gc,
- int x,
- int y)
-{
- return Success;
-}
-
-int
-XDrawPoints(
- Display* display,
- Drawable d,
- GC gc,
- XPoint* points,
- int npoints,
- int mode)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window))
{
return Success;
}
-*/
int
XWarpPointer(
- Display* display,
- Window src_w,
- Window dest_w,
- int src_x,
- int src_y,
- unsigned int src_width,
- unsigned int src_height,
- int dest_x,
- int dest_y)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(unsigned int),
+ TCL_UNUSED(unsigned int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
return Success;
}
int
XQueryColor(
- Display* display,
- Colormap colormap,
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Colormap),
XColor* def_in_out)
{
unsigned long p;
@@ -642,8 +593,8 @@ XQueryColor(
int
XQueryColors(
- Display* display,
- Colormap colormap,
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Colormap),
XColor* defs_in_out,
int ncolors)
{
@@ -667,14 +618,13 @@ XQueryColors(
}
int
-XQueryTree(display, w, root_return, parent_return, children_return,
- nchildren_return)
- Display* display;
- Window w;
- Window* root_return;
- Window* parent_return;
- Window** children_return;
- unsigned int* nchildren_return;
+XQueryTree(
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Window *),
+ TCL_UNUSED(Window *),
+ TCL_UNUSED(Window **),
+ TCL_UNUSED(unsigned int *))
{
return 0;
}
@@ -683,17 +633,17 @@ XQueryTree(display, w, root_return, parent_return, children_return,
int
XGetWindowProperty(
Display *display,
- Window w,
- Atom property,
- long long_offset,
- long long_length,
- Bool delete,
- Atom req_type,
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Atom),
+ TCL_UNUSED(long),
+ TCL_UNUSED(long),
+ TCL_UNUSED(Bool),
+ TCL_UNUSED(Atom),
Atom *actual_type_return,
int *actual_format_return,
unsigned long *nitems_return,
unsigned long *bytes_after_return,
- unsigned char ** prop_return)
+ TCL_UNUSED(unsigned char **))
{
display->request++;
*actual_type_return = None;
@@ -704,7 +654,7 @@ XGetWindowProperty(
int
XRefreshKeyboardMapping(
- XMappingEvent *x)
+ TCL_UNUSED(XMappingEvent *))
{
/* used by tkXEvent.c */
Debugger();
@@ -714,8 +664,8 @@ XRefreshKeyboardMapping(
int
XSetIconName(
Display* display,
- Window w,
- const char *icon_name)
+ TCL_UNUSED(Window),
+ TCL_UNUSED(const char *))
{
/*
* This is a no-op, no icon name for Macs.
@@ -727,7 +677,7 @@ XSetIconName(
int
XForceScreenSaver(
Display* display,
- int mode)
+ TCL_UNUSED(int))
{
/*
* This function is just a no-op. It is defined to reset the screen saver.
@@ -741,8 +691,8 @@ XForceScreenSaver(
void
Tk_FreeXId(
- Display *display,
- XID xid)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(XID))
{
/* no-op function needed for stubs implementation. */
}
@@ -750,7 +700,7 @@ Tk_FreeXId(
int
XSync(
Display *display,
- Bool discard)
+ TCL_UNUSED(Bool))
{
/*
* The main use of XSync is by the update command, which alternates
@@ -768,33 +718,6 @@ XSync(
return 0;
}
-#if 0
-int
-XSetClipRectangles(
- Display *d,
- GC gc,
- int clip_x_origin,
- int clip_y_origin,
- XRectangle* rectangles,
- int n,
- int ordering)
-{
- TkRegion clipRgn = TkCreateRegion();
-
- while (n--) {
- XRectangle rect = *rectangles;
-
- rect.x += clip_x_origin;
- rect.y += clip_y_origin;
- TkUnionRectWithRegion(&rect, clipRgn, clipRgn);
- rectangles++;
- }
- TkSetRegion(d, gc, clipRgn);
- TkDestroyRegion(clipRgn);
- return 1;
-}
-#endif
-
/*
*----------------------------------------------------------------------
*
@@ -853,64 +776,64 @@ TkGetServerInfo(
int
XChangeWindowAttributes(
- Display *display,
- Window w,
- unsigned long value_mask,
- XSetWindowAttributes *attributes)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(unsigned long),
+ TCL_UNUSED(XSetWindowAttributes *))
{
return Success;
}
int
XSetWindowBackground(
- Display *display,
- Window window,
- unsigned long value)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(unsigned long))
{
return Success;
}
int
XSetWindowBackgroundPixmap(
- Display *display,
- Window w,
- Pixmap background_pixmap)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Pixmap))
{
return Success;
}
int
XSetWindowBorder(
- Display *display,
- Window w,
- unsigned long border_pixel)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(unsigned long))
{
return Success;
}
int
XSetWindowBorderPixmap(
- Display *display,
- Window w,
- Pixmap border_pixmap)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Pixmap))
{
return Success;
}
int
XSetWindowBorderWidth(
- Display *display,
- Window w,
- unsigned int width)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(unsigned int))
{
return Success;
}
int
XSetWindowColormap(
- Display *display,
- Window w,
- Colormap colormap)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(Colormap))
{
Debugger();
return Success;
@@ -918,25 +841,25 @@ XSetWindowColormap(
Status
XStringListToTextProperty(
- char **list,
- int count,
- XTextProperty *text_prop_return)
+ TCL_UNUSED(char **),
+ TCL_UNUSED(int),
+ TCL_UNUSED(XTextProperty *))
{
Debugger();
- return (Status) 0;
+ return Success;
}
void
XSetWMClientMachine(
- Display *display,
- Window w,
- XTextProperty *text_prop)
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Window),
+ TCL_UNUSED(XTextProperty *))
{
Debugger();
}
XIC
-XCreateIC(XIM xim, ...)
+XCreateIC(TCL_UNUSED(XIM), ...)
{
Debugger();
return (XIC) 0;
@@ -954,7 +877,7 @@ XVisualIDFromVisual(
XAfterFunction
XSynchronize(
Display *display,
- Bool onoff)
+ TCL_UNUSED(Bool))
{
display->request++;
return NULL;
@@ -963,7 +886,7 @@ XSynchronize(
#undef XUngrabServer
int
XUngrabServer(
- Display *display)
+ TCL_UNUSED(Display *))
{
return 0;
}
@@ -980,7 +903,7 @@ XNoOp(
#undef XGrabServer
int
XGrabServer(
- Display *display)
+ TCL_UNUSED(Display *))
{
return 0;
}
@@ -998,7 +921,7 @@ XFree(
#undef XFlush
int
XFlush(
- Display *display)
+ TCL_UNUSED(Display *))
{
return 0;
}
@@ -1022,7 +945,7 @@ XFlush(
const char *
TkGetDefaultScreenName(
- Tcl_Interp *interp, /* Not used. */
+ TCL_UNUSED(Tcl_Interp *),
const char *screenName) /* If NULL, use default string. */
{
if ((screenName == NULL) || (screenName[0] == '\0')) {
@@ -1049,7 +972,7 @@ TkGetDefaultScreenName(
long
Tk_GetUserInactiveTime(
- Display *dpy)
+ TCL_UNUSED(Display *))
{
io_registry_entry_t regEntry;
CFMutableDictionaryRef props = NULL;
@@ -1115,7 +1038,7 @@ Tk_GetUserInactiveTime(
void
Tk_ResetUserInactiveTime(
- Display *dpy)
+ TCL_UNUSED(Display *))
{
lastInactivityReset = TkpGetMS();
}