nocurses/readme.md

43 lines
2.2 KiB
Markdown
Raw Normal View History

2019-10-22 06:44:20 +03:00
# nocurses.h
2019-10-18 03:38:07 +03:00
This library provides terminal manipulation capability by the use of VT100 ESC sequences.
It is aimed to simple applications where ncurses is simple "too much".
2019-10-18 03:42:29 +03:00
Inspired by the old Borland conio.h for DOS.
2019-10-18 03:38:07 +03:00
2019-10-22 06:44:20 +03:00
Here's a demo (demo.c file avaiable in the same repo):
![nocurses.h](img/nocurses.gif)
2019-10-18 03:38:07 +03:00
2019-10-22 06:44:20 +03:00
## Functions Provided
2019-10-18 03:38:07 +03:00
| Function | Description | Example |
|--------------------------|:--------------------------------------------------------------------------------------:|:--------------------:|
| pause() | Waits for the user to hit [ENTER]. | pause(); |
| clrscr() | Clears the screen. | clrscr(); |
| gotoxy(x, y) | Sets the cursor do the position x, y. Where x is the row number and y the line number. | gotoxy(10,25); |
| setfontcolor(color_name) | Sets the text color to one of the colors described on the color table below. | setfontcolor(RED); |
| setbgrcolor(color_name) | Sets the background color to one of the colors described on the color table below. | setbgrcolor(BLUE); |
2019-10-18 03:42:29 +03:00
| setfontbold(status) | Sets the bold attribute on or off. status can be TRUE or FALSE. | setfontbold(TRUE); |
| setunderline(status) | Sets the underline attribute on or off. status can be TRUE or FALSE. | setunderline(FALSE); |
| setblink(status) | Sets the blink attribute on or off. status can be TRUE or FALSE. | setblink(TRUE); |
2019-10-18 03:38:07 +03:00
| clrline() | Clears the row contents. | clrline(); |
2019-10-22 06:44:20 +03:00
| resetcolors() | Reset terminal to default colors. | clrline(); |
2019-10-18 03:38:07 +03:00
2019-10-22 06:44:20 +03:00
## color_name
2019-10-18 03:38:07 +03:00
Valid color names are:
| color_name |
|:----------:|
| BLACK |
| RED |
| GREEN |
| YELLOW |
| BLUE |
| MAGENTA |
| CYAN |
| WHITE |
2019-10-18 03:44:02 +03:00