catnipgtk

package
v0.0.0-...-92350c4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: ISC Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserConfigPath = filepath.Join(glib.GetUserConfigDir(), "catnip-gtk", "config.json")

UserConfigPath is the default path to the user's config file.

Functions

This section is empty.

Types

type AntiAlias

type AntiAlias string
const (
	AntiAliasNone     AntiAlias = "None"
	AntiAliasGrey     AntiAlias = "Grey"
	AntiAliasSubpixel AntiAlias = "Subpixel"
	AntiAliasFast     AntiAlias = "Fast"
	AntiAliasGood     AntiAlias = "Good"
	AntiAliasBest     AntiAlias = "Best"
)

func (AntiAlias) AsAntialias

func (aa AntiAlias) AsAntialias() cairo.Antialias

type Appearance

type Appearance struct {
	LineCap LineCap

	ForegroundColor OptionalColor
	BackgroundColor OptionalColor

	BarWidth     float64
	SpaceWidth   float64 // gap width
	MinimumClamp float64
	AntiAlias    AntiAlias

	DrawStyle catnip.DrawStyle

	CustomCSS string
}

func NewAppearance

func NewAppearance() Appearance

func (*Appearance) Page

func (ac *Appearance) Page(apply func()) *handy.PreferencesPage

type Config

type Config struct {
	Input      Input
	Appearance Appearance
	Visualizer Visualizer
	WindowSize struct {
		Width  int
		Height int
	}
}

func NewConfig

func NewConfig() (*Config, error)

NewConfig creates a new default config.

func ReadConfig

func ReadConfig(path string) (*Config, error)

ReadConfig reads the config at the given path.

func ReadUserConfig

func ReadUserConfig() (*Config, error)

ReadUserConfig reads the user's config file at the default user path.

func (*Config) PreferencesWindow

func (cfg *Config) PreferencesWindow(apply func()) *handy.PreferencesWindow

func (Config) Save

func (cfg Config) Save(path string) error

func (Config) Transform

func (cfg Config) Transform() catnip.Config

Transform turns this config into a catnip config.

type Input

type Input struct {
	Backend     string
	Device      string
	DualChannel bool // .Monophonic
	// contains filtered or unexported fields
}

func NewInput

func NewInput() (Input, error)

func (*Input) InputBackend

func (ic *Input) InputBackend() input.Backend

func (*Input) InputDevice

func (ic *Input) InputDevice() input.Device

func (*Input) Page

func (ic *Input) Page(apply func()) *handy.PreferencesPage

func (*Input) Update

func (ic *Input) Update()

Update updates the list of input devices.

type LineCap

type LineCap string
const (
	CapButt  LineCap = "Butt"
	CapRound LineCap = "Round"
)

func (LineCap) AsLineCap

func (lc LineCap) AsLineCap() cairo.LineCap

type OptionalColor

type OptionalColor = *catnip.CairoColor

type Session

type Session struct {
	gtk.Stack

	Error *gtk.Label

	Area   *gtk.DrawingArea
	Drawer *catnip.Drawer
	// contains filtered or unexported fields
}

func NewSession

func NewSession(cfg *Config) *Session

func (*Session) Reload

func (s *Session) Reload()

func (Session) Stop

func (s Session) Stop()

type Visualizer

type Visualizer struct {
	SampleRate float64
	SampleSize int
	FrameRate  int

	WindowFn     WindowFn
	SmoothFactor float64

	ScaleSlowWindow     float64
	ScaleFastWindow     float64
	ScaleDumpPercent    float64
	ScaleResetDeviation float64
}

func NewVisualizer

func NewVisualizer() Visualizer

func (*Visualizer) Page

func (v *Visualizer) Page(apply func()) *handy.PreferencesPage

type WindowFn

type WindowFn string
const (
	BartlettHann    WindowFn = "Bartlett–Hann"
	Blackman        WindowFn = "Blackman"
	BlackmanHarris  WindowFn = "Blackman–Harris"
	BlackmanNuttall WindowFn = "Blackman–Nuttall"
	FlatTop         WindowFn = "Flat Top"
	Hamming         WindowFn = "Hamming"
	Hann            WindowFn = "Hann"
	Lanczos         WindowFn = "Lanczos"
	Nuttall         WindowFn = "Nuttall"
	Rectangular     WindowFn = "Rectangular"
	Sine            WindowFn = "Sine"
	Triangular      WindowFn = "Triangular"
	CosineSum       WindowFn = "Cosine-Sum"
	PlanckTaper     WindowFn = "Planck–Taper"
)

func (WindowFn) AsFunction

func (wfn WindowFn) AsFunction() catnipwindow.Function

Jump to

Keyboard shortcuts

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