Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,29 @@ Every user-visible change, newest first. Pre-1.0 the minor number carries new su
carries fixes. The section for a tag is what the GitHub release publishes, so the two cannot say
different things.

## [Unreleased]
## [0.4.3] — unreleased

### Added

- **CUI is now at `6e6b353`, 148 commits past 1.4.0**: 36 new functions, 32 new structs, and the new
Creative controls header section; the existing Voice section gains its widgets. Every function has a decided status in
`bindings/coverage.txt`: 532 functions, 0 pending.
- **The creative controls** (gallery page *Creative controls*): `ui.StatusTag` with the eight states,
`ui.RatioSlider`, `ui.GradientSlider` (hue, white balance, opacity, and a `ref Color` under the
thumb), `ui.StepSlider`, `ui.PaletteStrip`, `ui.AspectPicker`, `ui.OptionAction`, `ui.SeedField`
and `ui.PatternMeter`. `ui.SkeletonGroup` takes a body, `ui.Veil` opens and closes around one.
- **Live collaboration** (gallery page *Collaboration*): `ui.PresencePill`, `ui.LiveCursors`,
`ui.SelectionRing`, `ui.SelectionBar`, `ui.ResultCard`, `ui.CanvasControls` and `ui.FormatBar`,
built on `LiveUser`, `SelectionAction`, `NodeView` and `TextFormat`.
- **Voice** (gallery page *Voice*): `ui.VoiceWave` (with `ref float progress` for a clip you can
seek), `ui.VoiceNote` over a `VoiceNoteState`, `ui.VoiceSession`, `ui.TypingIndicator`,
`ui.StatusSpinner`, and `CuiVoice.Resample(levels, columns)` for keeping a short waveform without
a frame. `CuiVoice.Silent` is CUI's "no audio at all" level.
- **`ui.SetClipboard(text)` and `ui.GetClipboard()`** wrap the platform clipboard CUI added: the
text is copied out of frame memory, so it stays valid after the frame.
- **Seven new data records**: `Aspect`, `MeterPart`, `SelectionAction`, `LiveUser`, `TextStyle`,
`TextFormat` and `VoiceNoteState`. A widget that writes its state back takes that record `ref`.

- **`dotnet cui session --script <file>`** names the command file instead of relying on `<` input
redirection, which Windows PowerShell does not have. Stdin still works in a POSIX shell.
- **`dotnet cui doctor`** checks this tool's version and API catalog against the CuiSharp version
Expand All @@ -28,6 +47,27 @@ different things.

### Changed

- **`ui.Treemap` gains `ref int selected`**, with a null-pointer overload preserving display-only
calls. `ui.Sankey` gains one optional node color per node.
- **`ui.CanvasControls`, `ui.PaletteStrip` and `ui.SelectionBar` are hand-written** to own and copy
back the per-item flags. Palette colors and lock flags must have equal lengths; without a seed,
Shuffle reports the press but leaves colors unchanged. Selection clear returns -2, no action -1.
- **CUI adds `cui_spinner_ex` but retains `cui_spinner`**: `ui.Spinner(size)` still compiles, with
styles available in `SpinnerOpts`. `GanttTask` gained `State`, `GaugeBand` gained `Name`.
- **Short option arrays throw before native can read past them.** This covers toolbar labels,
step labels, voice owners and sankey node colors. The step range is normalized as in CUI before
checking labels, and an overflowing native stop count is rejected even without labels.
- **Native flag results are typed**: `WellEvents`, `FormatEvents`, `CanvasEvents`,
`VoiceSessionEvents`, and the voice note's shared `PlayerEvents`.
- **Record write-back preserves caller-owned const arrays**, including a voice note's waveform.
`CuiVoice.Resample` rejects overlapping input/output rather than corrupting unread samples.
- **The API-diff helper compares complete header snapshots**, so a moved declaration is not a new
function and a reformatted typedef is not a removed/new struct. Parenthesized compatibility
declarations such as `(cui_spinner)` remain visible.
- **Measured budgets move explicitly**: gallery AOT 3 177 984 B (ceiling 3.20 MB), real-time chart
0.94 ms mean with 0 B/frame (ceiling 1.00 ms). Alternating runs against an isolated old-pin build
confirm a roughly 14% frame regression; its cause is not yet profiled, not dismissed as noise.
The three new gallery pages are independently tested at 0 B/frame.
- **`HttpMethod` is now `HttpVerb`.** The old name collided with `System.Net.Http.HttpMethod` in
every app that also made an HTTP request. `RequestBar` and `CuiHttp.MethodName` take `HttpVerb`;
the generated C binding is unchanged.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- Package metadata, inherited by every packable project. -->
<PropertyGroup>
<Version>0.4.2</Version>
<Version>0.4.3</Version>
<Authors>yappologistic</Authors>
<Copyright>Copyright (c) 2026 yappologistic</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,12 @@ What changed, per version: [CHANGELOG.md](CHANGELOG.md).

## Status

Pre-1.0: the API may still change. The binding covers all 496 CUI 1.4 functions: 170 option
structs, 104 records, 277 generated wrappers, 175 deliberate hand-written ones, 4 excluded with a
written reason, 4 variadic skipped, 0 pending — see [bindings/coverage.txt](bindings/coverage.txt).
The gallery's 29 pages walk the components section by section, light and dark; what is still missing
is the page shape that needs a device — a capture pipeline, an audio stream.
Pre-1.0: the API may still change. The binding covers all 532 CUI functions as of `6e6b353`, the last
148 commits after 1.4.0: 194 option structs, 111 records, 302 generated wrappers, 181 deliberate
hand-written ones, 6 excluded with a written reason, 4 variadic skipped, 0 pending — see
[bindings/coverage.txt](bindings/coverage.txt). The gallery's 32 pages walk the components section by
section, light and dark; what is still missing is the page shape that needs a device — a capture
pipeline, an audio stream.

## License

Expand Down
8 changes: 4 additions & 4 deletions bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ retained-pointer storage.
| `src/CuiSharp/Ui/Records.g.cs` | Data records used as array items (`Choice`, `Command`, `TableColumn`, `TableSort`): friendly constructor, `ToNative()`, and `FromNative()` where write-back is meaningful. |
| `src/CuiSharp.Tests/OptionMappings.g.cs` | One consolidated test covering every generated option's populated fields, sentinel and null/false defaults. A swapped field is a single generator bug, so it is one test, not one per option. |

Current state: **170** option structs, **104** data records, **277** generated wrappers, **175**
deliberate hand-written ones, **4** excluded, **4** variadic skipped, **0** pending — 496 C
Current state: **194** option structs, **111** data records, **302** generated wrappers, **181**
deliberate hand-written ones, **6** excluded, **4** variadic skipped, **0** pending — 532 C
functions, every one with a status. `pwsh skills/cui-sync/scripts/sync-status.ps1` prints these
numbers from `coverage.txt` and fails when the prose here or in `README.md` disagrees. Pointer-heavy options are withheld rather than exposed with guessed
ownership. Charts, texture handles, text-buffer inputs and reorder are hand-written on purpose, and
Expand Down Expand Up @@ -67,7 +67,7 @@ and missing reasons fail generation.
| `optionFieldNames` | `name`, `why` | Combined-word casing, e.g. NoWrap / AutoFocus. |
| `parameterDefaults` | `value`, `why` | Defaults not described by the signature, e.g. Heading level 2. |
| `injectedFields` | `type`, `why` | Internal native value provided by a wrapper, not a public dangling address. TableSort remains wrapper-owned. |
| `parameterStorage` | `storage`, `why` | `frame` for ref primitives whose addresses native code retains; `value` for native records converted through `UiMarshal` and written back. |
| `parameterStorage` | `storage`, optional `type`, `why` | `frame` for ref primitives whose addresses native retains; `value` converts records and writes back state while preserving caller-owned const arrays; `enum` exposes a typed enum over a C int pointer. |
| `scopes` | `end`, `clicked`, `why` | Non-standard pairs, or a bool that means clicked rather than open. |
| `recordNames` | `name`, `why` | Native structs used as `const T *` array items, e.g. `cui_choice` to `Choice`. |
| `outParams` | `why` | Parameters the header documents as filled in; the wrapper takes `out` instead of `ref`. |
Expand All @@ -80,7 +80,7 @@ and missing reasons fail generation.
| `capacityParams` | `array`, `why` | An `int capacity` the widget writes up to, where the array's length is that number. The wrapper passes the span's length and the parameter leaves the signature: supplying both lets them disagree, and the widget writes past the caller's array. |
| `textFields` | `capacity`, `why` | A `char * buf` pair the caller sees as one `ref string`; the wrapper rents a pooled buffer and reads the text back only when it changed. |
| `optionPointers` | `type`, `why` | An option field that is a pointer to a primitive (`int *`, `_Bool *`), exposed as a `ref` parameter. |
| `optionArrayChecks` | `atLeast`, `why` | An option array whose length is a widget parameter; the wrapper rejects a short array before the call. |
| `optionArrayChecks` | `atLeast`, optional `prepare`, `why` | An option array whose length is a widget parameter; the wrapper rejects a short array before the call. |
| `scopeResults` | `type`, `out`, `why` | A `begin` whose `end` reports a value: the wrapper emits the body overload and returns it. |
| `stringResults` | `why` | A function that returns a C string; the wrapper copies it. |
| `excludedFunctions` | `why` | One C function deliberately not wrapped: the pure helpers (diff computation, date maths, the log writer) belong in a static API, not on a frame-local `Ui`. |
Expand Down
Loading
Loading