Skip to content
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

Windows: System.Console driver #27

Closed
migueldeicaza opened this issue Jan 11, 2018 · 5 comments
Closed

Windows: System.Console driver #27

migueldeicaza opened this issue Jan 11, 2018 · 5 comments

Comments

@migueldeicaza
Copy link
Collaborator

migueldeicaza commented Jan 11, 2018

Currently the only backend in use for gui.cs is the ncurses backend. There is a partial implementation of a System.Console based driver but it is not complete.

Currently we use mainloop.cs to monitor input on standard input and wake up the mainloop to read the input. We need a variant that works for Windows, likely using Console.ReadKey and using some AutoResetEvent to wake up the thread.

Generally, we can either make mainloop.cs fully cross platform, or we could surface Windows/Unix codepaths, and let the consumer (in this case, gui.cs) deal with it.

In addition to that, the backend itself needs to be completed.

@migueldeicaza migueldeicaza changed the title Driver: System.Console driver Windows: System.Console driver Jan 29, 2018
@fanoI
Copy link

fanoI commented Feb 9, 2018

I think it will be great to have a fully cross platform without dependency to ncurses so it could work on OS that have neither ncurses neither a C API (as Cosmos).

@migueldeicaza
Copy link
Collaborator Author

Right, we need to auto-detect the platform at startup and choose the right driver, currently it is hardcoded to NCurses and I change it when I work there.

https://github.com/migueldeicaza/gui.cs/blob/c5325c55272d5e35b824e99076ad1c67d7719be3/Terminal.Gui/Core.cs#L1160

@fanoI
Copy link

fanoI commented Feb 10, 2018

In you opinion C# Console can do all NCurses does?

@migueldeicaza
Copy link
Collaborator Author

This is now implemented.

@fanoI
Copy link

fanoI commented Feb 16, 2018

Thank you! I'll test this soon...

tig added a commit that referenced this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants