update some c name and fmt code

This commit is contained in:
vcaesar 2017-12-29 20:24:47 +08:00
parent 4af3883371
commit df79f9793b
3 changed files with 12 additions and 12 deletions

View File

@ -53,9 +53,9 @@ void dispatch_proc(iohook_event * const event) {
snprintf(buffer + length, sizeof(buffer) - length, snprintf(buffer + length, sizeof(buffer) - length,
",keycode=%u,rawcode=0x%X", ",keycode=%u,rawcode=0x%X",
event->data.keyboard.keycode, event->data.keyboard.rawcode); event->data.keyboard.keycode, event->data.keyboard.rawcode);
int akeycode = (uint16_t) event->data.keyboard.keycode; int akeyCode = (uint16_t) event->data.keyboard.keycode;
// printf("atoi(str)---%d\n", atoi(cevent)); // printf("atoi(str)---%d\n", atoi(cevent));
if (akeycode == atoi(cevent)){ if (akeyCode == atoi(cevent)){
int stopEvent = stop_event(); int stopEvent = stop_event();
// printf("%d\n", stopEvent); // printf("%d\n", stopEvent);
cstatus = 0; cstatus = 0;

View File

@ -113,7 +113,7 @@ int mouse_toggle(char* d, MMMouseButton button){
return 0; return 0;
} }
int set_mouseDelay(size_t val){ int set_mouse_delay(size_t val){
// int val = 10; // int val = 10;
mouseDelay = val; mouseDelay = val;

View File

@ -373,8 +373,8 @@ func MoveMouseSmooth(x, y int, args ...interface{}) {
var ( var (
mouseDelay = 10 mouseDelay = 10
low C.double low C.double
high C.double high C.double
) )
if len(args) > 2 { if len(args) > 2 {
@ -399,8 +399,8 @@ func MoveSmooth(x, y int, args ...interface{}) {
var ( var (
mouseDelay = 10 mouseDelay = 10
low C.double low C.double
high C.double high C.double
) )
if len(args) > 2 { if len(args) > 2 {
@ -518,7 +518,7 @@ func MouseToggle(args ...interface{}) {
// SetMouseDelay set mouse delay // SetMouseDelay set mouse delay
func SetMouseDelay(x int) { func SetMouseDelay(x int) {
cx := C.size_t(x) cx := C.size_t(x)
C.set_mouseDelay(cx) C.set_mouse_delay(cx)
} }
// ScrollMouse scroll the mouse // ScrollMouse scroll the mouse
@ -612,9 +612,9 @@ func KeyTap(args ...interface{}) {
// https://github.com/go-vgo/robotgo/blob/master/docs/keys.md // https://github.com/go-vgo/robotgo/blob/master/docs/keys.md
func KeyToggle(args ...string) string { func KeyToggle(args ...string) string {
var ( var (
adown string adown string
amkey string amkey string
mKeyT string mKeyT string
// keyDelay = 10 // keyDelay = 10
) )
@ -642,7 +642,7 @@ func KeyToggle(args ...string) string {
camkey := C.CString(amkey) camkey := C.CString(amkey)
cmKeyT := C.CString(mKeyT) cmKeyT := C.CString(mKeyT)
// defer func() { // defer func() {
str:=C.key_toggle(ckey, cadown, camkey, cmKeyT) str := C.key_toggle(ckey, cadown, camkey, cmKeyT)
// str := C.key_Toggle(ckey, cadown, camkey, cmKeyT, C.int(keyDelay)) // str := C.key_Toggle(ckey, cadown, camkey, cmKeyT, C.int(keyDelay))
// fmt.Println(str) // fmt.Println(str)
// }() // }()