mirror of
https://github.com/robotn/gohook.git
synced 2024-11-22 11:36:47 +08:00
gofmt code
This commit is contained in:
parent
da6e29a777
commit
40c3386427
8
hook.go
8
hook.go
@ -12,7 +12,7 @@ package hook
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo darwin CFLAGS: -x objective-c -Wno-deprecated-declarations
|
#cgo darwin CFLAGS: -x objective-c -Wno-deprecated-declarations
|
||||||
#cgo darwin LDFLAGS: -framework Cocoa
|
#cgo darwin LDFLAGS: -framework Cocoa
|
||||||
|
|
||||||
#cgo linux CFLAGS:-I/usr/src
|
#cgo linux CFLAGS:-I/usr/src
|
||||||
#cgo linux LDFLAGS: -L/usr/src -lX11 -lXtst
|
#cgo linux LDFLAGS: -L/usr/src -lX11 -lXtst
|
||||||
@ -24,7 +24,7 @@ package hook
|
|||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
import(
|
import (
|
||||||
// "fmt"
|
// "fmt"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
@ -33,7 +33,7 @@ import(
|
|||||||
func AddEvent(key string) int {
|
func AddEvent(key string) int {
|
||||||
cs := C.CString(key)
|
cs := C.CString(key)
|
||||||
defer C.free(unsafe.Pointer(cs))
|
defer C.free(unsafe.Pointer(cs))
|
||||||
|
|
||||||
eve := C.add_event(cs)
|
eve := C.add_event(cs)
|
||||||
geve := int(eve)
|
geve := int(eve)
|
||||||
|
|
||||||
@ -43,4 +43,4 @@ func AddEvent(key string) int {
|
|||||||
// StopEvent stop event listener
|
// StopEvent stop event listener
|
||||||
func StopEvent() {
|
func StopEvent() {
|
||||||
C.stop_event()
|
C.stop_event()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user