summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXTest.c')
-rw-r--r--macosx/tkMacOSXTest.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 778ccd4..459c514 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -21,10 +21,10 @@
* Forward declarations of procedures defined later in this file:
*/
-static Tcl_ObjCmdProc PressButtonObjCmd;
-static Tcl_ObjCmdProc MoveMouseObjCmd;
-static Tcl_ObjCmdProc InjectKeyEventObjCmd;
-static Tcl_ObjCmdProc MenuBarHeightObjCmd;
+static Tcl_ObjCmdProc2 PressButtonObjCmd;
+static Tcl_ObjCmdProc2 MoveMouseObjCmd;
+static Tcl_ObjCmdProc2 InjectKeyEventObjCmd;
+static Tcl_ObjCmdProc2 MenuBarHeightObjCmd;
/*
@@ -52,10 +52,10 @@ TkplatformtestInit(
* Add commands for platform specific tests on MacOS here.
*/
- Tcl_CreateObjCommand(interp, "pressbutton", PressButtonObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "movemouse", MoveMouseObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "injectkeyevent", InjectKeyEventObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "menubarheight", MenuBarHeightObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pressbutton", PressButtonObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "movemouse", MoveMouseObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "injectkeyevent", InjectKeyEventObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "menubarheight", MenuBarHeightObjCmd, NULL, NULL);
return TCL_OK;
}
@@ -81,7 +81,7 @@ static int
MenuBarHeightObjCmd(
TCL_UNUSED(void *), /* Not used. */
Tcl_Interp *interp, /* Not used. */
- TCL_UNUSED(int), /* Not used. */
+ TCL_UNUSED(Tcl_Size), /* Not used. */
TCL_UNUSED(Tcl_Obj *const *)) /* Not used. */
{
static int height = 0;
@@ -146,10 +146,11 @@ static int
PressButtonObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
- int x = 0, y = 0, i, value;
+ int x = 0, y = 0, value;
+ Tcl_Size i;
CGPoint pt;
NSPoint loc;
NSEvent *motion, *press, *release;
@@ -245,10 +246,11 @@ static int
MoveMouseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
- int x = 0, y = 0, i, value;
+ int x = 0, y = 0, value;
+ Tcl_Size i;
CGPoint pt;
NSPoint loc;
NSEvent *motion;
@@ -305,7 +307,7 @@ static int
InjectKeyEventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const optionStrings[] = {
@@ -315,7 +317,8 @@ InjectKeyEventObjCmd(
"-command", "-control", "-function", "-option", "-shift", "-x", "-y", NULL};
enum args {KEYEVENT_COMMAND, KEYEVENT_CONTROL, KEYEVENT_FUNCTION, KEYEVENT_OPTION,
KEYEVENT_SHIFT, KEYEVENT_X, KEYEVENT_Y};
- int i, index, keysym, mods = 0, x = 0, y = 0;
+ Tcl_Size i;
+ int index, keysym, mods = 0, x = 0, y = 0;
NSString *chars = nil, *unmod = nil, *upper, *lower;
NSEvent *keyEvent;
NSUInteger type;