textinput

package
v0.0.0-...-6902453 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchInputEvent

func WatchInputEvent(n node.Node, handlers ...Handler) func()

Types

type ChangeData

type ChangeData struct {
	Value string
}

type EventsAccessor

type EventsAccessor interface {
	InputEvents() *event.Events[Input]
}

type Handler

type Handler = event.Handler[Input]

func OnChange

func OnChange(action func(event *ChangeData)) Handler

func OnKeyDown

func OnKeyDown(keySet key.Set, action func()) Handler

func OnKeyUp

func OnKeyUp(keySet key.Set, action func()) Handler

type Input

type Input int
const (
	KeyDown Input = iota + 10
	KeyUp
)
const (
	Change Input = iota + 20
)

type InputEventDetector

type InputEventDetector struct {
	// contains filtered or unexported fields
}

func (*InputEventDetector) InputEvents

func (d *InputEventDetector) InputEvents() *event.Events[Input]

func (*InputEventDetector) Layout

func (d *InputEventDetector) Layout(gtx giolayout.Context)

type KeyData

type KeyData struct {
	Name      string
	Modifiers key.Modifiers
}

Jump to

Keyboard shortcuts

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