processor

package
v0.0.0-...-46ca7f5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultProcessor

type DefaultProcessor struct {
	Pars *Params
}

DefaultProcessor is the default implementation of Processor

func NewDefaultProcessor

func NewDefaultProcessor(params *Params) *DefaultProcessor

NewDefaultProcessor will create a new DefaultProcessor struct

func (*DefaultProcessor) ProcessBindingEvent

func (p *DefaultProcessor) ProcessBindingEvent(ev *i3.BindingEvent)

ProcessBindingEvent processes given binding event

func (*DefaultProcessor) ProcessWindowEvent

func (p *DefaultProcessor) ProcessWindowEvent(ev *i3.WindowEvent)

ProcessWindowEvent processes given window event and keeps live list up to date. It will discard events while the list is being consulted.

type Params

type Params struct {

	// SnapExpirationStep is the amount of time the snapExpiration is increased
	// every time there's some user interaction
	SnapExpirationStep time.Duration

	// WindowEvents is the channel to send new WindowEvents
	WindowEvents chan *i3.WindowEvent

	// mockable i3.RunCommand handle
	RunCommand RunCommandFunc
	// contains filtered or unexported fields
}

Params is the struct holding the state for the switcher.Switcher

type Processor

type Processor interface {
	ProcessWindowEvent(ev *i3.WindowEvent)
	ProcessBindingEvent(ev *i3.BindingEvent)
}

Processor is the interface for the processing logic

type RunCommandFunc

type RunCommandFunc func(command string) ([]i3.CommandResult, error)

RunCommandFunc is the func type to mock i3.RunCommand

Jump to

Keyboard shortcuts

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