Provide fresh Wine review snapshots and 32-bit Edit hooks
Expose visible Wine window text to the matching Go reader's independent keypad review commands, and extend standard Edit feedback to 32-bit programs such as MUSHclient without requiring 32-bit Linux GLib/Winelib libraries. Add lifetime-aware instance/window/control identities and bounded capture of standard Edit text, button/static captions, native ListBox/ListView items, and usable MSAA text. Preserve focus, caret, selection, scrolling, and the clipboard. Exclude hidden/password content before retrieval, retain both rune and UTF-16 offsets, clip visible ranges, and reject changing or oversized sources rather than returning incomplete text as a full snapshot. Export CaptureWindow on the version-1 WineReview D-Bus interface. Register with the current reader service owner and publish copied focus metadata. Authorize capture only for the current same-user owner. Use a dedicated GLib dispatcher and separate COM worker with a 500 ms deadline, one active job and one pending job, bounded payloads, and explicit stale/busy/limited/ unavailable replies. Keep menu and focus forwarding responsive when an MSAA provider stalls; retain ordinary feedback with older readers. Read the actual X11 geometry associated with Wine HWNDs using bounded XCB queries and __wine_x11_whole_window. Translate virtual-desktop coordinates and recheck physical geometry before returning captured text. Link XCB in the helper/tests and declare libxcb in the Arch package dependencies. Build edit_hook.c into the 32-bit DLL and attach both menu and input hooks to the foreground 32-bit UI thread. Release both hooks on transitions or attachment failure. Keep Scintilla-specific hooks confined to 64-bit builds. Expand Edit integration checks with read-only multiline navigation and unsuccessful deletion, plus 32-bit editor/Windows Forms lifecycle support. Add 32-bit/64-bit native capture fixtures, wire-protocol integration checks, and design/implementation documents. Document exact schema, capture limits, installation dependencies, compatibility, and live acceptance procedures. Validation during commit preparation: - git diff --check passed. - cmake --build build --parallel passed. - CTest could not start because xvfb-run is unavailable in this environment. - Further tests were skipped at the user's request; capture, protocol, and menu/editor integration tests were not run during commit preparation. Live speech and physical braille checks remain necessary, including review without moving the native caret, incoming output, plugin dialogs, and return to Linux/Fenrir. Custom painted output requires an accessible provider; RichEdit/Scintilla capture, semantic object review, Say All, typing echo, and native Wine braille routing remain unsupported by this protocol.
This commit is contained in:
1 parent
872388a59b
commit
a8cb350467
21 files changed
+2401
-38
No files matched your search
+47
-4
@@ -1,5 +1,32 @@
|
||||
# Wine control integration
|
||||
|
||||
## Wine flat-review capture
|
||||
|
||||
Build the helper and run `ctest --test-dir build --output-on-failure` on a
|
||||
private display. The review fixture covers both architectures: visible Edit
|
||||
text, Unicode offsets before the viewport, wrapping/blank lines, an empty
|
||||
focus anchor, hidden/password exclusion, password transitions before copying,
|
||||
clipping, same-length Edit/ListBox/ListView races, native ListView cells,
|
||||
negative coordinates, source limits and unchanged focus/selection.
|
||||
|
||||
Run `python3 tests/review_integration.py --build-dir build` and its `--32-bit`
|
||||
variant sequentially. These exercise the exact wire types, actual-owner
|
||||
authorization, deadline/busy behavior, blocked-provider focus feedback,
|
||||
shutdown and older-reader compatibility. The matching reader's
|
||||
`tests/wine_review_x11.py` drives physical XTest keycodes through its real
|
||||
command router, D-Bus registry and speech/braille queues. Run its Go test with
|
||||
`CTHULHU_WINE_REVIEW_BUILD=/absolute/build` and
|
||||
`go test ./internal/app -run NativeWineReviewPhysicalKeys -count=1 -v` on a
|
||||
private session/display; add `CTHULHU_WINE_REVIEW_32=1` for a 32-bit application.
|
||||
|
||||
Recorded output proves queued text and input consumption, not audible speech
|
||||
or physical braille. In MUSHclient, focus the plugin's output text window and
|
||||
check current/previous/next line, words, characters, spelling/phonetics and
|
||||
window boundaries. Confirm review does not move the native caret; then confirm
|
||||
ordinary arrows and newly arriving game output still work. Check plugin
|
||||
dialogs and return to Linux/Fenrir. Custom painted output needs the output
|
||||
plugin; this protocol supplies no native braille routing or Say All.
|
||||
|
||||
Build the project, then run `python3 tests/menu_integration.py --build-dir build`
|
||||
from the repository root in a graphical session. Dependencies are Wine,
|
||||
MinGW's x86_64 and i686 C compilers, PyGObject, and `dbus-run-session`.
|
||||
@@ -35,8 +62,8 @@ and that normal control reading resumes afterward. Test multiple Wine prefixes
|
||||
and reader shutdown separately. Automated event recording does not establish
|
||||
live listening or physical braille acceptance.
|
||||
|
||||
32-bit hook support, entirely custom menus without `WM_MENUSELECT`, and full
|
||||
object review are outside the current implementation.
|
||||
Entirely custom menus without `WM_MENUSELECT` and full object review are outside
|
||||
the current implementation.
|
||||
|
||||
## BARD Express managed menus
|
||||
|
||||
@@ -83,6 +110,10 @@ a private X display:
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit --late-helper
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit --restart-helper
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit --32-bit
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit --32-bit --late-helper
|
||||
python3 tests/menu_integration.py --build-dir build --fixture edit --32-bit --restart-helper
|
||||
python3 tests/menu_integration.py --build-dir build --fixture winforms --32-bit
|
||||
python3 tests/menu_integration.py --build-dir build --fixture notepad
|
||||
```
|
||||
|
||||
@@ -90,7 +121,9 @@ The standard Edit fixture checks focus, characters/words/lines, incremental
|
||||
selection and unselection, Backspace/Delete/Clear, read-only controls, password
|
||||
exclusion, surrogate pairs, rapid repeated letters, menu return at the caret,
|
||||
short replacements, CRLF deletion, long-line truncation, Undo snapshots, and
|
||||
Ctrl+End line reading. Lifecycle variants attach after the control has focus or
|
||||
Ctrl+End line reading, and Up/Down navigation in a read-only multiline output
|
||||
control. Both 32-bit and 64-bit fixtures use the same assertions. Lifecycle
|
||||
variants attach after the control has focus or
|
||||
restart the helper without closing it. Every text action must have an established
|
||||
focus source, matching the Go reader's filtering contract.
|
||||
|
||||
@@ -100,6 +133,16 @@ checks resulting document text as well as recorded accessibility output. These
|
||||
tests use a recording D-Bus service; they do not run the full reader or prove
|
||||
audible speech, typing echo, physical keys, or a physical braille display.
|
||||
|
||||
For live MUSHclient acceptance, install the helper and reopen MUSHclient so the
|
||||
updated 32-bit DLL can load. In the command field, check Left/Right and
|
||||
Ctrl+Left/Right feedback without submitting a command. Use Ctrl+Tab to reach
|
||||
the read-only output notepad supplied by the Aardwolf review-buffer plugin;
|
||||
check Up/Down line reading and Left/Right characters there, then return to
|
||||
the command field. Check plugin menus and dialogs still work, and repeat after
|
||||
restarting the reader. These hooks provide caret feedback; independent review
|
||||
commands use the optional flat-review protocol described above. Native braille
|
||||
routing into Wine text remains unsupported.
|
||||
|
||||
The earlier 2026-10-10 helper fixtures and Go package tests did not establish
|
||||
that Go accepted editor `text` events. The reader follow-up adds that support,
|
||||
focused name/state handling, repeated-action and password/focus tests, and a
|
||||
@@ -222,7 +265,7 @@ synthetic accessibility events, button roles, return to the checked row,
|
||||
and empty-list state reset. The existing 32-bit plain-list regression also
|
||||
passed. These are private D-Bus recordings; audible GoldWave speech and
|
||||
physical braille remain a live acceptance check after installing the helper
|
||||
and restarting Cthulhu. The fix does not add 32-bit menu or editor hooks.
|
||||
and restarting Cthulhu. List queries are independent of the menu/editor hooks.
|
||||
|
||||
## Native tabs, trees and named clients
|
||||
|
||||
|
||||
Reference in new issue
Block a user