Make d-bus available to orca if someone decides they want to implement it.

This commit is contained in:
Storm Dragon committed 2026-10-12 04:37:12 -04:00
1 parent c3e981b4c2
commit 0f59809e9a
11 files changed
+374 -39

No files matched your search

+66 -5
View File
@@ -1,7 +1,9 @@
# Wine Access
`wine-access` is the standalone Wine-hosted accessibility helper for Cthulhu
and other readers that implement the Cthulhu D-Bus service.
and readers that implement its Wine D-Bus protocol. An Orca endpoint is
available for future Orca-side integration; stock Orca does not implement
the required Wine methods.
It provides two independent capabilities:
@@ -12,7 +14,8 @@ It provides two independent capabilities:
The compatibility window is hidden and non-activating. It is expected to be
invisible; the important endpoint is the local Wine RPC server registered by
the helper. The helper forwards speech, braille, cancellation, and standard
control events to `org.stormux.Cthulhu1.Service` on the session D-Bus.
control events to the selected reader on the session D-Bus. The default is
`org.stormux.Cthulhu1.Service`.
The executable is named `cthulhu-wine-access.exe` for compatibility with the
Cthulhu-Go supervisor.
@@ -86,8 +89,66 @@ $HOME/.local/libexec/cthulhu/wine/cthulhu-wine-access.exe
```
The helper is started automatically when Cthulhu-Go detects an active Wine
loader for the same user and prefix. It requires the Go service to be running;
it exits if `org.stormux.Cthulhu1.Service` is unavailable.
loader for the same user and prefix. It requires the selected reader service
to be running; it exits if that service is unavailable.
## Reader selection and Orca integration
The default invocation and `--reader cthulhu` use the existing Cthulhu endpoint.
An Orca-side integration can launch the helper in the application's Wine prefix:
```sh
WINEPREFIX=/path/to/prefix /path/to/cthulhu-wine-access.exe --reader orca
```
| Reader | Session bus name and interface | Object path |
| --- | --- | --- |
| Cthulhu (default) | `org.stormux.Cthulhu1.Service` | `/org/stormux/Cthulhu1/Service` |
| Orca | `org.gnome.Orca1.Service` | `/org/gnome/Orca1/Service` |
Selection applies to controller requests, accessibility events, review
registration and review-capture authorization. Only one helper runs per Wine
desktop/prefix, so stop the existing helper before changing readers. There is
no automatic switching between services. Unknown or missing reader values
are rejected. Orca must arrange helper startup and shutdown itself.
The Orca endpoint follows the versioned service in Orca's `dbus_service.py`.
It uses the same Wine methods and signatures as Cthulhu, on the selected
service interface:
| Method | Input signature | Output signature |
| --- | --- | --- |
| `SpeakText` | `sb` (text, interrupt) | `b` |
| `CancelSpeech` | empty | `b` |
| `BrailleMessage` | `s` (text) | `b` |
| `SpeakSsml` | `ss` (source, SSML) | `i` (Windows status code) |
| `PresentAccessibleEvent` | `sssssssiis` | `b` |
| `RegisterWineReviewProvider` (optional) | `ou` (provider path, version) | `b` |
| `PresentWineReviewFocus` (optional) | `ssstssb(iiii)` | `b` |
Boolean replies indicate whether the reader accepted the request. The helper
queues plain controller speech with `interrupt=false`; Tolk requests
interruption separately through `CancelSpeech`. An unsupported `SpeakSsml`
implementation should return `ERROR_CALL_NOT_IMPLEMENTED` (120).
`PresentAccessibleEvent` arguments are source ID, event type, name, role,
value, states, description, position, count and window title, in that order.
The reader handles focus tracking, event filtering and presentation; preserve
repeated editor actions and exclude password values as described below.
Orca's existing `SpeakMessage` and `DisplayMessage` methods have different
names/signatures. Wine Access does not translate to those methods. An Orca
contributor must implement the Wine methods above for the capabilities they
want to enable. `--no-controller` and `--no-dialog-reader` can disable either
capability while bringing up the integration.
Review retains the shared `/org/stormux/Cthulhu1/WineReview` object path and
`org.stormux.Cthulhu1.WineReview` interface for both readers. Use the helper's
unique D-Bus sender from `RegisterWineReviewProvider` as the destination for
`CaptureWindow`. Only the current same-user owner of the selected reader
service may capture; owning the other reader name grants no access. See
[the flat-review contract](#independent-wine-flat-review) for focus arguments,
capture replies and limits. Missing review methods leave ordinary control and
controller forwarding available.
When a game closes inside a Wine virtual desktop, the desktop can regain X11
focus while Wine has no foreground application. The helper restores native
@@ -254,7 +315,7 @@ Protocol version 1 adds `RegisterWineReviewProvider(ou) -> b` and
`PresentWineReviewFocus(ssstssb(iiii)) -> b` to the reader service. The helper
exports `/org/stormux/Cthulhu1/WineReview`, interface
`org.stormux.Cthulhu1.WineReview`, with `CaptureWindow(sst) -> a{sv}`. Only the
current same-user reader service owner can capture. Replies contain exactly
current same-user owner of the selected reader service can capture. Replies contain exactly
`version:u`, `instance:s`, `window:s`, `focus:s`, `revision:t`, `status:s`,
`bounds:(iiii)`, and `nodes:aa{sv}`. Nodes have `id`, `parent`, `role`, `name`
strings; `protected`, `visible`, `text_known`, `caret_known` booleans;