diff options
| author | dam <dam@gudinoff> | 2023-03-31 01:52:05 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-03-31 01:52:05 +0100 |
| commit | ee5fa34d14288a4ce79d77a0d3a89cc14b16a6b1 (patch) | |
| tree | bc79002251d4e1dc2d07e73ad1e1458ace44462b /curses.jai | |
| parent | f82ce565436dc04d58c85d55fb78038acf0191b2 (diff) | |
| download | task-time-tracker-ee5fa34d14288a4ce79d77a0d3a89cc14b16a6b1.tar.zst task-time-tracker-ee5fa34d14288a4ce79d77a0d3a89cc14b16a6b1.zip | |
Implemented initialize_tui.
Diffstat (limited to 'curses.jai')
| -rw-r--r-- | curses.jai | 36 |
1 files changed, 27 insertions, 9 deletions
@@ -78,12 +78,30 @@ tinfo :: #system_library "libtinfo"; // Required by some of ncurses functions. // I suspect this is an attempt to help the compilers to include libtinfo automatically. // ncurses :: #system_library "libncurses"; ncurses :: #library "libncurses"; -initscr :: () -> *WINDOW #foreign ncurses; -getch :: () -> s8 #foreign ncurses; -endwin :: () -> void #foreign ncurses; - -curs_set :: (visibility: s32) -> s32 #foreign ncurses; -mvaddstr :: (y: s32, x: s32, str: *u8) -> s32 #foreign ncurses; -noecho :: () -> s32 #foreign ncurses; -box :: (win :*WINDOW, verch :u8, horch :u8) -> s32 #foreign ncurses; - + +COLOR_BLACK :: 0; +COLOR_RED :: 1; +COLOR_GREEN :: 2; +COLOR_YELLOW :: 3; +COLOR_BLUE :: 4; +COLOR_MAGENTA :: 5; +COLOR_CYAN :: 6; +COLOR_WHITE :: 7; + +stdscr : *WINDOW; + +initscr :: () -> *WINDOW #foreign ncurses; +getch :: () -> s8 #foreign ncurses; +endwin :: () -> void #foreign ncurses; +cbreak :: () -> void #foreign ncurses; +start_color :: () -> void #foreign ncurses; +use_default_colors :: () -> void #foreign ncurses; + + +keypad :: (win: *WINDOW, bf: bool) -> s32 #foreign ncurses; + +curs_set :: (visibility: s32) -> s32 #foreign ncurses; +mvaddstr :: (y: s32, x: s32, str: *u8) -> s32 #foreign ncurses; +noecho :: () -> s32 #foreign ncurses; +box :: (win: *WINDOW, verch: u8, horch: u8) -> s32 #foreign ncurses; +init_pair :: (pair: s16, f: s16, b: s16) -> s32 #foreign ncurses; |
