refactor: improve enum definitions
This commit is contained in:
parent
f2989afd92
commit
5557af8306
|
@ -33,14 +33,14 @@ type CursorsState struct {
|
||||||
ForceVisible bool
|
ForceVisible bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Cursor int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
cursorNone = iota
|
cursorNone Cursor = iota
|
||||||
cursorDefault
|
cursorDefault
|
||||||
cursorGrabbing
|
cursorGrabbing
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cursor int
|
|
||||||
|
|
||||||
type CursorCache = map[Cursor]*gdk.Cursor
|
type CursorCache = map[Cursor]*gdk.Cursor
|
||||||
|
|
||||||
func (cursor *CursorsState) init() {
|
func (cursor *CursorsState) init() {
|
||||||
|
|
|
@ -39,13 +39,13 @@ type JumpmarksCycle struct {
|
||||||
dontClear bool
|
dontClear bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type JumpmarkCycleDirection int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
cycleDirectionBackward = iota
|
cycleDirectionBackward JumpmarkCycleDirection = iota
|
||||||
cycleDirectionForward
|
cycleDirectionForward
|
||||||
)
|
)
|
||||||
|
|
||||||
type JumpmarkCycleDirection int
|
|
||||||
|
|
||||||
func (jumpmarks Jumpmarks) has(page int) bool {
|
func (jumpmarks Jumpmarks) has(page int) bool {
|
||||||
for _, mark := range jumpmarks.list {
|
for _, mark := range jumpmarks.list {
|
||||||
// ASSUMPTION: The slice is sorted
|
// ASSUMPTION: The slice is sorted
|
||||||
|
|
|
@ -31,7 +31,7 @@ var (
|
||||||
type NotificationLength = int
|
type NotificationLength = int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ShortNotification = iota
|
ShortNotification NotificationLength = iota
|
||||||
LongNotification
|
LongNotification
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue