summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/ttk/ttkBlink.c9
-rw-r--r--generic/ttk/ttkButton.c27
-rw-r--r--generic/ttk/ttkCache.c19
-rw-r--r--generic/ttk/ttkClamTheme.c182
-rw-r--r--generic/ttk/ttkClassicTheme.c148
-rw-r--r--generic/ttk/ttkDefaultTheme.c151
-rw-r--r--generic/ttk/ttkElements.c331
-rw-r--r--generic/ttk/ttkEntry.c33
-rw-r--r--generic/ttk/ttkFrame.c10
-rw-r--r--generic/ttk/ttkImage.c53
-rw-r--r--generic/ttk/ttkLabel.c53
-rw-r--r--generic/ttk/ttkManager.c8
-rw-r--r--generic/ttk/ttkManager.h2
-rw-r--r--generic/ttk/ttkNotebook.c10
-rw-r--r--generic/ttk/ttkPanedwindow.c4
-rw-r--r--generic/ttk/ttkProgress.c2
-rw-r--r--generic/ttk/ttkScroll.c2
-rw-r--r--generic/ttk/ttkSquare.c6
-rw-r--r--generic/ttk/ttkState.c2
-rw-r--r--generic/ttk/ttkTheme.c41
-rw-r--r--generic/ttk/ttkTheme.h6
-rw-r--r--generic/ttk/ttkTrace.c4
-rw-r--r--generic/ttk/ttkTrack.c2
-rw-r--r--generic/ttk/ttkTreeview.c45
-rw-r--r--generic/ttk/ttkWidget.c37
-rw-r--r--macosx/ttkMacOSXTheme.c12
-rw-r--r--win/ttkWinTheme.c24
-rw-r--r--win/ttkWinXPTheme.c10
28 files changed, 670 insertions, 563 deletions
diff --git a/generic/ttk/ttkBlink.c b/generic/ttk/ttkBlink.c
index c64793e..a2bc3ae 100644
--- a/generic/ttk/ttkBlink.c
+++ b/generic/ttk/ttkBlink.c
@@ -32,10 +32,11 @@ typedef struct
/* CursorManagerDeleteProc --
* InterpDeleteProc for cursor manager.
*/
-static void CursorManagerDeleteProc(ClientData clientData, Tcl_Interp *dummy)
+static void CursorManagerDeleteProc(
+ void *clientData,
+ TCL_UNUSED(Tcl_Interp *))
{
CursorManager *cm = (CursorManager*)clientData;
- (void)dummy;
if (cm->timer) {
Tcl_DeleteTimerHandler(cm->timer);
@@ -90,7 +91,7 @@ static CursorManager *GetCursorManager(Tcl_Interp *interp)
* Timer handler to blink the insert cursor on and off.
*/
static void
-CursorBlinkProc(ClientData clientData)
+CursorBlinkProc(void *clientData)
{
CursorManager *cm = (CursorManager *)clientData;
int blinkTime;
@@ -153,7 +154,7 @@ static void ClaimCursor(CursorManager *cm, WidgetCore *corePtr)
(d == NotifyInferior || d == NotifyAncestor || d == NotifyNonlinear)
static void
-CursorEventProc(ClientData clientData, XEvent *eventPtr)
+CursorEventProc(void *clientData, XEvent *eventPtr)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
CursorManager *cm = GetCursorManager(corePtr->interp);
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index c23c739..51f86c2 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -121,10 +121,11 @@ static void TextVariableChanged(void *clientData, const char *value)
}
static void
-BaseInitialize(Tcl_Interp *dummy, void *recordPtr)
+BaseInitialize(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr)
{
Base *basePtr = (Base *)recordPtr;
- (void)dummy;
basePtr->base.textVariableTrace = 0;
basePtr->base.imageSpec = NULL;
@@ -142,16 +143,15 @@ BaseCleanup(void *recordPtr)
static void
BaseImageChanged(
- ClientData clientData, int x, int y, int width, int height,
- int imageWidth, int imageHeight)
+ void *clientData,
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
Base *basePtr = (Base *)clientData;
- (void)x;
- (void)y;
- (void)width;
- (void)height;
- (void)imageWidth;
- (void)imageHeight;
TtkResizeWidget(&basePtr->core);
}
@@ -201,12 +201,13 @@ error:
}
static int
-BasePostConfigure(Tcl_Interp *dummy, void *recordPtr, int mask)
+BasePostConfigure(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr,
+ TCL_UNUSED(int))
{
Base *basePtr = (Base *)recordPtr;
int status = TCL_OK;
- (void)dummy;
- (void)mask;
if (basePtr->base.textVariableTrace) {
status = Ttk_FireTrace(basePtr->base.textVariableTrace);
diff --git a/generic/ttk/ttkCache.c b/generic/ttk/ttkCache.c
index dc4b365..2f7ff28 100644
--- a/generic/ttk/ttkCache.c
+++ b/generic/ttk/ttkCache.c
@@ -170,7 +170,7 @@ void Ttk_FreeResourceCache(Ttk_ResourceCache cache)
* CacheWinEventHandler --
* Detect when the cache window is destroyed, clear cache.
*/
-static void CacheWinEventHandler(ClientData clientData, XEvent *eventPtr)
+static void CacheWinEventHandler(void *clientData, XEvent *eventPtr)
{
Ttk_ResourceCache cache = (Ttk_ResourceCache)clientData;
@@ -328,16 +328,15 @@ Tcl_Obj *Ttk_UseBorder(
* Tk_ImageChangedProc for Ttk_UseImage
*/
-static void NullImageChanged(ClientData dummy,
- int x, int y, int width, int height, int imageWidth, int imageHeight)
+static void NullImageChanged(
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{ /* No-op */
- (void)dummy;
- (void)x;
- (void)y;
- (void)width;
- (void)height;
- (void)imageWidth;
- (void)imageHeight;
}
/*
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 2a13bb6..624dc65 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -129,14 +129,15 @@ static const Ttk_ElementOptionSpec BorderElementOptions[] = {
*/
static void BorderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ TCL_UNUSED(int *), /* widthPtr */
+ TCL_UNUSED(int *), /* heightPtr */
+ Ttk_Padding *paddingPtr)
{
BorderElement *border = (BorderElement*)elementRecord;
int borderWidth = 2;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetPixelsFromObj(NULL, tkwin, border->borderWidthObj, &borderWidth);
if (borderWidth == 1) ++borderWidth;
@@ -144,15 +145,17 @@ static void BorderElementSize(
}
static void BorderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
BorderElement *border = (BorderElement *)elementRecord;
int relief = TK_RELIEF_FLAT;
int borderWidth = 2;
Tcl_Obj *outer = 0, *upper = 0, *lower = 0;
- (void)dummy;
- (void)state;
Tk_GetReliefFromObj(NULL, border->reliefObj, &relief);
Tk_GetPixelsFromObj(NULL, tkwin, border->borderWidthObj, &borderWidth);
@@ -212,29 +215,29 @@ static const Ttk_ElementOptionSpec FieldElementOptions[] = {
};
static void FieldElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *), /* widthPtr */
+ TCL_UNUSED(int *), /* heightPtr */
+ Ttk_Padding *paddingPtr)
{
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
-
*paddingPtr = Ttk_UniformPadding(2);
}
static void FieldElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
FieldElement *field = (FieldElement *)elementRecord;
Tk_3DBorder bg = Tk_Get3DBorderFromObj(tkwin, field->backgroundObj);
Ttk_Box f = Ttk_PadBox(b, Ttk_UniformPadding(2));
Tcl_Obj *outer = field->borderColorObj,
*inner = field->lightColorObj;
- (void)dummy;
- (void)state;
DrawSmoothBorder(tkwin, d, b, outer, inner, inner);
Tk_Fill3DRectangle(
@@ -255,7 +258,7 @@ static const Ttk_ElementSpec FieldElementSpec = {
*/
static void ComboboxFieldElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
FieldElement *field = (FieldElement *)elementRecord;
GC gc = Ttk_GCForColor(tkwin,field->borderColorObj,d);
@@ -366,13 +369,13 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
static void IndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
const IndicatorSpec *spec = (const IndicatorSpec *)clientData;
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding margins;
double scalingLevel = TkScalingLevel(tkwin);
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
*widthPtr = spec->width * scalingLevel + Ttk_PaddingWidth(margins);
@@ -387,18 +390,19 @@ static void ColorToStr(
}
static void ImageChanged( /* to be passed to Tk_GetImage() */
- ClientData clientData,
- int x, int y, int width, int height,
- int imageWidth, int imageHeight)
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
- (void)clientData;
- (void)x; (void)y; (void)width; (void)height;
- (void)imageWidth; (void)imageHeight;
}
static void IndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding padding;
@@ -560,12 +564,12 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = {
static void GripElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
Ttk_Orient orient = (Ttk_Orient)PTR2INT(clientData);
GripElement *grip = (GripElement *)elementRecord;
int gripSize = 0;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
gripSize *= 2;
@@ -578,7 +582,8 @@ static void GripElementSize(
static void GripElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
const int w = WIN32_XDRAWLINE_HACK;
Ttk_Orient orient = (Ttk_Orient)PTR2INT(clientData);
@@ -587,7 +592,6 @@ static void GripElementDraw(
GC darkGC = Ttk_GCForColor(tkwin,grip->borderColorObj,d);
int gripPad = 1, gripSize = 0;
int i;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
gripSize *= 2;
@@ -662,14 +666,16 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
};
static void TroughElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
GC gcb = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
GC gct = Ttk_GCForColor(tkwin,sb->troughColorObj,d);
- (void)dummy;
- (void)state;
XFillRectangle(Tk_Display(tkwin), d, gct, b.x, b.y, b.width-1, b.height-1);
XDrawRectangle(Tk_Display(tkwin), d, gcb, b.x, b.y, b.width-1, b.height-1);
@@ -684,22 +690,27 @@ static const Ttk_ElementSpec TroughElementSpec = {
};
static void ThumbElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
int size = SCROLLBAR_THICKNESS;
- (void)dummy;
- (void)tkwin;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &size);
*widthPtr = *heightPtr = size;
}
static void ThumbElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
int gripSize = 0;
@@ -707,8 +718,6 @@ static void ThumbElementDraw(
GC lightGC, darkGC;
int x1, y1, x2, y2, dx, dy, i;
const int w = WIN32_XDRAWLINE_HACK;
- (void)dummy;
- (void)state;
DrawSmoothBorder(tkwin, d, b,
sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
@@ -756,14 +765,16 @@ static const Ttk_ElementSpec ThumbElementSpec = {
* +++ Slider element.
*/
static void SliderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
int length, thickness;
Ttk_Orient orient;
- (void)dummy;
- (void)paddingPtr;
length = thickness = SCROLLBAR_THICKNESS;
TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
@@ -801,12 +812,14 @@ static void PbarElementSize(
}
static void PbarElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
- (void)dummy;
- (void)state;
b = Ttk_PadBox(b, Ttk_UniformPadding(2));
if (b.width > 4 && b.height > 4) {
@@ -831,14 +844,14 @@ static const Ttk_ElementSpec PbarElementSpec = {
*/
static void ArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding = Ttk_UniformPadding(round(3 * scalingLevel));
int size = SCROLLBAR_THICKNESS;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &size);
size -= Ttk_PaddingWidth(padding);
@@ -854,7 +867,8 @@ static void ArrowElementSize(
static void ArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
@@ -862,7 +876,6 @@ static void ArrowElementDraw(
Ttk_Padding padding = Ttk_UniformPadding(round(3 * scalingLevel));
int cx, cy;
GC gc = Ttk_GCForColor(tkwin, sb->arrowColorObj, d);
- (void)state;
DrawSmoothBorder(tkwin, d, b,
sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
@@ -909,14 +922,14 @@ static const Ttk_ElementSpec ArrowElementSpec = {
*/
static void SpinboxArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding = Ttk_UniformPadding(round(3 * scalingLevel));
int size = 10;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &size);
size -= Ttk_PaddingWidth(padding);
@@ -960,17 +973,16 @@ static const Ttk_ElementOptionSpec NotebookElementOptions[] = {
};
static void TabElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
int borderWidth = 2;
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
if (mainInfoPtr != NULL) {
nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit;
@@ -995,8 +1007,12 @@ static void TabElementSize(
}
static void TabElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ Ttk_State state)
{
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
@@ -1007,7 +1023,6 @@ static void TabElementDraw(
int x1, y1, x2, y2;
GC gc;
const int w = WIN32_XDRAWLINE_HACK;
- (void)dummy;
if (mainInfoPtr != NULL) {
nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit;
@@ -1119,28 +1134,29 @@ static const Ttk_ElementSpec TabElementSpec =
};
static void ClientElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
int borderWidth = 2;
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
static void ClientElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
NotebookElement *ce = (NotebookElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, ce->backgroundObj);
int borderWidth = 2;
- (void)dummy;
- (void)state;
Tk_Fill3DRectangle(tkwin, d, border,
b.x, b.y, b.width, b.height, borderWidth,TK_RELIEF_FLAT);
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index bd02464..9a4b509 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -30,30 +30,31 @@ static const Ttk_ElementOptionSpec HighlightElementOptions[] = {
};
static void HighlightElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
HighlightElement *hl = (HighlightElement *)elementRecord;
int highlightThickness = 0;
- (void)dummy;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
Tcl_GetIntFromObj(NULL,hl->highlightThicknessObj,&highlightThickness);
*paddingPtr = Ttk_UniformPadding((short)highlightThickness);
}
static void HighlightElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ TCL_UNUSED(Ttk_Box),
+ TCL_UNUSED(Ttk_State))
{
HighlightElement *hl = (HighlightElement *)elementRecord;
int highlightThickness = 0;
XColor *highlightColor = Tk_GetColorFromObj(tkwin, hl->highlightColorObj);
- (void)dummy;
- (void)b;
- (void)state;
Tcl_GetIntFromObj(NULL,hl->highlightThicknessObj,&highlightThickness);
if (highlightColor && highlightThickness > 0) {
@@ -102,16 +103,16 @@ static const Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
};
static void ButtonBorderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
ButtonBorderElement *bd = (ButtonBorderElement *)elementRecord;
Ttk_ButtonDefaultState defaultState = TTK_BUTTON_DEFAULT_DISABLED;
int borderWidth = 0;
- (void)dummy;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
Tcl_GetIntFromObj(NULL, bd->borderWidthObj, &borderWidth);
Ttk_GetButtonDefaultStateFromObj(NULL, bd->defaultStateObj, &defaultState);
@@ -128,16 +129,18 @@ static void ButtonBorderElementSize(
* when the button is active.)
*/
static void ButtonBorderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ButtonBorderElement *bd = (ButtonBorderElement *)elementRecord;
Tk_3DBorder border = NULL;
int borderWidth = 1, relief = TK_RELIEF_FLAT;
Ttk_ButtonDefaultState defaultState = TTK_BUTTON_DEFAULT_DISABLED;
int inset = 0;
- (void)dummy;
- (void)state;
/*
* Get option values.
@@ -233,14 +236,16 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
* Checkbutton indicators: 3-D square.
*/
static void SquareIndicatorElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding margins;
int diameter = 0;
- (void)dummy;
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter);
@@ -249,8 +254,12 @@ static void SquareIndicatorElementSize(
}
static void SquareIndicatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Tk_3DBorder border = 0, interior = 0;
@@ -258,8 +267,6 @@ static void SquareIndicatorElementDraw(
Ttk_Padding padding;
int borderWidth = 2;
int diameter;
- (void)dummy;
- (void)state;
interior = Tk_Get3DBorderFromObj(tkwin, indicator->colorObj);
border = Tk_Get3DBorderFromObj(tkwin, indicator->backgroundObj);
@@ -280,14 +287,16 @@ static void SquareIndicatorElementDraw(
* Radiobutton indicators: 3-D diamond.
*/
static void DiamondIndicatorElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding margins;
int diameter = 0;
- (void)dummy;
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter);
@@ -296,8 +305,12 @@ static void DiamondIndicatorElementSize(
}
static void DiamondIndicatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Tk_3DBorder border = 0, interior = 0;
@@ -306,8 +319,6 @@ static void DiamondIndicatorElementDraw(
int diameter, radius;
XPoint points[4];
Ttk_Padding padding;
- (void)dummy;
- (void)state;
interior = Tk_Get3DBorderFromObj(tkwin, indicator->colorObj);
border = Tk_Get3DBorderFromObj(tkwin, indicator->backgroundObj);
@@ -385,13 +396,15 @@ static const Ttk_ElementOptionSpec MenuIndicatorElementOptions[] = {
};
static void MenuIndicatorElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
MenuIndicatorElement *mi = (MenuIndicatorElement *)elementRecord;
Ttk_Padding margins;
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, mi->widthObj, widthPtr);
Tk_GetPixelsFromObj(NULL, tkwin, mi->heightObj, heightPtr);
@@ -401,15 +414,17 @@ static void MenuIndicatorElementSize(
}
static void MenuIndicatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
MenuIndicatorElement *mi = (MenuIndicatorElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, mi->backgroundObj);
Ttk_Padding margins;
int borderWidth = 2;
- (void)dummy;
- (void)state;
Ttk_GetPaddingFromObj(NULL,tkwin,mi->marginObj,&margins);
b = Ttk_PadBox(b, margins);
@@ -454,13 +469,15 @@ static const Ttk_ElementOptionSpec ArrowElementOptions[] =
};
static void ArrowElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
int size = 12;
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->sizeObj, &size);
*widthPtr = *heightPtr = size;
@@ -468,7 +485,8 @@ static void ArrowElementSize(
static void ArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
ArrowElement *arrow = (ArrowElement *)elementRecord;
@@ -477,7 +495,6 @@ static void ArrowElementDraw(
int relief = TK_RELIEF_RAISED;
int size = b.width < b.height ? b.width : b.height;
XPoint points[3];
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, arrow->reliefObj, &relief);
@@ -555,14 +572,16 @@ static const Ttk_ElementOptionSpec SliderElementOptions[] = {
};
static void SliderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
SliderElement *slider = (SliderElement *)elementRecord;
Ttk_Orient orient;
int length, thickness;
- (void)dummy;
- (void)paddingPtr;
TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, slider->lengthObj, &length);
@@ -582,15 +601,17 @@ static void SliderElementSize(
}
static void SliderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SliderElement *slider = (SliderElement *)elementRecord;
Tk_3DBorder border = NULL;
int relief = TK_RELIEF_RAISED, borderWidth = 2;
Ttk_Orient orient;
- (void)dummy;
- (void)state;
border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj);
TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
@@ -675,13 +696,12 @@ static const Ttk_ElementOptionSpec SashOptions[] = {
static void SashElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
SashElement *sash = (SashElement *)elementRecord;
int sashPad = 2, sashThickness = 6, handleSize = 8;
Ttk_Orient orient = (Ttk_Orient)PTR2INT(clientData);
- (void)paddingPtr;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, sash->sashThicknessObj, &sashThickness);
Tk_GetPixelsFromObj(NULL, tkwin, sash->handleSizeObj, &handleSize);
@@ -698,7 +718,8 @@ static void SashElementSize(
static void SashElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SashElement *sash = (SashElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, sash->borderObj);
@@ -707,7 +728,6 @@ static void SashElementDraw(
int handleSize = 8, handlePad = 8;
Ttk_Orient orient = (Ttk_Orient)PTR2INT(clientData);
Ttk_Box hb;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, sash->handleSizeObj, &handleSize);
Tk_GetPixelsFromObj(NULL, tkwin, sash->handlePadObj, &handlePad);
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index 531fe01..fb07b06 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -257,16 +257,16 @@ static const Ttk_ElementOptionSpec BorderElementOptions[] = {
};
static void BorderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
BorderElement *bd = (BorderElement *)elementRecord;
int borderWidth = 0;
Ttk_ButtonDefaultState defaultState = TTK_BUTTON_DEFAULT_DISABLED;
- (void)dummy;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
Tcl_GetIntFromObj(NULL, bd->borderWidthObj, &borderWidth);
Ttk_GetButtonDefaultStateFromObj(NULL, bd->defaultStateObj, &defaultState);
@@ -279,8 +279,12 @@ static void BorderElementSize(
}
static void BorderElementDraw(
- void *dummy, void *elementRecord,
- Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
BorderElement *bd = (BorderElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, bd->borderObj);
@@ -288,8 +292,6 @@ static void BorderElementDraw(
int borderWidth = 2;
int relief = TK_RELIEF_FLAT;
Ttk_ButtonDefaultState defaultState = TTK_BUTTON_DEFAULT_DISABLED;
- (void)dummy;
- (void)state;
/*
* Get option values.
@@ -343,27 +345,25 @@ static const Ttk_ElementOptionSpec FieldElementOptions[] = {
};
static void FieldElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
-
*paddingPtr = Ttk_UniformPadding(2);
}
static void FieldElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, Ttk_State state)
{
FieldElement *field = (FieldElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, field->borderObj);
XColor *borderColor = Tk_GetColorFromObj(tkwin, field->borderColorObj);
int focusWidth = 2;
- (void)dummy;
Tk_GetPixelsFromObj(NULL, tkwin, field->focusWidthObj, &focusWidth);
@@ -534,13 +534,13 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
static void IndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
const IndicatorSpec *spec = (const IndicatorSpec *)clientData;
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding margins;
double scalingLevel = TkScalingLevel(tkwin);
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
*widthPtr = spec->width * scalingLevel + Ttk_PaddingWidth(margins);
@@ -555,18 +555,19 @@ static void ColorToStr(
}
static void ImageChanged( /* to be passed to Tk_GetImage() */
- ClientData clientData,
- int x, int y, int width, int height,
- int imageWidth, int imageHeight)
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
- (void)clientData;
- (void)x; (void)y; (void)width; (void)height;
- (void)imageWidth; (void)imageHeight;
}
static void IndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding padding;
@@ -752,14 +753,14 @@ static const Ttk_Padding ArrowPadding = { 3,3,4,4 };
static void ArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding;
int size = SCROLLBAR_WIDTH;
- (void)paddingPtr;
padding.left = round(ArrowPadding.left * scalingLevel);
padding.right = padding.left + 1;
@@ -780,7 +781,8 @@ static void ArrowElementSize(
static void ArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
@@ -792,7 +794,6 @@ static void ArrowElementDraw(
int cx = 0, cy = 0;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, arrow->colorObj);
GC gc = Tk_GCForColor(arrowColor, d);
- (void)state;
Tk_GetReliefFromObj(NULL, arrow->reliefObj, &relief);
@@ -845,14 +846,14 @@ static const Ttk_ElementSpec ArrowElementSpec = {
static void BoxArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding;
int size = 14;
- (void)paddingPtr;
padding.left = round(ArrowPadding.left * scalingLevel);
padding.top = round(ArrowPadding.top * scalingLevel);
@@ -868,7 +869,8 @@ static void BoxArrowElementSize(
static void BoxArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
@@ -883,7 +885,6 @@ static void BoxArrowElementDraw(
int cx = 0, cy = 0;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, arrow->colorObj);
GC arrowGC = Tk_GCForColor(arrowColor, d);
- (void)state;
Tk_Fill3DRectangle(tkwin, d, border, b.x, b.y, b.width, b.height,
0, TK_RELIEF_FLAT);
@@ -947,15 +948,17 @@ static const Ttk_ElementOptionSpec MenubuttonArrowElementOptions[] = {
static const Ttk_Padding MenubuttonArrowPadding = { 3, 0, 3, 0 };
static void MenubuttonArrowElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
MenubuttonArrowElement *arrow = (MenubuttonArrowElement *)elementRecord;
int size = MENUBUTTON_ARROW_SIZE;
Ttk_Padding padding;
double scalingLevel = TkScalingLevel(tkwin);
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->sizeObj, &size);
@@ -970,8 +973,12 @@ static void MenubuttonArrowElementSize(
}
static void MenubuttonArrowElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
MenubuttonArrowElement *arrow = (MenubuttonArrowElement *)elementRecord;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, arrow->colorObj);
@@ -982,8 +989,6 @@ static void MenubuttonArrowElementDraw(
int width = 0, height = 0;
Ttk_Padding padding;
double scalingLevel = TkScalingLevel(tkwin);
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->sizeObj, &size);
Tcl_GetIndexFromObjStruct(NULL, arrow->directionObj, directionStrings,
@@ -1046,14 +1051,16 @@ static const Ttk_ElementOptionSpec ThumbElementOptions[] = {
};
static void ThumbElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ThumbElement *thumb = (ThumbElement *)elementRecord;
Ttk_Orient orient;
int size;
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, thumb->sizeObj, &size);
TtkGetOrientFromObj(NULL, thumb->orientObj, &orient);
@@ -1068,16 +1075,18 @@ static void ThumbElementSize(
}
static void ThumbElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ThumbElement *thumb = (ThumbElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, thumb->borderObj);
XColor *borderColor = Tk_GetColorFromObj(tkwin, thumb->borderColorObj);
int relief = TK_RELIEF_RAISED;
int borderWidth = 2;
- (void)dummy;
- (void)state;
/*
* Don't draw the thumb if we are disabled.
@@ -1138,14 +1147,16 @@ static const Ttk_ElementOptionSpec SliderElementOptions[] = {
};
static void SliderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
SliderElement *slider = (SliderElement *)elementRecord;
Ttk_Orient orient;
int thickness, borderWidth;
- (void)dummy;
- (void)paddingPtr;
TtkGetOrientFromObj(NULL, slider->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth);
@@ -1164,15 +1175,17 @@ static void SliderElementSize(
}
static void SliderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SliderElement *slider = (SliderElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj);
XColor *borderColor = Tk_GetColorFromObj(tkwin, slider->borderColorObj);
int relief = TK_RELIEF_RAISED, borderWidth = 2;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, slider->reliefObj, &relief);
@@ -1215,14 +1228,16 @@ static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
};
static void TreeitemIndicatorSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
TreeitemIndicator *indicator = (TreeitemIndicator *)elementRecord;
int diameter = 0;
Ttk_Padding margins;
- (void)dummy;
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter);
@@ -1231,7 +1246,8 @@ static void TreeitemIndicatorSize(
}
static void TreeitemIndicatorDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, Ttk_State state)
{
TreeitemIndicator *indicator = (TreeitemIndicator *)elementRecord;
@@ -1240,7 +1256,6 @@ static void TreeitemIndicatorDraw(
Ttk_Padding padding = Ttk_UniformPadding(0);
int w = WIN32_XDRAWLINE_HACK;
int cx, cy;
- (void)dummy;
if (state & TTK_STATE_LEAF) {
/* don't draw anything ... */
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 16296b2..d55c07f 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -29,28 +29,24 @@
/* public */ void
TtkNullElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(Ttk_Padding *))
{
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
- (void)paddingPtr;
}
/* public */ void
TtkNullElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(Drawable),
+ TCL_UNUSED(Ttk_Box),
+ TCL_UNUSED(Ttk_State))
{
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)d;
- (void)b;
- (void)state;
}
/* public */ Ttk_ElementSpec ttkNullElementSpec = {
@@ -81,13 +77,15 @@ static const Ttk_ElementOptionSpec BackgroundElementOptions[] = {
};
static void FillElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
BackgroundElement *bg = (BackgroundElement *)elementRecord;
Tk_3DBorder backgroundPtr = Tk_Get3DBorderFromObj(tkwin,bg->backgroundObj);
- (void)dummy;
- (void)state;
XFillRectangle(Tk_Display(tkwin), d,
Tk_3DBorderGC(tkwin, backgroundPtr, TK_3D_FLAT_GC),
@@ -96,10 +94,10 @@ static void FillElementDraw(
static void BackgroundElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d,
+ TCL_UNUSED(Ttk_Box),
+ Ttk_State state)
{
- (void)b;
-
FillElementDraw(
clientData, elementRecord, tkwin,
d, Ttk_WinBox(tkwin), state);
@@ -142,29 +140,31 @@ static const Ttk_ElementOptionSpec BorderElementOptions[] = {
};
static void BorderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
BorderElement *bd = (BorderElement *)elementRecord;
int borderWidth = 0;
- (void)dummy;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
Tcl_GetIntFromObj(NULL, bd->borderWidthObj, &borderWidth);
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
static void BorderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
BorderElement *bd = (BorderElement *)elementRecord;
Tk_3DBorder border = NULL;
int borderWidth = 1, relief = TK_RELIEF_FLAT;
- (void)dummy;
- (void)state;
border = Tk_Get3DBorderFromObj(tkwin, bd->borderObj);
Tcl_GetIntFromObj(NULL, bd->borderWidthObj, &borderWidth);
@@ -209,14 +209,15 @@ static const Ttk_ElementOptionSpec FieldElementOptions[] = {
static void FieldElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
FieldElement *field = (FieldElement *)elementRecord;
int borderWidth = 2, focusWidth = 2;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetPixelsFromObj(NULL, tkwin, field->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(NULL, tkwin, field->focusWidthObj, &focusWidth);
@@ -227,13 +228,13 @@ static void FieldElementSize(
}
static void FieldElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, Ttk_State state)
{
FieldElement *field = (FieldElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, field->borderObj);
int focusWidth = 2;
- (void)dummy;
Tk_GetPixelsFromObj(NULL, tkwin, field->focusWidthObj, &focusWidth);
@@ -325,16 +326,17 @@ static const Ttk_ElementOptionSpec PaddingElementOptions[] = {
};
static void PaddingElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
PaddingElement *padding = (PaddingElement *)elementRecord;
int shiftRelief = 0;
int relief = TK_RELIEF_FLAT;
Ttk_Padding pad;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetReliefFromObj(NULL, padding->reliefObj, &relief);
Tcl_GetIntFromObj(NULL, padding->shiftreliefObj, &shiftRelief);
@@ -392,27 +394,30 @@ static const Ttk_ElementOptionSpec FocusElementOptions[] = {
};
static void FocusElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
FocusElement *focus = (FocusElement *)elementRecord;
int focusThickness = 0;
- (void)dummy;
- (void)tkwin;
- (void)widthPtr;
- (void)heightPtr;
Tcl_GetIntFromObj(NULL, focus->focusThicknessObj, &focusThickness);
*paddingPtr = Ttk_UniformPadding((short)focusThickness);
}
static void FocusElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ Ttk_State state)
{
FocusElement *focus = (FocusElement *)elementRecord;
int focusThickness = 0;
- (void)dummy;
if (state & TTK_STATE_FOCUS) {
Tcl_GetIntFromObj(NULL,focus->focusThicknessObj,&focusThickness);
@@ -449,42 +454,45 @@ static const Ttk_ElementOptionSpec SeparatorElementOptions[] = {
};
static void SeparatorElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
- (void)dummy;
- (void)elementRecord;
- (void)tkwin;
- (void)paddingPtr;
-
*widthPtr = *heightPtr = 2;
}
static void HorizontalSeparatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SeparatorElement *separator = (SeparatorElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, separator->borderObj);
GC lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
GC darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
- (void)dummy;
- (void)state;
XDrawLine(Tk_Display(tkwin), d, darkGC, b.x, b.y, b.x + b.width, b.y);
XDrawLine(Tk_Display(tkwin), d, lightGC, b.x, b.y+1, b.x + b.width, b.y+1);
}
static void VerticalSeparatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SeparatorElement *separator = (SeparatorElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, separator->borderObj);
GC lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
GC darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
- (void)dummy;
- (void)state;
XDrawLine(Tk_Display(tkwin), d, darkGC, b.x, b.y, b.x, b.y + b.height);
XDrawLine(Tk_Display(tkwin), d, lightGC, b.x+1, b.y, b.x+1, b.y+b.height);
@@ -492,7 +500,7 @@ static void VerticalSeparatorElementDraw(
static void GeneralSeparatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
SeparatorElement *separator = (SeparatorElement *)elementRecord;
Ttk_Orient orient;
@@ -552,22 +560,27 @@ static const Ttk_ElementOptionSpec SizegripOptions[] = {
};
static void SizegripSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
SizegripElement *grip = (SizegripElement *)elementRecord;
int gripSize = 0;
- (void)dummy;
- (void)tkwin;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
*widthPtr = *heightPtr = gripSize;
}
static void SizegripDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
SizegripElement *grip = (SizegripElement *)elementRecord;
int gripSize = 0;
@@ -576,8 +589,6 @@ static void SizegripDraw(
GC lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
GC darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
int x1 = b.x + b.width-1, y1 = b.y + b.height-1, x2 = x1, y2 = y1;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
gripThickness = gripSize * 3 / (gripCount * 5);
@@ -691,13 +702,13 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
static void IndicatorElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
const IndicatorSpec *spec = (const IndicatorSpec *)clientData;
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding margins;
double scalingLevel = TkScalingLevel(tkwin);
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins);
*widthPtr = spec->width * scalingLevel + Ttk_PaddingWidth(margins);
@@ -712,18 +723,19 @@ static void ColorToStr(
}
static void ImageChanged( /* to be passed to Tk_GetImage() */
- ClientData clientData,
- int x, int y, int width, int height,
- int imageWidth, int imageHeight)
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
- (void)clientData;
- (void)x; (void)y; (void)width; (void)height;
- (void)imageWidth; (void)imageHeight;
}
static void IndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
IndicatorElement *indicator = (IndicatorElement *)elementRecord;
Ttk_Padding padding;
@@ -900,14 +912,14 @@ static const Ttk_Padding ArrowPadding = { 3,3,3,3 };
static void ArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding;
int size = 14;
- (void)paddingPtr;
padding.left = round(ArrowPadding.left * scalingLevel);
padding.top = round(ArrowPadding.top * scalingLevel);
@@ -928,7 +940,8 @@ static void ArrowElementSize(
static void ArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
@@ -939,7 +952,6 @@ static void ArrowElementDraw(
int cx = 0, cy = 0;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, arrow->colorObj);
GC gc = Tk_GCForColor(arrowColor, d);
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, arrow->reliefObj, &relief);
@@ -992,14 +1004,14 @@ static const Ttk_ElementSpec ArrowElementSpec = {
static void BoxArrowElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
double scalingLevel = TkScalingLevel(tkwin);
Ttk_Padding padding;
int size = 14;
- (void)paddingPtr;
padding.left = round(ArrowPadding.left * scalingLevel);
padding.top = round(ArrowPadding.top * scalingLevel);
@@ -1015,7 +1027,8 @@ static void BoxArrowElementSize(
static void BoxArrowElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ArrowElement *arrow = (ArrowElement *)elementRecord;
ArrowDirection direction = (ArrowDirection)PTR2INT(clientData);
@@ -1029,7 +1042,6 @@ static void BoxArrowElementDraw(
int cx = 0, cy = 0;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, arrow->colorObj);
GC arrowGC = Tk_GCForColor(arrowColor, d);
- (void)state;
Tk_Fill3DRectangle(tkwin, d, border, b.x, b.y, b.width, b.height,
borderWidth, relief);
@@ -1088,14 +1100,16 @@ static const Ttk_ElementOptionSpec MenuIndicatorElementOptions[] = {
};
static void MenuIndicatorElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
MenuIndicatorElement *indicator = (MenuIndicatorElement *)elementRecord;
Ttk_Padding margins;
int size = MENUBUTTON_ARROW_SIZE;
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size);
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->paddingObj, &margins);
@@ -1105,16 +1119,18 @@ static void MenuIndicatorElementSize(
}
static void MenuIndicatorElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
MenuIndicatorElement *indicator = (MenuIndicatorElement *)elementRecord;
XColor *arrowColor = Tk_GetColorFromObj(tkwin, indicator->colorObj);
GC gc = Tk_GCForColor(arrowColor, d);
int size = MENUBUTTON_ARROW_SIZE;
int width, height;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size);
@@ -1166,14 +1182,15 @@ static const Ttk_ElementOptionSpec TroughElementOptions[] = {
};
static void TroughElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
TroughElement *troughPtr = (TroughElement *)elementRecord;
int borderWidth = 1, grooveWidth = -1;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->grooveWidthObj, &grooveWidth);
@@ -1186,15 +1203,15 @@ static void TroughElementSize(
static Ttk_Box troughInnerBox;
static void TroughElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
TroughElement *troughPtr = (TroughElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, troughPtr->colorObj);
int borderWidth = 1, grooveWidth = -1, relief = TK_RELIEF_SUNKEN;
Ttk_Orient orient;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->borderWidthObj, &borderWidth);
Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->grooveWidthObj, &grooveWidth);
@@ -1258,14 +1275,14 @@ static const Ttk_ElementOptionSpec ThumbElementOptions[] = {
};
static void ThumbElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ThumbElement *thumb = (ThumbElement *)elementRecord;
Ttk_Orient orient;
int thickness;
- (void)dummy;
- (void)paddingPtr;
Tk_GetPixelsFromObj(NULL, tkwin, thumb->thicknessObj, &thickness);
TtkGetOrientFromObj(NULL, thumb->orientObj, &orient);
@@ -1280,14 +1297,14 @@ static void ThumbElementSize(
}
static void ThumbElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ThumbElement *thumb = (ThumbElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, thumb->borderObj);
int borderWidth = 2, relief = TK_RELIEF_RAISED;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, thumb->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, thumb->reliefObj, &relief);
@@ -1338,24 +1355,22 @@ static const Ttk_ElementOptionSpec SliderElementOptions[] = {
};
static void SliderElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ TCL_UNUSED(void *), /* elementRecord */
+ Tk_Window tkwin,
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
- (void)dummy;
- (void)elementRecord;
- (void)paddingPtr;
-
double scalingLevel = TkScalingLevel(tkwin);
*widthPtr = *heightPtr = SLIDER_DIM * scalingLevel;
}
static void SliderElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
- (void)dummy;
- (void)state;
-
double scalingLevel = TkScalingLevel(tkwin);
int dim = SLIDER_DIM * scalingLevel;
@@ -1526,14 +1541,14 @@ static const Ttk_ElementOptionSpec PbarElementOptions[] = {
};
static void PbarElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ int *widthPtr, int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
PbarElement *pbar = (PbarElement *)elementRecord;
Ttk_Orient orient;
int thickness = 15, length = 30, borderWidth = 2;
- (void)dummy;
- (void)paddingPtr;
TtkGetOrientFromObj(NULL, pbar->orientObj, &orient);
Tk_GetPixelsFromObj(NULL, tkwin, pbar->thicknessObj, &thickness);
@@ -1553,14 +1568,14 @@ static void PbarElementSize(
}
static void PbarElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
PbarElement *pbar = (PbarElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, pbar->borderObj);
int relief = TK_RELIEF_RAISED, borderWidth = 2;
- (void)dummy;
- (void)state;
Tk_GetPixelsFromObj(NULL, tkwin, pbar->borderWidthObj, &borderWidth);
Tk_GetReliefFromObj(NULL, pbar->reliefObj, &relief);
@@ -1602,16 +1617,16 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = {
};
static void TabElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
TabElement *tab = (TabElement *)elementRecord;
int borderWidth = 1;
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth);
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
@@ -1638,8 +1653,9 @@ static void TabElementSize(
}
static void TabElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b, Ttk_State state)
{
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
@@ -1652,7 +1668,6 @@ static void TabElementDraw(
int cut = round(2 * scalingLevel);
Display *disp = Tk_Display(tkwin);
int borderWidth = 1;
- (void)dummy;
if (mainInfoPtr != NULL) {
nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit;
@@ -1807,28 +1822,28 @@ typedef TabElement ClientElement;
#define ClientElementOptions TabElementOptions
static void ClientElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
+ Ttk_Padding *paddingPtr)
{
ClientElement *ce = (ClientElement *)elementRecord;
int borderWidth = 1;
- (void)dummy;
- (void)widthPtr;
- (void)heightPtr;
Tk_GetPixelsFromObj(0, tkwin, ce->borderWidthObj, &borderWidth);
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
static void ClientElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord, Tk_Window tkwin,
+ Drawable d, Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
ClientElement *ce = (ClientElement *)elementRecord;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, ce->backgroundObj);
int borderWidth = 1;
- (void)dummy;
- (void)state;
Tcl_GetIntFromObj(NULL, ce->borderWidthObj, &borderWidth);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index f0fe2fc..7dc2748 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -356,7 +356,7 @@ EntryEditable(Entry *entryPtr)
*/
static Tcl_Size
EntryFetchSelection(
- ClientData clientData, Tcl_Size offset, char *buffer, Tcl_Size maxBytes)
+ void *clientData, Tcl_Size offset, char *buffer, Tcl_Size maxBytes)
{
Entry *entryPtr = (Entry *)clientData;
Tcl_Size byteCount;
@@ -389,7 +389,7 @@ EntryFetchSelection(
* Tk_LostSelProc for Entry widgets; called when an entry
* loses ownership of the selection.
*/
-static void EntryLostSelection(ClientData clientData)
+static void EntryLostSelection(void *clientData)
{
Entry *entryPtr = (Entry *)clientData;
entryPtr->core.flags &= ~GOT_SELECTION;
@@ -660,11 +660,13 @@ done:
* Returns:
* TCL_OK if valid, TCL_BREAK if invalid, TCL_ERROR on error.
*/
-static int EntryRevalidate(Tcl_Interp *dummy, Entry *entryPtr, VREASON reason)
+static int EntryRevalidate(
+ TCL_UNUSED(Tcl_Interp *),
+ Entry *entryPtr,
+ VREASON reason)
{
int code = EntryValidateChange(
entryPtr, entryPtr->entry.string, -1,0, reason);
- (void)dummy;
if (code == TCL_BREAK) {
TtkWidgetChangeState(&entryPtr->core, TTK_STATE_INVALID, 0);
@@ -929,7 +931,7 @@ DeleteChars(
*/
#define EntryEventMask (FocusChangeMask)
static void
-EntryEventProc(ClientData clientData, XEvent *eventPtr)
+EntryEventProc(void *clientData, XEvent *eventPtr)
{
Entry *entryPtr = (Entry *)clientData;
@@ -954,10 +956,11 @@ EntryEventProc(ClientData clientData, XEvent *eventPtr)
*/
static void
-EntryInitialize(Tcl_Interp *dummy, void *recordPtr)
+EntryInitialize(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr)
{
Entry *entryPtr = (Entry *)recordPtr;
- (void)dummy;
Tk_CreateEventHandler(
entryPtr->core.tkwin, EntryEventMask, EntryEventProc, entryPtr);
@@ -1070,11 +1073,13 @@ static int EntryConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
/* EntryPostConfigure --
* Post-configuration hook for entry widgets.
*/
-static int EntryPostConfigure(Tcl_Interp *dummy, void *recordPtr, int mask)
+static int EntryPostConfigure(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr,
+ int mask)
{
Entry *entryPtr = (Entry *)recordPtr;
int status = TCL_OK;
- (void)dummy;
if ((mask & TEXTVAR_CHANGED) && entryPtr->entry.textVariableTrace != NULL) {
status = Ttk_FireTrace(entryPtr->entry.textVariableTrace);
@@ -2077,16 +2082,18 @@ static const Ttk_ElementOptionSpec TextareaElementOptions[] = {
};
static void TextareaElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
TextareaElement *textarea = (TextareaElement *)elementRecord;
Tk_Font font = Tk_GetFontFromObj(tkwin, textarea->fontObj);
int avgWidth = Tk_TextWidth(font, "0", 1);
Tk_FontMetrics fm;
int prefWidth = 1;
- (void)dummy;
- (void)paddingPtr;
Tk_GetFontMetrics(font, &fm);
Tcl_GetIntFromObj(NULL, textarea->widthObj, &prefWidth);
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index e8c9dc0..8ada461 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -495,10 +495,10 @@ static void LabelframePlaceContent(void *recordPtr)
}
static int LabelRequest(
- TCL_UNUSED(void *),
- TCL_UNUSED(Tcl_Size),
- TCL_UNUSED(int),
- TCL_UNUSED(int))
+ TCL_UNUSED(void *), /* managerData */
+ TCL_UNUSED(Tcl_Size), /* index */
+ TCL_UNUSED(int), /* width */
+ TCL_UNUSED(int)) /* height */
{
return 1;
}
@@ -512,7 +512,7 @@ static int LabelRequest(
*/
static void LabelRemoved(
void *managerData,
- TCL_UNUSED(Tcl_Size))
+ TCL_UNUSED(Tcl_Size)) /* index */
{
Labelframe *lframe = (Labelframe *)managerData;
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index b959165..634ba63 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -31,22 +31,22 @@ struct TtkImageSpec {
/* NullImageChanged --
* Do-nothing Tk_ImageChangedProc.
*/
-static void NullImageChanged(ClientData dummy,
- int x, int y, int width, int height, int imageWidth, int imageHeight)
-{ /* No-op */
- (void)dummy;
- (void)x;
- (void)y;
- (void)width;
- (void)height;
- (void)imageWidth;
- (void)imageHeight;
+static void NullImageChanged(
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
+{
+ /* No-op */
}
/* ImageSpecImageChanged --
* Image changes should trigger a repaint.
*/
-static void ImageSpecImageChanged(ClientData clientData,
+static void ImageSpecImageChanged(void *clientData,
int x, int y, int width, int height, int imageWidth, int imageHeight)
{
Ttk_ImageSpec *imageSpec = (Ttk_ImageSpec *)clientData;
@@ -76,7 +76,7 @@ TtkGetImageSpec(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
*/
Ttk_ImageSpec *
TtkGetImageSpecEx(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr,
- Tk_ImageChangedProc *imageChangedProc, ClientData imageChangedClientData)
+ Tk_ImageChangedProc *imageChangedProc, void *imageChangedClientData)
{
Ttk_ImageSpec *imageSpec = 0;
int i = 0, n = 0;
@@ -212,12 +212,15 @@ static Ttk_Box BPadding(Ttk_Box b, Ttk_Padding p)
* the source area of the image.
*/
static void Ttk_Fill(
- Tk_Window tkwin, Drawable d, Tk_Image image, Ttk_Box src, Ttk_Box dst)
+ TCL_UNUSED(Tk_Window),
+ Drawable d,
+ Tk_Image image,
+ Ttk_Box src,
+ Ttk_Box dst)
{
int dr = dst.x + dst.width;
int db = dst.y + dst.height;
int x,y;
- (void)tkwin;
if (!(src.width && src.height && dst.width && dst.height))
return;
@@ -284,13 +287,15 @@ static void FreeImageData(void *clientData)
}
static void ImageElementSize(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ void *clientData,
+ TCL_UNUSED(void *), /* elementRecord */
+ TCL_UNUSED(Tk_Window),
+ int *widthPtr,
+ int *heightPtr,
+ Ttk_Padding *paddingPtr)
{
ImageData *imageData = (ImageData *)clientData;
Tk_Image image = imageData->imageSpec->baseImage;
- (void)elementRecord;
- (void)tkwin;
if (image) {
Tk_SizeOfImage(image, widthPtr, heightPtr);
@@ -306,14 +311,17 @@ static void ImageElementSize(
}
static void ImageElementDraw(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ void *clientData,
+ TCL_UNUSED(void *), /* elementRecord */
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ Ttk_State state)
{
ImageData *imageData = (ImageData *)clientData;
Tk_Image image = 0;
int imgWidth, imgHeight;
Ttk_Box src, dst;
- (void)elementRecord;
#ifdef TILE_07_COMPAT
if (imageData->imageMap) {
@@ -355,7 +363,7 @@ static const Ttk_ElementSpec ImageElementSpec =
static int
Ttk_CreateImageElement(
Tcl_Interp *interp,
- void *dummy,
+ TCL_UNUSED(void *),
Ttk_Theme theme,
const char *elementName,
Tcl_Size objc, Tcl_Obj *const objv[])
@@ -368,7 +376,6 @@ Ttk_CreateImageElement(
ImageData *imageData = 0;
int padding_specified = 0;
Tcl_Size i;
- (void)dummy;
if (objc + 1 < 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 9e09195..f038829 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -204,12 +204,14 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b)
}
static void TextElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
TextElement *text = (TextElement *)elementRecord;
- (void)dummy;
- (void)paddingPtr;
if (!TextSetup(text, tkwin))
return;
@@ -223,12 +225,14 @@ static void TextElementSize(
}
static void TextElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
TextElement *text = (TextElement *)elementRecord;
- (void)dummy;
- (void)state;
if (TextSetup(text, tkwin)) {
TextDraw(text, tkwin, d, b);
@@ -261,12 +265,14 @@ static int cTextSetup(TextElement *text, Tk_Window tkwin)
}
static void cTextElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
TextElement *text = (TextElement *)elementRecord;
- (void)dummy;
- (void)paddingPtr;
if (!cTextSetup(text, tkwin))
return;
@@ -419,12 +425,14 @@ static void ImageDraw(
}
static void ImageElementSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
ImageElement *image = (ImageElement *)elementRecord;
- (void)dummy;
- (void)paddingPtr;
if (ImageSetup(image, tkwin, 0)) {
*widthPtr = image->width;
@@ -434,11 +442,14 @@ static void ImageElementSize(
}
static void ImageElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ Ttk_State state)
{
ImageElement *image = (ImageElement *)elementRecord;
- (void)dummy;
if (ImageSetup(image, tkwin, state)) {
ImageDraw(image, tkwin, d, b, state);
@@ -627,7 +638,7 @@ static void LabelCleanup(LabelElement *c)
}
static void LabelElementSize(
- TCL_UNUSED(void *),
+ TCL_UNUSED(void *), /* clientData */
void *elementRecord,
Tk_Window tkwin,
int *widthPtr,
@@ -688,7 +699,7 @@ static void DrawCompound(
}
static void LabelElementDraw(
- TCL_UNUSED(void *),
+ TCL_UNUSED(void *), /* clientData */
void *elementRecord,
Tk_Window tkwin,
Drawable d,
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c
index 7d78c86..98c5274 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -113,7 +113,7 @@ static void RecomputeLayout(Ttk_Manager *mgr)
/* ++ ManagerIdleProc --
* DoWhenIdle procedure for deferred updates.
*/
-static void ManagerIdleProc(ClientData clientData)
+static void ManagerIdleProc(void *clientData)
{
Ttk_Manager *mgr = (Ttk_Manager *)clientData;
mgr->flags &= ~MGR_UPDATE_PENDING;
@@ -139,7 +139,7 @@ static void ManagerIdleProc(ClientData clientData)
* Keep the content's map state in sync with the container's.
*/
static const int ManagerEventMask = StructureNotifyMask;
-static void ManagerEventHandler(ClientData clientData, XEvent *eventPtr)
+static void ManagerEventHandler(void *clientData, XEvent *eventPtr)
{
Ttk_Manager *mgr = (Ttk_Manager *)clientData;
Tcl_Size i;
@@ -310,7 +310,7 @@ static void RemoveContent(Ttk_Manager *mgr, Tcl_Size index)
* +++ Tk_GeomMgr hooks.
*/
-void Ttk_GeometryRequestProc(ClientData clientData, Tk_Window window)
+void Ttk_GeometryRequestProc(void *clientData, Tk_Window window)
{
Ttk_Manager *mgr = (Ttk_Manager *)clientData;
Tcl_Size index = Ttk_ContentIndex(mgr, window);
@@ -325,7 +325,7 @@ void Ttk_GeometryRequestProc(ClientData clientData, Tk_Window window)
}
}
-void Ttk_LostContentProc(ClientData clientData, Tk_Window window)
+void Ttk_LostContentProc(void *clientData, Tk_Window window)
{
Ttk_Manager *mgr = (Ttk_Manager *)clientData;
Tcl_Size index = Ttk_ContentIndex(mgr, window);
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h
index 65cf724..acb264e 100644
--- a/generic/ttk/ttkManager.h
+++ b/generic/ttk/ttkManager.h
@@ -31,7 +31,7 @@ typedef struct { /* Manager hooks */
int (*RequestedSize)(void *managerData, int *widthPtr, int *heightPtr);
void (*PlaceContent)(void *managerData);
- int (*ContentRequest)(void *managerData, Tcl_Size index, int w, int h);
+ int (*ContentRequest)(void *managerData, Tcl_Size index, int width, int height);
void (*ContentRemoved)(void *managerData, Tcl_Size index);
} Ttk_ManagerSpec;
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 17ccd3a..668cdf5 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -731,10 +731,10 @@ static void TabRemoved(void *managerData, Tcl_Size index)
}
static int TabRequest(
- TCL_UNUSED(void *),
- TCL_UNUSED(Tcl_Size),
- TCL_UNUSED(int),
- TCL_UNUSED(int))
+ TCL_UNUSED(void *), /* managerData */
+ TCL_UNUSED(Tcl_Size), /* index */
+ TCL_UNUSED(int), /* width */
+ TCL_UNUSED(int)) /* height */
{
return 1;
}
@@ -804,7 +804,7 @@ static const int NotebookEventMask
| PointerMotionMask
| LeaveWindowMask
;
-static void NotebookEventHandler(ClientData clientData, XEvent *eventPtr)
+static void NotebookEventHandler(void *clientData, XEvent *eventPtr)
{
Notebook *nb = (Notebook *)clientData;
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index 01285df..e81ddca 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -480,7 +480,7 @@ static Ttk_ManagerSpec PanedManagerSpec = {
*/
static const unsigned PanedEventMask = LeaveWindowMask;
-static void PanedEventProc(ClientData clientData, XEvent *eventPtr)
+static void PanedEventProc(void *clientData, XEvent *eventPtr)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
if ( eventPtr->type == LeaveNotify
@@ -933,7 +933,7 @@ static const Ttk_ElementOptionSpec SashElementOptions[] = {
};
static void SashElementSize(
- TCL_UNUSED(void *),
+ TCL_UNUSED(void *), /* clientData */
void *elementRecord,
TCL_UNUSED(Tk_Window),
int *widthPtr,
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index b23c698..cfffc42 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -120,7 +120,7 @@ static int AnimationEnabled(Progressbar *pb)
* Increments the -phase option, redisplays the widget,
* and reschedules itself if animation still enabled.
*/
-static void AnimateProgressProc(ClientData clientData)
+static void AnimateProgressProc(void *clientData)
{
Progressbar *pb = (Progressbar *)clientData;
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index 40a5bf0..4720850 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -123,7 +123,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
/* UpdateScrollbarBG --
* Idle handler to update the scrollbar.
*/
-static void UpdateScrollbarBG(ClientData clientData)
+static void UpdateScrollbarBG(void *clientData)
{
ScrollHandle h = (ScrollHandle)clientData;
Tcl_Interp *interp = h->corePtr->interp;
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index d1295a1..57f4eda 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -199,7 +199,7 @@ static const Ttk_ElementOptionSpec SquareElementOptions[] =
*/
static void SquareElementSize(
- TCL_UNUSED(void *),
+ TCL_UNUSED(void *), /* clientData */
void *elementRecord,
Tk_Window tkwin,
int *widthPtr,
@@ -220,12 +220,12 @@ static void SquareElementSize(
*/
static void SquareElementDraw(
- TCL_UNUSED(void *),
+ TCL_UNUSED(void *), /* clientData */
void *elementRecord,
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
SquareElement *square = (SquareElement *)elementRecord;
Tk_3DBorder foreground = NULL;
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index 4d05c87..33ed11c 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -262,7 +262,7 @@ Ttk_StateMap Ttk_GetStateMapFromObj(
* Ttk_StateTableLooup --
* Look up an index from a statically allocated state table.
*/
-int Ttk_StateTableLookup(const Ttk_StateTable *map, unsigned int state)
+int Ttk_StateTableLookup(const Ttk_StateTable *map, Ttk_State state)
{
while ((state & map->onBits) != map->onBits
|| (~state & map->offBits) != map->offBits)
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index 57b0610..a664fec 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -407,7 +407,7 @@ typedef struct
* Cleanup procedure for StylePackageData.
*/
static void Ttk_StylePkgFree(
- ClientData clientData,
+ void *clientData,
TCL_UNUSED(Tcl_Interp *))
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
@@ -475,7 +475,7 @@ static StylePackageData *GetStylePackageData(Tcl_Interp *interp)
*
*/
void Ttk_RegisterCleanup(
- Tcl_Interp *interp, ClientData clientData, Ttk_CleanupProc *cleanupProc)
+ Tcl_Interp *interp, void *clientData, Ttk_CleanupProc *cleanupProc)
{
StylePackageData *pkgPtr = GetStylePackageData(interp);
Cleanup *cleanup = (Cleanup *)ckalloc(sizeof(*cleanup));
@@ -498,7 +498,7 @@ void Ttk_RegisterCleanup(
* the widget hierarchy, so this is done by evaluating a Tcl script.
*/
-static void ThemeChangedProc(ClientData clientData)
+static void ThemeChangedProc(void *clientData)
{
static char ThemeChangedScript[] = "ttk::ThemeChanged";
StylePackageData *pkgPtr = (StylePackageData *)clientData;
@@ -1190,7 +1190,7 @@ static Tcl_Obj* HashTableToDict(Tcl_HashTable *ht)
*/
static int
StyleMapCmd(
- ClientData clientData, /* StylePackageData pointer */
+ void *clientData, /* StylePackageData pointer */
Tcl_Interp *interp, /* Current interpreter */
Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
@@ -1257,7 +1257,7 @@ usage:
/* + style configure $style -option ?value...
*/
static int StyleConfigureCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1312,7 +1312,7 @@ usage:
/* + style lookup $style -option ?statespec? ?defaultValue?
*/
static int StyleLookupCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1352,7 +1352,7 @@ static int StyleLookupCmd(
}
static int StyleThemeCurrentCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj * const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj * const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Tcl_HashSearch search;
@@ -1388,7 +1388,7 @@ static int StyleThemeCurrentCmd(
/* + style theme create name ?-parent $theme? ?-settings { script }?
*/
static int StyleThemeCreateCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
static const char *const optStrings[] =
@@ -1452,10 +1452,10 @@ static int StyleThemeCreateCmd(
* Return list of registered themes.
*/
static int StyleThemeNamesCmd(
- ClientData clientData,
+ void *clientData,
Tcl_Interp *interp,
- TCL_UNUSED(Tcl_Size),
- TCL_UNUSED(Tcl_Obj *const *))
+ TCL_UNUSED(Tcl_Size), /* objc */
+ TCL_UNUSED(Tcl_Obj *const *)) /* objv */
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
@@ -1469,7 +1469,7 @@ static int StyleThemeNamesCmd(
*/
static int
StyleThemeSettingsCmd(
- ClientData clientData, /* StylePackageData pointer */
+ void *clientData, /* StylePackageData pointer */
Tcl_Interp *interp, /* Current interpreter */
Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
@@ -1498,7 +1498,7 @@ StyleThemeSettingsCmd(
/* + style element create name type ? ...args ?
*/
static int StyleElementCreateCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1533,7 +1533,7 @@ static int StyleElementCreateCmd(
* Return a list of elements defined in the current theme.
*/
static int StyleElementNamesCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1549,7 +1549,7 @@ static int StyleElementNamesCmd(
* Return list of element options for specified element
*/
static int StyleElementOptionsCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1587,7 +1587,7 @@ static int StyleElementOptionsCmd(
/* + style layout name ?spec?
*/
static int StyleLayoutCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = (StylePackageData *)clientData;
Ttk_Theme theme = pkgPtr->currentTheme;
@@ -1627,7 +1627,10 @@ static int StyleLayoutCmd(
* Use the current theme if $theme is omitted.
*/
static int StyleThemeStylesCmd(
- TCL_UNUSED(void *), Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ TCL_UNUSED(void *),
+ Tcl_Interp *interp,
+ Tcl_Size objc,
+ Tcl_Obj *const objv[])
{
Ttk_Theme themePtr;
@@ -1652,7 +1655,7 @@ static int StyleThemeStylesCmd(
*/
static int
StyleThemeUseCmd(
- ClientData clientData, /* StylePackageData pointer */
+ void *clientData, /* StylePackageData pointer */
Tcl_Interp *interp, /* Current interpreter */
Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
@@ -1710,7 +1713,7 @@ static const Ttk_Ensemble StyleEnsemble[] = {
static int
StyleObjCmd(
- ClientData clientData, /* StylePackageData pointer */
+ void *clientData, /* StylePackageData pointer */
Tcl_Interp *interp, /* Current interpreter */
int objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h
index a5ae350..a0a27cd 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -234,10 +234,8 @@ typedef struct {
Tcl_Obj *unused;
} NullElement;
-MODULE_SCOPE void TtkNullElementSize
- (void *, void *, Tk_Window, int *, int *, Ttk_Padding *);
-MODULE_SCOPE void TtkNullElementDraw
- (void *, void *, Tk_Window, Drawable, Ttk_Box, Ttk_State);
+MODULE_SCOPE Ttk_ElementSizeProc TtkNullElementSize;
+MODULE_SCOPE Ttk_ElementDrawProc TtkNullElementDraw;
MODULE_SCOPE const Ttk_ElementOptionSpec TtkNullElementOptions[];
MODULE_SCOPE Ttk_ElementSpec ttkNullElementSpec;
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c
index 1019ffa..c292c11 100644
--- a/generic/ttk/ttkTrace.c
+++ b/generic/ttk/ttkTrace.c
@@ -24,7 +24,7 @@ struct TtkTraceHandle_
*/
static char *
VarTraceProc(
- ClientData clientData, /* Widget record pointer */
+ void *clientData, /* Widget record pointer */
Tcl_Interp *interp, /* Interpreter containing variable. */
TCL_UNUSED(const char *), /* name1 */
TCL_UNUSED(const char *), /* name2 */
@@ -114,7 +114,7 @@ Ttk_TraceHandle *Ttk_TraceVariable(
void Ttk_UntraceVariable(Ttk_TraceHandle *h)
{
if (h) {
- ClientData cd = NULL;
+ void *cd = NULL;
/*
* Workaround for Tcl Bug 3062331. The trace design problem is
diff --git a/generic/ttk/ttkTrack.c b/generic/ttk/ttkTrack.c
index 43a7644..332a3f6 100644
--- a/generic/ttk/ttkTrack.c
+++ b/generic/ttk/ttkTrack.c
@@ -116,7 +116,7 @@ static const unsigned ElementStateMask =
;
static void
-ElementStateEventProc(ClientData clientData, XEvent *ev)
+ElementStateEventProc(void *clientData, XEvent *ev)
{
ElementStateTracker *es = (ElementStateTracker *)clientData;
Ttk_Layout layout = es->corePtr->layout;
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 11de5e0..6bca9e6 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1426,7 +1426,7 @@ TreeviewConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
*/
static int ConfigureItem(
Tcl_Interp *interp, Treeview *tv, TreeItem *item,
- int objc, Tcl_Obj *const objv[])
+ Tcl_Size objc, Tcl_Obj *const objv[])
{
Tk_SavedOptions savedOptions;
int mask;
@@ -1518,7 +1518,7 @@ error:
*/
static int ConfigureColumn(
Tcl_Interp *interp, Treeview *tv, TreeColumn *column,
- int objc, Tcl_Obj *const objv[])
+ Tcl_Size objc, Tcl_Obj *const objv[])
{
Tk_SavedOptions savedOptions;
int mask;
@@ -1564,7 +1564,7 @@ error:
*/
static int ConfigureHeading(
Tcl_Interp *interp, Treeview *tv, TreeColumn *column,
- int objc, Tcl_Obj *const objv[])
+ Tcl_Size objc, Tcl_Obj *const objv[])
{
Tk_SavedOptions savedOptions;
int mask;
@@ -2752,7 +2752,10 @@ static int TreeviewBBoxCommand(
* row itemid
*/
static int TreeviewHorribleIdentify(
- Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], Treeview *tv)
+ Tcl_Interp *interp,
+ TCL_UNUSED(Tcl_Size), /* objc */
+ Tcl_Obj *const objv[],
+ Treeview *tv)
{
const char *what = "nothing", *detail = NULL;
TreeItem *item = 0;
@@ -2760,7 +2763,6 @@ static int TreeviewHorribleIdentify(
Tcl_Size dColumnNumber;
char dcolbuf[32];
int x, y, x1;
- (void)objc;
/* ASSERT: objc == 4 */
@@ -3639,7 +3641,9 @@ static int TreeviewSelectionCommand(
*/
static int SelObjChangeElement(
Treeview *tv, Tcl_Obj *listPtr, Tcl_Obj *elemPtr,
- int add, TCL_UNUSED(int) /*remove*/, int toggle)
+ int add,
+ TCL_UNUSED(int) /*remove*/,
+ int toggle)
{
Tcl_Size i, nElements;
int anyChange = 0;
@@ -4455,14 +4459,16 @@ static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
};
static void TreeitemIndicatorSize(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ TCL_UNUSED(Ttk_Padding *))
{
TreeitemIndicator *indicator = (TreeitemIndicator *)elementRecord;
Ttk_Padding margins;
int size = 0;
- (void)dummy;
- (void)paddingPtr;
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, &margins);
Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size);
@@ -4472,8 +4478,12 @@ static void TreeitemIndicatorSize(
}
static void TreeitemIndicatorDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ Ttk_State state)
{
TreeitemIndicator *indicator = (TreeitemIndicator *)elementRecord;
ArrowDirection direction =
@@ -4481,7 +4491,6 @@ static void TreeitemIndicatorDraw(
Ttk_Padding margins;
XColor *borderColor = Tk_GetColorFromObj(tkwin, indicator->colorObj);
XGCValues gcvalues; GC gc; unsigned mask;
- (void)dummy;
if (state & TTK_STATE_LEAF) /* don't draw anything */
return;
@@ -4525,14 +4534,16 @@ static const Ttk_ElementOptionSpec RowElementOptions[] = {
};
static void RowElementDraw(
- void *dummy, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, Ttk_State state)
+ TCL_UNUSED(void *), /* clientData */
+ void *elementRecord,
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ TCL_UNUSED(Ttk_State))
{
RowElement *row = (RowElement *)elementRecord;
XColor *color = Tk_GetColorFromObj(tkwin, row->backgroundObj);
GC gc = Tk_GCForColor(color, d);
- (void)dummy;
- (void)state;
XFillRectangle(Tk_Display(tkwin), d, gc,
b.x, b.y, b.width, b.height);
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index d819af7..3ec9b02 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -81,13 +81,17 @@ static void EndDrawing(Tk_Window tkwin, Drawable d)
#else
/* No double-buffering: draw directly into the window. */
static Drawable BeginDrawing(Tk_Window tkwin) { return Tk_WindowId(tkwin); }
-static void EndDrawing(Tk_Window tkwin, Drawable d) { (void)tkwin; (void)d;}
+static void EndDrawing(
+ TCL_UNUSED(Tk_Window),
+ TCL_UNUSED(Drawable))
+{
+}
#endif
/* DrawWidget --
* Redraw a widget. Called as an idle handler.
*/
-static void DrawWidget(ClientData recordPtr)
+static void DrawWidget(void *recordPtr)
{
WidgetCore *corePtr = (WidgetCore *)recordPtr;
@@ -121,7 +125,7 @@ void TtkRedisplayWidget(WidgetCore *corePtr)
* Invoked whenever fonts or other system resources are changed;
* recomputes geometry.
*/
-static void WidgetWorldChanged(ClientData clientData)
+static void WidgetWorldChanged(void *clientData)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
(void)UpdateLayout(corePtr->interp, corePtr);
@@ -159,7 +163,7 @@ void TtkWidgetChangeState(WidgetCore *corePtr,
*/
static int
WidgetInstanceObjCmd(
- ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
WidgetCore *corePtr = (WidgetCore *)clientData;
const Ttk_Ensemble *commands = corePtr->widgetSpec->commands;
@@ -194,7 +198,7 @@ WidgetInstanceObjCmd(
* Widget instance command deletion callback.
*/
static void
-WidgetInstanceObjCmdDeleted(ClientData clientData)
+WidgetInstanceObjCmdDeleted(void *clientData)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
corePtr->widgetCmd = NULL;
@@ -260,7 +264,7 @@ static const unsigned CoreEventMask
| LeaveWindowMask
;
-static void CoreEventProc(ClientData clientData, XEvent *eventPtr)
+static void CoreEventProc(void *clientData, XEvent *eventPtr)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
@@ -335,7 +339,7 @@ static const Tk_ClassProcs widgetClassProcs = {
* ClientData is a WidgetSpec *.
*/
int TtkWidgetConstructorObjCmd(
- ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
+ void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
WidgetSpec *widgetSpec = (WidgetSpec *)clientData;
const char *className = widgetSpec->className;
@@ -508,21 +512,20 @@ Ttk_Layout TtkWidgetGetOrientedLayout(
/* TtkNullInitialize --
* Default widget initializeProc (no-op)
*/
-void TtkNullInitialize(Tcl_Interp *interp, void *recordPtr)
+void TtkNullInitialize(
+ TCL_UNUSED(Tcl_Interp *),
+ TCL_UNUSED(void *))
{
- (void)interp;
- (void)recordPtr;
}
/* TtkNullPostConfigure --
* Default widget postConfigureProc (no-op)
*/
-int TtkNullPostConfigure(Tcl_Interp *interp, void *clientData, int mask)
+int TtkNullPostConfigure(
+ TCL_UNUSED(Tcl_Interp *),
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int))
{
- (void)interp;
- (void)clientData;
- (void)mask;
-
return TCL_OK;
}
@@ -545,9 +548,9 @@ int TtkCoreConfigure(Tcl_Interp *interp, void *clientData, int mask)
/* TtkNullCleanup --
* Default widget cleanupProc (no-op)
*/
-void TtkNullCleanup(void *recordPtr)
+void TtkNullCleanup(
+ TCL_UNUSED(void *))
{
- (void)recordPtr;
return;
}
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 504446b..f651c06 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -209,7 +209,7 @@ static inline CGRect BoxToRect(
static GrayPalette LookupGrayPalette(
const ButtonDesign *design,
- unsigned int state,
+ Ttk_State state,
int isDark)
{
const PaletteStateTable *entry = design->palettes;
@@ -489,7 +489,7 @@ static void DrawGrayButton(
CGContextRef context,
CGRect bounds,
const ButtonDesign *design,
- unsigned int state,
+ Ttk_State state,
Tk_Window tkwin)
{
int isDark = TkMacOSXInDarkMode(tkwin);
@@ -583,7 +583,7 @@ static void DrawAccentedSegment(
CGContextRef context,
CGRect bounds,
const ButtonDesign *design,
- unsigned int state,
+ Ttk_State state,
Tk_Window tkwin)
{
/*
@@ -2936,7 +2936,7 @@ static void SeparatorElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
CGRect bounds = BoxToRect(d, b);
const HIThemeSeparatorDrawInfo info = {
@@ -2999,7 +2999,7 @@ static void SizegripElementDraw(
TCL_UNUSED(Tk_Window), /* tkwin */
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
CGRect bounds = BoxToRect(d, b);
HIThemeGrowBoxDrawInfo info = {
@@ -3104,7 +3104,7 @@ static void BackgroundElementDraw(
Tk_Window tkwin,
Drawable d,
TCL_UNUSED(Ttk_Box),
- unsigned int state)
+ Ttk_State state)
{
FillElementDraw(clientData, elementRecord, tkwin, d, Ttk_WinBox(tkwin),
state);
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 640573e..4ec5a7b 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -181,7 +181,7 @@ static void FrameControlElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
FrameControlElementData *elementData = (FrameControlElementData *)clientData;
RECT rc = BoxToRect(Ttk_PadBox(b, elementData->margins));
@@ -233,7 +233,7 @@ static void BorderElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
BorderElement *border = (BorderElement *)elementRecord;
RECT rc = BoxToRect(b);
@@ -292,7 +292,7 @@ static void FieldElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
FieldElement *field = (FieldElement *)elementRecord;
Tk_3DBorder bg = Tk_Get3DBorderFromObj(tkwin, field->backgroundObj);
@@ -375,7 +375,7 @@ static void ButtonBorderElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
ButtonBorderElement *bd = (ButtonBorderElement *)elementRecord;
int relief = TK_RELIEF_FLAT;
@@ -444,7 +444,7 @@ static void FocusElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
if (state & TTK_STATE_FOCUS) {
RECT rc = BoxToRect(b);
@@ -484,7 +484,7 @@ static void FillFocusElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
FillFocusElement *focus = (FillFocusElement *)elementRecord;
@@ -508,7 +508,7 @@ static void FillFocusElementDraw(
*/
static void ComboboxFocusElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
if (state & TTK_STATE_READONLY) {
FillFocusElementDraw(clientData, elementRecord, tkwin, d, b, state);
@@ -563,7 +563,7 @@ static void TroughElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
TroughClientData *cd = (TroughClientData *)clientData;
TkWinDCState dcState;
@@ -637,7 +637,7 @@ static void ThumbElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
@@ -702,7 +702,7 @@ static void SliderElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
@@ -781,7 +781,7 @@ static void TabElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
@@ -913,7 +913,7 @@ static void ClientElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- TCL_UNUSED(unsigned int))
+ TCL_UNUSED(Ttk_State))
{
RECT rc = BoxToRect(b);
TkWinDCState dcState;
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index d64a359..3b5ab0b 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -534,7 +534,7 @@ static void GenericElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
ElementData *elementData = (ElementData *)clientData;
RECT rc;
@@ -648,7 +648,7 @@ static void ThumbElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
ElementData *elementData = (ElementData *)clientData;
unsigned stateId = Ttk_StateTableLookup(elementData->info->statemap, state);
@@ -768,7 +768,7 @@ static void TabElementDraw(
Tk_Window tkwin,
Drawable d,
Ttk_Box b,
- unsigned int state)
+ Ttk_State state)
{
Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S;
TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr;
@@ -892,7 +892,7 @@ static const Ttk_StateTable tvpglyph_statemap[] =
static void TreeIndicatorElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
if (!(state & TTK_STATE_LEAF)) {
GenericElementDraw(clientData,elementRecord,tkwin,d,b,state);
@@ -977,7 +977,7 @@ static void TextElementSize(
static void TextElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ Drawable d, Ttk_Box b, Ttk_State state)
{
TextElement *element = elementRecord;
ElementData *elementData = clientData;