From a7dc40f29086515c31667490c03211812b84e2ed Mon Sep 17 00:00:00 2001 From: "N.N." Date: Tue, 4 Oct 2005 02:12:44 +0000 Subject: added the remainder of the files (or almost) from GF 0.8.0 svn path=/trunk/; revision=3651 --- externals/gridflow/devices4ruby/README | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 externals/gridflow/devices4ruby/README (limited to 'externals/gridflow/devices4ruby/README') diff --git a/externals/gridflow/devices4ruby/README b/externals/gridflow/devices4ruby/README new file mode 100644 index 00000000..740b5165 --- /dev/null +++ b/externals/gridflow/devices4ruby/README @@ -0,0 +1,27 @@ +devices/linux + +AUTHOR + + Mathieu Bouchard + irc: irc.openprojects.net / #ruby-lang / matju + (note: I can't read Japanese; write in French or English please) + +OVERVIEW + +This is a collection of simple modules that you extend IO objects with, to +give them support for specific devices. For example: + + require "linux/SoundMixer" + f = File.open "/dev/mixer" + f.extend Linux::SoundMixer + + # f now has special accessors for driver variables, e.g: + + f.treble = left_speaker_percent + 256 * right_speaker_percent + +The modules are made of automatically generated methods, much like Ruby's +accessors. those generators are called ioctl_reader, ioctl_writer, +ioctl_accessor. Writing expects an integer in -2**31...2**31; reading will +return the same. You may browse the source to find out which accessors are +available, and it's easy to add support for more features. + -- cgit v1.2.1