-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelativeeventcode_string.go
More file actions
48 lines (42 loc) · 1.26 KB
/
relativeeventcode_string.go
File metadata and controls
48 lines (42 loc) · 1.26 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
// Code generated by "stringer -type=RelativeEventCode"; DO NOT EDIT.
package golibevdev
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[RelX-0]
_ = x[RelY-1]
_ = x[RelZ-2]
_ = x[RelRx-3]
_ = x[RelRy-4]
_ = x[RelRz-5]
_ = x[RelHWheel-6]
_ = x[RelDial-7]
_ = x[RelWheel-8]
_ = x[RelMisc-9]
_ = x[RelReserved-10]
_ = x[RelWheelHiRes-11]
_ = x[RelHWheelHiRes-12]
_ = x[RelMax-15]
_ = x[RelCnt-16]
}
const (
_RelativeEventCode_name_0 = "RelXRelYRelZRelRxRelRyRelRzRelHWheelRelDialRelWheelRelMiscRelReservedRelWheelHiResRelHWheelHiRes"
_RelativeEventCode_name_1 = "RelMaxRelCnt"
)
var (
_RelativeEventCode_index_0 = [...]uint8{0, 4, 8, 12, 17, 22, 27, 36, 43, 51, 58, 69, 82, 96}
_RelativeEventCode_index_1 = [...]uint8{0, 6, 12}
)
func (i RelativeEventCode) String() string {
switch {
case i <= 12:
return _RelativeEventCode_name_0[_RelativeEventCode_index_0[i]:_RelativeEventCode_index_0[i+1]]
case 15 <= i && i <= 16:
i -= 15
return _RelativeEventCode_name_1[_RelativeEventCode_index_1[i]:_RelativeEventCode_index_1[i+1]]
default:
return "RelativeEventCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}