v icon indicating copy to clipboard operation
v copied to clipboard

Add a ncurses library

Open 4a594c opened this issue 1 year ago • 8 comments

Describe the feature

I want the standed ncurses function like getch, initscr and ETC

Use Case

I want to make a command line interface and the internal term.ui library didn't have many function for example getch.

Proposed Solution

Create a library that have the ncurses C binding. Note: I actually stuck here because I don't know what will ncurses's function return.

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

Version used

V 0.4.6 80397e6, timestamp: 2024-05-27 23:06:52 +0300

Environment details (OS name and version, etc.)

MacOs 14.1.1

[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.

4a594c avatar May 28 '24 13:05 4a594c

The regular term module (not term.ui) has functions as well, such as https://modules.vlang.io/term.html#utf8_getchar

JalonSolov avatar May 28 '24 16:05 JalonSolov

ncurses does not have windows implementation afaik

spytheman avatar May 29 '24 11:05 spytheman

I believe anyone from the community can make the bindings.

Delta456 avatar May 29 '24 14:05 Delta456

ncurses does not have windows implementation afaik

But the python3 have it working, according to the python docs Windows use something called UniCurses

4a594c avatar Jun 01 '24 13:06 4a594c

According to the UniCurses page, it is a Python wrapper around PDCurses lib... neither of which is native to Windows (as in, it doesn't come with the OS).

JalonSolov avatar Jun 01 '24 16:06 JalonSolov

According to the UniCurses page, it is a Python wrapper around PDCurses lib... neither of which is native to Windows (as in, it doesn't come with the OS).

But maybe someone can make a module and when installing the module, it auto detect the os and install the correct deps.

4a594c avatar Jun 02 '24 09:06 4a594c

Perhaps someone could, if they wanted to do so.

JalonSolov avatar Jun 02 '24 13:06 JalonSolov

How about using https://github.com/Bill-Gray/PDCursesMod ?

And maybe https://github.com/dankamongmen/notcurses ?

LifeCANvs avatar Jun 06 '24 16:06 LifeCANvs