[BRLTTY] Low-level BrlAPI questions
Aura Kelloniemi
kaura.dev at sange.fi
Fri Mar 26 19:14:13 EDT 2021
Hi list,
Thanks for the fixes Samuel!
On 2021-03-26 at 22:51 +0100, Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
> Aura Kelloniemi, le ven. 26 mars 2021 22:45:43 +0200, a ecrit:
> > - What is the best way to write to the display if the input text is always
> > UTF-8 encoded? (This is how Rust's strings work).
> You can just emit UTF-8.
Byt what happens if the user's locale uses some other charset and I write with
brlapi__writeText?
How does the charset field in brlapi_writeArguments_t work? What kind of
charset names it understands?
> > - What is the intended use of enterTtyModeWithPath?
> It is meant for screen readers, that take control of a whole desktop.
> For more rationale, see the “A pile of "paper sheets"” section of the
> brlapi documentation.
Will the given tty path be prepended by tty numbers from other sources – e.g.
the WINDOWPATH environemnt variable?
> > - It is not always clear who owns the data returned by BrlAPI functions.
> For which function is this not clear?
- brlapi__openConnection: it manipulates the settings struct passd as
parameter
- brlapi_strerror
- Possibly some others, but I haven't found them yet
I have digged information from the client source, but it would be good to
get it documented.
> > To me it looks like brlapi_error_location allocates new memory for
> > each thread, but it is never freed.
> It uses pthread_once(&error_key_once, error_key_alloc); that calls
> pthread_key_create(&error_key, error_key_free);
Yes, ok, great.
Additional questions:
- What is the displayNumber field in brlapi_writeArguments_t?
- What happens if I replace my display with another unit with a different size
while BrlAPI clients are running? (Assuming that the same BRLTTY instance
finds the new display and takes control of it. I cannot test this now.)
- Could the BRLAPI_ERROR_... constants form an enum type, or would it break
something?
--
Aura
More information about the BRLTTY
mailing list