node

package
v0.1.103 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainNode

type ChainNode interface {
	Node

	//NodeKind identifies the type of modifier node.
	Kind() NodeKind

	// Bitset of phases a node cares about.
	Phases() Phases

	// Attach is called when the node is attached to a node tree
	Attach(node TreeNode)

	// Detach is called when the node is detached from a node tree
	Detach()

	// Next returns the next node in the chain
	Next() ChainNode

	// SetNext sets the next node in the chain
	SetNext(node ChainNode)
}

func NewChainNode

func NewChainNode(
	id NodeID,
	kind NodeKind,
	phases Phases,
	onAttach func(node TreeNode),
	options ...NewChainNodeOption,

) ChainNode

type ModifierNode

type ModifierNode interface {
	ChainNode
}

type NewChainNodeOption

type NewChainNodeOption func(options *NewChainNodeOptions)

func NewChainNodeWithNextNode

func NewChainNodeWithNextNode(nextNode ChainNode) NewChainNodeOption

func NewChainNodeWithOnDetach

func NewChainNodeWithOnDetach(onDetach func()) NewChainNodeOption

type NewChainNodeOptions

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

type Node

type Node interface {
	GetID() NodeID
}

type NodeID

type NodeID = idApi.Identifier

compose-identifier.api.Identifier

func NewNodeID

func NewNodeID() NodeID

type NodeKind

type NodeKind uint16

NodeKind identifies the type of modifier node. These are bit flags that can be combined.

const (
	NodeKindAny NodeKind = 1 << iota
	NodeKindLayout
	NodeKindDraw
	NodeKindSemantics
	NodeKindPointerInput
	NodeKindLocals
	NodeKindParentData
	NodeKindLayoutAware
	NodeKindGlobalPositionAware
	NodeKindIntermediateMeasure
	NodeKindFocusTarget
	NodeKindFocusProperties
	NodeKindFocusEvent
	NodeKindKeyInput
	NodeKindRotaryInput
	NodeKindCompositionLocalConsumer
)

func (NodeKind) String

func (nk NodeKind) String() string

type NodePath

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

func NewNodePath

func NewNodePath(ids []NodeID) NodePath

func (NodePath) String

func (np NodePath) String() string

func (NodePath) Unwrap

func (np NodePath) Unwrap() []NodeID

type Phases

type Phases uint8

Bitset of phases a node cares about.

const (
	LayoutPhase Phases = 1 << iota
	DrawPhase
	PointerInputPhase
)

type TreeNode

type TreeNode interface {
	Node

	Children() []TreeNode
}

Jump to

Keyboard shortcuts

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