refactor: improve enum definitions

This commit is contained in:
Piotr Grabowski 2022-07-10 14:57:11 +02:00
parent f2989afd92
commit 5557af8306
3 changed files with 7 additions and 7 deletions

View file

@ -33,14 +33,14 @@ type CursorsState struct {
ForceVisible bool
}
type Cursor int
const (
cursorNone = iota
cursorNone Cursor = iota
cursorDefault
cursorGrabbing
)
type Cursor int
type CursorCache = map[Cursor]*gdk.Cursor
func (cursor *CursorsState) init() {

View file

@ -39,13 +39,13 @@ type JumpmarksCycle struct {
dontClear bool
}
type JumpmarkCycleDirection int
const (
cycleDirectionBackward = iota
cycleDirectionBackward JumpmarkCycleDirection = iota
cycleDirectionForward
)
type JumpmarkCycleDirection int
func (jumpmarks Jumpmarks) has(page int) bool {
for _, mark := range jumpmarks.list {
// ASSUMPTION: The slice is sorted

View file

@ -31,7 +31,7 @@ var (
type NotificationLength = int
const (
ShortNotification = iota
ShortNotification NotificationLength = iota
LongNotification
)