# yuiInvalidationTracker

A yui invalidation tracker record carrying surfaceId, surfaceArea, elements, invalidatedArea, generation, 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 yuiInvalidationTracker
```

- text surfaceId: Stores surface id as text.
- int surfaceArea: Stores surface area as int.
- list of yuiRenderElementState elements: Stores elements as list of yuiRenderElementState.
- int invalidatedArea: Stores invalidated area as int.
- int generation: Stores generation as int.
- text lastReason: Stores last reason as text.
- text diagnostic: Stores diagnostic as text.
- yuiInvalidationTracker(text surfaceId, int width, int height): Yui invalidation tracker.
- IndexOf(text id) returns int: Index of.
- AddElement(yuiRenderElementState element) returns bool: Add element.
- MarkElement(text id, bool measure, bool layout, bool paint) returns bool: Mark element.
- MarkAncestors(text id, bool layout, bool paint) returns bool: Mark ancestors.
- Invalidate(text id, text scope, text reason) returns bool: Invalidate.
- ConsumeFrame() returns yuiPartialRebuildReport: Consume frame.
- ElementReport(text id) returns text: Element report.

## Use yuiInvalidationTracker

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.
yuiInvalidationTracker sample = yuiInvalidationTracker("surface Id", 1, 1)
Console.Log(Text.From(sample.surfaceId))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.IndexOf

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Index of.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
text argument_id = "argument id"
int result = instance.IndexOf(argument_id)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-IndexOf-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.AddElement

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add element.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
yuiRenderElementState argument_element = yuiRenderElementState("id", "parent Id", yuiRenderBounds(1, 1, 1, 1))
bool result = instance.AddElement(argument_element)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-AddElement-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.MarkElement

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Mark element.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
text argument_id = "argument id"
bool argument_measure = true
bool argument_layout = true
bool argument_paint = true
bool result = instance.MarkElement(argument_id, argument_measure, argument_layout, argument_paint)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-MarkElement-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.MarkAncestors

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Mark ancestors.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
text argument_id = "argument id"
bool argument_layout = true
bool argument_paint = true
bool result = instance.MarkAncestors(argument_id, argument_layout, argument_paint)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-MarkAncestors-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.Invalidate

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Invalidate.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
text argument_id = "argument id"
text argument_scope = "argument scope"
text argument_reason = "argument reason"
bool result = instance.Invalidate(argument_id, argument_scope, argument_reason)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-Invalidate-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.ConsumeFrame

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Consume frame.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
yuiPartialRebuildReport result = instance.ConsumeFrame()
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-ConsumeFrame-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiInvalidationTracker.ElementReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Element report.
yuiInvalidationTracker instance = yuiInvalidationTracker("surface Id", 1, 1)
text argument_id = "argument id"
text result = instance.ElementReport(argument_id)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuiinvalidationtracker"
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--yuiInvalidationTracker/method-ElementReport-14 --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/render-30-invalidation.yh

AI training permission: https://demonhunterlabs.com/ai-use
