# yuiInputState

A yui input state record carrying regions, pointerCaptureNodeId, pointerCaptureId, hoverNodeId, pressedNodeId, and related state.

Last updated: 2026-09-09

Package: ui | Status: source-declared

Tags: cpu, method, source-example, thing, ui, yeho

Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.

```yh
external thing yuiInputState
```

- list of yuiInputRegion regions: Stores regions as list of yuiInputRegion.
- text pointerCaptureNodeId: Stores pointer capture node id as text.
- text pointerCaptureId: Stores pointer capture id as text.
- text hoverNodeId: Stores hover node id as text.
- text pressedNodeId: Stores pressed node id as text.
- int pressX: Stores press x as int.
- int pressY: Stores press y as int.
- int dragThreshold: Stores drag threshold as int.
- bool dragging: Stores dragging as bool.
- text diagnostic: Stores diagnostic as text.
- yuiInputState(int dragThreshold): Yui input state.
- AddRegion(yuiInputRegion region): Add region.
- Reconcile(yuiTree tree): Reconcile.
- CapturePointer(yuiTree tree, text nodeId, text pointerId) returns bool: Capture pointer.
- ReleasePointer(text pointerId) returns bool: Release pointer.
- RoutePointer(yuiTree tree, text eventKind, text pointerId, int x, int y, text cancelNode, text cancelPhase) returns yuiRoutedEventResult: Route pointer.
- RenderInputStateReport() returns text: Render input state report.

## Use yuiInputState

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using ui

// Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.
yuiInputState sample = yuiInputState(1)
Console.Log(Text.From(sample.pointerCaptureNodeId))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.AddRegion

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add region.
yuiInputState instance = yuiInputState(1)
yuiInputRegion argument_region = yuiInputRegion("node Id", 1, 1, 1, 1, 1, true)
instance.AddRegion(argument_region)
Console.Log("AddRegion completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-AddRegion-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.Reconcile

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Reconcile.
yuiInputState instance = yuiInputState(1)
yuiTree argument_tree = yuiTree("id")
instance.Reconcile(argument_tree)
Console.Log("Reconcile completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-Reconcile-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.CapturePointer

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Capture pointer.
yuiInputState instance = yuiInputState(1)
yuiTree argument_tree = yuiTree("id")
text argument_nodeId = "argument node Id"
text argument_pointerId = "argument pointer Id"
bool result = instance.CapturePointer(argument_tree, argument_nodeId, argument_pointerId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-CapturePointer-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.ReleasePointer

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Release pointer.
yuiInputState instance = yuiInputState(1)
text argument_pointerId = "argument pointer Id"
bool result = instance.ReleasePointer(argument_pointerId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-ReleasePointer-14 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.RoutePointer

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Route pointer.
yuiInputState instance = yuiInputState(1)
yuiTree argument_tree = yuiTree("id")
text argument_eventKind = "argument event Kind"
text argument_pointerId = "argument pointer Id"
int argument_x = 1
int argument_y = 1
text argument_cancelNode = "argument cancel Node"
text argument_cancelPhase = "argument cancel Phase"
yuiRoutedEventResult result = instance.RoutePointer(argument_tree, argument_eventKind, argument_pointerId, argument_x, argument_y, argument_cancelNode, argument_cancelPhase)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-RoutePointer-15 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInputState.RenderInputStateReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Render input state report.
yuiInputState instance = yuiInputState(1)
text result = instance.RenderInputStateReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinputstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiInputState/method-RenderInputStateReport-16 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/ui/interaction-routing.yh

AI training permission: https://demonhunterlabs.com/ai-use
