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 ¶
RunCommandFunc is the func type to mock i3.RunCommand
Click to show internal directories.
Click to hide internal directories.