summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScale.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkScale.c')
-rw-r--r--generic/ttk/ttkScale.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index a6bde9a..8c2999f 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -5,6 +5,7 @@
*/
#include "tkInt.h"
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -57,11 +58,11 @@ static const Tk_OptionSpec ScaleOptionSpecs[] =
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
offsetof(Scale,scale.variableObj), TCL_INDEX_NONE,
- 0,0,0},
+ 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
offsetof(Scale,scale.orientObj),
offsetof(Scale,scale.orient), 0,
- (ClientData)ttkOrientStrings, STYLE_CHANGED },
+ (void *)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
offsetof(Scale,scale.fromObj), TCL_INDEX_NONE, 0, 0, 0},
@@ -75,7 +76,7 @@ static const Tk_OptionSpec ScaleOptionSpecs[] =
{TK_OPTION_STRING, "-state", "state", "State",
"normal", offsetof(Scale,scale.stateObj), TCL_INDEX_NONE,
- 0,0,STATE_CHANGED},
+ 0, 0, STATE_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
@@ -110,10 +111,11 @@ static void ScaleVariableChanged(void *recordPtr, const char *value)
/* ScaleInitialize --
* Scale widget initialization hook.
*/
-static void ScaleInitialize(Tcl_Interp *dummy, void *recordPtr)
+static void ScaleInitialize(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr)
{
Scale *scalePtr = (Scale *)recordPtr;
- (void)dummy;
TtkTrackElementState(&scalePtr->core);
}
@@ -163,12 +165,12 @@ static int ScaleConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
* Post-configuration hook.
*/
static int ScalePostConfigure(
- Tcl_Interp *dummy, void *recordPtr, int mask)
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr,
+ TCL_UNUSED(int))
{
Scale *scale = (Scale *)recordPtr;
int status = TCL_OK;
- (void)dummy;
- (void)mask;
if (scale->scale.variableTrace) {
status = Ttk_FireTrace(scale->scale.variableTrace);
@@ -376,8 +378,8 @@ ScaleCoordsCommand(
if (r == TCL_OK) {
Tcl_Obj *point[2];
XPoint pt = ValueToPoint(scalePtr, value);
- point[0] = Tcl_NewIntObj(pt.x);
- point[1] = Tcl_NewIntObj(pt.y);
+ point[0] = Tcl_NewWideIntObj(pt.x);
+ point[1] = Tcl_NewWideIntObj(pt.y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, point));
}
return r;