internal

package
v0.0.0-...-fc981ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

This file is copied from fyne.io/fyne/internal to avoid an import loop

This file is copied from fyne.io/fyne/app/preferences.go to avoid an import loop

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPreferences

func NewPreferences(a fyne.App, file fyne.URI) *preferences

Types

type InMemoryPreferences

type InMemoryPreferences struct {
	// contains filtered or unexported fields
}

InMemoryPreferences provides an implementation of the fyne.Preferences API that is stored in memory.

func NewInMemoryPreferences

func NewInMemoryPreferences() *InMemoryPreferences

NewInMemoryPreferences creates a new preferences implementation stored in memory

func (*InMemoryPreferences) AddChangeListener

func (p *InMemoryPreferences) AddChangeListener(listener func())

AddChangeListener allows code to be notified when some preferences change. This will fire on any update. The passed 'listener' should not try to write values.

func (*InMemoryPreferences) Bool

func (p *InMemoryPreferences) Bool(key string) bool

Bool looks up a boolean value for the key

func (*InMemoryPreferences) BoolList

func (p *InMemoryPreferences) BoolList(key string) []bool

func (*InMemoryPreferences) BoolListWithFallback

func (p *InMemoryPreferences) BoolListWithFallback(key string, fallback []bool) []bool

func (*InMemoryPreferences) BoolWithFallback

func (p *InMemoryPreferences) BoolWithFallback(key string, fallback bool) bool

BoolWithFallback looks up a boolean value and returns the given fallback if not found

func (*InMemoryPreferences) ChangeListeners

func (p *InMemoryPreferences) ChangeListeners() []func()

ChangeListeners returns the list of listeners registered for this set of preferences.

func (*InMemoryPreferences) Float

func (p *InMemoryPreferences) Float(key string) float64

Float looks up a float64 value for the key

func (*InMemoryPreferences) FloatList

func (p *InMemoryPreferences) FloatList(key string) []float64

func (*InMemoryPreferences) FloatListWithFallback

func (p *InMemoryPreferences) FloatListWithFallback(key string, fallback []float64) []float64

func (*InMemoryPreferences) FloatWithFallback

func (p *InMemoryPreferences) FloatWithFallback(key string, fallback float64) float64

FloatWithFallback looks up a float64 value and returns the given fallback if not found

func (*InMemoryPreferences) Int

func (p *InMemoryPreferences) Int(key string) int

Int looks up an integer value for the key

func (*InMemoryPreferences) IntList

func (p *InMemoryPreferences) IntList(key string) []int

func (*InMemoryPreferences) IntListWithFallback

func (p *InMemoryPreferences) IntListWithFallback(key string, fallback []int) []int

func (*InMemoryPreferences) IntWithFallback

func (p *InMemoryPreferences) IntWithFallback(key string, fallback int) int

IntWithFallback looks up an integer value and returns the given fallback if not found

func (*InMemoryPreferences) ReadValues

func (p *InMemoryPreferences) ReadValues(fn func(map[string]interface{}))

ReadValues provides read access to the underlying value map - for internal use only... You should not retain a reference to the map nor write to the values in the callback function

func (*InMemoryPreferences) RemoveValue

func (p *InMemoryPreferences) RemoveValue(key string)

RemoveValue deletes a value on the given key

func (*InMemoryPreferences) SetBool

func (p *InMemoryPreferences) SetBool(key string, value bool)

SetBool saves a boolean value for the given key

func (*InMemoryPreferences) SetBoolList

func (p *InMemoryPreferences) SetBoolList(key string, value []bool)

func (*InMemoryPreferences) SetFloat

func (p *InMemoryPreferences) SetFloat(key string, value float64)

SetFloat saves a float64 value for the given key

func (*InMemoryPreferences) SetFloatList

func (p *InMemoryPreferences) SetFloatList(key string, value []float64)

func (*InMemoryPreferences) SetInt

func (p *InMemoryPreferences) SetInt(key string, value int)

SetInt saves an integer value for the given key

func (*InMemoryPreferences) SetIntList

func (p *InMemoryPreferences) SetIntList(key string, value []int)

func (*InMemoryPreferences) SetString

func (p *InMemoryPreferences) SetString(key string, value string)

SetString saves a string value for the given key

func (*InMemoryPreferences) SetStringList

func (p *InMemoryPreferences) SetStringList(key string, value []string)

func (*InMemoryPreferences) String

func (p *InMemoryPreferences) String(key string) string

String looks up a string value for the key

func (*InMemoryPreferences) StringList

func (p *InMemoryPreferences) StringList(key string) []string

func (*InMemoryPreferences) StringListWithFallback

func (p *InMemoryPreferences) StringListWithFallback(key string, fallback []string) []string

func (*InMemoryPreferences) StringWithFallback

func (p *InMemoryPreferences) StringWithFallback(key, fallback string) string

StringWithFallback looks up a string value and returns the given fallback if not found

func (*InMemoryPreferences) WriteValues

func (p *InMemoryPreferences) WriteValues(fn func(map[string]interface{}))

WriteValues provides write access to the underlying value map - for internal use only... You should not retain a reference to the map passed to the callback function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL