diff options
Diffstat (limited to 'generic/ttk/ttkPanedwindow.c')
-rw-r--r-- | generic/ttk/ttkPanedwindow.c | 213 |
1 files changed, 108 insertions, 105 deletions
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index f44c569..ae7bf11 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -28,7 +28,7 @@ * gives the same result as changing the size by X+Y pixels * in one step). * - * The request size is initially set to the slave window's requested size. + * The request size is initially set to the content window's requested size. * When the user drags a sash, each pane's request size is set to its * actual size. This ensures that panes "stay put" on the next resize. * @@ -77,20 +77,20 @@ typedef struct { static const Tk_OptionSpec PanedOptionSpecs[] = { {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "vertical", offsetof(Paned,paned.orientObj), offsetof(Paned,paned.orient), - 0,(ClientData)ttkOrientStrings,READONLY_OPTION|STYLE_CHANGED }, + 0, (void *)ttkOrientStrings, READONLY_OPTION|STYLE_CHANGED }, {TK_OPTION_INT, "-width", "width", "Width", "0", - TCL_INDEX_NONE, offsetof(Paned,paned.width), - 0,0,GEOMETRY_CHANGED }, + TCL_INDEX_NONE, offsetof(Paned, paned.width), + 0, 0, GEOMETRY_CHANGED }, {TK_OPTION_INT, "-height", "height", "Height", "0", - TCL_INDEX_NONE, offsetof(Paned,paned.height), - 0,0,GEOMETRY_CHANGED }, + TCL_INDEX_NONE, offsetof(Paned, paned.height), + 0, 0, GEOMETRY_CHANGED }, WIDGET_TAKEFOCUS_FALSE, WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs) }; /*------------------------------------------------------------------------ - * +++ Slave pane record. + * +++ Pane record. */ typedef struct { int reqSize; /* Pane request size */ @@ -107,21 +107,21 @@ static const Tk_OptionSpec PaneOptionSpecs[] = { /* CreatePane -- * Create a new pane record. */ -static Pane *CreatePane(Tcl_Interp *interp, Paned *pw, Tk_Window slaveWindow) +static Pane *CreatePane(Tcl_Interp *interp, Paned *pw, Tk_Window window) { Tk_OptionTable optionTable = pw->paned.paneOptionTable; void *record = ckalloc(sizeof(Pane)); Pane *pane = (Pane *)record; memset(record, 0, sizeof(Pane)); - if (Tk_InitOptions(interp, record, optionTable, slaveWindow) != TCL_OK) { + if (Tk_InitOptions(interp, record, optionTable, window) != TCL_OK) { ckfree(record); return NULL; } pane->reqSize = pw->paned.orient == TTK_ORIENT_HORIZONTAL - ? Tk_ReqWidth(slaveWindow) : Tk_ReqHeight(slaveWindow); + ? Tk_ReqWidth(window) : Tk_ReqHeight(window); return pane; } @@ -140,7 +140,7 @@ static void DestroyPane(Paned *pw, Pane *pane) * Set pane options. */ static int ConfigurePane( - Tcl_Interp *interp, Paned *pw, Pane *pane, Tk_Window slaveWindow, + Tcl_Interp *interp, Paned *pw, Pane *pane, Tk_Window window, int objc, Tcl_Obj *const objv[]) { Ttk_Manager *mgr = pw->paned.mgr; @@ -148,7 +148,7 @@ static int ConfigurePane( int mask = 0; if (Tk_SetOptions(interp, pane, pw->paned.paneOptionTable, - objc, objv, slaveWindow, &savedOptions, &mask) != TCL_OK) + objc, objv, window, &savedOptions, &mask) != TCL_OK) { return TCL_ERROR; } @@ -188,14 +188,14 @@ error: static int ShoveUp(Paned *pw, int i, int pos) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, i); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, i); int sashThickness = pw->paned.sashThickness; if (i == 0) { if (pos < 0) pos = 0; } else { - Pane *prevPane = (Pane *)Ttk_SlaveData(pw->paned.mgr, i-1); + Pane *prevPane = (Pane *)Ttk_ContentData(pw->paned.mgr, i-1); if (pos < prevPane->sashPos + sashThickness) pos = ShoveUp(pw, i-1, pos - sashThickness) + sashThickness; } @@ -208,13 +208,13 @@ static int ShoveUp(Paned *pw, int i, int pos) */ static int ShoveDown(Paned *pw, TkSizeT i, int pos) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr,i); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr,i); int sashThickness = pw->paned.sashThickness; - if (i == Ttk_NumberSlaves(pw->paned.mgr) - 1) { - pos = pane->sashPos; /* Sentinel value == master window size */ + if (i == Ttk_NumberContent(pw->paned.mgr) - 1) { + pos = pane->sashPos; /* Sentinel value == container window size */ } else { - Pane *nextPane = (Pane *)Ttk_SlaveData(pw->paned.mgr,i+1); + Pane *nextPane = (Pane *)Ttk_ContentData(pw->paned.mgr,i+1); if (pos + sashThickness > nextPane->sashPos) pos = ShoveDown(pw, i+1, pos + sashThickness) - sashThickness; } @@ -230,7 +230,7 @@ static int ShoveDown(Paned *pw, TkSizeT i, int pos) static int PanedSize(void *recordPtr, int *widthPtr, int *heightPtr) { Paned *pw = (Paned *)recordPtr; - int nPanes = Ttk_NumberSlaves(pw->paned.mgr); + int nPanes = Ttk_NumberContent(pw->paned.mgr); int nSashes = nPanes - 1; int sashThickness = pw->paned.sashThickness; int width = 0, height = 0; @@ -238,21 +238,21 @@ static int PanedSize(void *recordPtr, int *widthPtr, int *heightPtr) if (pw->paned.orient == TTK_ORIENT_HORIZONTAL) { for (index = 0; index < nPanes; ++index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); - Tk_Window slaveWindow = Ttk_SlaveWindow(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); + Tk_Window window = Ttk_ContentWindow(pw->paned.mgr, index); - if (height < Tk_ReqHeight(slaveWindow)) - height = Tk_ReqHeight(slaveWindow); + if (height < Tk_ReqHeight(window)) + height = Tk_ReqHeight(window); width += pane->reqSize; } width += nSashes * sashThickness; } else { for (index = 0; index < nPanes; ++index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); - Tk_Window slaveWindow = Ttk_SlaveWindow(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); + Tk_Window window = Ttk_ContentWindow(pw->paned.mgr, index); - if (width < Tk_ReqWidth(slaveWindow)) - width = Tk_ReqWidth(slaveWindow); + if (width < Tk_ReqWidth(window)) + width = Tk_ReqWidth(window); height += pane->reqSize; } height += nSashes * sashThickness; @@ -277,8 +277,8 @@ static void AdjustPanes(Paned *pw) int pos = 0; TkSizeT index; - for (index = 0; index < Ttk_NumberSlaves(pw->paned.mgr); ++index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); + for (index = 0; index < Ttk_NumberContent(pw->paned.mgr); ++index) { + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); int size = pane->sashPos - pos; pane->reqSize = size >= 0 ? size : 0; pos = pane->sashPos + sashThickness; @@ -304,7 +304,7 @@ static void AdjustPanes(Paned *pw) static void PlaceSashes(Paned *pw, int width, int height) { Ttk_Manager *mgr = pw->paned.mgr; - int nPanes = Ttk_NumberSlaves(mgr); + int nPanes = Ttk_NumberContent(mgr); int sashThickness = pw->paned.sashThickness; int available = pw->paned.orient == TTK_ORIENT_HORIZONTAL ? width : height; int reqSize = 0, totalWeight = 0; @@ -316,7 +316,7 @@ static void PlaceSashes(Paned *pw, int width, int height) /* Compute total required size and total available weight: */ for (i = 0; i < nPanes; ++i) { - Pane *pane = (Pane *)Ttk_SlaveData(mgr, i); + Pane *pane = (Pane *)Ttk_ContentData(mgr, i); reqSize += pane->reqSize; totalWeight += pane->weight * (pane->reqSize != 0); } @@ -340,7 +340,7 @@ static void PlaceSashes(Paned *pw, int width, int height) */ pos = 0; for (i = 0; i < nPanes; ++i) { - Pane *pane = (Pane *)Ttk_SlaveData(mgr, i); + Pane *pane = (Pane *)Ttk_ContentData(mgr, i); int weight = pane->weight * (pane->reqSize != 0); int size = pane->reqSize + delta * weight; @@ -364,7 +364,7 @@ static void PlaceSashes(Paned *pw, int width, int height) } /* PlacePanes -- - * Places slave panes based on sash positions. + * Places panes based on sash positions. */ static void PlacePanes(Paned *pw) { @@ -374,18 +374,18 @@ static void PlacePanes(Paned *pw) int pos = 0; TkSizeT index; - for (index = 0; index < Ttk_NumberSlaves(pw->paned.mgr); ++index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); + for (index = 0; index < Ttk_NumberContent(pw->paned.mgr); ++index) { + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); int size = pane->sashPos - pos; if (size > 0) { if (horizontal) { - Ttk_PlaceSlave(pw->paned.mgr, index, pos, 0, size, height); + Ttk_PlaceContent(pw->paned.mgr, index, pos, 0, size, height); } else { - Ttk_PlaceSlave(pw->paned.mgr, index, 0, pos, width, size); + Ttk_PlaceContent(pw->paned.mgr, index, 0, pos, width, size); } } else { - Ttk_UnmapSlave(pw->paned.mgr, index); + Ttk_UnmapContent(pw->paned.mgr, index); } pos = pane->sashPos + sashThickness; @@ -396,7 +396,7 @@ static void PlacePanes(Paned *pw) * +++ Manager specification. */ -static void PanedPlaceSlaves(void *managerData) +static void PanedPlaceContent(void *managerData) { Paned *pw = (Paned *)managerData; PlaceSashes(pw, Tk_Width(pw->core.tkwin), Tk_Height(pw->core.tkwin)); @@ -406,62 +406,62 @@ static void PanedPlaceSlaves(void *managerData) static void PaneRemoved(void *managerData, TkSizeT index) { Paned *pw = (Paned *)managerData; - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); DestroyPane(pw, pane); } static int AddPane( Tcl_Interp *interp, Paned *pw, - int destIndex, Tk_Window slaveWindow, + int destIndex, Tk_Window window, int objc, Tcl_Obj *const objv[]) { Pane *pane; - if (!Ttk_Maintainable(interp, slaveWindow, pw->core.tkwin)) { + if (!Ttk_Maintainable(interp, window, pw->core.tkwin)) { return TCL_ERROR; } - if (Ttk_SlaveIndex(pw->paned.mgr, slaveWindow) != TCL_INDEX_NONE) { + if (Ttk_ContentIndex(pw->paned.mgr, window) != TCL_INDEX_NONE) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%s already added", Tk_PathName(slaveWindow))); + "%s already added", Tk_PathName(window))); Tcl_SetErrorCode(interp, "TTK", "PANE", "PRESENT", NULL); return TCL_ERROR; } - pane = CreatePane(interp, pw, slaveWindow); + pane = CreatePane(interp, pw, window); if (!pane) { return TCL_ERROR; } - if (ConfigurePane(interp, pw, pane, slaveWindow, objc, objv) != TCL_OK) { + if (ConfigurePane(interp, pw, pane, window, objc, objv) != TCL_OK) { DestroyPane(pw, pane); return TCL_ERROR; } - Ttk_InsertSlave(pw->paned.mgr, destIndex, slaveWindow, pane); + Ttk_InsertContent(pw->paned.mgr, destIndex, window, pane); return TCL_OK; } /* PaneRequest -- - * Only update pane request size if slave is currently unmapped. - * Geometry requests from mapped slaves are not directly honored + * Only update pane request size if pane is currently unmapped. + * Geometry requests from mapped panes are not directly honored * in order to avoid unexpected pane resizes (esp. while the * user is dragging a sash [#1325286]). */ static int PaneRequest(void *managerData, TkSizeT index, int width, int height) { Paned *pw = (Paned *)managerData; - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); - Tk_Window slaveWindow = Ttk_SlaveWindow(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); + Tk_Window window = Ttk_ContentWindow(pw->paned.mgr, index); int horizontal = pw->paned.orient == TTK_ORIENT_HORIZONTAL; - if (!Tk_IsMapped(slaveWindow)) { + if (!Tk_IsMapped(window)) { pane->reqSize = horizontal ? width : height; } return 1; } static Ttk_ManagerSpec PanedManagerSpec = { - { "panedwindow", Ttk_GeometryRequestProc, Ttk_LostSlaveProc }, + { "panedwindow", Ttk_GeometryRequestProc, Ttk_LostContentProc }, PanedSize, - PanedPlaceSlaves, + PanedPlaceContent, PaneRequest, PaneRemoved }; @@ -486,7 +486,7 @@ static void PanedEventProc(ClientData clientData, XEvent *eventPtr) if ( eventPtr->type == LeaveNotify && eventPtr->xcrossing.detail == NotifyInferior) { - TtkSendVirtualEvent(corePtr->tkwin, "EnteredChild"); + Tk_SendVirtualEvent(corePtr->tkwin, "EnteredChild", NULL); } } @@ -519,10 +519,12 @@ static void PanedCleanup(void *recordPtr) /* Post-configuration hook. */ -static int PanedPostConfigure(Tcl_Interp *dummy, void *clientData, int mask) +static int PanedPostConfigure( + TCL_UNUSED(Tcl_Interp *), + void *clientData, + int mask) { Paned *pw = (Paned *)clientData; - (void)dummy; if (mask & GEOMETRY_CHANGED) { /* User has changed -width or -height. @@ -581,7 +583,7 @@ static Ttk_Layout PanedGetLayout( */ static Ttk_Layout SashLayout(Paned *pw, int index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); int thickness = pw->paned.sashThickness, height = Tk_Height(pw->core.tkwin), width = Tk_Width(pw->core.tkwin), @@ -604,10 +606,10 @@ static void DrawSash(Paned *pw, int index, Drawable d) static void PanedDisplay(void *recordPtr, Drawable d) { Paned *pw = (Paned *)recordPtr; - TkSizeT i, nSlaves = Ttk_NumberSlaves(pw->paned.mgr); + TkSizeT i, nContent = Ttk_NumberContent(pw->paned.mgr); TtkWidgetDisplay(recordPtr, d); - for (i = 1; i < nSlaves; ++i) { + for (i = 1; i < nContent; ++i) { DrawSash(pw, i - 1, d); } } @@ -622,65 +624,65 @@ static int PanedAddCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Paned *pw = (Paned *)recordPtr; - Tk_Window slaveWindow; + Tk_Window window; if (objc < 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; } - slaveWindow = Tk_NameToWindow( + window = Tk_NameToWindow( interp, Tcl_GetString(objv[2]), pw->core.tkwin); - if (!slaveWindow) { + if (!window) { return TCL_ERROR; } - return AddPane(interp, pw, Ttk_NumberSlaves(pw->paned.mgr), slaveWindow, + return AddPane(interp, pw, Ttk_NumberContent(pw->paned.mgr), window, objc - 3, objv + 3); } -/* $pw insert $index $slave ?-option value ...? - * Insert new slave, or move existing one. +/* $pw insert $index $window ?-option value ...? + * Insert new content window, or move existing one. */ static int PanedInsertCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Paned *pw = (Paned *)recordPtr; - TkSizeT nSlaves = Ttk_NumberSlaves(pw->paned.mgr); + TkSizeT nContent = Ttk_NumberContent(pw->paned.mgr); TkSizeT srcIndex, destIndex; - Tk_Window slaveWindow; + Tk_Window window; if (objc < 4) { - Tcl_WrongNumArgs(interp, 2,objv, "index slave ?-option value ...?"); + Tcl_WrongNumArgs(interp, 2,objv, "index window ?-option value ...?"); return TCL_ERROR; } - slaveWindow = Tk_NameToWindow( + window = Tk_NameToWindow( interp, Tcl_GetString(objv[3]), pw->core.tkwin); - if (!slaveWindow) { + if (!window) { return TCL_ERROR; } - if (TCL_OK != Ttk_GetSlaveIndexFromObj( + if (TCL_OK != Ttk_GetContentIndexFromObj( interp,pw->paned.mgr, objv[2], &destIndex)) { return TCL_ERROR; } - srcIndex = Ttk_SlaveIndex(pw->paned.mgr, slaveWindow); - if (srcIndex == TCL_INDEX_NONE) { /* New slave: */ - return AddPane(interp, pw, destIndex, slaveWindow, objc-4, objv+4); - } /* else -- move existing slave: */ + srcIndex = Ttk_ContentIndex(pw->paned.mgr, window); + if (srcIndex == TCL_INDEX_NONE) { /* New content: */ + return AddPane(interp, pw, destIndex, window, objc-4, objv+4); + } /* else -- move existing content: */ - if (destIndex + 1 >= nSlaves + 1) - destIndex = nSlaves - 1; - Ttk_ReorderSlave(pw->paned.mgr, srcIndex, destIndex); + if (destIndex + 1 >= nContent + 1) + destIndex = nContent - 1; + Ttk_ReorderContent(pw->paned.mgr, srcIndex, destIndex); return objc == 4 ? TCL_OK : ConfigurePane(interp, pw, - (Pane *)Ttk_SlaveData(pw->paned.mgr, destIndex), - Ttk_SlaveWindow(pw->paned.mgr, destIndex), + (Pane *)Ttk_ContentData(pw->paned.mgr, destIndex), + Ttk_ContentWindow(pw->paned.mgr, destIndex), objc-4, objv+4); } @@ -697,14 +699,14 @@ static int PanedForgetCommand( return TCL_ERROR; } - if (TCL_OK != Ttk_GetSlaveIndexFromObj( + if (TCL_OK != Ttk_GetContentIndexFromObj( interp, pw->paned.mgr, objv[2], &paneIndex)) { return TCL_ERROR; - } else if (paneIndex + 1 >= Ttk_NumberSlaves(pw->paned.mgr) + 1) { - paneIndex = Ttk_NumberSlaves(pw->paned.mgr) - 1; + } else if (paneIndex + 1 >= Ttk_NumberContent(pw->paned.mgr) + 1) { + paneIndex = Ttk_NumberContent(pw->paned.mgr) - 1; } - Ttk_ForgetSlave(pw->paned.mgr, paneIndex); + Ttk_ForgetContent(pw->paned.mgr, paneIndex); return TCL_OK; } @@ -720,7 +722,7 @@ static int PanedIdentifyCommand( int what = IDENTIFY_SASH; Paned *pw = (Paned *)recordPtr; int sashThickness = pw->paned.sashThickness; - int nSashes = Ttk_NumberSlaves(pw->paned.mgr) - 1; + int nSashes = Ttk_NumberContent(pw->paned.mgr) - 1; int x, y, pos; int index; @@ -739,7 +741,7 @@ static int PanedIdentifyCommand( pos = pw->paned.orient == TTK_ORIENT_HORIZONTAL ? x : y; for (index = 0; index < nSashes; ++index) { - Pane *pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, index); + Pane *pane = (Pane *)Ttk_ContentData(pw->paned.mgr, index); if (pane->sashPos <= pos && pos <= pane->sashPos + sashThickness) { /* Found it. */ switch (what) { @@ -771,7 +773,7 @@ static int PanedPaneCommand( { Paned *pw = (Paned *)recordPtr; TkSizeT paneIndex; - Tk_Window slaveWindow; + Tk_Window window; Pane *pane; if (objc < 3) { @@ -779,26 +781,26 @@ static int PanedPaneCommand( return TCL_ERROR; } - if (TCL_OK != Ttk_GetSlaveIndexFromObj( + if (TCL_OK != Ttk_GetContentIndexFromObj( interp,pw->paned.mgr, objv[2], &paneIndex)) { return TCL_ERROR; - } else if (paneIndex + 1 >= Ttk_NumberSlaves(pw->paned.mgr) + 1) { - paneIndex = Ttk_NumberSlaves(pw->paned.mgr) - 1; + } else if (paneIndex + 1 >= Ttk_NumberContent(pw->paned.mgr) + 1) { + paneIndex = Ttk_NumberContent(pw->paned.mgr) - 1; } - pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, paneIndex); - slaveWindow = Ttk_SlaveWindow(pw->paned.mgr, paneIndex); + pane = (Pane *)Ttk_ContentData(pw->paned.mgr, paneIndex); + window = Ttk_ContentWindow(pw->paned.mgr, paneIndex); switch (objc) { case 3: return TtkEnumerateOptions(interp, pane, PaneOptionSpecs, - pw->paned.paneOptionTable, slaveWindow); + pw->paned.paneOptionTable, window); case 4: return TtkGetOptionValue(interp, pane, objv[3], - pw->paned.paneOptionTable, slaveWindow); + pw->paned.paneOptionTable, window); default: - return ConfigurePane(interp, pw, pane, slaveWindow, objc-3,objv+3); + return ConfigurePane(interp, pw, pane, window, objc-3,objv+3); } } @@ -819,8 +821,8 @@ static int PanedPanesCommand( } panes = Tcl_NewListObj(0, NULL); - for (i = 0; i < Ttk_NumberSlaves(mgr); ++i) { - const char *pathName = Tk_PathName(Ttk_SlaveWindow(mgr,i)); + for (i = 0; i < Ttk_NumberContent(mgr); ++i) { + const char *pathName = Tk_PathName(Ttk_ContentWindow(mgr,i)); Tcl_ListObjAppendElement(interp, panes, Tcl_NewStringObj(pathName,-1)); } Tcl_SetObjResult(interp, panes); @@ -846,14 +848,14 @@ static int PanedSashposCommand( if (Tcl_GetIntFromObj(interp, objv[2], &sashIndex) != TCL_OK) { return TCL_ERROR; } - if (sashIndex < 0 || (TkSizeT)sashIndex + 1 >= Ttk_NumberSlaves(pw->paned.mgr)) { + if (sashIndex < 0 || (TkSizeT)sashIndex + 1 >= Ttk_NumberContent(pw->paned.mgr)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "sash index %d out of range", sashIndex)); Tcl_SetErrorCode(interp, "TTK", "PANE", "SASH_INDEX", NULL); return TCL_ERROR; } - pane = (Pane *)Ttk_SlaveData(pw->paned.mgr, sashIndex); + pane = (Pane *)Ttk_ContentData(pw->paned.mgr, sashIndex); if (objc == 3) { Tcl_SetObjResult(interp, Tcl_NewWideIntObj(pane->sashPos)); @@ -930,14 +932,15 @@ static const Ttk_ElementOptionSpec SashElementOptions[] = { }; static void SashElementSize( - void *dummy, void *elementRecord, Tk_Window tkwin, - int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) + TCL_UNUSED(void *), + void *elementRecord, + TCL_UNUSED(Tk_Window), + int *widthPtr, + int *heightPtr, + TCL_UNUSED(Ttk_Padding *)) { SashElement *sash = (SashElement *)elementRecord; int thickness = DEFAULT_SASH_THICKNESS; - (void)dummy; - (void)tkwin; - (void)paddingPtr; Tcl_GetIntFromObj(NULL, sash->thicknessObj, &thickness); *widthPtr = *heightPtr = thickness; |