Commit ecdd16a 1 parent 39ef2f7 commit ecdd16a Copy full SHA for ecdd16a
File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,22 @@ NAN_METHOD(moveMouse)
33
33
NanReturnValue (NanNew (" 1" ));
34
34
}
35
35
36
+ NAN_METHOD (moveMouseSmooth)
37
+ {
38
+ NanScope ();
39
+ if (args.Length () < 2 )
40
+ {
41
+ return NanThrowError (" Invalid number of arguments" );
42
+ }
43
+ size_t x = args[0 ]->Int32Value ();
44
+ size_t y = args[1 ]->Int32Value ();
45
+
46
+ MMPoint point;
47
+ point = MMPointMake (x, y);
48
+ smoothlyMoveMouse (point);
49
+ NanReturnValue (NanNew (" 1" ));
50
+ }
51
+
36
52
NAN_METHOD (getMousePos)
37
53
{
38
54
NanScope ();
@@ -99,6 +115,9 @@ void init(Handle<Object> target)
99
115
target->Set (NanNew<String>(" moveMouse" ),
100
116
NanNew<FunctionTemplate>(moveMouse)->GetFunction ());
101
117
118
+ target->Set (NanNew<String>(" moveMouseSmooth" ),
119
+ NanNew<FunctionTemplate>(moveMouseSmooth)->GetFunction ());
120
+
102
121
target->Set (NanNew<String>(" getMousePos" ),
103
122
NanNew<FunctionTemplate>(getMousePos)->GetFunction ());
104
123
You can’t perform that action at this time.
0 commit comments