README in ncursesw-0.9.2 vs README in ncursesw-1.2.4.1
- old
+ new
@@ -1,6 +1,6 @@
-$Id: README,v 1.14 2006/06/19 09:43:58 t-peters Exp $
+$Id: README,v 1.16 2009/05/03 14:13:27 t-peters Exp $
------------------------------------------------------------------------
This directory contains a ruby module for accessing the FSF's ncurses
library.
(C) 2002, 2003, 2004 Tobias Peters <t-peters@users.berlios.de>
(C) 2004 Simon Kaczor <skaczor@cox.net>
@@ -45,13 +45,14 @@
- Functions (and their Interfaces)
- Module / Class Hierarchie
- The WINDOW class
- The panel Library
- The form Library
+- The menu Library
+- Locale handling
- Ncurses and Ruby Threads
- Example programs
-- Applications using ncurses-ruby
General Ncurses Literature
--------------------------
If you don't know how to use ncurses from C, then please read an
@@ -209,10 +210,14 @@
module Form
class FORM; end
class FIELD; end
class FIELDTYPE; end
end
+ module Menu
+ class MENU; end
+ class ITEM; end
+ end
end
The WINDOW class
================
@@ -286,10 +291,52 @@
function arguments. See the example form2.rb for more details.
The functions form_userptr and field_userptr are not supported. Use
form.user_object and field.user_object to store Ruby objects instead.
+The menu Library
+================
+
+The menu library was wrapped inside the Ncurses:Menu module. All
+menu functions are implemented as module functions in the module
+Ncurses::Menu. In addition, all functions for which the first
+parameter is one of the objects are also implemented as an instance
+method of the respective class. For example, instead of calling
+post_menu(menu), you can use menu.post_menu().
+
+Two objects are defined in the Ncurses:Menu module:
+ 1. MENU
+ 2. ITEM
+
+They are wrapping actual ncurses pointers and should be use whenever a
+pointer to one of these types is expected in function calls.
+
+All menu constants are defined in the module as Ruby constants with
+the same name as the curses constants.
+
+Constructors for MENU and ITEM objects are also provided, and they
+expect the same parameters as new_menu and new_item curses functions.
+
+You must provide a Ruby block whenever a function pointer is expected
+in curses function arguments.
+
+The functions menu_userptr and item_userptr are not supported. Use
+menu.user_object and item.user_object to store Ruby objects instead.
+
+Locale handling
+===============
+
+The C library function setlocale is not technically an Ncurses function.
+However, it is used by many ncurses programs, and for this purpose,
+a wrapper for this function is also included in ncurses-ruby.
+
+The function is implemented as a module function Ncurses.ruby, and
+expects two arguments, an Integer and a String. It returns a string.
+The constants that can be used as the Integer argument are also wrapped
+as constants in the Ncurses module. See the manual page for setlocale
+for documentation of this function.
+
Ncurses and Ruby Threads
========================
The ncurses library is not thread-safe. Your application must properly
serialize calls into ncurses.
@@ -304,15 +351,5 @@
Directory "examples" contains a few example programs demonstrating how
to use the ncurses library with ruby. Be sure to read the file
"examples/LICENSES_for_examples".
-
-Applications using ncurses-ruby
-===============================
-
-aeditor (v. 0.x) - Pair programming editor, http://metaeditor.sourceforge.net/
-raggle - RSS aggregator, http://www.raggle.org/about/
-ruvi - Editor, http://ruvi.rubyforge.org/
-diakonos - Editor, http://purepistos.net/diakonos/
-tpp - text-based presentation program, http://synflood.at/tpp/
-yapo - ports overview for CRUX linux distribution, http://jue.li/crux/yapo/