summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-03 12:58:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-03 12:58:16 (GMT)
commitc594f7549d926ba7d3ad0f7ee0ad3638719870dd (patch)
treebcd38dec13f43f75cfe3b20dcfc22a8c27b50be3 /generic/tkCmds.c
parent1e1f629ce1661dec695273cc771f3273bcd1cf22 (diff)
downloadtk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.zip
tk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.tar.gz
tk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.tar.bz2
More usage for Tcl_Size (internal TkEnsemble)
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r--generic/tkCmds.c81
1 files changed, 41 insertions, 40 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index b781405..448a207 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -27,26 +27,26 @@
*/
static TkWindow * GetTopHierarchy(Tk_Window tkwin);
-static char * WaitVariableProc(ClientData clientData,
+static char * WaitVariableProc(void *clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
-static void WaitVisibilityProc(ClientData clientData,
+static void WaitVisibilityProc(void *clientData,
XEvent *eventPtr);
-static void WaitWindowProc(ClientData clientData,
+static void WaitWindowProc(void *clientData,
XEvent *eventPtr);
-static int AppnameCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv);
-static int CaretCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv);
-static int InactiveCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv);
-static int ScalingCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv);
-static int UseinputmethodsCmd(ClientData dummy,
- Tcl_Interp *interp, int objc,
+static int AppnameCmd(void *dummy, Tcl_Interp *interp,
+ Tcl_Size objc, Tcl_Obj *const *objv);
+static int CaretCmd(void *dummy, Tcl_Interp *interp,
+ Tcl_Size objc, Tcl_Obj *const *objv);
+static int InactiveCmd(void *dummy, Tcl_Interp *interp,
+ Tcl_Size objc, Tcl_Obj *const *objv);
+static int ScalingCmd(void *dummy, Tcl_Interp *interp,
+ Tcl_Size objc, Tcl_Obj *const *objv);
+static int UseinputmethodsCmd(void *dummy,
+ Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv);
-static int WindowingsystemCmd(ClientData dummy,
- Tcl_Interp *interp, int objc,
+static int WindowingsystemCmd(void *dummy,
+ Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv);
#if defined(_WIN32) || defined(MAC_OSX_TK)
@@ -90,7 +90,7 @@ static const TkEnsemble tkCmdMap[] = {
int
Tk_BellObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -158,14 +158,14 @@ Tk_BellObjCmd(
int
Tk_BindObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
TkWindow *winPtr;
- ClientData object;
+ void *object;
const char *string;
if ((objc < 2) || (objc > 4)) {
@@ -342,7 +342,7 @@ TkBindEventProc(
int
Tk_BindtagsObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -482,7 +482,7 @@ TkFreeBindingTags(
int
Tk_DestroyObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -529,7 +529,7 @@ Tk_DestroyObjCmd(
int
Tk_LowerObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -588,7 +588,7 @@ Tk_LowerObjCmd(
int
Tk_RaiseObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -647,7 +647,7 @@ Tk_RaiseObjCmd(
int
TkInitTkCmd(
Tcl_Interp *interp,
- ClientData clientData)
+ void *clientData)
{
/* If the interp is safe, leave out "fontchooser" */
int isSafe = Tcl_IsSafe(interp);
@@ -680,9 +680,9 @@ TkInitTkCmd(
int
AppnameCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
@@ -712,9 +712,9 @@ AppnameCmd(
int
CaretCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
@@ -778,7 +778,8 @@ CaretCmd(
}
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(value));
} else {
- int i, value, x = 0, y = 0, height = -1;
+ Tcl_Size i;
+ int value, x = 0, y = 0, height = -1;
for (i = 2; i < objc; i += 2) {
if ((Tcl_GetIndexFromObj(interp, objv[i], caretStrings,
@@ -804,9 +805,9 @@ CaretCmd(
int
ScalingCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
@@ -855,9 +856,9 @@ ScalingCmd(
int
UseinputmethodsCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
@@ -903,7 +904,7 @@ int
WindowingsystemCmd(
TCL_UNUSED(void *), /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *windowingsystem;
@@ -925,9 +926,9 @@ WindowingsystemCmd(
int
InactiveCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window)clientData;
@@ -988,7 +989,7 @@ InactiveCmd(
int
Tk_TkwaitObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1116,7 +1117,7 @@ Tk_TkwaitObjCmd(
static char *
WaitVariableProc(
- ClientData clientData, /* Pointer to integer to set to 1. */
+ void *clientData, /* Pointer to integer to set to 1. */
Tcl_Interp *interp, /* Interpreter containing variable. */
const char *name1, /* Name of variable. */
TCL_UNUSED(const char *), /* Second part of variable name. */
@@ -1132,7 +1133,7 @@ WaitVariableProc(
static void
WaitVisibilityProc(
- ClientData clientData, /* Pointer to integer to set to 1. */
+ void *clientData, /* Pointer to integer to set to 1. */
XEvent *eventPtr) /* Information about event (not used). */
{
int *donePtr = (int *)clientData;
@@ -1146,7 +1147,7 @@ WaitVisibilityProc(
static void
WaitWindowProc(
- ClientData clientData, /* Pointer to integer to set to 1. */
+ void *clientData, /* Pointer to integer to set to 1. */
XEvent *eventPtr) /* Information about event. */
{
int *donePtr = (int *)clientData;
@@ -1273,7 +1274,7 @@ Tk_UpdateObjCmd(
int
Tk_WinfoObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
+ void *clientData, /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */