Aura Kelloniemi, le sam. 27 mars 2021 01:14:13 +0200, a ecrit: > On 2021-03-26 at 22:51 +0100, Samuel Thibault <[email protected]> > 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?
If you pass UTF-8 text to brlapi_writeText while the locale is non-UTF-8 it will get a bogus result, as expected. There is also brlapi_writeWText which just takes a wchar_t *, so independent of the locale. We could add a brlapi_writeUTF8Text if needed. > How does the charset field in brlapi_writeArguments_t work? What kind of > charset names it understands? It is anything that iconv supports. > > > - 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 will, yes. > > > - 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 For these there is actually a const qualifier which means that they are not to be passed to free(). I'll add a comment to make it clear. > Additional questions: > - What is the displayNumber field in brlapi_writeArguments_t? Basically left for any future case where there could be several displays on the same device. > - What happens if I replace my display with another unit with a different size > while BrlAPI clients are running? You will see a parameter update for the display size. > - Could the BRLAPI_ERROR_... constants form an enum type, or would it break > something? We could do this indeed, we'd still need to define the macros in case some existing code depends on that. Samuel _______________________________________________ This message was sent via the BRLTTY mailing list. To post a message, send an e-mail to: [email protected] For general information, go to: http://brltty.app/mailman/listinfo/brltty
