Consolidate shared UI, hardware transport, and translation tooling
This commit is contained in:
1 parent
ed6951f4cd
commit
2c612de63b
61 files changed
+2417
-1573
No files matched your search
@@ -14,7 +14,13 @@ translate labels and what to do when an emoji is selected.
|
||||
Import `git.stormux.org/storm/screenreader-common/emoji` and call
|
||||
`emoji.Categories()` to build a reader-specific picker.
|
||||
|
||||
The module targets Go 1.24 or newer and has no external dependencies.
|
||||
The module targets Go 1.27.2 or newer, matching Fenrir and Cthulhu. Its one
|
||||
external dependency is `github.com/leonelquinteros/gotext`, used by `i18n`.
|
||||
|
||||
`i18n` loads a reader's gettext catalogs (installed, then bundled, per
|
||||
language) and `i18n/catalogtool` extracts, merges and checks them; each
|
||||
reader's `tools/translations` command supplies its domain and rules. See
|
||||
[TRANSLATIONS.md](TRANSLATIONS.md).
|
||||
|
||||
## Quick settings
|
||||
|
||||
@@ -29,11 +35,11 @@ the selected entry disappeared so a reader can refuse to change a different
|
||||
setting by mistake. `MessageIDs` lists the menu's own English messages for
|
||||
translation catalogs.
|
||||
|
||||
`voiceprofiles` supplies the shared Voice profile quick setting: `Quick_options`
|
||||
`voiceprofiles` supplies the shared Voice profile quick setting: `QuickOptions`
|
||||
lists "Default" for the saved voice, then each profile, and adds "Custom" only
|
||||
while the current voice matches neither. These helpers are available starting
|
||||
with v0.7.0. `Quick_choice` reports the current
|
||||
choice and `Quick_profile` resolves a selection. Readers pass the voice that
|
||||
while the current voice matches neither. These helpers were introduced in v0.7.0 and use the names shown here
|
||||
starting with v0.8.0. `QuickChoice` reports the current
|
||||
choice and `QuickProfile` resolves a selection. Readers pass the voice that
|
||||
"Default" restores, such as the focused application's saved voice.
|
||||
|
||||
Both readers store rate, pitch and volume on Speech Dispatcher's -100..100
|
||||
@@ -67,7 +73,7 @@ checks. Leave submission to the contributor after their review and testing.
|
||||
|
||||
The shared quick menu and validated discovery API are available starting with
|
||||
v0.5.0. Shared translation message ID lists are available starting with v0.6.1.
|
||||
Both readers pin v0.7.0 for standalone builds.
|
||||
Both readers pin v0.8.0 for standalone builds.
|
||||
|
||||
## License
|
||||
|
||||
@@ -90,7 +96,7 @@ Entries support Unicode caret movement, Control+Left/Right word movement,
|
||||
Shift selection, select-all, and host-mediated copy/cut/paste. The host must
|
||||
write the clipboard successfully before deleting a cut selection. Password
|
||||
fields mask speech and braille, refuse copy/cut, and drop their text references
|
||||
on Close. Values and Focused_control may contain plaintext secrets: use them
|
||||
on Close. Values and FocusedControl may contain plaintext secrets: use them
|
||||
only for submission, never generic logging or persistence. Go strings do not
|
||||
provide guaranteed memory erasure. Clipboard I/O remains a host operation.
|
||||
Fenrir uses its clipboard history; Cthulhu uses its existing desktop clipboard.
|
||||
@@ -102,12 +108,11 @@ control behavior. Hosts call Close on cancellation, replacement and shutdown;
|
||||
the toolkit closes itself on Escape. Sessions belong to one event-loop/worker
|
||||
and must not be accessed concurrently without external serialization.
|
||||
|
||||
`interaction` translates the existing Cthulhu form protocol into this toolkit,
|
||||
retaining JSON kinds and external input limits. Its NewUnifiedSession exposes
|
||||
rich forms to core reader features; Cthulhu's OpenUI returns typed Controls
|
||||
keyed by page.control and preserves local-only authorization. The old
|
||||
`interaction/tabbed` import is a compatibility alias. Neither adapter contains
|
||||
an independent widget engine. Fenrir imports internalui through its local
|
||||
Starting with v0.8.0, the former `interaction` and `interaction/tabbed` packages
|
||||
and the underscore-named `internalui` methods are removed. Use
|
||||
`internalui.NewSession(form, messages)` and the Go-style methods directly.
|
||||
Cthulhu builds internalui forms directly and converts its Tentacle form
|
||||
protocol in `internal/tentaclewire`. Fenrir imports internalui through its local
|
||||
localization adapter. New widgets belong in internalui, so either reader can
|
||||
use them without another implementation. No date picker or general table
|
||||
widget is included yet; external application table reading is separate.
|
||||
@@ -194,10 +199,24 @@ Hardware commands use the previously tested Fenrir mapping in both readers.
|
||||
DECtalk rate spans 75/180/650 and pitch spans 50/122/350 at minimum/midpoint/maximum;
|
||||
volume uses `dv g5` from 60 to 86. Cthulhu converts its legacy saved 0..99 rate
|
||||
and 0..9 pitch/volume values at the boundary. It no longer has a separate
|
||||
DECtalk encoding. Port opening, serial/USB I/O, flush timing and cancellation
|
||||
synchronization remain the responsibility of the device-owning reader.
|
||||
DECtalk encoding.
|
||||
|
||||
These additions are available starting with v0.4.0. Both readers pin v0.7.0
|
||||
- `hardware/transport`: opening and driving the device. `transport.Open` takes
|
||||
a driver ID (`dectalk`, `dectalk-usb`, `litetalk`, `doubletalk`,
|
||||
`tripletalk`), a serial path and a baud rate (0 selects 9600). Serial ports
|
||||
are opened raw, locked exclusively so two readers cannot share one synth, and
|
||||
restored on close; DECtalk serial uses XON/XOFF. DECtalk USB finds a single
|
||||
0dd0:2001 device through libusb, loaded at runtime with `dlopen`, so the only
|
||||
build flag is `-ldl` and no libusb headers are needed. `Port.Write` checks a
|
||||
cancellation callback between 64-byte packets and `Port.Cancel` sends the
|
||||
immediate command without waiting behind a blocked write, including during
|
||||
an XOFF pause. The package needs Linux and cgo; other builds compile and
|
||||
return `transport.ErrUnsupported`. Speech queues, settings caches and
|
||||
generation tracking remain in each reader. The USB tests use a fake libusb
|
||||
built from `testdata/usb_fixture.c` and need a C compiler, not hardware.
|
||||
|
||||
The protocol and presentation helpers are available starting with v0.4.0;
|
||||
`hardware/transport` is available starting with v0.8.0. Both readers pin v0.8.0
|
||||
for standalone builds. Verify pinned dependencies with `GOWORK=off`;
|
||||
physical keyboard, audible speech, braille, and hardware acceptance remain
|
||||
separate live checks.
|
||||
@@ -206,7 +225,7 @@ separate live checks.
|
||||
|
||||
`voiceprofiles` supplies the shared primary-voice preset model, collection
|
||||
validation/copying, automatic names with duplicate rejection, management-tab
|
||||
controls, and editor forms for software and hardware speech. `Editor.Refresh_session` maintains
|
||||
controls, and editor forms for software and hardware speech. `Editor.RefreshSession` maintains
|
||||
module/language/voice dependencies in the shared UI toolkit; native GTK hosts
|
||||
use the same form and dependent-control updates. Catalog discovery, native
|
||||
widget rendering, speech preparation/rollback and atomic settings persistence
|
||||
@@ -214,9 +233,9 @@ remain host responsibilities. Existing echo and message voice policies remain
|
||||
with each reader. A preset stores only primary speech transport/voice/numeric
|
||||
settings and never modifies unrelated preferences.
|
||||
|
||||
`internalui.Session.Focus_control` restores a control when a child editor
|
||||
`internalui.Session.FocusControl` restores a control when a child editor
|
||||
returns to its parent form. `quicksettings.Option.Literal` preserves user-chosen
|
||||
profile names without translation. These APIs are available starting with v0.6.0;
|
||||
both readers pin v0.7.0 for standalone builds. Run `go test -race ./...` here and the
|
||||
both readers pin v0.8.0 for standalone builds. Run `go test -race ./...` here and the
|
||||
consumer settings/speech regressions with `GOWORK=off` in both readers. The
|
||||
sibling workspace supports local development without machine-specific replaces.
|
||||
Reference in new issue
Block a user