mirror of
https://github.com/robotn/gohook.git
synced 2025-05-20 15:24:25 +08:00
forgot to import unsafe
This commit is contained in:
parent
850a61c06c
commit
0df92dc3d4
4
hook.go
4
hook.go
@ -19,7 +19,6 @@ package hook
|
|||||||
#cgo linux LDFLAGS: -lX11-xcb -lxcb -lxcb-xkb -lxkbcommon -lxkbcommon-x11
|
#cgo linux LDFLAGS: -lX11-xcb -lxcb -lxcb-xkb -lxkbcommon -lxkbcommon-x11
|
||||||
//#cgo windows LDFLAGS: -lgdi32 -luser32
|
//#cgo windows LDFLAGS: -lgdi32 -luser32
|
||||||
|
|
||||||
// #include "event/hook_async.h"
|
|
||||||
#include "event/goEvent.h"
|
#include "event/goEvent.h"
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -28,6 +27,7 @@ import "C"
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -100,7 +100,7 @@ func (e Event) String() string {
|
|||||||
case MouseWheel:
|
case MouseWheel:
|
||||||
return fmt.Sprintf("%v - Event: {Kind: MouseWheel, Amount: %v, Rotation: %v, Direction: %v}", e.When, e.Amount, e.Rotation, e.Direction)
|
return fmt.Sprintf("%v - Event: {Kind: MouseWheel, Amount: %v, Rotation: %v, Direction: %v}", e.When, e.Amount, e.Rotation, e.Direction)
|
||||||
case FakeEvent:
|
case FakeEvent:
|
||||||
return fmt.Sprintf("%v - Event: {Kind: FakeEvent}",e.When)
|
return fmt.Sprintf("%v - Event: {Kind: FakeEvent}", e.When)
|
||||||
}
|
}
|
||||||
return "Unknown event, contact the mantainers"
|
return "Unknown event, contact the mantainers"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user