listenable

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder[T any](listenable Listenable[T], builder ListenableBuilderCallback[T]) application.BaseWidget

Types

type Listenable

type Listenable[T any] interface {
	AddListener(listener Listener[T])
	NotifyListeners(value T)
	RemoveListener(listener Listener[T])
}

type ListenableBuilder

type ListenableBuilder[T any] struct {
	// contains filtered or unexported fields
}

type ListenableBuilderCallback

type ListenableBuilderCallback[T any] func() application.BaseWidget

type Listener

type Listener[T any] chan T

func NewListener

func NewListener[T any](callback ListenerFunc[T]) Listener[T]

type ListenerFunc

type ListenerFunc[T any] func(T)

Jump to

Keyboard shortcuts

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