-
Notifications
You must be signed in to change notification settings - Fork 0
/
windowflags_string.go
44 lines (36 loc) · 1.13 KB
/
windowflags_string.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
32
33
34
35
36
37
38
39
40
41
42
43
44
// Code generated by "stringer -type=WindowFlags"; DO NOT EDIT.
package oswin
import (
"errors"
"strconv"
)
var _ = errors.New("dummy error")
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[Dialog-0]
_ = x[Modal-1]
_ = x[Tool-2]
_ = x[Fullscreen-3]
_ = x[Minimized-4]
_ = x[Focus-5]
_ = x[WindowFlagsN-6]
}
const _WindowFlags_name = "DialogModalToolFullscreenMinimizedFocusWindowFlagsN"
var _WindowFlags_index = [...]uint8{0, 6, 11, 15, 25, 34, 39, 51}
func (i WindowFlags) String() string {
if i < 0 || i >= WindowFlags(len(_WindowFlags_index)-1) {
return "WindowFlags(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _WindowFlags_name[_WindowFlags_index[i]:_WindowFlags_index[i+1]]
}
func (i *WindowFlags) FromString(s string) error {
for j := 0; j < len(_WindowFlags_index)-1; j++ {
if s == _WindowFlags_name[_WindowFlags_index[j]:_WindowFlags_index[j+1]] {
*i = WindowFlags(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: WindowFlags")
}