diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-02 15:07:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-02 15:07:23 (GMT) |
commit | 30699869c5cf8459e81c4bcedbe819d6887a02cb (patch) | |
tree | d9a6f8318d5ea92c32427f8db251c477206c50cd /macosx | |
parent | fecbf2b8553ba43518eba229753b0efc12aabd28 (diff) | |
download | tk-30699869c5cf8459e81c4bcedbe819d6887a02cb.zip tk-30699869c5cf8459e81c4bcedbe819d6887a02cb.tar.gz tk-30699869c5cf8459e81c4bcedbe819d6887a02cb.tar.bz2 |
Fix more warnings, related to -Wshadow, now in MacOSX code
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXColor.c | 10 | ||||
-rw-r--r-- | macosx/tkMacOSXCursor.c | 268 | ||||
-rw-r--r-- | macosx/tkMacOSXDialog.c | 10 | ||||
-rw-r--r-- | macosx/tkMacOSXFont.c | 59 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyboard.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 84 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 8 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 324 |
8 files changed, 391 insertions, 375 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 208fc8b..5f549b1 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -31,7 +31,7 @@ static NSAppearance *lightAqua = nil; static NSAppearance *darkAqua = nil; #endif static NSColorSpace* sRGB = NULL; -static CGFloat windowBackground[4] = +static const CGFloat WINDOWBACKGROUND[4] = {236.0 / 255, 236.0 / 255, 236.0 / 255, 1.0}; void initColorTable() @@ -92,9 +92,9 @@ void initColorTable() for (key in [systemColorList allKeys]) { int length = [key lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; char *name; - entry = ckalloc(sizeof(SystemColorDatum)); + entry = (SystemColorDatum *)ckalloc(sizeof(SystemColorDatum)); bzero(entry, sizeof(SystemColorDatum)); - name = ckalloc(length + 1); + name = (char *)ckalloc(length + 1); strcpy(name, key.UTF8String); name[0] = toupper(name[0]); if (!strcmp(name, "WindowBackgroundColor")) { @@ -124,7 +124,7 @@ void initColorTable() */ numSystemColors = index; - systemColorIndex = ckalloc(numSystemColors * sizeof(SystemColorDatum*)); + systemColorIndex = (SystemColorDatum **)ckalloc(numSystemColors * sizeof(SystemColorDatum *)); for (hPtr = Tcl_FirstHashEntry(&systemColors, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { entry = (SystemColorDatum *) Tcl_GetHashValue(hPtr); @@ -297,7 +297,7 @@ GetRGBA( if ([NSApp macOSVersion] < 101400) { for (int i = 0; i < 3; i++) { - rgba[i] = windowBackground[i]; + rgba[i] = WINDOWBACKGROUND[i]; } } else { bgColor = [[NSColor windowBackgroundColor] colorUsingColorSpace:sRGB]; diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c index 894a44d..4b2de7f 100644 --- a/macosx/tkMacOSXCursor.c +++ b/macosx/tkMacOSXCursor.c @@ -54,131 +54,131 @@ struct CursorName { #define MacXCursorData(n) ((id)tkMacOSXXCursors[TK_MAC_XCURSOR_##n]) static const struct CursorName cursorNames[] = { - {"none", NONE, nil}, - {"arrow", SELECTOR, @"arrowCursor"}, - {"top_left_arrow", SELECTOR, @"arrowCursor"}, - {"left_ptr", SELECTOR, @"arrowCursor"}, - {"copyarrow", SELECTOR, @"dragCopyCursor", @"_copyDragCursor"}, - {"aliasarrow", SELECTOR, @"dragLinkCursor", @"_linkDragCursor"}, - {"contextualmenuarrow", SELECTOR, @"contextualMenuCursor"}, - {"movearrow", SELECTOR, @"_moveCursor"}, - {"ibeam", SELECTOR, @"IBeamCursor"}, - {"text", SELECTOR, @"IBeamCursor"}, - {"xterm", SELECTOR, @"IBeamCursor"}, - {"cross", SELECTOR, @"crosshairCursor"}, - {"crosshair", SELECTOR, @"crosshairCursor"}, - {"cross-hair", SELECTOR, @"crosshairCursor"}, - {"tcross", SELECTOR, @"crosshairCursor"}, - {"hand", SELECTOR, @"openHandCursor"}, - {"openhand", SELECTOR, @"openHandCursor"}, - {"closedhand", SELECTOR, @"closedHandCursor"}, - {"fist", SELECTOR, @"closedHandCursor"}, - {"pointinghand", SELECTOR, @"pointingHandCursor"}, - {"resize", SELECTOR, @"arrowCursor"}, - {"resizeleft", SELECTOR, @"resizeLeftCursor"}, - {"resizeright", SELECTOR, @"resizeRightCursor"}, - {"resizeleftright", SELECTOR, @"resizeLeftRightCursor"}, - {"resizeup", SELECTOR, @"resizeUpCursor"}, - {"resizedown", SELECTOR, @"resizeDownCursor"}, - {"resizeupdown", SELECTOR, @"resizeUpDownCursor"}, - {"resizebottomleft", SELECTOR, @"_bottomLeftResizeCursor"}, - {"resizetopleft", SELECTOR, @"_topLeftResizeCursor"}, - {"resizebottomright", SELECTOR, @"_bottomRightResizeCursor"}, - {"resizetopright", SELECTOR, @"_topRightResizeCursor"}, - {"notallowed", SELECTOR, @"operationNotAllowedCursor"}, - {"poof", SELECTOR, @"disappearingItemCursor"}, - {"wait", SELECTOR, @"busyButClickableCursor"}, - {"spinning", SELECTOR, @"busyButClickableCursor"}, - {"countinguphand", SELECTOR, @"busyButClickableCursor"}, - {"countingdownhand", SELECTOR, @"busyButClickableCursor"}, - {"countingupanddownhand", SELECTOR, @"busyButClickableCursor"}, + {"none", NONE, nil, nil, {0, 0}}, + {"arrow", SELECTOR, @"arrowCursor", nil, {0, 0}}, + {"top_left_arrow", SELECTOR, @"arrowCursor", nil, {0, 0}}, + {"left_ptr", SELECTOR, @"arrowCursor", nil, {0, 0}}, + {"copyarrow", SELECTOR, @"dragCopyCursor", @"_copyDragCursor", {0, 0}}, + {"aliasarrow", SELECTOR, @"dragLinkCursor", @"_linkDragCursor", {0, 0}}, + {"contextualmenuarrow", SELECTOR, @"contextualMenuCursor", nil, {0, 0}}, + {"movearrow", SELECTOR, @"_moveCursor", nil, {0, 0}}, + {"ibeam", SELECTOR, @"IBeamCursor", nil, {0, 0}}, + {"text", SELECTOR, @"IBeamCursor", nil, {0, 0}}, + {"xterm", SELECTOR, @"IBeamCursor", nil, {0, 0}}, + {"cross", SELECTOR, @"crosshairCursor", nil, {0, 0}}, + {"crosshair", SELECTOR, @"crosshairCursor", nil, {0, 0}}, + {"cross-hair", SELECTOR, @"crosshairCursor", nil, {0, 0}}, + {"tcross", SELECTOR, @"crosshairCursor", nil, {0, 0}}, + {"hand", SELECTOR, @"openHandCursor", nil, {0, 0}}, + {"openhand", SELECTOR, @"openHandCursor", nil, {0, 0}}, + {"closedhand", SELECTOR, @"closedHandCursor", nil, {0, 0}}, + {"fist", SELECTOR, @"closedHandCursor", nil, {0, 0}}, + {"pointinghand", SELECTOR, @"pointingHandCursor", nil, {0, 0}}, + {"resize", SELECTOR, @"arrowCursor", nil, {0, 0}}, + {"resizeleft", SELECTOR, @"resizeLeftCursor", nil, {0, 0}}, + {"resizeright", SELECTOR, @"resizeRightCursor", nil, {0, 0}}, + {"resizeleftright", SELECTOR, @"resizeLeftRightCursor", nil, {0, 0}}, + {"resizeup", SELECTOR, @"resizeUpCursor", nil, {0, 0}}, + {"resizedown", SELECTOR, @"resizeDownCursor", nil, {0, 0}}, + {"resizeupdown", SELECTOR, @"resizeUpDownCursor", nil, {0, 0}}, + {"resizebottomleft", SELECTOR, @"_bottomLeftResizeCursor", nil, {0, 0}}, + {"resizetopleft", SELECTOR, @"_topLeftResizeCursor", nil, {0, 0}}, + {"resizebottomright", SELECTOR, @"_bottomRightResizeCursor", nil, {0, 0}}, + {"resizetopright", SELECTOR, @"_topRightResizeCursor", nil, {0, 0}}, + {"notallowed", SELECTOR, @"operationNotAllowedCursor", nil, {0, 0}}, + {"poof", SELECTOR, @"disappearingItemCursor", nil, {0, 0}}, + {"wait", SELECTOR, @"busyButClickableCursor", nil, {0, 0}}, + {"spinning", SELECTOR, @"busyButClickableCursor", nil, {0, 0}}, + {"countinguphand", SELECTOR, @"busyButClickableCursor", nil, {0, 0}}, + {"countingdownhand", SELECTOR, @"busyButClickableCursor", nil, {0, 0}}, + {"countingupanddownhand", SELECTOR, @"busyButClickableCursor", nil, {0, 0}}, {"help", IMAGENAMED, @"NSHelpCursor", nil, {8, 8}}, -// {"hand", IMAGEBITMAP, MacCursorData(hand)}, - {"bucket", IMAGEBITMAP, MacCursorData(bucket)}, - {"cancel", IMAGEBITMAP, MacCursorData(cancel)}, -// {"resize", IMAGEBITMAP, MacCursorData(resize)}, - {"eyedrop", IMAGEBITMAP, MacCursorData(eyedrop)}, - {"eyedrop-full", IMAGEBITMAP, MacCursorData(eyedrop_full)}, - {"zoom-in", IMAGEBITMAP, MacCursorData(zoom_in)}, - {"zoom-out", IMAGEBITMAP, MacCursorData(zoom_out)}, - {"X_cursor", IMAGEBITMAP, MacXCursorData(X_cursor)}, -// {"arrow", IMAGEBITMAP, MacXCursorData(arrow)}, - {"based_arrow_down", IMAGEBITMAP, MacXCursorData(based_arrow_down)}, - {"based_arrow_up", IMAGEBITMAP, MacXCursorData(based_arrow_up)}, - {"boat", IMAGEBITMAP, MacXCursorData(boat)}, - {"bogosity", IMAGEBITMAP, MacXCursorData(bogosity)}, - {"bottom_left_corner", IMAGEBITMAP, MacXCursorData(bottom_left_corner)}, - {"bottom_right_corner", IMAGEBITMAP, MacXCursorData(bottom_right_corner)}, - {"bottom_side", IMAGEBITMAP, MacXCursorData(bottom_side)}, - {"bottom_tee", IMAGEBITMAP, MacXCursorData(bottom_tee)}, - {"box_spiral", IMAGEBITMAP, MacXCursorData(box_spiral)}, - {"center_ptr", IMAGEBITMAP, MacXCursorData(center_ptr)}, - {"circle", IMAGEBITMAP, MacXCursorData(circle)}, - {"clock", IMAGEBITMAP, MacXCursorData(clock)}, - {"coffee_mug", IMAGEBITMAP, MacXCursorData(coffee_mug)}, -// {"cross", IMAGEBITMAP, MacXCursorData(cross)}, - {"cross_reverse", IMAGEBITMAP, MacXCursorData(cross_reverse)}, -// {"crosshair", IMAGEBITMAP, MacXCursorData(crosshair)}, - {"diamond_cross", IMAGEBITMAP, MacXCursorData(diamond_cross)}, - {"dot", IMAGEBITMAP, MacXCursorData(dot)}, - {"dotbox", IMAGEBITMAP, MacXCursorData(dotbox)}, - {"double_arrow", IMAGEBITMAP, MacXCursorData(double_arrow)}, - {"draft_large", IMAGEBITMAP, MacXCursorData(draft_large)}, - {"draft_small", IMAGEBITMAP, MacXCursorData(draft_small)}, - {"draped_box", IMAGEBITMAP, MacXCursorData(draped_box)}, - {"exchange", IMAGEBITMAP, MacXCursorData(exchange)}, - {"fleur", IMAGEBITMAP, MacXCursorData(fleur)}, - {"gobbler", IMAGEBITMAP, MacXCursorData(gobbler)}, - {"gumby", IMAGEBITMAP, MacXCursorData(gumby)}, - {"hand1", IMAGEBITMAP, MacXCursorData(hand1)}, - {"hand2", IMAGEBITMAP, MacXCursorData(hand2)}, - {"heart", IMAGEBITMAP, MacXCursorData(heart)}, - {"icon", IMAGEBITMAP, MacXCursorData(icon)}, - {"iron_cross", IMAGEBITMAP, MacXCursorData(iron_cross)}, -// {"left_ptr", IMAGEBITMAP, MacXCursorData(left_ptr)}, - {"left_side", IMAGEBITMAP, MacXCursorData(left_side)}, - {"left_tee", IMAGEBITMAP, MacXCursorData(left_tee)}, - {"leftbutton", IMAGEBITMAP, MacXCursorData(leftbutton)}, - {"ll_angle", IMAGEBITMAP, MacXCursorData(ll_angle)}, - {"lr_angle", IMAGEBITMAP, MacXCursorData(lr_angle)}, - {"man", IMAGEBITMAP, MacXCursorData(man)}, - {"middlebutton", IMAGEBITMAP, MacXCursorData(middlebutton)}, - {"mouse", IMAGEBITMAP, MacXCursorData(mouse)}, - {"pencil", IMAGEBITMAP, MacXCursorData(pencil)}, - {"pirate", IMAGEBITMAP, MacXCursorData(pirate)}, - {"plus", IMAGEBITMAP, MacXCursorData(plus)}, - {"question_arrow", IMAGEBITMAP, MacXCursorData(question_arrow)}, - {"right_ptr", IMAGEBITMAP, MacXCursorData(right_ptr)}, - {"right_side", IMAGEBITMAP, MacXCursorData(right_side)}, - {"right_tee", IMAGEBITMAP, MacXCursorData(right_tee)}, - {"rightbutton", IMAGEBITMAP, MacXCursorData(rightbutton)}, - {"rtl_logo", IMAGEBITMAP, MacXCursorData(rtl_logo)}, - {"sailboat", IMAGEBITMAP, MacXCursorData(sailboat)}, - {"sb_down_arrow", IMAGEBITMAP, MacXCursorData(sb_down_arrow)}, - {"sb_h_double_arrow", IMAGEBITMAP, MacXCursorData(sb_h_double_arrow)}, - {"sb_left_arrow", IMAGEBITMAP, MacXCursorData(sb_left_arrow)}, - {"sb_right_arrow", IMAGEBITMAP, MacXCursorData(sb_right_arrow)}, - {"sb_up_arrow", IMAGEBITMAP, MacXCursorData(sb_up_arrow)}, - {"sb_v_double_arrow", IMAGEBITMAP, MacXCursorData(sb_v_double_arrow)}, - {"shuttle", IMAGEBITMAP, MacXCursorData(shuttle)}, - {"sizing", IMAGEBITMAP, MacXCursorData(sizing)}, - {"spider", IMAGEBITMAP, MacXCursorData(spider)}, - {"spraycan", IMAGEBITMAP, MacXCursorData(spraycan)}, - {"star", IMAGEBITMAP, MacXCursorData(star)}, - {"target", IMAGEBITMAP, MacXCursorData(target)}, -// {"tcross", IMAGEBITMAP, MacXCursorData(tcross)}, -// {"top_left_arrow", IMAGEBITMAP, MacXCursorData(top_left_arrow)}, - {"top_left_corner", IMAGEBITMAP, MacXCursorData(top_left_corner)}, - {"top_right_corner", IMAGEBITMAP, MacXCursorData(top_right_corner)}, - {"top_side", IMAGEBITMAP, MacXCursorData(top_side)}, - {"top_tee", IMAGEBITMAP, MacXCursorData(top_tee)}, - {"trek", IMAGEBITMAP, MacXCursorData(trek)}, - {"ul_angle", IMAGEBITMAP, MacXCursorData(ul_angle)}, - {"umbrella", IMAGEBITMAP, MacXCursorData(umbrella)}, - {"ur_angle", IMAGEBITMAP, MacXCursorData(ur_angle)}, - {"watch", IMAGEBITMAP, MacXCursorData(watch)}, -// {"xterm", IMAGEBITMAP, MacXCursorData(xterm)}, - {NULL} +// {"hand", IMAGEBITMAP, MacCursorData(hand), nil, {0, 0}}, + {"bucket", IMAGEBITMAP, MacCursorData(bucket), nil, {0, 0}}, + {"cancel", IMAGEBITMAP, MacCursorData(cancel), nil, {0, 0}}, +// {"resize", IMAGEBITMAP, MacCursorData(resize), nil, {0, 0}}, + {"eyedrop", IMAGEBITMAP, MacCursorData(eyedrop), nil, {0, 0}}, + {"eyedrop-full", IMAGEBITMAP, MacCursorData(eyedrop_full), nil, {0, 0}}, + {"zoom-in", IMAGEBITMAP, MacCursorData(zoom_in), nil, {0, 0}}, + {"zoom-out", IMAGEBITMAP, MacCursorData(zoom_out), nil, {0, 0}}, + {"X_cursor", IMAGEBITMAP, MacXCursorData(X_cursor), nil, {0, 0}}, +// {"arrow", IMAGEBITMAP, MacXCursorData(arrow), nil, {0, 0}}, + {"based_arrow_down", IMAGEBITMAP, MacXCursorData(based_arrow_down), nil, {0, 0}}, + {"based_arrow_up", IMAGEBITMAP, MacXCursorData(based_arrow_up), nil, {0, 0}}, + {"boat", IMAGEBITMAP, MacXCursorData(boat), nil, {0, 0}}, + {"bogosity", IMAGEBITMAP, MacXCursorData(bogosity), nil, {0, 0}}, + {"bottom_left_corner", IMAGEBITMAP, MacXCursorData(bottom_left_corner), nil, {0, 0}}, + {"bottom_right_corner", IMAGEBITMAP, MacXCursorData(bottom_right_corner), nil, {0, 0}}, + {"bottom_side", IMAGEBITMAP, MacXCursorData(bottom_side), nil, {0, 0}}, + {"bottom_tee", IMAGEBITMAP, MacXCursorData(bottom_tee), nil, {0, 0}}, + {"box_spiral", IMAGEBITMAP, MacXCursorData(box_spiral), nil, {0, 0}}, + {"center_ptr", IMAGEBITMAP, MacXCursorData(center_ptr), nil, {0, 0}}, + {"circle", IMAGEBITMAP, MacXCursorData(circle), nil, {0, 0}}, + {"clock", IMAGEBITMAP, MacXCursorData(clock), nil, {0, 0}}, + {"coffee_mug", IMAGEBITMAP, MacXCursorData(coffee_mug), nil, {0, 0}}, +// {"cross", IMAGEBITMAP, MacXCursorData(cross), nil, {0, 0}}, + {"cross_reverse", IMAGEBITMAP, MacXCursorData(cross_reverse), nil, {0, 0}}, +// {"crosshair", IMAGEBITMAP, MacXCursorData(crosshair), nil, {0, 0}}, + {"diamond_cross", IMAGEBITMAP, MacXCursorData(diamond_cross), nil, {0, 0}}, + {"dot", IMAGEBITMAP, MacXCursorData(dot), nil, {0, 0}}, + {"dotbox", IMAGEBITMAP, MacXCursorData(dotbox), nil, {0, 0}}, + {"double_arrow", IMAGEBITMAP, MacXCursorData(double_arrow), nil, {0, 0}}, + {"draft_large", IMAGEBITMAP, MacXCursorData(draft_large), nil, {0, 0}}, + {"draft_small", IMAGEBITMAP, MacXCursorData(draft_small), nil, {0, 0}}, + {"draped_box", IMAGEBITMAP, MacXCursorData(draped_box), nil, {0, 0}}, + {"exchange", IMAGEBITMAP, MacXCursorData(exchange), nil, {0, 0}}, + {"fleur", IMAGEBITMAP, MacXCursorData(fleur), nil, {0, 0}}, + {"gobbler", IMAGEBITMAP, MacXCursorData(gobbler), nil, {0, 0}}, + {"gumby", IMAGEBITMAP, MacXCursorData(gumby), nil, {0, 0}}, + {"hand1", IMAGEBITMAP, MacXCursorData(hand1), nil, {0, 0}}, + {"hand2", IMAGEBITMAP, MacXCursorData(hand2), nil, {0, 0}}, + {"heart", IMAGEBITMAP, MacXCursorData(heart), nil, {0, 0}}, + {"icon", IMAGEBITMAP, MacXCursorData(icon), nil, {0, 0}}, + {"iron_cross", IMAGEBITMAP, MacXCursorData(iron_cross), nil, {0, 0}}, +// {"left_ptr", IMAGEBITMAP, MacXCursorData(left_ptr), nil, {0, 0}}, + {"left_side", IMAGEBITMAP, MacXCursorData(left_side), nil, {0, 0}}, + {"left_tee", IMAGEBITMAP, MacXCursorData(left_tee), nil, {0, 0}}, + {"leftbutton", IMAGEBITMAP, MacXCursorData(leftbutton), nil, {0, 0}}, + {"ll_angle", IMAGEBITMAP, MacXCursorData(ll_angle), nil, {0, 0}}, + {"lr_angle", IMAGEBITMAP, MacXCursorData(lr_angle), nil, {0, 0}}, + {"man", IMAGEBITMAP, MacXCursorData(man), nil, {0, 0}}, + {"middlebutton", IMAGEBITMAP, MacXCursorData(middlebutton), nil, {0, 0}}, + {"mouse", IMAGEBITMAP, MacXCursorData(mouse), nil, {0, 0}}, + {"pencil", IMAGEBITMAP, MacXCursorData(pencil), nil, {0, 0}}, + {"pirate", IMAGEBITMAP, MacXCursorData(pirate), nil, {0, 0}}, + {"plus", IMAGEBITMAP, MacXCursorData(plus), nil, {0, 0}}, + {"question_arrow", IMAGEBITMAP, MacXCursorData(question_arrow), nil, {0, 0}}, + {"right_ptr", IMAGEBITMAP, MacXCursorData(right_ptr), nil, {0, 0}}, + {"right_side", IMAGEBITMAP, MacXCursorData(right_side), nil, {0, 0}}, + {"right_tee", IMAGEBITMAP, MacXCursorData(right_tee), nil, {0, 0}}, + {"rightbutton", IMAGEBITMAP, MacXCursorData(rightbutton), nil, {0, 0}}, + {"rtl_logo", IMAGEBITMAP, MacXCursorData(rtl_logo), nil, {0, 0}}, + {"sailboat", IMAGEBITMAP, MacXCursorData(sailboat), nil, {0, 0}}, + {"sb_down_arrow", IMAGEBITMAP, MacXCursorData(sb_down_arrow), nil, {0, 0}}, + {"sb_h_double_arrow", IMAGEBITMAP, MacXCursorData(sb_h_double_arrow), nil, {0, 0}}, + {"sb_left_arrow", IMAGEBITMAP, MacXCursorData(sb_left_arrow), nil, {0, 0}}, + {"sb_right_arrow", IMAGEBITMAP, MacXCursorData(sb_right_arrow), nil, {0, 0}}, + {"sb_up_arrow", IMAGEBITMAP, MacXCursorData(sb_up_arrow), nil, {0, 0}}, + {"sb_v_double_arrow", IMAGEBITMAP, MacXCursorData(sb_v_double_arrow), nil, {0, 0}}, + {"shuttle", IMAGEBITMAP, MacXCursorData(shuttle), nil, {0, 0}}, + {"sizing", IMAGEBITMAP, MacXCursorData(sizing), nil, {0, 0}}, + {"spider", IMAGEBITMAP, MacXCursorData(spider), nil, {0, 0}}, + {"spraycan", IMAGEBITMAP, MacXCursorData(spraycan), nil, {0, 0}}, + {"star", IMAGEBITMAP, MacXCursorData(star), nil, {0, 0}}, + {"target", IMAGEBITMAP, MacXCursorData(target), nil, {0, 0}}, +// {"tcross", IMAGEBITMAP, MacXCursorData(tcross), nil, {0, 0}}, +// {"top_left_arrow", IMAGEBITMAP, MacXCursorData(top_left_arrow), nil, {0, 0}}, + {"top_left_corner", IMAGEBITMAP, MacXCursorData(top_left_corner), nil, {0, 0}}, + {"top_right_corner", IMAGEBITMAP, MacXCursorData(top_right_corner), nil, {0, 0}}, + {"top_side", IMAGEBITMAP, MacXCursorData(top_side), nil, {0, 0}}, + {"top_tee", IMAGEBITMAP, MacXCursorData(top_tee), nil, {0, 0}}, + {"trek", IMAGEBITMAP, MacXCursorData(trek), nil, {0, 0}}, + {"ul_angle", IMAGEBITMAP, MacXCursorData(ul_angle), nil, {0, 0}}, + {"umbrella", IMAGEBITMAP, MacXCursorData(umbrella), nil, {0, 0}}, + {"ur_angle", IMAGEBITMAP, MacXCursorData(ur_angle), nil, {0, 0}}, + {"watch", IMAGEBITMAP, MacXCursorData(watch), nil, {0, 0}}, +// {"xterm", IMAGEBITMAP, MacXCursorData(xterm), nil, {0, 0}}, + {NULL, 0, nil, nil, {0, 0}} }; /* @@ -375,7 +375,7 @@ FindCursorByName( TkCursor * TkGetCursorByName( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - Tk_Window tkwin, /* Window in which cursor will be used. */ + TCL_UNUSED(Tk_Window), /* Window in which cursor will be used. */ Tk_Uid string) /* Description of cursor. See manual entry * for details on legal syntax. */ { @@ -390,7 +390,7 @@ TkGetCursorByName( if (Tcl_SplitList(interp, string, &argc, &argv) == TCL_OK) { if (argc) { - macCursorPtr = ckalloc(sizeof(TkMacOSXCursor)); + macCursorPtr = (TkMacOSXCursor *)ckalloc(sizeof(TkMacOSXCursor)); macCursorPtr->info.cursor = (Tk_Cursor) macCursorPtr; macCursorPtr->macCursor = nil; macCursorPtr->type = 0; @@ -429,13 +429,15 @@ TkGetCursorByName( TkCursor * TkCreateCursorFromData( - Tk_Window tkwin, /* Window in which cursor will be used. */ - const char *source, /* Bitmap data for cursor shape. */ - const char *mask, /* Bitmap data for cursor mask. */ - int width, int height, /* Dimensions of cursor. */ - int xHot, int yHot, /* Location of hot-spot in cursor. */ - XColor fgColor, /* Foreground color for cursor. */ - XColor bgColor) /* Background color for cursor. */ + TCL_UNUSED(Tk_Window), /* Window in which cursor will be used. */ + TCL_UNUSED(const char *), /* Bitmap data for cursor shape. */ + TCL_UNUSED(const char *), /* Bitmap data for cursor mask. */ + TCL_UNUSED(int), /* Dimensions of cursor. */ + TCL_UNUSED(int), + TCL_UNUSED(int), /* Location of hot-spot in cursor. */ + TCL_UNUSED(int), + TCL_UNUSED(XColor), /* Foreground color for cursor. */ + TCL_UNUSED(XColor)) /* Background color for cursor. */ { return NULL; } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index c2b1b15..42cb4a5 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -870,15 +870,15 @@ Tk_GetOpenFileObjCmd( selectedFilterIndex = filterInfo.fileTypeIndex; // The preselection from the typevariable selectedFilter = [filterInfo.fileTypeNames objectAtIndex:selectedFilterIndex]; } else { - NSUInteger i; + NSUInteger j; - for (i = 0; i < [filterInfo.fileTypeNames count]; i++) { - if (filterCompatible(extension, i)) { - selectedFilterIndex = i; + for (j = 0; j < [filterInfo.fileTypeNames count]; j++) { + if (filterCompatible(extension, j)) { + selectedFilterIndex = j; break; } } - if (i == selectedFilterIndex) { + if (j == selectedFilterIndex) { selectedFilter = [filterInfo.fileTypeNames objectAtIndex:selectedFilterIndex]; } else { selectedFilter = @""; diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index f7b87dc..34dc8c2 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -56,25 +56,25 @@ struct SystemFontMapEntry { #define ThemeFont(n, ...) { kTheme##n##Font, "system" #n "Font", ##__VA_ARGS__ } static const struct SystemFontMapEntry systemFontMap[] = { ThemeFont(System, "TkDefaultFont", "TkIconFont"), - ThemeFont(EmphasizedSystem, "TkCaptionFont"), + ThemeFont(EmphasizedSystem, "TkCaptionFont", NULL), ThemeFont(SmallSystem, "TkHeadingFont", "TkTooltipFont"), - ThemeFont(SmallEmphasizedSystem), - ThemeFont(Application, "TkTextFont"), - ThemeFont(Label, "TkSmallCaptionFont"), - ThemeFont(Views), - ThemeFont(MenuTitle), - ThemeFont(MenuItem, "TkMenuFont"), - ThemeFont(MenuItemMark), - ThemeFont(MenuItemCmdKey), - ThemeFont(WindowTitle), - ThemeFont(PushButton), - ThemeFont(UtilityWindowTitle), - ThemeFont(AlertHeader), - ThemeFont(Toolbar), - ThemeFont(MiniSystem), - { kThemeSystemFontDetail, "systemDetailSystemFont" }, - { kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont" }, - { -1, NULL } + ThemeFont(SmallEmphasizedSystem, NULL, NULL), + ThemeFont(Application, "TkTextFont", NULL), + ThemeFont(Label, "TkSmallCaptionFont", NULL), + ThemeFont(Views, NULL, NULL), + ThemeFont(MenuTitle, NULL, NULL), + ThemeFont(MenuItem, "TkMenuFont", NULL), + ThemeFont(MenuItemMark, NULL, NULL), + ThemeFont(MenuItemCmdKey, NULL, NULL), + ThemeFont(WindowTitle, NULL, NULL), + ThemeFont(PushButton, NULL, NULL), + ThemeFont(UtilityWindowTitle, NULL, NULL), + ThemeFont(AlertHeader, NULL, NULL), + ThemeFont(Toolbar, NULL, NULL), + ThemeFont(MiniSystem, NULL, NULL), + { kThemeSystemFontDetail, "systemDetailSystemFont", NULL, NULL }, + { kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont", NULL, NULL }, + { -1, NULL, NULL, NULL } }; #undef ThemeFont @@ -162,7 +162,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp, * our string's unicode characters. */ char *p; - unsigned int index; + NSUInteger index; Tcl_DStringInit(&_ds); Tcl_DStringSetLength(&_ds, 3 * [_string length]); @@ -550,7 +550,7 @@ TkpFontPkgInit( TkFont * TkpGetNativeFont( - Tk_Window tkwin, /* For display where font will be used. */ + TCL_UNUSED(Tk_Window), /* For display where font will be used. */ const char *name) /* Platform-specific font name. */ { MacFont *fontPtr = NULL; @@ -569,7 +569,7 @@ TkpGetNativeFont( ctFont = CTFontCreateUIFontForLanguage( HIThemeGetUIFontType(themeFontId), 0, NULL); if (ctFont) { - fontPtr = ckalloc(sizeof(MacFont)); + fontPtr = (MacFont *)ckalloc(sizeof(MacFont)); InitFont((NSFont*) ctFont, NULL, fontPtr); } @@ -637,7 +637,7 @@ TkpGetFontFromAttributes( Tcl_Panic("Could not determine NSFont from TkFontAttributes"); } if (tkFontPtr == NULL) { - fontPtr = ckalloc(sizeof(MacFont)); + fontPtr = (MacFont *)ckalloc(sizeof(MacFont)); } else { fontPtr = (MacFont *) tkFontPtr; TkpDeleteFont(tkFontPtr); @@ -699,7 +699,7 @@ TkpDeleteFont( void TkpGetFontFamilies( Tcl_Interp *interp, /* Interp to hold result. */ - Tk_Window tkwin) /* For display to query. */ + TCL_UNUSED(Tk_Window)) /* For display to query. */ { Tcl_Obj *resultPtr = Tcl_NewListObj(0, NULL); NSArray *list = [[NSFontManager sharedFontManager] availableFontFamilies]; @@ -772,7 +772,7 @@ TkpGetSubFonts( void TkpGetFontAttrsForChar( - Tk_Window tkwin, /* Window on the font's display */ + TCL_UNUSED(Tk_Window), /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ int c, /* Character of interest */ TkFontAttributes* faPtr) /* Output: Font attributes */ @@ -1162,7 +1162,7 @@ TkpDrawCharsInContext( void TkpDrawAngledCharsInContext( - Display *display, /* Display on which to draw. */ + TCL_UNUSED(Display *), /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ Tk_Font tkfont, /* Font in which characters will be drawn; must @@ -1206,6 +1206,7 @@ TkpDrawAngledCharsInContext( if (!string) { return; } + context = drawingContext.context; fg = TkMacOSXCreateCGColor(gc, gc->foreground); attributes = [fontPtr->nsAttributes mutableCopy]; @@ -1325,8 +1326,8 @@ TkMacOSXNSFontAttributesForFont( int TkMacOSXIsCharacterMissing( - Tk_Font tkfont, /* The font we are looking in. */ - unsigned int searchChar) /* The character we are looking for. */ + TCL_UNUSED(Tk_Font), /* The font we are looking in. */ + TCL_UNUSED(unsigned int)) /* The character we are looking for. */ { return 0; } @@ -1365,8 +1366,8 @@ TkMacOSXFontDescriptionForNSFontAndNSFontAttributes( NSStrikethroughStyleAttributeName]; objv[i++] = Tcl_NewStringObj(familyName, -1); - objv[i++] = Tcl_NewIntObj([nsFont pointSize]); -#define S(s) Tcl_NewStringObj(STRINGIFY(s),(int)(sizeof(STRINGIFY(s))-1)) + objv[i++] = Tcl_NewWideIntObj([nsFont pointSize]); +#define S(s) Tcl_NewStringObj(STRINGIFY(s), (sizeof(STRINGIFY(s))-1)) objv[i++] = (traits & NSBoldFontMask) ? S(bold) : S(normal); objv[i++] = (traits & NSItalicFontMask) ? S(italic) : S(roman); if ([underline respondsToSelector:@selector(intValue)] && diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index 378c30e..b9bf3be 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -151,6 +151,7 @@ static int KeyDataToUnicode(UniChar *uniChars, int maxChars, @implementation TKApplication(TKKeyboard) - (void) keyboardChanged: (NSNotification *) notification { + (void)notification; #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #else @@ -662,7 +663,7 @@ XKeysymToKeycode( macKC.x.keychar = (unsigned int) data; hPtr = Tcl_FindHashEntry(&unichar2xvirtual, INT2PTR(macKC.x.keychar)); if (hPtr != NULL) { - unsigned long data = (unsigned long) Tcl_GetHashValue(hPtr); + data = (unsigned long) Tcl_GetHashValue(hPtr); macKC.x.xvirtual = (unsigned int) data; } } diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 8005517..3d5a996 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -36,19 +36,19 @@ #define SPECIALMENU(n, f) {.name = "." #n, .len = sl(#n) + 1, \ .flag = ENTRY_##f##_MENU } static const struct { - const char *name; const size_t len; const int flag; + const char *name; size_t len; int flag; } specialMenus[] = { SPECIALMENU(help, HELP), SPECIALMENU(apple, APPLE), SPECIALMENU(window, WINDOWS), - {NULL} + {NULL, 0, 0} }; #undef SPECIALMENU #define MODIFIER(n, f) {.name = #n, .len = sl(#n), .mask = f } static const struct { - const char *name; const size_t len; const NSUInteger mask; -} modifiers[] = { + const char *name; size_t len; NSUInteger mask; +} allModifiers[] = { MODIFIER(Control, NSControlKeyMask), MODIFIER(Ctrl, NSControlKeyMask), MODIFIER(Option, NSAlternateKeyMask), @@ -58,13 +58,13 @@ static const struct { MODIFIER(Command, NSCommandKeyMask), MODIFIER(Cmd, NSCommandKeyMask), MODIFIER(Meta, NSCommandKeyMask), - {NULL} + {NULL, 0, 0} }; #undef MODIFIER #define ACCEL(n, c) {.name = #n, .len = sl(#n), .ch = c } static const struct { - const char *name; const size_t len; const UniChar ch; + const char *name; size_t len; UniChar ch; } specialAccelerators[] = { ACCEL(PageUp, NSPageUpFunctionKey), ACCEL(PageDown, NSPageDownFunctionKey), @@ -86,7 +86,7 @@ static const struct { ACCEL(Help, NSHelpFunctionKey), ACCEL(Power, 0x233d), ACCEL(Eject, 0xf804), - {NULL} + {NULL, 0, 0} }; #undef ACCEL #undef sl @@ -348,6 +348,8 @@ TKBackgroundLoop *backgroundLoop = nil; - (BOOL) menuHasKeyEquivalent: (NSMenu *) menu forEvent: (NSEvent *) event target: (id *) target action: (SEL *) action { + (void)menu; + /* * Use lowercaseString when comparing keyEquivalents since the notion of * a shifted upper case letter does not make much sense. @@ -404,6 +406,8 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menuWillOpen: (NSMenu *) menu { + (void)menu; + if (_tkMenu) { //RecursivelyClearActiveMenu(_tkMenu); GenerateMenuSelectEvent((TKMenu *)[self supermenu], @@ -413,6 +417,8 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menuDidClose: (NSMenu *) menu { + (void)menu; + if (_tkMenu) { RecursivelyClearActiveMenu(_tkMenu); } @@ -420,6 +426,8 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menu: (NSMenu *) menu willHighlightItem: (NSMenuItem *) item { + (void)menu; + if (_tkMenu) { GenerateMenuSelectEvent(self, item); } @@ -428,6 +436,7 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menuNeedsUpdate: (NSMenu *) menu { TkMenu *menuPtr = (TkMenu *) _tkMenu; + (void)menu; if (menuPtr) { Tcl_Interp *interp = menuPtr->interp; @@ -453,6 +462,7 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menuBeginTracking: (NSNotification *) notification { + (void)notification; #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #endif @@ -468,6 +478,7 @@ TKBackgroundLoop *backgroundLoop = nil; - (void) menuEndTracking: (NSNotification *) notification { + (void)notification; #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #endif @@ -701,7 +712,6 @@ TkpConfigureMenuEntry( image = TkMacOSXGetNSImageFromBitmap(mePtr->menuPtr->display, bitmap, gc, imageWidth, imageHeight); if (gc->foreground == defaultFg) { - // Use a semantic foreground color by default [image setTemplate:YES]; } } @@ -857,7 +867,7 @@ TkpDestroyMenuEntry( int TkpPostMenu( - Tcl_Interp *interp, /* The interpreter this menu lives in */ + TCL_UNUSED(Tcl_Interp *), /* The interpreter this menu lives in */ TkMenu *menuPtr, /* The menu we are posting */ int x, int y, /* The screen coordinates where the top left * corner of the menu, or of the specified @@ -954,7 +964,7 @@ TkpPostMenu( int TkpPostTearoffMenu( - Tcl_Interp *interp, /* The interpreter this menu lives in */ + TCL_UNUSED(Tcl_Interp *), /* The interpreter this menu lives in */ TkMenu *menuPtr, /* The menu we are posting */ int x, int y, int index) /* The screen coordinates where the top left * corner of the menu, or of the specified @@ -1217,18 +1227,18 @@ ParseAccelerator( *maskPtr = 0; while (1) { i = 0; - while (modifiers[i].name) { - int l = modifiers[i].len; + while (allModifiers[i].name) { + int l = allModifiers[i].len; - if (!strncasecmp(accel, modifiers[i].name, l) && + if (!strncasecmp(accel, allModifiers[i].name, l) && (accel[l] == '-' || accel[l] == '+')) { - *maskPtr |= modifiers[i].mask; + *maskPtr |= allModifiers[i].mask; accel += l+1; break; } i++; } - if (!modifiers[i].name || !*accel) { + if (!allModifiers[i].name || !*accel) { break; } } @@ -1452,14 +1462,14 @@ TkpComputeStandardMenuGeometry( } } else { NSUInteger modifMask = [menuItem keyEquivalentModifierMask]; - int i = 0; + int j = 0; - while (modifiers[i].name) { - if (modifMask & modifiers[i].mask) { - modifMask &= ~modifiers[i].mask; + while (allModifiers[j].name) { + if (modifMask & allModifiers[j].mask) { + modifMask &= ~allModifiers[j].mask; modifierWidth += modifierCharWidth; } - i++; + j++; } accelWidth = [[menuItem keyEquivalent] sizeWithAttributes: TkMacOSXNSFontAttributesForFont(tkfont)].width; @@ -1763,8 +1773,8 @@ TkpMenuThreadInit(void) void TkpMenuNotifyToplevelCreate( - Tcl_Interp *interp, /* The interp the menu lives in. */ - const char *menuName) /* The name of the menu to reconfigure. */ + TCL_UNUSED(Tcl_Interp *), /* The interp the menu lives in. */ + TCL_UNUSED(const char *)) /* The name of the menu to reconfigure. */ { /* * Nothing to do. @@ -1792,8 +1802,8 @@ TkpMenuNotifyToplevelCreate( void TkpInitializeMenuBindings( - Tcl_Interp *interp, /* The interpreter to set. */ - Tk_BindingTable bindingTable) + TCL_UNUSED(Tcl_Interp *), /* The interpreter to set. */ + TCL_UNUSED(Tk_BindingTable)) /* The table to add to. */ { /* @@ -1846,17 +1856,17 @@ TkpComputeMenubarGeometry( void TkpDrawMenuEntry( - TkMenuEntry *mePtr, /* The entry to draw */ - Drawable d, /* What to draw into */ - Tk_Font tkfont, /* Precalculated font for menu */ - const Tk_FontMetrics *menuMetricsPtr, + TCL_UNUSED(TkMenuEntry *), /* The entry to draw */ + TCL_UNUSED(Drawable), /* What to draw into */ + TCL_UNUSED(Tk_Font), /* Precalculated font for menu */ + TCL_UNUSED(const Tk_FontMetrics *), /* Precalculated metrics for menu */ - int x, /* X-coordinate of topleft of entry */ - int y, /* Y-coordinate of topleft of entry */ - int width, /* Width of the entry rectangle */ - int height, /* Height of the current rectangle */ - int strictMotif, /* Boolean flag */ - int drawArrow) /* Whether or not to draw the cascade arrow + TCL_UNUSED(int), /* X-coordinate of topleft of entry */ + TCL_UNUSED(int), /* Y-coordinate of topleft of entry */ + TCL_UNUSED(int), /* Width of the entry rectangle */ + TCL_UNUSED(int), /* Height of the current rectangle */ + TCL_UNUSED(int), /* Boolean flag */ + TCL_UNUSED(int)) /* Whether or not to draw the cascade arrow * for cascade items. */ { } @@ -1905,7 +1915,7 @@ TkMacOSXPreprocessMenu(void) int TkMacOSXUseMenuID( - short macID) /* The id to take out of the table */ + TCL_UNUSED(short)) /* The id to take out of the table */ { return TCL_OK; } @@ -1928,8 +1938,8 @@ TkMacOSXUseMenuID( int TkMacOSXDispatchMenuEvent( - int menuID, /* The menu id of the menu we are invoking */ - int index) /* The one-based index of the item that was + TCL_UNUSED(int), /* The menu id of the menu we are invoking */ + TCL_UNUSED(int)) /* The one-based index of the item that was * selected. */ { return TCL_ERROR; diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 8cb3e15..4c07557 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -103,11 +103,11 @@ * debug message in case of failure. */ #define ChkErr(f, ...) ({ \ - OSStatus err = f(__VA_ARGS__); \ - if (err != noErr) { \ - TkMacOSXDbgOSErr(f, err); \ + OSStatus err_ = f(__VA_ARGS__); \ + if (err_ != noErr) { \ + TkMacOSXDbgOSErr(f, err_); \ } \ - err;}) + err_;}) #else /* TK_MAC_DEBUG */ #define TKLog(f, ...) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 87ec507..1e7797d 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -169,7 +169,7 @@ static inline CGRect BoxToRect( */ static Ttk_StateTable ThemeStateTable[] = { - {kThemeStateActive, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND}, + {kThemeStateActive, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND, 0}, {kThemeStateUnavailable, TTK_STATE_DISABLED, 0}, {kThemeStatePressed, TTK_STATE_PRESSED, 0}, {kThemeStateInactive, TTK_STATE_BACKGROUND, 0}, @@ -232,11 +232,11 @@ static CGRect NormalizeButtonBounds( * support Dark Mode anyway. */ -static CGFloat windowBackground[4] = { +static const CGFloat WINDOWBACKGROUND[4] = { 235.0 / 255, 235.0 / 255, 235.0 / 255, 1.0 }; -static CGFloat whiteRGBA[4] = {1.0, 1.0, 1.0, 1.0}; -static CGFloat blackRGBA[4] = {0.0, 0.0, 0.0, 1.0}; +static const CGFloat WHITERGBA[4] = {1.0, 1.0, 1.0, 1.0}; +static const CGFloat BLACKRGBA[4] = {0.0, 0.0, 0.0, 1.0}; /*---------------------------------------------------------------------- * GetBackgroundColor -- @@ -276,7 +276,7 @@ static void GetBackgroundColor( [windowColor getComponents: rgba]; } else { for (int i = 0; i < 4; i++) { - rgba[i] = windowBackground[i]; + rgba[i] = WINDOWBACKGROUND[i]; } } } @@ -314,7 +314,7 @@ static void DrawDownArrow( CGRect bounds, CGFloat inset, CGFloat size, - CGFloat *rgba) + const CGFloat *rgba) { CGFloat x, y; @@ -336,7 +336,7 @@ static void DrawUpArrow( CGRect bounds, CGFloat inset, CGFloat size, - CGFloat *rgba) + const CGFloat *rgba) { CGFloat x, y; @@ -406,7 +406,7 @@ static void DrawUpDownArrows( CGRect bounds, CGFloat inset, CGFloat size, - CGFloat *rgba) + const CGFloat *rgba) { CGFloat x, y; @@ -633,9 +633,9 @@ static void DrawListHeader( arrowBounds.origin.x = bounds.origin.x + bounds.size.width - 16; arrowBounds.size.width = 16; if (state & TTK_STATE_ALTERNATE) { - DrawUpArrow(context, arrowBounds, 3, 8, blackRGBA); + DrawUpArrow(context, arrowBounds, 3, 8, BLACKRGBA); } else if (state & TTK_STATE_SELECTED) { - DrawDownArrow(context, arrowBounds, 3, 8, blackRGBA); + DrawDownArrow(context, arrowBounds, 3, 8, BLACKRGBA); } } } @@ -757,9 +757,9 @@ static void DrawDarkButton( darkSelectedGradient, 2); } if (kind == kThemePopupButton) { - DrawUpDownArrows(context, arrowBounds, 3, 7, whiteRGBA); + DrawUpDownArrows(context, arrowBounds, 3, 7, WHITERGBA); } else { - DrawDownArrow(context, arrowBounds, 4, 8, whiteRGBA); + DrawDownArrow(context, arrowBounds, 4, 8, WHITERGBA); } } @@ -818,7 +818,7 @@ static void DrawDarkIncDecButton( darkSelectedGradient, 2); CGContextRestoreGState(context); } - DrawUpDownArrows(context, bounds, 3, 5, whiteRGBA); + DrawUpDownArrows(context, bounds, 3, 5, WHITERGBA); HighlightButtonBorder(context, bounds); } @@ -1245,9 +1245,9 @@ static void DrawDarkListHeader( arrowBounds.origin.x = bounds.origin.x + bounds.size.width - 16; arrowBounds.size.width = 16; if (state & TTK_STATE_ALTERNATE) { - DrawUpArrow(context, arrowBounds, 3, 8, whiteRGBA); + DrawUpArrow(context, arrowBounds, 3, 8, WHITERGBA); } else if (state & TTK_STATE_SELECTED) { - DrawDownArrow(context, arrowBounds, 3, 8, whiteRGBA); + DrawDownArrow(context, arrowBounds, 3, 8, WHITERGBA); } } } @@ -1277,7 +1277,7 @@ static ThemeButtonParams ListHeaderParams = {kThemeListHeaderButton, kThemeMetricListHeaderHeight}; static Ttk_StateTable ButtonValueTable[] = { - {kThemeButtonOff, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND}, + {kThemeButtonOff, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND, 0}, {kThemeButtonMixed, TTK_STATE_ALTERNATE, 0}, {kThemeButtonOn, TTK_STATE_SELECTED, 0}, {kThemeButtonOff, 0, 0} @@ -1306,7 +1306,7 @@ static Ttk_StateTable ButtonAdornmentTable[] = { static inline HIThemeButtonDrawInfo computeButtonDrawInfo( ThemeButtonParams *params, Ttk_State state, - Tk_Window tkwin) + TCL_UNUSED(Tk_Window)) { /* @@ -1342,13 +1342,13 @@ static inline HIThemeButtonDrawInfo computeButtonDrawInfo( static void ButtonElementMinSize( void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { - ThemeButtonParams *params = clientData; + ThemeButtonParams *params = (ThemeButtonParams *)clientData; if (params->heightMetric != NoThemeMetric) { ChkErr(GetThemeMetric, params->heightMetric, minHeight); @@ -1420,7 +1420,7 @@ static void ButtonElementSize( static void ButtonElementDraw( void *clientData, - void *elementRecord, + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -1510,25 +1510,25 @@ static Ttk_ElementSpec ButtonElementSpec = { /* Tab position logic, c.f. ttkNotebook.c TabState() */ static Ttk_StateTable TabStyleTable[] = { - {kThemeTabFrontInactive, TTK_STATE_SELECTED | TTK_STATE_BACKGROUND}, - {kThemeTabNonFrontInactive, TTK_STATE_BACKGROUND}, - {kThemeTabFrontUnavailable, TTK_STATE_DISABLED | TTK_STATE_SELECTED}, - {kThemeTabNonFrontUnavailable, TTK_STATE_DISABLED}, - {kThemeTabFront, TTK_STATE_SELECTED}, - {kThemeTabNonFrontPressed, TTK_STATE_PRESSED}, - {kThemeTabNonFront, 0} + {kThemeTabFrontInactive, TTK_STATE_SELECTED | TTK_STATE_BACKGROUND, 0}, + {kThemeTabNonFrontInactive, TTK_STATE_BACKGROUND, 0}, + {kThemeTabFrontUnavailable, TTK_STATE_DISABLED | TTK_STATE_SELECTED, 0}, + {kThemeTabNonFrontUnavailable, TTK_STATE_DISABLED, 0}, + {kThemeTabFront, TTK_STATE_SELECTED, 0}, + {kThemeTabNonFrontPressed, TTK_STATE_PRESSED, 0}, + {kThemeTabNonFront, 0, 0} }; static Ttk_StateTable TabAdornmentTable[] = { - {kHIThemeTabAdornmentNone, TTK_STATE_FIRST_TAB | TTK_STATE_LAST_TAB}, - {kHIThemeTabAdornmentTrailingSeparator, TTK_STATE_FIRST_TAB}, - {kHIThemeTabAdornmentNone, TTK_STATE_LAST_TAB}, - {kHIThemeTabAdornmentTrailingSeparator, 0}, + {kHIThemeTabAdornmentNone, TTK_STATE_FIRST_TAB | TTK_STATE_LAST_TAB, 0}, + {kHIThemeTabAdornmentTrailingSeparator, TTK_STATE_FIRST_TAB, 0}, + {kHIThemeTabAdornmentNone, TTK_STATE_LAST_TAB, 0}, + {kHIThemeTabAdornmentTrailingSeparator, 0, 0}, }; static Ttk_StateTable TabPositionTable[] = { - {kHIThemeTabPositionOnly, TTK_STATE_FIRST_TAB | TTK_STATE_LAST_TAB}, - {kHIThemeTabPositionFirst, TTK_STATE_FIRST_TAB}, - {kHIThemeTabPositionLast, TTK_STATE_LAST_TAB}, - {kHIThemeTabPositionMiddle, 0}, + {kHIThemeTabPositionOnly, TTK_STATE_FIRST_TAB | TTK_STATE_LAST_TAB, 0}, + {kHIThemeTabPositionFirst, TTK_STATE_FIRST_TAB, 0}, + {kHIThemeTabPositionLast, TTK_STATE_LAST_TAB, 0}, + {kHIThemeTabPositionMiddle, 0, 0}, }; /* @@ -1572,10 +1572,10 @@ static Ttk_StateTable TabPositionTable[] = { */ static void TabElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, - int *minWidth, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(int *), int *minHeight, Ttk_Padding *paddingPtr) { @@ -1585,8 +1585,8 @@ static void TabElementSize( } static void TabElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -1626,19 +1626,19 @@ static Ttk_ElementSpec TabElementSpec = { */ static void PaneElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, - int *minWidth, - int *minHeight, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(int *), + TCL_UNUSED(int *), Ttk_Padding *paddingPtr) { *paddingPtr = Ttk_MakePadding(9, 5, 9, 9); } static void PaneElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -1687,19 +1687,19 @@ static Ttk_ElementSpec PaneElementSpec = { */ static void GroupElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, - int *minWidth, - int *minHeight, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(int *), + TCL_UNUSED(int *), Ttk_Padding *paddingPtr) { *paddingPtr = Ttk_UniformPadding(4); } static void GroupElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -1748,22 +1748,22 @@ static Ttk_ElementOptionSpec EntryElementOptions[] = { Tk_Offset(EntryElement, backgroundObj), ENTRY_DEFAULT_BACKGROUND}, {"-fieldbackground", TK_OPTION_BORDER, Tk_Offset(EntryElement, fieldbackgroundObj), ENTRY_DEFAULT_BACKGROUND}, - {0} + {NULL, TK_OPTION_BOOLEAN, 0, NULL} }; static void EntryElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, - int *minWidth, - int *minHeight, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(int *), + TCL_UNUSED(int *), Ttk_Padding *paddingPtr) { *paddingPtr = Ttk_MakePadding(7, 5, 7, 6); } static void EntryElementDraw( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, Drawable d, @@ -1875,9 +1875,9 @@ static Ttk_ElementSpec EntryElementSpec = { static Ttk_Padding ComboboxPadding = {4, 2, 20, 2}; static void ComboboxElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, Ttk_Padding *paddingPtr) @@ -1888,8 +1888,8 @@ static void ComboboxElementSize( } static void ComboboxElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -1953,12 +1953,12 @@ static Ttk_ElementSpec ComboboxElementSpec = { static Ttk_Padding SpinbuttonMargins = {0, 0, 2, 0}; static void SpinButtonUpElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { SInt32 s; @@ -1969,8 +1969,8 @@ static void SpinButtonUpElementSize( } static void SpinButtonUpElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -2010,12 +2010,12 @@ static Ttk_ElementSpec SpinButtonUpElementSpec = { SpinButtonUpElementDraw }; static void SpinButtonDownElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { SInt32 s; @@ -2026,8 +2026,8 @@ static void SpinButtonDownElementSize( } static void SpinButtonDownElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -2104,21 +2104,21 @@ typedef struct { } TrackElement; static Ttk_ElementOptionSpec TrackElementOptions[] = { - {"-from", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, fromObj)}, - {"-to", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, toObj)}, - {"-value", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, valueObj)}, - {"-orient", TK_OPTION_STRING, Tk_Offset(TrackElement, orientObj)}, - {0, 0, 0} + {"-from", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, fromObj), NULL}, + {"-to", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, toObj), NULL}, + {"-value", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, valueObj), NULL}, + {"-orient", TK_OPTION_STRING, Tk_Offset(TrackElement, orientObj), NULL}, + {NULL, TK_OPTION_BOOLEAN, 0, NULL} }; static void TrackElementSize( void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { - TrackElementData *data = clientData; + TrackElementData *data = (TrackElementData *)clientData; SInt32 size = 24; /* reasonable default ... */ ChkErr(GetThemeMetric, data->thicknessMetric, &size); @@ -2137,6 +2137,7 @@ static void TrackElementDraw( TrackElement *elem = elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; double from = 0, to = 100, value = 0, factor; + CGRect bounds; Ttk_GetOrientFromObj(NULL, elem->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from); @@ -2149,7 +2150,7 @@ static void TrackElementDraw( * bounds variable avoids UBSan (-fsanitize=alignment) complaints. */ - CGRect bounds = BoxToRect(d, b); + bounds = BoxToRect(d, b); HIThemeTrackDrawInfo info = { .version = 0, .kind = data->kind, @@ -2175,7 +2176,7 @@ static void TrackElementDraw( } BEGIN_DRAWING(d) if (TkMacOSXInDarkMode(tkwin)) { - CGRect bounds = BoxToRect(d, b); + bounds = BoxToRect(d, b); NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *trackColor = [NSColor colorWithColorSpace: deviceRGB components: darkTrack @@ -2209,12 +2210,12 @@ static Ttk_ElementSpec TrackElementSpec = { */ static void SliderElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { *minWidth = *minHeight = 24; } @@ -2254,15 +2255,15 @@ static Ttk_ElementOptionSpec PbarElementOptions[] = { Tk_Offset(PbarElement, phaseObj), "0"}, {"-mode", TK_OPTION_STRING, Tk_Offset(PbarElement, modeObj), "determinate"}, - {0, 0, 0, 0} + {NULL, TK_OPTION_BOOLEAN, 0, NULL} }; static void PbarElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { SInt32 size = 24; /* @@@ Check HIG for correct default */ @@ -2271,7 +2272,7 @@ static void PbarElementSize( } static void PbarElementDraw( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, Drawable d, @@ -2281,6 +2282,7 @@ static void PbarElementDraw( PbarElement *pbar = elementRecord; int orientation = TTK_ORIENT_HORIZONTAL, phase = 0; double value = 0, maximum = 100, factor; + CGRect bounds; Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, pbar->valueObj, &value); @@ -2293,7 +2295,7 @@ static void PbarElementDraw( * bounds variable avoids UBSan (-fsanitize=alignment) complaints. */ - CGRect bounds = BoxToRect(d, b); + bounds = BoxToRect(d, b); HIThemeTrackDrawInfo info = { .version = 0, .kind = @@ -2313,7 +2315,7 @@ static void PbarElementDraw( BEGIN_DRAWING(d) if (TkMacOSXInDarkMode(tkwin)) { - CGRect bounds = BoxToRect(d, b); + bounds = BoxToRect(d, b); NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *trackColor = [NSColor colorWithColorSpace: deviceRGB components: darkTrack @@ -2349,12 +2351,12 @@ typedef struct static Ttk_ElementOptionSpec ScrollbarElementOptions[] = { {"-orient", TK_OPTION_STRING, Tk_Offset(ScrollbarElement, orientObj), "horizontal"}, - {0, 0, 0, 0} + {NULL, TK_OPTION_BOOLEAN, 0, NULL} }; static void TroughElementSize( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, Ttk_Padding *paddingPtr) @@ -2393,12 +2395,12 @@ static CGFloat darkActiveThumb[4] = { 158.0 / 255, 158.0 / 255, 159.0 / 255, 1.0 }; static void TroughElementDraw( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, - Ttk_State state) + TCL_UNUSED(Ttk_State)) { ScrollbarElement *scrollbar = elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; @@ -2435,12 +2437,12 @@ static Ttk_ElementSpec TroughElementSpec = { TroughElementDraw }; static void ThumbElementSize( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { ScrollbarElement *scrollbar = elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; @@ -2456,7 +2458,7 @@ static void ThumbElementSize( } static void ThumbElementDraw( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, Drawable d, @@ -2571,12 +2573,12 @@ static Ttk_ElementSpec ThumbElementSpec = { ThumbElementDraw }; static void ArrowElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { if ([NSApp macOSVersion] < 100800) { *minHeight = *minWidth = 14; @@ -2602,19 +2604,19 @@ static Ttk_ElementSpec ArrowElementSpec = { */ static void SeparatorElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { *minWidth = *minHeight = 1; } static void SeparatorElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -2654,12 +2656,12 @@ static const ThemeGrowDirection sizegripGrowDirection = kThemeGrowRight | kThemeGrowDown; static void SizegripElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { HIThemeGrowBoxDrawInfo info = { .version = 0, @@ -2676,9 +2678,9 @@ static void SizegripElementSize( } static void SizegripElementDraw( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), Drawable d, Ttk_Box b, unsigned int state) @@ -2753,8 +2755,8 @@ static Ttk_ElementSpec SizegripElementSpec = { */ static void FillElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -2791,7 +2793,7 @@ static void BackgroundElementDraw( void *elementRecord, Tk_Window tkwin, Drawable d, - Ttk_Box b, + TCL_UNUSED(Ttk_Box), unsigned int state) { FillElementDraw(clientData, elementRecord, tkwin, d, Ttk_WinBox(tkwin), @@ -2828,12 +2830,12 @@ static Ttk_ElementSpec BackgroundElementSpec = { */ static void ToolbarBackgroundElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, - Ttk_Box b, - Ttk_State state) + TCL_UNUSED(Ttk_Box), + TCL_UNUSED(Ttk_State)) { ThemeBrush brush = kThemeBrushToolbarBackground; CGRect bounds = BoxToRect(d, Ttk_WinBox(tkwin)); @@ -2867,16 +2869,16 @@ typedef struct { static Ttk_ElementOptionSpec FieldElementOptions[] = { {"-fieldbackground", TK_OPTION_BORDER, Tk_Offset(FieldElement, backgroundObj), "white"}, - {NULL, 0, 0, NULL} + {NULL, TK_OPTION_BOOLEAN, 0, NULL} }; static void FieldElementDraw( - void *clientData, + TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, - Ttk_State state) + TCL_UNUSED(Ttk_State)) { FieldElement *e = elementRecord; Tk_3DBorder backgroundPtr = @@ -2904,28 +2906,28 @@ static Ttk_ElementSpec FieldElementSpec = { */ static Ttk_StateTable TreeHeaderValueTable[] = { - {kThemeButtonOn, TTK_STATE_ALTERNATE}, - {kThemeButtonOn, TTK_STATE_SELECTED}, - {kThemeButtonOff, 0} + {kThemeButtonOn, TTK_STATE_ALTERNATE, 0}, + {kThemeButtonOn, TTK_STATE_SELECTED, 0}, + {kThemeButtonOff, 0, 0} }; static Ttk_StateTable TreeHeaderAdornmentTable[] = { {kThemeAdornmentHeaderButtonSortUp, - TTK_STATE_ALTERNATE | TTK_TREEVIEW_STATE_SORTARROW}, + TTK_STATE_ALTERNATE | TTK_TREEVIEW_STATE_SORTARROW, 0}, {kThemeAdornmentDefault, - TTK_STATE_SELECTED | TTK_TREEVIEW_STATE_SORTARROW}, - {kThemeAdornmentHeaderButtonNoSortArrow, TTK_STATE_ALTERNATE}, - {kThemeAdornmentHeaderButtonNoSortArrow, TTK_STATE_SELECTED}, - {kThemeAdornmentFocus, TTK_STATE_FOCUS}, - {kThemeAdornmentNone, 0} + TTK_STATE_SELECTED | TTK_TREEVIEW_STATE_SORTARROW, 0}, + {kThemeAdornmentHeaderButtonNoSortArrow, TTK_STATE_ALTERNATE, 0}, + {kThemeAdornmentHeaderButtonNoSortArrow, TTK_STATE_SELECTED, 0}, + {kThemeAdornmentFocus, TTK_STATE_FOCUS, 0}, + {kThemeAdornmentNone, 0, 0} }; static void TreeAreaElementSize ( - void *clientData, - void *elementRecord, - Tk_Window tkwin, - int *minWidth, - int *minHeight, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(int *), + TCL_UNUSED(int *), Ttk_Padding *paddingPtr) { @@ -2964,7 +2966,7 @@ static void TreeHeaderElementSize( static void TreeHeaderElementDraw( void *clientData, - void *elementRecord, + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, @@ -3020,12 +3022,12 @@ static Ttk_StateTable DisclosureValueTable[] = { {kThemeDisclosureRight, 0, 0}, }; static void DisclosureElementSize( - void *clientData, - void *elementRecord, - Tk_Window tkwin, + TCL_UNUSED(void *), + TCL_UNUSED(void *), + TCL_UNUSED(Tk_Window), int *minWidth, int *minHeight, - Ttk_Padding *paddingPtr) + TCL_UNUSED(Ttk_Padding *)) { SInt32 s; @@ -3036,8 +3038,8 @@ static void DisclosureElementSize( } static void DisclosureElementDraw( - void *clientData, - void *elementRecord, + TCL_UNUSED(void *), + TCL_UNUSED(void *), Tk_Window tkwin, Drawable d, Ttk_Box b, |