forked from maxence-charriere/go-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent.go
More file actions
55 lines (49 loc) · 1.1 KB
/
event.go
File metadata and controls
55 lines (49 loc) · 1.1 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package app
// ChangeArg represents the data passed in a onchange event.
type ChangeArg struct {
Value string
Target DOMElement
}
// MouseArg represents data fired when interacting
// with a pointing device (such as a mouse).
type MouseArg struct {
ClientX float64
ClientY float64
PageX float64
PageY float64
ScreenX float64
ScreenY float64
Button int
Detail int
AltKey bool
CtrlKey bool
MetaKey bool
ShiftKey bool
Target DOMElement
}
// WheelArg represents data fired when a wheel button of a
// pointing device (usually a mouse) is rotated.
type WheelArg struct {
DeltaX float64
DeltaY float64
DeltaZ float64
DeltaMode DeltaMode
Target DOMElement
}
// DeltaMode is an indication of the units of measurement for a delta value.
type DeltaMode uint64
// KeyboardArg represents data fired when the keyboard is used.
type KeyboardArg struct {
CharCode rune
KeyCode KeyCode
Location KeyLocation
AltKey bool
CtrlKey bool
MetaKey bool
ShiftKey bool
Target DOMElement
}
// EventArg represents the data passed in events.
type EventArg struct {
Target DOMElement
}