ffi-ncurses version 0.3.0
by Sean O’Halpin
ffi-ncurses is an FFI wrapper for ncurses 5.x.
This is the first release of a gem on rubyforge.
Tested on Mac OS X 10.4 (Tiger) and Ubuntu 8.04 with ruby 1.8.6
using ruby-ffi (>= 0.2.0) and JRuby 1.1.6.
The API is a transliteration of the C API rather than an attempt to
provide an idiomatic Ruby object-oriented API. The intent is to
provide a ‘close to the metal’ wrapper around the ncurses library upon
which you can build your own abstractions.
This is still very much a work-in-progress, so expect some rough
edges. Having said that, you can do quite a lot with it as it is. The
main things left to be done are documentation, tests and access to
global variables in JRuby.
I don’t have an issue tracker set up yet but I’m happy to receive
See the examples directory for real working examples.
$ sudo gem install ffi-ncurses
- Use FFI::NCurses rather than NCurses
- Removed dependency on rubygems
- Reorganised library layout
From the README:
Load the library with:
FFI::NCurses methods can be called as module methods:
stdscr = FFI::NCurses.initscr
or as included methods:
stdscr = initscr
move 10, 10
There’s more in the README and examples, including how to create
the mouse and how to interpret keypresses.