-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing capabilities functions to direct mode #1768
Comments
i hesitated to add all of these because i didn't like the idea of symbol explosion. maybe i'll add a or maybe i just shouldn't care about the number of exported symbols. |
Part of my motivation for asking this is that I'm currently wrapping all the capabilities in a single
I surrendered long ago to the humongous number of functions of the C API, lol... My goal in the higher-level rust bindings is to provide a minimal and versatile public API that hides most of that. |
that isn't a bad idea at all. i think i might introduce exactly that for ncdirect. thanks for the suggestion!
damn! i had no idea it had grown that large. |
If you do that, then go all the way and change how's done in the notcurses context too. After all, it's usually a single time operation, and having all of them updated together in a single place is handy. And you can remove a lot of functions in a single shot XD |
of course, but i can't do anything like that until ABI3. removing a symbol is an ABI break, even when replaced with an inline (already-compiled programs will fail to link). i would mark them deprecated, and then kill them off for 3.0.0. |
so i suggest the following three functions to replace all existing capability functions: typedef struct {
// blah blah blah
} nccapabilites;
struct nccapabilities* notcurses_capabilities(const struct notcurses*);
struct nccapabilities* ncdirect_capabilities(const struct ncdirect*);
void nccapabilities_destroy(struct nccapabilities*); we need to originate the object inside the library boundary, or else we can't freely add new fields in the future (since older clients would pass too small an object). we could have a c++ can wrap this with an RAII using |
hrmmmmmmmmmmmmmmmmmmmm. no sir, i don't like it. let's instead do: typedef struct {
} nccapabilites;
const struct nccapabilites* notcurses_...
const struct nccapabilites* ncdirect_... and we will have a single |
i've started this work in |
|
putting up a PR momentarily |
Right now it's not possible to check the same capabilities in direct mode as in full mode. The missing ones in direct mode are:
The text was updated successfully, but these errors were encountered: