From: Charles Oliver Nutter Date: 2009-02-16T09:56:21+09:00 Subject: Re: [ruby-ffi] [ANN] ffi-ncurses version 0.3.0 I noticed this tries to install the ruby-ffi gem on JRuby. Perhaps we need to have a dummy ffi gem for JRuby that does nothing more than turn on our built-in support, so that gem authors can depend on 'ffi'? Sean O'Halpin wrote: > ffi-ncurses version 0.3.0 > by Sean O'Halpin > http://github.com/seanohalpin/ffi-ncurses > > == DESCRIPTION > > 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 feedback > via email. > > See the examples directory for real working examples. > > == INSTALL > > $ sudo gem install ffi-ncurses > > == CHANGES > > * Features > * Use FFI::NCurses rather than NCurses > * Removed dependency on rubygems > * Reorganised library layout > > From the README: > > == Usage > > Load the library with: > > require 'ffi-ncurses' > > FFI::NCurses methods can be called as module methods: > > begin > stdscr = FFI::NCurses.initscr > FFI::NCurses.clear > FFI::NCurses.addstr("Hello world!") > FFI::NCurses.refresh > FFI::NCurses.getch > ensure > FFI::NCurses.endwin > end > > or as included methods: > > require 'ffi-ncurses' > include FFI::NCurses > begin > stdscr = initscr > start_color > curs_set 0 > raw > cbreak > noecho > clear > move 10, 10 > standout > addstr("Hi!") > standend > refresh > getch > ensure > endwin > end > > There's more in the README and examples, including how to create windows, use > the mouse and how to interpret keypresses. > > Regards, > Sean