testkit

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testkit contains Effects and Session construction helpers for Flatte's in-repository harnesses and samples. It is not part of the public module API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHarnessEffects

func NewHarnessEffects[S any](ctx context.Context, updates chan<- flatte.StateUpdate[S], quit func(), dispatch func(func()), clock flatte.Clock) flatte.Effects[S]

NewHarnessEffects creates Effects that send updates to updates. Async work uses dispatch (nil means a real goroutine) and clock (nil means real time).

func NewHarnessEffectsQueue

func NewHarnessEffectsQueue[S any](ctx context.Context, enqueue func(flatte.StateUpdate[S]) bool, quit func(), dispatch func(func()), clock flatte.Clock) flatte.Effects[S]

NewHarnessEffectsQueue creates Effects backed by an enqueue callback.

func NewHarnessEffectsWithServices

func NewHarnessEffectsWithServices[S any](ctx context.Context, updates chan<- flatte.StateUpdate[S], send func(context.Context, any) bool, quit func(), dispatch func(func()), clock flatte.Clock, services flatte.HostServices) flatte.Effects[S]

NewHarnessEffectsWithServices is NewHarnessEffects with host services installed on the returned Effects value.

func SettleFrame

func SettleFrame(view func() flatte.Frame, handle func(flatte.LayoutEvent), last map[string]layout.Rect, width, height int) (flatte.Frame, layout.Composition, map[string]layout.Rect)

SettleFrame uses the root runtime's private cell-layout settling path.

func WithHostMedia

func WithHostMedia(commands <-chan flatte.MediaEvent, publish func(*flatte.NowPlaying)) flatte.Option

WithHostMedia constructs the internal media option used by the browser smoke and native composite host.

Types

This section is empty.

Jump to

Keyboard shortcuts

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