-
Notifications
You must be signed in to change notification settings - Fork 694
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 TrueColor support to CursesDriver #2798
Comments
While diving down the CursesDriver rabbit hole to address other issues (#3287 covers some of it), I'm now rapidly leaning toward and half talking myself into going ahead and tackling a rework of it. While that wouldn't be directly targeted at enhancing it, such as adding more color support, I have a feeling that redoing it in the spirit of the other ConsoleDrivers will already implicitly bring at least a good portion of the necessary elements along with it, anyway, if not even straight up result in it just getting at least similar support to what the others have. Someone either talk me out of that or push me over the edge! 😅 |
Remember: the fact Terminal.gui relies on curses for Mac/Linux support is dumb. Curses just provides a huge amount of complexity for very little. If you're gonna dive in here, dive all the way. 🤪 |
Would using notcurses help? Though I don't think they have a C# wrapper yet... EDIT: Yeah, they don't. |
When we don't need pinvokes for Windows, they may not be necessary for Linux/Mac either. Everything is interconnected with completely different systems and only by handling them is it possible to access certain functionalities. .NET does not fully provide all these features for all systems, especially on Linux/Mac, for obvious reasons, I think. |
Curses (and noncurses) are not magic. They do what we already partially do, and need to do fully on Windows (to support VTS) anyway. We need three things on each platform:
On Mac/Linux, leveraging some API that abstracts away low-level platform differences will be useful for 2 and 3. It may be curses/notcurses can be useful there. But given how these OS's have converged over time, I think we can use the bare minimum. |
Spot on. Also, even Console itself is more capable in .net 8 than it was before, so we have existing code that can almost certainly be refactored to remove some pinvokes. One of the BIG pushes they've made, in recent .net versions, however, has been explicitly to unify support and behaviors for all sorts of stuff, across platforms - linux especially. |
Yeah. That's it in a nutshell. My approach for the purposes of the current work I'm doing, however, is not currently planned to be as drastic as an outright replacement, just yet. That is definitely a great goal, though. Not putting specifics here, though, since some wires are getting a little crossed because the work I'm doing right now is related to several existing issues. I'm going to try and wrap some of that up so what fixes/changes have been made can be merged and then I can hopefully triage where I focus my next effort (or at least the scope of whatever that may be) a little better. |
(Side note: That's another good place for a project, to organize all related work, since it's not a small endeavor.) |
However, if you want to directly output ANSI escape sequences (like for true color) while using |
…river Fixes #2798. Add TrueColor support to CursesDriver.
Dependent on #2797
Add TrueColor support to CursesDriver
The text was updated successfully, but these errors were encountered: