summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScale.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2010-01-31 22:50:55 (GMT)
committerjenglish <jenglish@flightlab.com>2010-01-31 22:50:55 (GMT)
commitb8c9d13aa05cbfcbbe02e7c35a467b6043128989 (patch)
treeb05e13d2fe6e468becf1ed719e0768c481dbe97d /generic/ttk/ttkScale.c
parent9eb9490bdd0af957334eed8ed99c60c0223d9536 (diff)
downloadtk-b8c9d13aa05cbfcbbe02e7c35a467b6043128989.zip
tk-b8c9d13aa05cbfcbbe02e7c35a467b6043128989.tar.gz
tk-b8c9d13aa05cbfcbbe02e7c35a467b6043128989.tar.bz2
Change signature of widget subcommand procedures to match Tcl_ObjCmdProc.
Merge now-redundant ensemble dispatch code.
Diffstat (limited to 'generic/ttk/ttkScale.c')
-rw-r--r--generic/ttk/ttkScale.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 6645dc0..619401f 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScale.c,v 1.10 2009/02/08 19:35:35 jenglish Exp $
+/* $Id: ttkScale.c,v 1.11 2010/01/31 22:50:56 jenglish Exp $
* Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
*
* ttk::scale widget.
@@ -242,7 +242,7 @@ static double ScaleFraction(Scale *scalePtr, double value)
*/
static int
ScaleGetCommand(
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr)
+ void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Scale *scalePtr = recordPtr;
int x, y, r = TCL_OK;
@@ -270,7 +270,7 @@ ScaleGetCommand(
*/
static int
ScaleSetCommand(
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr)
+ void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Scale *scalePtr = recordPtr;
double from = 0.0, to = 1.0, value;
@@ -338,7 +338,7 @@ ScaleSetCommand(
static int
ScaleCoordsCommand(
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr)
+ void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Scale *scalePtr = recordPtr;
double value;
@@ -462,17 +462,16 @@ ValueToPoint(Scale *scalePtr, double value)
return pt;
}
-static WidgetCommandSpec ScaleCommands[] =
-{
- { "configure", TtkWidgetConfigureCommand },
- { "cget", TtkWidgetCgetCommand },
- { "state", TtkWidgetStateCommand },
- { "instate", TtkWidgetInstateCommand },
- { "identify", TtkWidgetIdentifyCommand },
- { "set", ScaleSetCommand },
- { "get", ScaleGetCommand },
- { "coords", ScaleCoordsCommand },
- { 0, 0 }
+static const Ttk_Ensemble ScaleCommands[] = {
+ { "configure", TtkWidgetConfigureCommand,0 },
+ { "cget", TtkWidgetCgetCommand,0 },
+ { "state", TtkWidgetStateCommand,0 },
+ { "instate", TtkWidgetInstateCommand,0 },
+ { "identify", TtkWidgetIdentifyCommand,0 },
+ { "set", ScaleSetCommand,0 },
+ { "get", ScaleGetCommand,0 },
+ { "coords", ScaleCoordsCommand,0 },
+ { 0,0,0 }
};
static WidgetSpec ScaleWidgetSpec =