Last active
October 12, 2015 17:51
-
-
Save muspellsson/aa65946b81338e1d6154 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REBOL [] | |
switch fourth system/version [ | |
3 [ | |
curses: make library! %pdcurses.dll | |
kernel32: make library! %kernel32.dll | |
alloc-console: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(kernel32) "AllocConsole" | |
] | |
init-screen: func [] [ | |
alloc-console | |
initscr | |
] | |
] | |
4 [ | |
curses: make library! %libncursesw.so | |
init-screen: func [] [ | |
initscr | |
] | |
] | |
] | |
initscr: make routine! compose [ | |
[ | |
return: [pointer] | |
] | |
(curses) "initscr" | |
] | |
refresh: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(curses) "refresh" | |
] | |
stdscr: make routine! compose [ | |
[ | |
return: [pointer] | |
] | |
(curses) "stdscr" | |
] | |
raw: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(curses) "raw" | |
] | |
echo: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(curses) "echo" | |
] | |
noecho: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(curses) "noecho" | |
] | |
keypad: make routine! compose [ | |
[ | |
win [pointer] | |
bf [int32] | |
return: [int32] | |
] | |
(curses) "keypad" | |
] | |
curs-set: make routine! compose [ | |
[ | |
visibility [int32] | |
return: [int32] | |
] | |
(curses) "curs_set" | |
] | |
add-char: make routine! compose [ | |
[ | |
char [int32] | |
return: [int32] | |
] | |
(curses) "addch" | |
] | |
end-window: make routine! compose [ | |
[ | |
return: [int32] | |
] | |
(curses) "endwin" | |
] | |
wgetch: make routine! compose [ | |
[ | |
win [pointer] | |
return: [int32] | |
] | |
(curses) "wgetch" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment