-
Notifications
You must be signed in to change notification settings - Fork 0
/
mouse.go
31 lines (26 loc) · 876 Bytes
/
mouse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package mouse
// cursor name
type Cursor struct {
Name string
}
type Coordinate struct {
X int
Y int
}
type Move Coordinate
type Click Coordinate
type DoubleClick Coordinate
type Press Coordinate
type Release Coordinate
var BrowserMouseToPlatformMouseCoordinate chan Move
var BrowserMouseClickToPlatformMouseClickEvent chan Click
var BrowserMouseDoubleClickToPlatformMouseDoubleClickEvent chan DoubleClick
var BrowserMouseDownToPlatformMouseDownEvent chan Press
var BrowserMouseUpToPlatformMouseUpEvent chan Release
func init() {
BrowserMouseToPlatformMouseCoordinate = make(chan Move, 1)
BrowserMouseClickToPlatformMouseClickEvent = make(chan Click, 1)
BrowserMouseDoubleClickToPlatformMouseDoubleClickEvent = make(chan DoubleClick, 1)
BrowserMouseDownToPlatformMouseDownEvent = make(chan Press, 1)
BrowserMouseUpToPlatformMouseUpEvent = make(chan Release, 1)
}