magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
1.99k stars 150 forks source link

request: C# wrapper #85

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi

Is there any interest in making a C# wrapper for tvision? I would be interested since I almost never use C or C++. I know there are ways C# can call C code but I don't have experience. But maybe somebody can use this to make a C# wrapper very easily?

Thanks Lisa

ghost commented 1 year ago

.NET is also cross platform today so in theory the wrapper could become crossplatform too if underlying tvision is just installed for each platform? Just some ideas...

magiblot commented 1 year ago

Hi!

The problem of writing a C# wrapper is the same as writing a wrapper for any other language: Turbo Vision expects the user to inherit its classes; since inheritance depends on the C++ ABI, writing a wrapper is more complex than just calling C code.

In the case of C#, however, someone already wrote a native port of Turbo Vision: https://github.com/10der/tvision. Although it works a bit different than my port since it replicates the behaviour of https://github.com/set-soft/tvision instead.

ghost commented 1 year ago

OK, I understand.