[BRLTTY] Low-level BrlAPI questions

Samuel Thibault samuel.thibault at ens-lyon.org
Sun May 9 05:36:44 EDT 2021


Dave Mielke, le dim. 09 mai 2021 05:24:11 -0400, a ecrit:
> [quoted lines by Samuel Thibault on 2021/05/09 at 11:04 +0200]
> 
> >But for all bindings that will be returned as an array of two elements.
> 
> I don't think that's a good assumption. Why should we impose constraints on any set of bindings that can offer a better way?

If they wish to do better, ok why not, but by default we'll probably
want to have something coherent.

> Some bindings might wish to use a list rather than an array.

If bindings want to return a list, fine for them, "array" is just a word
for the brlapi protocol, it can be expressed whichever way is fine for
bindings.

I just mean that "array" in brlapi means that the bindings is supposed
to expose something that can hold several values, *even if there is only
one value to expose*.

> They can still ignore isArray and assume an array if count is greater than 1.

That's were distorsion starts to begin, I don't think we want this.

> >Just like for for BRLAPI_PARAM_COMPUTER_BRAILLE_ROWS_MASK we will return
> >an array of 544 elements, and for BRLAPI_PARAM_COMPUTER_BRAILLE_ROW_CELLS
> >an array of 256 elements.
> 
> Yes, because those are fixed sizes.

Just like the display size if of fixed size.

> There are other arrays, however, for which the count is 0 because the returned size is unknown, i.e. it's variable.

And bindings can still return them as arrays. Returning different types
for different cases will confuse programmers, I don't think we want
that.

Samuel


More information about the BRLTTY mailing list