nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Add Windows support to the C version of termbox #65

Open maurisvh opened 8 years ago

maurisvh commented 8 years ago

Currently, termbox.c seems to use hard-coded VT100 escape codes like \033[ for cursor movement and text colors. It would be nice to have at least a rudimentary (#ifdef-based) alternative for Windows console support. (The Go version seems to have very fleshed-out cross-platform support; is anything holding back the C version from getting it too, or is it just that nobody's gotten around to it?)

(Great work on this, BTW -- hate to sound like I'm complaining about missing features when this library is actually really good!)

nsf commented 8 years ago

Nothing holding it back. Just time. Someone needs to sit down and write it. I'm very busy right now and barely can find any time on my open source projects, sorry.

Also I would like to encourage using Go version instead of C. There are 0 reasons to write things in C when it comes to terminal-based interfaces. But if someone writes an implementation for windows, I don't mind. It won't be me, at least not soon. Even if I have time for my open source projects there are more important ones. :)

WiSaGaN commented 8 years ago

@nsf care to elaborate on "There are 0 reasons to write things in C when it comes to terminal-based interfaces."?

nsf commented 8 years ago

Use a garbage collected language.

dleslie commented 8 years ago

Windows support would be welcome, in the C version.

imdaveho commented 7 years ago

@nsf Just wondering if the Go version of termbox is compatible with the Python wrapper for the C version?

I'm currently in the middle of writing a thin wrapper for termbox-go, compiling using -buildmode=c-shared and writing the C interop for Python with cffi. BUT, if the APIs are identical, am I wasting my time?

(also, the reason for using termbox-go is exactly the OPs question: termbox-go has support for Windows baked in, so then creating a text UI in Python would work the same way cross-platform)

nsf commented 7 years ago

I don't think it is compatible.