events

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT-0 Imports: 5 Imported by: 0

Documentation

Overview

Package events implements functions dealing with channels of tcell.Event.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWith added in v0.6.0

func ContextWith(ctx context.Context, events chan<- tcell.Event) context.Context

ContextWith returns a context.Context with the events channel.

func FromContext added in v0.6.0

func FromContext(ctx context.Context) chan<- tcell.Event

FromContext returns the events channel from ctx.

func Post added in v0.6.0

func Post(ctx context.Context, newEvent func() tcell.Event) (done bool)

Post sends a newEvent.

func PostEvent added in v0.6.0

func PostEvent(ctx context.Context, ev tcell.Event) (done bool)

PostEvent sends ev.

func PostFunc added in v0.6.0

func PostFunc(ctx context.Context, fn func()) (done bool)

PostFunc sends an event that executes fn.

func PostFuncTicker added in v0.7.0

func PostFuncTicker(ctx context.Context, fn func(), d time.Duration)

PostFuncTicker sends an event that executes fn every period of time d. Should be called as a new goroutine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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