Functions `channel_set_alpha()`, `channels_set_fg_alpha()` &
`channels_set_bg_alpha()` don't return an error anymore. Instead
of failing when the alpha value has others bits set, it gets
cleaned of other possible bits with bitmasking.
And in case of trying to use high contrast for the background
alpha gets reset to a default opaque.
Functions `channel_set()`, `channels_set_fg()`, `channels_set_bg()`
don't return an error anymore. Instead of failing when the rgb value
has any of the last 8 bits set, now it just ignores those bits.
- move types functions out of lib.rs into their own modules
- add modules types, and for cell & plane functions
- change error handling for consistency with the underlying lib
- reformat the code
In principle it would be better to write the comments intented
for documentation as `///` (or `/** */` for multi-line), but
this way it works mostly, without having to change them all.
There are two comments that are not valid Rust doc-comments,
and arerendered badly: The are the ones in:
`ncmultiselector_options` and `ncselector_item`.
When we split direct.h out from notcurses.h, I forgot to add
the new header file to the bindgen-rs includes. I've added
it, and also added a simple directmode unit test.
Closes#853. Thanks @joseluis for reporting this issue!