diff --git a/.gitignore b/.gitignore
index e72561ed..0edf023e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,9 +6,21 @@ ext/fox16_c/*_wrap.cpp
 ext/fox16_c/*.o
 ext/fox16_c/conftest.dSYM
 ext/fox16_c/include/inlinestubs.h
+ext/fox16_c/extconf.h
 ext/fox16_c/swigruby.h
 ext/fox16_c/fox16.bundle
 ext/fox16_c/mkmf.log
 lib/fox16/kwargs.rb
+lib/[0-9].[0-9]
+lib/*.so
 fox-includes/diffs.py
 fox-includes/diffs.txt
+pkg
+tmp
+vendor
+*.orig
+*.rej
+/Gemfile.lock
+/ports
+/.bundle
+/.yardoc
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..43985e88
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,34 @@
+dist: xenial
+language: ruby
+
+addons:
+  apt:
+    packages:
+    - xpra
+    - xserver-xorg-video-dummy
+    - g++
+    - libxrandr-dev
+    - libfox-1.6-dev
+    - libfxscintilla-dev
+    - swig
+
+install:
+  - swig -version
+  - ls -l /usr/lib/libfxscintilla*
+  - bundle install
+
+before_script:
+  - "xpra --xvfb=\"Xorg +extension GLX -config `pwd`/test/dummy.xorg.conf -logfile ${HOME}/.xpra/xorg.log\"  start :9"
+
+script: bundle exec rake test DISPLAY=:9
+
+after_failure:
+  - "cat ~/.xpra/*"
+
+after_script:
+  - "xpra stop :9"
+
+rvm:
+  - "ruby-head"
+  - "2.6.0"
+  - "2.2"
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 00000000..3528541c
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,22 @@
+source 'https://rubygems.org'
+
+# Specify your gem's runtime dependencies in fxruby.gemspec
+gemspec
+
+# For some reason this is required in addition to the gemspec
+# when 'bundle config force_ruby_platform true' is active:
+gem 'mini_portile2'
+
+group :development do
+  gem 'rake-compiler', '~> 1.0'
+  gem 'rake-compiler-dock', '~> 1.0'
+  gem 'yard', '~> 0.8'
+  gem "bundler", ">= 1.12", "< 3.a"
+  gem "rake", "~> 13.0"
+end
+
+group :test do
+  gem 'opengl', '~> 0.8'
+  gem 'glu', '~> 8.0'
+  gem 'test-unit', '~> 3.1'
+end
diff --git a/History.md b/History.md
new file mode 100755
index 00000000..8dd56b16
--- /dev/null
+++ b/History.md
@@ -0,0 +1,1456 @@
+## 1.6.42 / 2020-02-01
+
+* Fix a packing issue in 1.6.41: `lib/fox16/input.rb` had owner permission only.
+
+## 1.6.41 / 2020-01-26
+
+* Add support for Ruby-2.7
+* Fix build error on FreeBSD. #51
+* Fix handling of scroll events to FXText instance.
+* Add 8 virtual methods of FXText to be passed through ruby.
+* FXText#findText: Return multi entry array only when searching Regex.
+* Fix several example apps in example/ dir.
+* Update to rake-compiler-dock-1.0 and use parallel cross build.
+* Update to libpng-1.6.37, jpeg-turbo-2.0.4, libtiff-4.1.0 on Windows binary gem.
+
+## 1.6.40 / 2018-12-28
+
+* Fix some library classes which failed, when Fox was not included into the global namespace.
+* Add new accessor FXImage#dataPtr to access raw image data from FFI, Fiddle or OpenGL.
+* Ensure zero terminated strings in values of C-argv.
+* Remove various Ruby and C++ warnings.
+* Update libfox to 1.6.57.
+* Add support for RubyInstaller-2.6
+* Set minimum required ruby version to 2.2.
+
+## 1.6.39 / 2017-12-26
+
+* Fix FXGLVisual.supported and .supported?
+* Add support for RubyInstaller-2.5
+
+## 1.6.38 / 2017-07-27
+
+* Update dependent libraries for Windows binary gem.
+* Replace libjpeg-9b by libjpeg-turbo-1.5.2 on Windows binary gem.
+* Fix build with clang on FreeBSD (and possibly other OS). Fixes #41
+
+## 1.6.37 / 2017-06-24
+
+* Add a 3rd type of FXRbObjects which is used for callbacks. Fixes #39
+
+## 1.6.36 / 2017-06-04
+
+* Support the fxruby source gem on Windows (only RubyInstaller-2.4).
+* Replace our self-made directory search methods by pgk-config.
+* Enable the use of Win32 unicode functions. Fixes #30 and #38
+* Fix segfault in vsprintf on Windows 10.
+* Update support for RubyInstaller-2.4.1-1
+* Update to libjpeg-9b
+* More automation for gem releases
+
+## 1.6.35 / 2017-02-15
+
+* Adjust for Ruby-2.4 with unified Integers
+* Add support for RubyInstaller-2.4
+* Drop support for Ruby-1.8 and 1.9. It may work with them, but is no longer tested.
+* Add compat with SWIG-3.0
+* Fix an issue with FXApp#removeInput introduced in fxruby-1.6.30.
+* Work around missing /usr/lib/libfxscintilla.so file in Ubuntu
+* Update dependent gems.
+* Update libraries for Windows build.
+
+## 1.6.34 / 2016-04-26
+
+* Add support for RubyInstaller-2.3
+* Avoid RARRAY_PTR() which broke fxruby on ruby-2.3.0.
+* Make use of StringValueCStr() where it is suitable.
+* Fix initialisation of runOnUiThread event handler, when FXApp is called with a block.
+* Disable GVL on RubyInstaller-1.9.3. Fixes #24
+
+## 1.6.33 / 2015-08-20
+
+* Avoid rb_* calls that are prohibited during GC. Fixes #23
+* Use copy'ing getters for FXVec members in FXMat*, FXMaterial and FXLight.
+  This fixes the TC_FXMaterial#test_bug test case.
+* Fix test suite, so that all tests pass.
+* Add a travis-ci test setup and connect it to the github account.
+
+## 1.6.32 / 2015-08-07
+
+* Avoid call to rb_class2name() during GC. Fixes #21
+* Use release mode, unless extconf.rb is called with --enable-debug,
+  so that all FXTRACE() and FXASSERT() calls are skiped, per default.
+* Remove self made GC detection by ruby's rb_during_gc().
+* Fix Windows binary x86-mingw32.gem for Ruby versions < 2.0
+
+## 1.6.31 / 2015-07-21
+
+* Replace pipe2() by pipe() and fcntl(), because pipe2() is not as portable.
+* Add missing include statement. Fixes #20
+
+## 1.6.30 / 2015-07-07
+
+* Fix crashes in rb_gc_mark(): 0x00000003f54af8 is T_ZOMBIE / T_NONE
+* Release Ruby's GVL while calls to FXImage#savePixels, #loadPixels
+  and FXApp#run* methods.
+* Add a working version for FXApp#addInput event handling on Windows.
+  This works for sockets only for now.
+* Add FXApp#runOnUiThread and FXId#runOnUiThread .
+  This allows to safely execute GUI code from other threads.
+* Use rake-compiler-dock for building windows binary gems.
+
+## 1.6.29 / 2015-02-17
+
+* Add Windows binaries for Ruby-2.1 and 2.2.
+* Use shared libs for Windows binary gems to reduce gem size.
+* Allow non owned assignment of image data to FXImage derivations
+  without copy'ing pixel data.
+* Allow retrival of parts of the pixel data.
+* Fix namespace specifier for FXRGB in kwargs.rb.
+* Change GC'ing of TreeListBox and FXTreeItem. Fixes #10
+* Update to swig version 2.0 or newer. Fixes #13
+
+## 1.6.28 / 2013-07-05
+
+* Fix build for Ruby-2.0.0-p127+
+* Update libraries for win32 build: libfox-1.6.49
+
+## 1.6.27 / 2013-04-05
+
+* Add support for Ruby-2.0.
+* Add cross compilation for x64-mingw32 target.
+
+## 1.6.26 / 2013-02-16
+
+* Mark all text strings retrieved from fox as UTF-8 when running on Ruby 1.9
+* Fix loading error on Ruby 1.8.7 by renaming the C++ extension to fox16_c
+* Update libraries for windows cross compilation
+
+## 1.6.25 / 2012-06-17
+
+* Windows: Fix slow loading of fox16.so by using a more recent mingw-w64 compiler
+  (reported by Allen Doug and Igor Jorobus)
+* Fix two possible segfaults in conjunction with FXSplashWindow (reported by Igor Jorobus)
+
+## 1.6.24 / 2012-06-06
+
+* Update libraries for win32 build: libz-1.2.7 libpng-1.5.10 libjpeg-8d libtiff-4.0.1 libfox-1.6.45
+* Avoid Segfauls in lots of methods when called with nil instead of FXApp, FXComposite or FXWindow objects
+
+## 1.6.23 / 2012-03-08
+
+* Add YARD documentation support
+* Use generated Manifest.txt
+* Support for parallel task execution with drake
+
+## 1.6.22 / 2012-02-21
+
+* Allow better access to raw pixel data of FXImage and derivatives
+* Build Windows binary gem per cross compiler on Linux
+* Add support for Rubinius (currently requires rubinius from git)
+* Add alias FXApp#modalWindow, as described in rdoc
+* Add quality parameter to FXJPGImage and FXJPGIcon
+* Fix invalid memory access in final GC call when using FXMenuCommand with acckey
+* Fix double referenced foxObj when borrowed object registration is triggered from C++
+* Fix Segfault while GC'ing FXWindows
+* Fix 'object allocation not allowed while garbage collection' bug
+* Fix clipboard handling on windows
+* Add missing namespace qualifier to FXSEL in FXAccelTable
+* Fix GC bug in FXAccelTable
+* Fix double free in FXMemoryStream#giveBuffer
+* Fix invalid memory access in typemap to zero terminated FXchar* (such as fillItems methods)
+* Fix FXApp#addInput for Ruby 1.9 on Linux
+* Fix "ruby_code case not handled: Regexp" issue with newer rubygems
+
+## Changes For Version 1.6.20 (November 09, 2009)
+
+* Integrated the Hoe and rake-compiler extensions into the Rakefile and
+  removed redundant tasks.
+* Did some work to provide support for MinGW builds.
+* The previous release of FXRuby couldn't be built from source against Ruby 1.9.1 final
+  due to a change in some of the file-related utility libraries
+  (see RubyForge Bug #23786). This problem has been corrected.
+
+
+## Changes For Version 1.6.19 (March 6, 2009)
+
+* The previous release of FXRuby couldn't be built from source against Ruby 1.9.1 final
+  due to a change in some of the file-related utility libraries
+  (see RubyForge Bug #23786). This problem has been corrected.
+* The previous release of FXRuby couldn't be built from source against Ruby versions 1.8.5 or
+  earlier (see RubyForge Bug #23967). This problem has been corrected.
+* A change in the return value for Ruby's `instance_variables` method broke
+  some of the code related to message handling in FXRuby (see RubyForge
+  Bug #23787). This problem has been corrected.
+* The `addAccel` method for the `FXAccelTable` class
+  now accepts lambda functions (or any other objects that respond to `call`). See
+  the API documentation
+  for `FXAccelTable` for examples of how this works.
+
+
+## Changes For Version 1.6.18 (December 29, 2008)
+
+* Some users were having trouble building FXRuby on 64-bit operating systems
+  (see RubyForge Bug #23375). This problem has been corrected.
+
+
+## Changes For Version 1.6.17 (December 24, 2008)
+
+* The Ruby interpreter was generating a large number of warning messages about redefined methods
+  in the `kwargs.rb` library
+  (see RubyForge
+  Bug #19231 and elsewhere). This problem has been corrected.
+
+* Due to recent changes in Ruby's garbage collection algorithm, FXRuby applications could under some circumstances
+  crash for large numbers of table items
+  (see RubyForge bugs ).
+  This bug has been fixed.
+
+* The documentation for the `FXTable` class referred to the non-existent `setColumnX`
+  and `setRowY` instance methods
+  (see RubyForge
+  Bug #21987). These entries have been removed from the documentation.
+
+* A number of instance methods for the `FXTable` class could crash an application if they
+  were passed out-of-bounds index arguments
+  (see RubyForge
+  Bug #21987). These methods now raise `IndexError` when they're passed out-of-bounds
+  indexes.
+
+* Due to a change in the URL scheme for the Dilbert web site, the `dilbert.rb` example
+  program was no longer working properly
+  (see RubyForge
+  Bug #21538). This has been fixed.
+
+* The `lower` method for the `FXRangef` was returning
+  ´self´ instead of an `FXVec3f` instance for the range's low
+  bound
+  (see RubyForge
+  Bug #22488). This has been fixed.
+
+* Made a number of minor fixes for compatibility with Ruby 1.9.1.
+
+
+## Changes For Version 1.6.16 (July 3, 2008)
+
+* Historically, if you called `create` on a
+  window before its parent window was created, your application would
+  crash (see RubyForge
+  Bug #20702 and elsewhere). Now, the code should raise a
+  ´RuntimeError´ with a message indicating the
+  problem.
+
+* The message data that the `FXPicker` widget
+  sends along with its ´SEL_CHANGED´ and
+  ´SEL_COMMAND´ messages wasn't being handled
+  properly, and as a result, applications using this widget could crash
+  (see RubyForge
+  Bug #20780). This problem has been fixed.
+
+
+## Changes For Version 1.6.15 (June 4, 2008)
+
+* FXRuby applications could crash (with a segmentation fault) if
+  ´nil´ was passed in as the first argument to
+  `FXDialogBox.new` or
+  `FXMainWindow.new` (see RubyForge
+  Bug #14642). These methods now raise an
+  ´ArgumentError´ if ´nil´ is
+  passed as the first argument.
+
+* You should only ever construct one `FXApp`
+  object per application, but there was no protection against doing so
+  in the code (see RubyForge
+  Bug #16275). Now, `FXApp.new` will
+  raise a `RuntimeException` if an
+  `FXApp` object already exists.
+
+* The `babelfish.rb` example program, which
+  previously depended on an external web service to perform translation
+  between languages, was broken since that web service no longer exists
+  (see RubyForge
+  Bug #16962). The example has now been updated to use Dr. Nic's
+  Tranexp library instead.
+
+* The value of the ´MBOX_SAVE_CANCEL_DONTSAVE´
+  option (for the `FXMessageBox` class) wasn't
+  wrapped properly and was unusable (see RubyForge
+  Bug #17094). There was also no constant corresponding to the
+  ´MBOX_CLICKED_DONTSAVE´ return value. Both of these
+  problems have been fixed.
+
+* The fields for new `FXHiliteStyle` objects
+  were uninitialized and as a result sometimes gave unpredictable
+  results (see RubyForge
+  Bug #19637). This has been fixed.
+
+* The `columnHeaderFont` and
+  `rowHeaderFont` attributes for
+  `FXTable` weren't implemented properly (see
+  RubyForge
+  Bug #20142). This has been fixed.
+
+* Ruby 1.8.7 adds a new `first` method to
+  the `Enumerable` module, and this conflicts with
+  the existing `first` method defined in the
+  `FXWindow` base class for a number of FXRuby
+  classes which mix in `Enumerable` (see RubyForge
+  Bug #20418). This problem has been resolved.
+
+* Due to a bug in the `extconf.rb` script, the
+  build was failing for Ruby 1.9.0 (see RubyForge
+  Bug #20426). This has been fixed.
+
+
+## Changes For Version 1.6.14 (March 29, 2008)
+
+* Updated the documentation for the `FXImage`
+  class to indicate which methods call `render`
+  after they're finished, and which ones do not.
+
+* Corrected a little typo in the
+  `gembrowser.rb` example program.
+
+* Updated the `dilbert.rb` example program to
+  use the more popular-and-likely-to-be-installed Hpricot HTML
+  parser library instead of Rubyful Soup.
+
+* Re-added the documentation for the
+  ´TOGGLEBUTTON_KEEPSTATE´ option, which had
+  mysteriously disappeared (see RubyForge
+  Bug #2286).
+
+* Made a number of minor fixes to support building FXRuby against
+  Ruby 1.9.
+
+* Added a binary gem for OS X. This works with the Ruby that's
+  included with OS X (Leopard).
+
+* The binary gem for Windows was built with FOX version 1.6.32 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.13 (November 9, 2007)
+
+* Calls to the `extractText` method for the
+  `FXTable` class were causing various
+  memory-related errors on certain platforms (see RubyForge
+  Bug #15444). This problem has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.28 and
+  FXScintilla version 1.71.
+
+## Changes For Version 1.6.12 (October 19, 2007)
+
+* The API documentation for `FXMDIClient`
+  referred to the non-existent instance method
+  `activeChild=` (see RubyForge
+  Bug #10259). This method has been added.
+
+* The API documentation for `FXMDIClient`
+  also referred to the non-existent instance methods
+  `getMDIChildFirst` and
+  `getMDIChildLast`. These entries have been
+  removed.
+
+* The API documentation for `FXMDIChild`
+  referred to non-existent instance methods
+  `getMDINext` and
+  `getMDIPrev` (see RubyForge
+  Bug #10436). The documentation has been corrected.
+
+* Added the ´:repeat´ parameter for the
+  `addChore` and
+  `addTimeout` methods. See the documentation for
+  more details, and `gltest.rb` for an example of its
+  use.
+
+* Corrected a number of minor typos in the API
+  documentation.
+
+* Corrected a typo in the `imageviewer.rb`
+  example.
+
+* Modified the `inputs.rb` example program to
+  use `Pipe.read_nonblock()` instead of
+  `Pipe.read()`.
+
+* Fixed a bug in the implementation of the
+  `findText` method for the
+  `FXText` class, when used with the
+  ´SEARCH_REGEX´ option.
+
+* The binary gem for Windows was built with FOX version 1.6.28 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.11 (April 18, 2007)
+
+* Added `editable` as an alias for
+  `FXTextField#editable?`.
+
+* Added `each_child_recursive` instance
+  method for the `FXWindow` class. This method
+  performs a depth-first traversal of the widget tree starting at the
+  receiver window.
+
+* Corrected some errors in the keyword arguments support for the
+  `FXVec2d`, `FXVec2f`,
+  `FXVec3d`, `FVec3f`,
+  `FXVec4d` and `FXVec4f`
+  classes.
+
+* Corrected an error in the keyword arguments support for the
+  `FXIconDict` class.
+
+* Modified the gem specification so that the RDoc generated during
+  a gem install is consistent with that generated by other methods (see
+  RubyForge
+  Bug #10035).
+
+* Changes to the `iterators` library in version
+  1.6.6 introduced a bug in the `each` method for
+  the `FXFoldingList`,
+  `FXTreeList` and
+  `FXTreeListBox` classes (see RubyForge
+  Bug #10175). This problem has been fixed.
+
+* Applied submitted patches for building FXRuby against Ruby 1.9
+  (see RubyForge
+  Bug #10181). Please note that building FXRuby against the Ruby
+  1.9 code base is still officially unsupported; however, I'm glad to
+  accept patches that will help make this possible.
+
+* The binary gem for Windows was built with FOX version 1.6.25 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.9 (April 8, 2007)
+
+* A bug was discovered in the keyword arguments library support
+  for the `FXMenuBar` class (see RubyForge
+  Bug #9927). This problem has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.25 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.8 (April 5, 2007)
+
+* Due to an internal bookkeeping error, applications like the
+  `glviewer.rb` example program which create multiple
+  `FXGLViewer` instances could cause an assertion
+  to fail. When this assertion fails on Windows, the program simply
+  crashes (see RubyForge
+  Bug #9775). This problem has been fixed.
+
+* The keyword arguments library, introduced in version 1.6.5, is
+  now included automatically when you load FXRuby; it is no longer
+  necessary to explicitly require it.
+
+* The binary gem for Windows was built with FOX version 1.6.25 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.7 (March 31, 2007)
+
+* The binary gem for Windows was built with FOX version 1.6.25 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.6 (February 10, 2007)
+
+* Somewhere along the way, the RAA browser example program got
+  broken due to changes in the SOAP interface to RAA (see RubyForge
+  Bug #7977). This has been fixed.
+
+* Some debugging code that was meant to detect errors in FXRuby
+  message data conversion was inadvertently causing some user
+  applications to crash when running under Windows (see RubyForge
+  Bug #8049). This debugging code has been changed to avoid the
+  problem.
+
+* Modified the implementations of the each iterator methods for
+  `FXFoldingList`,
+  `FXFoldingItem`,
+  `FXTreeItem`, `FXTreeList`
+  and `FXTreeListBox` (see RubyForge
+  Bug #8090). The new implementation is a bit more robust in
+  terms of modifications (such as deletion) of the iterated-over
+  elements.
+
+* A bug in the new keyword arguments library (introduced in
+  version 1.6.5) caused the `initialize` method
+  for the `FXDCWindow` class to do the wrong thing
+  (see RubyForge
+  Bug #8441). This has been corrected.
+
+* A different bug in the keyword arguments library caused the
+  `initialize` method for the
+  `FXFont` class to do the wrong thing (see RubyForge
+  Bug #8517). This also has been corrected.
+
+* Yet another bug in the keyword arguments library broke the part
+  of the code that used to yield ´self´ to an
+  optional block attached to the call to `new`
+  (see RubyForge
+  Bug #8518). This has been corrected.
+
+* Most of the FXRuby example programs have been updated to use the
+  keyword arguments library.
+
+* Added a new "virtual" keyword argument
+  ´:padding´ that can be used in place of (or in
+  addition to) the ´:padLeft´,
+  ´:padRight´, ´:padTop´ and
+  ´:padBottom´ arguments for a constructor. When a
+  ´:padding´ value is passed in to the arguments
+  hash, that value will be used for any of the four regular padding
+  values that aren't otherwise specified. See the example programs for,
+  you know, examples.
+
+* The binary gem for Windows was built with FOX version 1.6.20 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.5 (January 20, 2007)
+
+* Clicking outside of the visible cells for an
+  `FXTable` when there was no current selection
+  caused the code to raise an exception (see RubyForge
+  Bug #5907). This problem has been fixed.
+
+* The `hasTimeout?` method for the
+  `FXApp` class was implemented incorrectly (see
+  RubyForge
+  Bug #7564). This problem has been fixed.
+
+* The `FXFoldingList` and
+  `FXFoldingItem` classes did not have each
+  iterator methods like most of the other list-based widgets (see RubyForge
+  Patch #7978). These have been added.
+
+* The API documentation for `FXMDIClient`
+  claimed that `FXScrollArea` was its base class
+  (see RubyForge
+  Bug #7979). This has been corrected; the base class for
+  `FXMDIClient` is
+  `FXComposite`.
+
+* There was a small typo in the documentation for the
+  `FXFoldingList` class options (see RubyForge
+  Bug #7981). This has been fixed.
+
+* Added preliminary support for keyword-style arguments, as
+  described in the "Differences Between
+  FOX and FXRuby" section of the FXRuby User's Guide.
+
+* The binary gem for Windows was built with FOX version 1.6.20 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.4 (November 30, 2006)
+
+* A change made in Ruby 1.8.5 for cyclic requires led to a problem
+  that caused the Ruby interpreter to emit a large number of warnings
+  (see RubyForge
+  Bug #5633). This problem has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.16 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.3 (October 27, 2006)
+
+* Widgets of some classes (namely
+  `FXTopWindow` and
+  `FXMDIChild`) weren't properly sending a
+  ´SEL_CLOSE´ message to their message targets (see
+  RubyForge
+  Bug #5498). Thanks to a change in FOX version 1.6.16, this
+  problem has been fixed.
+
+* The `getControlFor` method for the
+  `FXComboTableItem` class was coded incorrectly
+  (see RubyForge
+  Bug #5906). This has been fixed.
+
+* There was a minor typo in the API documentation for the
+  `FXTriStateButton` class (see RubyForge Bug #5962). This has been fixed.
+
+* The `each_row` and
+  `each_column` iterator methods for the
+  `FXTable` class were incorrectly coded (see
+  RubyForge
+  Bug #6036). This has been fixed.
+
+* The `new` class methods for
+  `FXColorItem`, `FXDirItem`,
+  `FXFileItem`,
+  `FXFoldingItem`,
+  `FXHeaderItem`,
+  `FXIconItem`, `FXListItem`
+  and `FXTreeItem` were all raising exceptions when
+  a non-´nil´ value was passed in for the last
+  argument (see RubyForge
+  Bug #6197). A similar problem was present for various instance
+  methods in the `FXColorList`,
+  `FXListBox` and
+  `FXMDIClient` classes. These problems have been
+  fixed.
+
+* A few problems were discovered for the
+  `inputs.rb` example program (see RubyForge
+  Bug #6209). These problems have been fixed.
+
+* Several instance methods for the `FXTable`
+  class were not actually present under their documented names (see
+  RubyForge
+  Bug #6211). This has been fixed.
+
+* The build script was not compatible with changes made in the
+  recently-released FXScintilla 1.71 (see RubyForge
+  Bug #6313). This has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.16 and
+  FXScintilla version 1.71.
+
+
+## Changes For Version 1.6.2 (September 13, 2006)
+
+* The `expandTree()` and
+  `collapseTree()` methods for the
+  `FXFoldingList` class were incorrectly identified
+  as `expandFolding()` and
+  `collapseFolding()` in the API documentation
+  (see RubyForge
+  Bug #5354). This has been fixed.
+
+* The `FXDockTitle` class was not supported
+  (see RubyForge
+  Bug #5632). This has been fixed.
+
+* The API documentation for the `FXGLCanvas`
+  class claimed it had a `shared?` method, but it
+  didn't (see RubyForge
+  Bug #5591). Now it does.
+
+* The `FXGradientBar` class was not supported
+  (see RubyForge
+  Bug #5746). This has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.14 and
+  FXScintilla version 1.67 (from CVS).
+
+
+## Changes For Version 1.4.7 (September 13, 2006)
+
+* The `children` instance method for the
+  `FXWindow` class always returned an array of
+  `FXWindow` instances, even if the actual types
+  should have been instances of subclasses of
+  `FXWindow` (see RubyForge
+  Bug #4342). This has been fixed.
+
+* The `dilbert.rb` example program was broken
+  due to a change in the Dilbert.com web site structure (see RubyForge
+  Bug #4597). This has been fixed.
+
+* The `expandTree()` and
+  `collapseTree()` methods for the
+  `FXFoldingList` class were incorrectly identified
+  as `expandFolding()` and
+  `collapseFolding()` in the API documentation
+  (see RubyForge
+  Bug #5354). This has been fixed.
+
+* The `FXDockTitle` class was not supported
+  (see RubyForge
+  Bug #5632). This has been fixed.
+
+* The API documentation for the `FXGLCanvas`
+  class claimed it had a `shared?` method, but it
+  didn't (see RubyForge
+  Bug #5591). Now it does.
+
+* The `FXGradientBar` class was not supported
+  (see RubyForge
+  Bug #5746). This has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.4.34 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.6.1 (July 21, 2006)
+
+* The message data sent along for the
+  ´SEL_INSERTED´, ´SEL_DELETED´
+  and ´SEL_REPLACED´ messages from an a
+  `FXText` widget to its target was not being
+  converted properly (see RubyForge
+  Bug #4666). This has been fixed.
+
+* The code related to the localization of application messages in
+  FOX wasn't implemented properly in FXRuby, and as a result,
+  constructing certain dialogs (like the color dialog) could cause a
+  program to crash (see RubyForge
+  Bug #5000). This has been fixed.
+
+* The "Stop Spin" button in the gltest.rb example program didn't
+  stop the cubes from spinning after either the "Spin Timer" or "Spin
+  Chore" option was selected (see RubyForge
+  Bug #5001). This was actually a symptom of a larger problem,
+  that FXRuby wasn't properly handling timers and chores. These problems
+  have been fixed.
+
+* Setting the current item for an
+  `FXComboBox` to -1 (to indicate that there's no
+  current item) would cause FXRuby to erroneously raise an
+  `IndexError` (see RubyForge
+  Bug #5007). This has been fixed.
+
+* The documentation for the `reparent`
+  instance method for the `FXWindow` class was
+  incorrect (see RubyForge
+  Bug #5035). This has been fixed.
+
+* The `textedit.rb` example program was not up
+  to date with some of the changes for FOX 1.6. This example has been
+  updated.
+
+* The new `font` method for the
+  `FXFont` class was not documented. This has been
+  fixed.
+
+* The `dilbert.rb` example program has been
+  modified to use the RubyfulSoup HTML library instead of the
+  html-parser library.
+
+* As discussed in various forums (see for example [this
+  post](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/182827), the `autorequire` directive for
+  RubyGems specifications is now deprecated. As a result, this has been
+  removed from the FXRuby gem specification. This change will break any
+  code that was using a statement like:´require_gem 'fxruby'´as
+  the sole means for loading FXRuby. Such programs should instead
+  use:´require 'fox16'´which will work
+  for either gem based or non-gem based installations.
+
+* The binary gem for Windows was built with FOX version 1.6.8 and
+  FXScintilla version 1.67 (from CVS).
+
+
+## Changes For Version 1.6.0 (May 29, 2006)
+
+* This is the first release of FXRuby compatible with FOX version
+  1.6. One of the most signficant changes for FOX 1.6 has been the
+  addition of Unicode support; all FOX widgets and internal string
+  processing routines are now Unicode aware. For a comprehensive
+  overview of the changes made to FOX since version 1.4 (including those
+  made in the FOX 1.5 development series), please refer to the
+  [News archives](http://www.fox-toolkit.com/news.html) at
+  the FOX web site.
+
+* Added the `allowSide`,
+  `disallowSide` and
+  `allowedSide?` methods for the
+  `FXDockBar` class, as complements to the
+  `allowedSides` accessor methods (see RubyForge
+  Feature Request #2307).
+
+* Added the `visible=` and
+  `visible?` accessor methods for the
+  `FXWindow` class, as complements to the
+  `show`, `hide` and
+  `shown?` methods (see RubyForge
+  Feature Request #3579).
+
+* The `browser.rb` example was making use of a
+  deprecated API (see RubyForge
+  Bug #4325). This has been fixed.
+
+* The `children` instance method for the
+  `FXWindow` class always returned an array of
+  `FXWindow` instances, even if the actual types
+  should have been instances of subclasses of
+  `FXWindow` (see RubyForge
+  Bug #4342). This has been fixed.
+
+* The `dilbert.rb` example program was broken
+  due to a change in the Dilbert.com web site structure (see RubyForge
+  Bug #4597). This has been fixed.
+
+* The binary gem for Windows was built with FOX version 1.6.5 and
+  FXScintilla version 1.67 (from CVS).
+
+
+## Changes For Version 1.4.6 (April 26, 2006)
+
+* FXRuby would not compile properly on some x86-64 systems (see
+  RubyForge
+  Bug #3729). This error has been corrected. Thanks to Javier
+  Goizueta for initially reporting this problem, and especially to
+  Tobias Peters for providing a patch.
+
+* The `FXIconDict` widget was accidentally
+  "lost" in the transition between FXRuby versions 1.2 and 1.4 (see
+  RubyForge
+  Bug #4117). This error has been corrected. Thanks to Manfred
+  Usselmann for reporting this problem.
+
+* The `FXSwitcher` widget was not sending the
+  appropriate message data to its message target for the
+  ´SEL_COMMAND´ message type (see RubyForge
+  Bug #4157). This error has been corrected. Thanks to Manfred
+  Usselmann for reporting this problem.
+
+* The `FXSeparator` class wasn't implemented
+  properly (see RubyForge
+  Bug #4158). This error has been corrected. Thanks to Gerard
+  Menochet for reporting this problem.
+
+* The `findItemByData` method was
+  implemented incorrectly for the `FXComboBox`,
+  `FXFoldingList`,
+  `FXIconList`, `FXList` and
+  `FXListBox` classes (see RubyForge
+  Bug #4172). This error has been corrected. Thanks to Gerard
+  Menochet for reporting this problem.
+
+* The `FXListBox` widget was not sending the
+  appropriate message data to its message target for the
+  ´SEL_COMMAND´ message type (see RubyForge
+  Bug #4255). This error has been corrected. Thanks to Gerard
+  Menochet for reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.4.29 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.5 (April 10, 2006)
+
+* The `FXTextField` class was not properly
+  responding to the ´ID_INSERT_STRING´ command (see
+  RubyForge
+  Bug #3320). This error has been corrected. Thanks to Uwe Hartl
+  for reporting this problem.
+
+* The `text` and
+  `getText` methods for the
+  `FXMenuCaption` class were returning
+  ´nil´ instead of the actual value (see RubyForge
+  Bug #3458). This error has been corrected. Thanks to Meinrad
+  Recheis (Henon) for reporting this problem.
+
+* The API documentation for the `FXMDIChild`
+  class erroneously listed ´SEL_CLOSEALL´ as one of
+  the message types that an MDI child window might send to its message
+  target (see RubyForge
+  Bug #3508). This error has been corrected. Thanks to Meinrad
+  Recheis (Henon) for reporting this problem.
+
+* Calling the `selectRange` method for
+  class `FXTable` would cause a fatal error instead
+  of merely raising an `IndexError` exception (see
+  RubyForge
+  Bug #3615). This error has been corrected. Thanks to Meinrad
+  Recheis (Henon) for reporting this problem.
+
+* Due to an error in the SWIG interface files, the
+  `FXChoiceBox` class was basically unusable (see
+  RubyForge
+  Bug #3676). This error has been corrected. Thanks to Uwe Hartl
+  for reporting this problem.
+
+* The API documentation for the
+  `FXRealSlider` and
+  `FXRealSpinner` classes erroneously claimed that
+  the message data for the ´SEL_COMMAND´ and
+  ´SEL_CHANGED´ messages sent by these widgets to
+  their targets were integers (see RubyForge
+  Bug #3749). Along the same lines, the message data for those
+  widgets wasn't being converted correctly (see RubyForge
+  Bug #3750). Both of these errors have been corrected. Thanks
+  to Meinrad Recheis (Henon) for reporting these problems.
+
+* The API documentation for the Fox module incorrectly listed the
+  names of the `FXSELTYPE` and
+  `FXSELID` methods as
+  `SELTYPE` and `SELID`
+  (see RubyForge
+  Bug #3940). This error has been corrected. Thanks to Joel
+  VanderWerf for reporting this problem.
+
+* The `FXTableItem` constructor was supposed
+  to (optionally) accept a reference to an arbitrary Ruby object as its
+  third argument, but this wasn't working properly (see RubyForge
+  Bug #4005). This error has been corrected. Thanks to Mark
+  Volkman for reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.4.29 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.4 (January 21, 2006)
+
+* The build instructions for Unix platforms had not been updated
+  recently and as such contained some errors (see RubyForge
+  Bug #3014). These errors have been corrected. Thanks to Dave
+  Burns for reporting this problem.
+
+* The `extendSelection` method for the
+  `FXTable` class was raising an exception if an
+  out of bounds row or column index was passed in (see RubyForge
+  Bug #3050). This has been changed so that
+  `extendSelection` instead returns false for out
+  of bounds arguments. Thanks to Leonid Moiseichuk for reporting this
+  problem.
+
+* The `each_child` iterator method for the
+  `FXWindow` class would fail if the child window
+  was destroyed in the block (see RubyForge
+  Bug #3134). Thanks to Liam Irish for reporting this problem
+  and providing a patch.
+
+* The message data for the ´SEL_REPLACED´
+  message sent by the `FXTable` class to its target
+  was not being handled properly (see RubyForge
+  Bug #3244). There were also problems with the message data for
+  the ´SEL_SELECTED´ and
+  ´SEL_DESELECTED´ messages. Furthermore, the
+  ´SEL_REPLACED´ message was not documented in the
+  RDoc documentation for the `FXTable` class. All
+  of these problems have been corrected. Thanks to _blackdog for
+  reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.4.29 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.3 (November 7, 2005)
+
+* The ´TOGGLEBUTTON_KEEPSTATE´ option for the
+  `FXToggleButton` class was not documented (see
+  RubyForge
+  Bug #2286). This oversight has been corrected. Thanks to Tim
+  Smith for reporting this problem.
+
+* The `scintilla.rb` library file was not up to
+  date with the latest FXScintilla release, and as a result it was
+  missing some methods (see RubyForge
+  Bug #2479). This oversight has been corrected. Thanks to Maxim
+  Kulkin for reporting this problem.
+
+* Due to changes in the APIs for timers and chores, the mechanisms
+  for removing chores and timeouts were broken (see RubyForge
+  Bug #2563). This bug has been fixed. Thanks to "moinker" for
+  reporting this problem.
+
+* An error in the test setup caused all of the tests for the
+  `FXList` class to fail (see RubyForge
+  Bug #2564). This bug has been fixed. Thanks to Peter for
+  reporting this problem.
+
+* Due to a bug in the test suite runner script, not all test cases
+  were being exercised (see RubyForge
+  Bug #2565). This bug has been fixed.
+
+* Calling the `getPixel` method for the
+  `FXImage` class when the client-side pixel buffer
+  for the image has already been released would cause a program to crash
+  (see RubyForge
+  Bug #2611). Now, `getPixel` will raise
+  an exception if it's called after the pixel buffer has been released.
+  The documentation for `getPixel` has been
+  updated accordingly. Thanks to Gonzalo Garramuno for reporting this
+  problem.
+
+* The `makePositionVisible` method for the
+  `FXTable` class was raising an exception when
+  passed out-of-bounds values for the row or column index (see RubyForge
+  Bug #2660). This could happen, for example, if you were to
+  click in a table area outside of the regular cells (which indirectly
+  triggers a call to `makePositionVisible`). This
+  was actually inconsistent with standard FOX behavior, which simply
+  ignores out of bounds values for that method's arguments. This bug has
+  been fixed, and the documentation for
+  `makePositionVisible` has been updated
+  accordingly. Thanks to Ralf Jonas for reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.4.21 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.2 (August 22, 2005)
+
+* Due to a bug in the implementation, the
+  `checked?` method for the
+  `FXCheckButton` class always returned
+  ´false´ (see RubyForge
+  Bug #1852). This bug has been fixed. Thanks to Meinrad Recheis
+  for reporting this problem.
+
+* The API documentation for the `FXTable`
+  class listed several obsolete attributes (see RubyForge
+  Bug #1928). Those errors have been corrected. Thanks to Pavel
+  Sokolov for reporting these problems.
+
+* There were a number of bugs in the
+  `textedit.rb` example program (see RubyForge
+  Bug #1979), and those bugs have been fixed. Thanks to Claude
+  Marinier for reporting these problems.
+
+* The API documentation for the `FXTreeList`
+  class' `new` method still showed the number of
+  visible items (´nvis´) as its second argument
+  (see RubyForge
+  Bug #2171). This problem has been corrected. Thanks to Bill
+  Atkins for reporting this problem.
+
+* The API documentation for the `FXTopWindow`
+  class had a number of errors (see RubyForge
+  Bug #2269). This problem has been corrected.
+
+* The API documentation for the `FXTreeList`
+  class still listed the obsolete `reparentItem`
+  method (see RubyForge
+  Bug #2270). This problem has been corrected. Thanks to Jacob
+  Hansen for reporting this problem.
+
+* Due to a bug in how the SWIG typemaps for the
+  ´FXlong´ type were defined, some methods for the
+  `FXFileStream` class were broken (see RubyForge
+  Bug #2275). This problem has been corrected. Thanks to Gonzalo
+  Garramuno for reporting this problem.
+
+* Merged in all of the fixes for FXRuby 1.2.6.
+
+* The binary gem for Windows was built with FOX version 1.4.17 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.1 (August 20, 2005)
+
+* This is the second release of FXRuby which is compatible with
+  FOX 1.4, and as such should be considered an "unstable" release. For a
+  history of the changes made during the FOX 1.3 and 1.4 development,
+  see the [News](http://www.fox-toolkit.com/news.html)
+  page at the FOX Web site.
+
+* The unit tests (in the `tests` subdirectory)
+  had not been updated to require the ´fox14´
+  feature, and were still looking at ´fox12´. This
+  has been corrected.
+
+* A number of minor problems were corrected for the Windows build
+  of FXRuby.
+
+* The binary gem for Windows was built with FOX version 1.4.17 and
+  FXScintilla version 1.63.
+
+
+## Changes For Version 1.4.0 (August 19, 2005)
+
+* This is the first release of FXRuby which is compatible with FOX
+  1.4, and as such should be considered an "unstable" release. For a
+  history of the changes made during the FOX 1.3 and 1.4 development,
+  see the [News](http://www.fox-toolkit.com/news.html)
+  page at the FOX Web site.
+
+
+## Changes For Version 1.2.6 (April 15, 2005)
+
+* Some additional problems related to calling the
+  `setTableSize` method for an
+  `FXTable` were discovered (see RubyForge
+  Bug #1597). This problem has been corrected. Thanks to Joel
+  VanderWerf for reporting this problem.
+
+* The `iconlist.rb` example program had a
+  "Sort" pulldown menu filled with a number of commands that didn't
+  really do anything, including sorting the items (see RubyForge
+  Bug #1654). This pulldown menu has been removed from that
+  example.
+
+* The API documentation for the `FXDC` class
+  erroneously referred to the `font` attribute as
+  `textFont` (see RubyForge
+  Bug #1667). This problem has been corrected. Thanks to Meinrad
+  Recheis for reporting this problem.
+
+* The `checked?`,
+  `unchecked?` and
+  `maybe?` methods for the
+  `FXMenuCheck` class were missing (see RubyForge
+  Bug #1677). This problem has been corrected. Thanks to Oliver
+  Smith for reporting this problem.
+
+* The API documentation for the
+  `FXScrollArea` class incorrectly spelled the
+  names of the `horizontalScrollBar` and
+  `verticalScrollBar` methods as
+  `horizontalScrollbar` and
+  `verticalScrollbar` (see RubyForge
+  Bug #1678). The documentation has been corrected. Thanks to
+  Jannis Pohlmann for reporting this mistake.
+
+* Some code in the `groupbox.rb` example
+  program was calling the `getRootWindow` method,
+  but that method has been renamed to `getRoot`
+  (see RubyForge
+  Bug #1692). This problem has been corrected. Thanks to
+  Jaroslav Stika for reporting this problem.
+
+* The `hasChar?` method for the
+  `FXFont` class was spelled without a trailing
+  question mark, but it seems more Ruby-like that it should, so we've
+  added an alias for that (see RubyForge
+  Bug #1714). This method also now accepts a string of size 1
+  (i.e. a single character) as its input, as an alternative to an
+  ordinal value. Thanks to Meinrad Recheis for these suggestions.
+
+* The API documentation for the `FXImage`
+  class mistakenly listed ´IMAGE_ALPHA´ as a valid
+  image rendering hint, but this flag is no longer needed since FOX
+  images now always contain an alpha channel (see RubyForge
+  Bug #1715). The documentation has been corrected. Thanks to
+  Meinrad Recheis for reporting this mistake.
+
+* Due to an error in the SWIG interface files, the
+  `data` method for the
+  `FXSettings` class was not being wrapped
+  properly. As a result, this method was unavailable and in turn led to
+  other dependent methods (like `each_section`)
+  to be unavailable as well (see RubyForge
+  Bug #1771). This error has been corrected. Thanks to Jannis
+  Pohlmann for reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.2.16 and
+  FXScintilla version 1.62.
+
+
+## Changes For Version 1.2.5 (March 1, 2005)
+
+* The change made for FXRuby version 1.2.4 regarding garbage
+  collection for table items corrected only one of the problems
+  described in RubyForge
+  Bug #1445; There was still a problem related to the
+  "destructive" effects of the `setTableSize`
+  method for the `FXTable` class. This problem has
+  now been corrected as well. Thanks to David Peoples, Jamey Cribbs and
+  Joel VanderWerf for their assistance in helping me to track down this
+  problem.
+
+* The `extractText` and
+  `overlayText` methods for the
+  `FXTable` class were implemented incorrectly and
+  weren't listed in the API documentation. These problems have been
+  corrected.
+
+* The checks for out-of-bounds indices in the
+  `getColumnX`,
+  `setColumnX`, `getRowY`,
+  `setRowY` and
+  `updateRange` methods for the
+  `FXTable` class were incorrect. These have been
+  fixed.
+
+* The `setTableSize` method for the
+  `FXTable` class now raises
+  `ArgError` if either the number of rows or
+  columns passed in as arguments is less than zero.
+
+* A typo in one of the source files was causing the build to fail
+  when compiled against Ruby versions 1.8.1 or earlier (see RubyForge
+  Bug #1551). This error has been corrected. Thanks to Alex
+  McGuire for reporting this problem.
+
+* The `selectItem` method for the
+  `FXTable` class was removed in FOX 1.2, so we've
+  added a convenience method for this that just calls the
+  `selectRange` method under the hood (see RubyForge
+  Bug #1562). Thanks to Joel VanderWerf for this
+  suggestion.
+
+* The binary gem for Windows was built with FOX version 1.2.13 and
+  FXScintilla version 1.62.
+
+
+## Changes For Version 1.2.4 (February 23, 2005)
+
+* Due to a change in some of the internal Ruby C APIs, a
+  compile-time error for FXRuby was introduced in some of the Ruby 1.8.2
+  preview releases (see RubyForge
+  Bug #1039). One should not see any compile-time errors when
+  compiling FXRuby (versions 1.2.3 or later) against the Ruby 1.8.2
+  final release, but I've neverthless made a change to how those
+  internal APIs are used, to avoid any potential problems. Thanks to the
+  many users who pointed out this problem.
+
+* Joel VanderWerf suggested some enhancements to the
+  `image.rb` example program in order to improve its
+  startup time (see RubyForge
+  Bug #1281). Those changes have been incorporated. Thanks to
+  Joel for this suggestion.
+
+* One change for the `FXImage` class between
+  FOX versions 1.0 and 1.2 is the nature of the pixel buffer that's
+  passed to the `FXImage` constructor. Previously,
+  this pixel buffer was expected to be a string of bytes; now it's
+  expected to be an array of ´FXColor´ values. This
+  modification was not implemented correctly for FXRuby versions 1.2.3
+  and earlier (see RubyForge
+  Bug #1427). This bug has been corrected, and the example
+  program (`image.rb`) and test cases have been
+  updated as well. Thanks to Oliver Smith and others for reporting this
+  problem.
+
+* A couple of different problems, reported by Patrick Fernie and
+  David Peoples, exposed a flaw in how FXRuby manages the links between
+  FOX objects and their Ruby peers when the FOX objects are destroyed
+  (see RubyForge
+  Bug #1445). Without going into all the gory details, let's
+  just say that since we have no explicit control over when Ruby's
+  garbage collector decides to "collect" those Ruby peers that point to
+  C++ objects that have been destroyed, we need to take steps to
+  neutralize those Ruby peer objects so that they can't cause your
+  application to crash in the meantime; I've implemented a fix to take
+  care of this situation. Thanks to Patrick and David for reporting
+  these problems.
+
+* The API documentation for FXRuby 1.2 still contained references
+  to the old "spellings" of the `fxparseAccel`
+  and `fxparseHotKey` method names, which were
+  all lowercase (i.e. `fxparseaccel` and
+  `fxparsehotkey`). (see RubyForge
+  Bug #1470). These errors have been corrected.
+
+* Added the `FXScrollArea#scrollCorner`
+  method, which returns a reference to the scroll corner for any window
+  derived from `FXScrollArea` (see RubyForge
+  Feature Request #1226). Thanks to Brian Sheehan for this
+  suggestion.
+
+* Added the `FXMemoryBuffer#to_a` method,
+  which is just an alias for the `data` accessor
+  method that returns a copy of the data buffer as an array (see RubyForge
+  Feature Request #1295). Thanks to Meinrad Recheis for this
+  suggestion.
+
+* Added the `appendRows` and
+  `appendColumns` methods to the
+  `FXTable` class (see RubyForge
+  Feature Request #1295). Thanks to Brett Hallett for this
+  suggestion.
+
+* The binary gem for Windows was built with FOX version 1.2.13 and
+  FXScintilla version 1.62.
+
+
+## Changes For Version 1.2.3 (January 22, 2005)
+
+* Since group boxes containing radio buttons no longer enforce the
+  radio behavior of radio buttons (i.e. keeping only one radio button
+  selected at a time), some of the example programs were no longer
+  working as desired (see RubyForge
+  Bug #751 and RubyForge
+  Bug #1280). This problem has been corrected. Thanks to Yuri
+  Leikind and Barry DeZonia for reporting this problem.
+
+* Bob Sidebotham reported a little typo in the
+  `table.rb` example program (see RubyForge
+  Bug #990). This has been corrected.
+
+* The API documentation for `FXList` did not
+  reflect the changes for FOX 1.2; the
+  `retrieveItem()` has been renamed to
+  `getItem()` and
+  `insertItem()` has been renamed to
+  `setItem()` (see RubyForge
+  Bug #1037 and RubyForge
+  Bug #1257). This has been corrected. Thanks to Remy Drouilhet
+  and Stephan Kamper for reporting this problem.
+
+* The Windows installer was missing some of the documentation
+  files (see RubyForge
+  Bug #1139). This has been corrected. Thanks to Curt Hibbs and
+  Mark Smith for reporting this problem.
+
+* The `browser.rb` example program was broken
+  (see RubyForge
+  Bug #1146). This has been corrected. Thanks to Stefan Lang for
+  reporting this problem.
+
+* The attribute setter for
+  `FXHeaderItem#justification` was defined
+  incorrectly (see RubyForge
+  Bug #1276). This has been corrected. Thanks to Joel VanderWerf
+  for reporting this problem (and providing a patch to fix it).
+
+* The `filenames` alias for the
+  `FXFileDialog#getFilenames()` instance method
+  was missing (see RubyForge
+  Bug #1277). This error has been corrected. Thanks to Barry
+  DeZonia for reporting this problem.
+
+* The API documentation for the
+  `FXFileDialog` class methods
+  `getOpenFilenames()`,
+  `getOpenDirectory()`,
+  `getOpenFilename()` and
+  `getSaveFilename()` was extremely inadequate
+  (see RubyForge
+  Bug #1279). This documentation has been improved. Thanks to
+  Barry DeZonia for reporting this problem.
+
+* Brett Hallett contributed a Ruby port of the "ratio" example
+  program from the regular FOX distribution, for demonstrating the use
+  of the new `FXSpring` layout manager (see RubyForge
+  Bug #1282). Many thanks to Brett for this addition!
+
+* Joel VanderWerf contributed code to simplify how programs
+  interact with modal and non-modal dialog boxes (see RubyForge
+  Bug #1283). See the API documentation for the new
+  `FXDialogBox#execute_modal` and
+  `FXDialogBox#execute_nonmodal` methods for
+  examples of their use.
+
+* The attribute setters for
+  `FXRealSpinner#selBackColor` and
+  `FXSpinner#selBackColor` were defined
+  incorrectly (see RubyForge
+  Bug #1297). These have been corrected. Thanks to Meinrad
+  Recheis for reporting this problem.
+
+* The `tooltipPause` attribute reader for
+  the `FXApp` class was missing (see RubyForge
+  Patch #1306). Thanks to Joel VanderWerf for reporting this
+  omission and providing a patch to fix it.
+
+* The API documentation for the
+  `FXToolBarTab` class was missing (see RubyForge
+  Bug #1322). Thanks to Joel VanderWerf for reporting this
+  omission.
+
+* The attribute accessors for
+  `FXText#visibleRows` and
+  `FXText#visibleColumns` were defined and
+  documented incorrectly (see RubyForge
+  Bug #1325). These have been corrected. Thanks to Karl El-Koura
+  for reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.2.13 and
+  FXScintilla version 1.62.
+
+
+## Changes For Version 1.2.2 (October 1, 2004)
+
+* In order to avoid versioning problems when dealing with a mix of
+  applications based on either FXRuby 1.0 or 1.2, the feature name for
+  FXRuby has been changed from "fox" to "fox12". For most application
+  developers, this means that you will need to modify the source code
+  for applications targeted at FXRuby 1.2 to begin with the line
+  ´require 'fox12'´Note that no
+  changes should be required for legacy applications targeted at FXRuby
+  1.0.
+
+* Made a number of updates to the documentation, to reflect API
+  changes for FXRuby 1.2.
+
+* The binary gem for Windows was built with FOX version 1.2.9 and
+  FXScintilla version 1.61.
+
+
+## Changes For Version 1.2a2 (July 10, 2004)
+
+* This is the second "alpha" release of FXRuby 1.2. This release
+  should be compatible with any FOX library version 1.2; it is not
+  compatible with any previous FOX library versions. As this is an alpha
+  release, users should expect a certain amount of instability, bugs,
+  etc.
+
+* For this release, all of the FOX 1.2 classes are available with
+  the exception of the `FXBitmapView` class. There
+  is a small problem with how the `FXBitmapView`
+  class is declared in the FOX 1.2 header files, and I'm trying to
+  decide how best to resolve that problem. The goal is to have this
+  problem resolved by the next alpha release of FXRuby.
+
+* For this release, all of the RDoc-based online documentation has
+  been brought up to date with the new APIs.
+
+* Portions of the FXRuby User's Guide were still out of date with
+  respect to the new APIs (see SourceForge Bug #988623). This has been fixed.
+
+* The `mditest.rb` example program was not up
+  to date with the new APIs. This has been fixed.
+
+* The `glviewer.rb` example program was not up
+  to date with the new APIs (see SourceForge Bug #986479). This has been fixed. Thanks to Remy Drouilhet
+  for reporting this problem and suggesting the fixes.
+
+* The `FXGLGroup#bounds` method was defined
+  incorrectly (see SourceForge Bug #986476). This has been fixed. Thanks to Remy Drouilhet
+  for reporting this problem and suggesting the fix.
+
+* The `scintilla-test.rb` example program was
+  not up to date with the new APIs (see SourceForge Bug #986172). This has been fixed. Thanks to Peter Watkins for
+  reporting this problem and submitting a corrected version of the
+  program.
+
+* There was a small typo in the table.rb example program (see
+  SourceForge Bug #988152). This has been fixed. Thanks to Jamey Cribbs for
+  reporting this problem and suggesting the fix.
+
+* Due to an oversight on my part, one of the overloaded
+  constructors for the `FXRegion` class wasn't
+  wrapped properly (see SourceForge Bug #986181). This has been fixed. Thanks to Bil Bas for
+  reporting this problem.
+
+* Removed some obsolete aliases for the old leading and trailing
+  rows and columns for the `FXTable` class (see
+  SourceForge Bug #988038). Thanks to Yuri Leikind for reporting this
+  problem.
+
+* Added `FXTable` instance methods
+  `horizontalGridShown=()` and
+  `verticalGridShown=()` to complement the
+  already available `horizontalGridShown?` and
+  `verticalGridShown?` methods.
+
+* The binary gem for the 1.2a1 release on Windows didn't have PNG
+  or JPEG image support built-in (see SourceForge Bug #986180). This has been fixed. Thanks to Bil Bas for
+  reporting this problem.
+
+* The binary gem for Windows was built with FOX version 1.2.7 and
+  FXScintilla version 1.61.
+
+
+## Changes For Version 1.2a1 (June 28, 2004)
+
+* This is the first "alpha" release of FXRuby 1.2. This release
+  should be compatible with any FOX library version 1.2; it is not
+  compatible with any previous FOX library versions. As this is an alpha
+  release, users should expect a certain amount of instability, bugs,
+  etc.
+  The intent of this first alpha release is twofold. The primary
+  intent is allow application developers who have current projects based
+  on FXRuby 1.0 to begin the process of updating their applications for
+  compatibility with FXRuby 1.2. For this release, all of the classes
+  that existed in FXRuby 1.0 have been updated for compatibility with
+  FOX 1.2, and so developers should at least be able to begin to "port"
+  their applications forward now. Note that there have been a number of
+  changes for FOX 1.2 and FXRuby 1.2, both in terms of API changes and
+  less obvious "behavioral" changes. For a detailed summary of these
+  changes, please see "What's New in FOX 1.2" (also available as a PDF).
+  Note that few, if any, of the new classes introduced in FOX 1.2 are
+  available in this first alpha release of FXRuby 1.2. Support for those
+  new classes should come along quickly in subsequent alpha releases of
+  FXRuby 1.2.
+  The secondary intent of this first alpha release is to introduce
+  the new RubyGems-based packaging
+  of FXRuby and to begin to work out the inevitable kinks in that
+  system.
+
+* The binary gem for Windows was built with FOX version 1.2.4 and
+  FXScintilla version 1.57.
+
diff --git a/History.txt b/History.txt
deleted file mode 100755
index 0a10a0e0..00000000
--- a/History.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-=== 1.6.29 / 2015-02-17
-
-* Add Windows binaries for Ruby-2.1 and 2.2.
-* Use shared libs for Windows binary gems to reduce gem size.
-* Allow non owned assignment of image data to FXImage derivations
-  without copy'ing pixel data.
-* Allow retrival of parts of the pixel data.
-* Fix namespace specifier for FXRGB in kwargs.rb.
-* Change GC'ing of TreeListBox and FXTreeItem. Fixes #10
-* Update to swig version 2.0 or newer. Fixes #13
-
-=== 1.6.28 / 2013-07-05
-
-* Fix build for Ruby-2.0.0-p127+
-* Update libraries for win32 build: libfox-1.6.49
-
-=== 1.6.27 / 2013-04-05
-
-* Add support for Ruby-2.0.
-* Add cross compilation for x64-mingw32 target.
-
-=== 1.6.26 / 2013-02-16
-
-* Mark all text strings retrieved from fox as UTF-8 when running on Ruby 1.9
-* Fix loading error on Ruby 1.8.7 by renaming the C++ extension to fox16_c
-* Update libraries for windows cross compilation
-
-=== 1.6.25 / 2012-06-17
-
-* Windows: Fix slow loading of fox16.so by using a more recent mingw-w64 compiler
-  (reported by Allen Doug and Igor Jorobus)
-* Fix two possible segfaults in conjunction with FXSplashWindow (reported by Igor Jorobus)
-
-=== 1.6.24 / 2012-06-06
-
-* Update libraries for win32 build: libz-1.2.7 libpng-1.5.10 libjpeg-8d libtiff-4.0.1 libfox-1.6.45
-* Avoid Segfauls in lots of methods when called with nil instead of FXApp, FXComposite or FXWindow objects
-
-=== 1.6.23 / 2012-03-08
-
-* Add YARD documentation support
-* Use generated Manifest.txt
-* Support for parallel task execution with drake
-
-=== 1.6.22 / 2012-02-21
-
-* Allow better access to raw pixel data of FXImage and derivatives
-* Build Windows binary gem per cross compiler on Linux
-* Add support for Rubinius (currently requires rubinius from git)
-* Add alias FXApp#modalWindow, as described in rdoc
-* Add quality parameter to FXJPGImage and FXJPGIcon
-* Fix invalid memory access in final GC call when using FXMenuCommand with acckey
-* Fix double referenced foxObj when borrowed object registration is triggered from C++
-* Fix Segfault while GC'ing FXWindows
-* Fix 'object allocation not allowed while garbage collection' bug
-* Fix clipboard handling on windows
-* Add missing namespace qualifier to FXSEL in FXAccelTable
-* Fix GC bug in FXAccelTable
-* Fix double free in FXMemoryStream#giveBuffer
-* Fix invalid memory access in typemap to zero terminated FXchar* (such as fillItems methods)
-* Fix FXApp#addInput for Ruby 1.9 on Linux
-* Fix "ruby_code case not handled: Regexp" issue with newer rubygems
-
-=== 1.6.20 / 2009-03-06
-
-* Integrated the Hoe and rake-compiler extensions into the Rakefile and
-  removed redundant tasks.
-* Did some work to provide support for MinGW builds.
-
-=== 1.6.19 / 2009-03-06
-
-* Please see http://www.fxruby.org/doc/changes.html
-  for a complete list of the changes in this release.
diff --git a/Manifest.txt b/Manifest.txt
deleted file mode 100644
index 94d8f7db..00000000
--- a/Manifest.txt
+++ /dev/null
@@ -1,1214 +0,0 @@
-.gemtest
-.gitignore
-.yardopts
-History.txt
-Manifest.txt
-README.rdoc
-Rakefile
-TODO
-doap.rdf.erb
-examples/RAA.rb
-examples/README
-examples/WhatAQuietStiff.rb
-examples/babelfish.rb
-examples/bounce.rb
-examples/browser.rb
-examples/button.rb
-examples/canvasdemo.rb
-examples/charts.rb
-examples/custom_table_item.rb
-examples/datatarget.rb
-examples/dctest.rb
-examples/dialog.rb
-examples/dilbert.rb
-examples/dirlist.rb
-examples/dragdrop.rb
-examples/dragsource.rb
-examples/dropsite.rb
-examples/foursplit.rb
-examples/gdchart.rb
-examples/gembrowser.rb
-examples/gltest.rb
-examples/glviewer.rb
-examples/groupbox.rb
-examples/header.rb
-examples/hello.rb
-examples/hello2.rb
-examples/iRAA.rb
-examples/iconlist.rb
-examples/icons/AngryGuyInBunnySuit.ico
-examples/icons/FatBot.ico
-examples/icons/FlippedySwitch.ico
-examples/icons/LeGoon.ico
-examples/icons/Net.ico
-examples/icons/RedMacOS.ico
-examples/icons/SawBlade.ico
-examples/icons/backview.png
-examples/icons/big.png
-examples/icons/bigfolder.png
-examples/icons/bigpenguin.png
-examples/icons/bluebullet14x14.gif
-examples/icons/bottomview.png
-examples/icons/camera.png
-examples/icons/capbutt.png
-examples/icons/capnotlast.png
-examples/icons/capproj.png
-examples/icons/capround.png
-examples/icons/colorpal.png
-examples/icons/copy.png
-examples/icons/cut.png
-examples/icons/delimit.png
-examples/icons/dippy.png
-examples/icons/double_dash.png
-examples/icons/filenew.png
-examples/icons/fileopen.png
-examples/icons/filesave.png
-examples/icons/filesaveas.png
-examples/icons/fonts.png
-examples/icons/fox.png
-examples/icons/foxicon.png
-examples/icons/frontview.png
-examples/icons/gem_big.png
-examples/icons/gem_small.png
-examples/icons/hello2.png
-examples/icons/help.png
-examples/icons/indent.png
-examples/icons/jbevel.png
-examples/icons/jmiter.png
-examples/icons/jround.png
-examples/icons/kill.png
-examples/icons/leftview.png
-examples/icons/light.png
-examples/icons/minidoc.png
-examples/icons/minifolder.png
-examples/icons/minifolderopen.png
-examples/icons/newfolder.png
-examples/icons/nolight.png
-examples/icons/onoff_dash.png
-examples/icons/palette.png
-examples/icons/parallel.png
-examples/icons/paste.png
-examples/icons/pattern.png
-examples/icons/penguin.png
-examples/icons/perspective.png
-examples/icons/printicon.png
-examples/icons/prop.png
-examples/icons/redo.png
-examples/icons/rightview.png
-examples/icons/saveas.png
-examples/icons/shutter1.png
-examples/icons/shutter2.png
-examples/icons/small.png
-examples/icons/smoothlight.png
-examples/icons/solid_line.png
-examples/icons/tbuplevel.png
-examples/icons/topview.png
-examples/icons/transpbullet14x14.gif
-examples/icons/undo.png
-examples/icons/winapp.png
-examples/icons/zoom.png
-examples/image.rb
-examples/imageviewer.rb
-examples/inputs.rb
-examples/mditest.rb
-examples/pig.rb
-examples/raabrowser.rb
-examples/ratio.rb
-examples/rmagick.rb
-examples/rulerview.rb
-examples/scintilla-test.rb
-examples/scribble-orig.rb
-examples/scribble.rb
-examples/shutter.rb
-examples/splitter.rb
-examples/styledtext.rb
-examples/tabbook.rb
-examples/table.rb
-examples/textedit/commands.rb
-examples/textedit/helpwindow.rb
-examples/textedit/prefdialog.rb
-examples/textedit/textedit.rb
-examples/unicode.rb
-ext/fox16_c/FXRbApp.cpp
-ext/fox16_c/FXRbDataTarget.cpp
-ext/fox16_c/FXRbGLViewer.cpp
-ext/fox16_c/FXRuby.cpp
-ext/fox16_c/MANIFEST
-ext/fox16_c/extconf.rb
-ext/fox16_c/impl.cpp
-ext/fox16_c/include/FXMemoryBuffer.h
-ext/fox16_c/include/FXRb4Splitter.h
-ext/fox16_c/include/FXRb7Segment.h
-ext/fox16_c/include/FXRbAccelTable.h
-ext/fox16_c/include/FXRbApp.h
-ext/fox16_c/include/FXRbAppVirtuals.h
-ext/fox16_c/include/FXRbArrowButton.h
-ext/fox16_c/include/FXRbBMPIcon.h
-ext/fox16_c/include/FXRbBMPImage.h
-ext/fox16_c/include/FXRbBitmap.h
-ext/fox16_c/include/FXRbBitmapFrame.h
-ext/fox16_c/include/FXRbBitmapView.h
-ext/fox16_c/include/FXRbBitmapVirtuals.h
-ext/fox16_c/include/FXRbButton.h
-ext/fox16_c/include/FXRbCURCursor.h
-ext/fox16_c/include/FXRbCanvas.h
-ext/fox16_c/include/FXRbCheckButton.h
-ext/fox16_c/include/FXRbChoiceBox.h
-ext/fox16_c/include/FXRbColorBar.h
-ext/fox16_c/include/FXRbColorDialog.h
-ext/fox16_c/include/FXRbColorList.h
-ext/fox16_c/include/FXRbColorRing.h
-ext/fox16_c/include/FXRbColorSelector.h
-ext/fox16_c/include/FXRbColorWell.h
-ext/fox16_c/include/FXRbColorWheel.h
-ext/fox16_c/include/FXRbComboBox.h
-ext/fox16_c/include/FXRbCommon.h
-ext/fox16_c/include/FXRbComposite.h
-ext/fox16_c/include/FXRbCursor.h
-ext/fox16_c/include/FXRbCursorVirtuals.h
-ext/fox16_c/include/FXRbDC.h
-ext/fox16_c/include/FXRbDCPrint.h
-ext/fox16_c/include/FXRbDCVirtuals.h
-ext/fox16_c/include/FXRbDCWindow.h
-ext/fox16_c/include/FXRbDataTarget.h
-ext/fox16_c/include/FXRbDebugTarget.h
-ext/fox16_c/include/FXRbDelegator.h
-ext/fox16_c/include/FXRbDial.h
-ext/fox16_c/include/FXRbDialogBox.h
-ext/fox16_c/include/FXRbDialogBoxVirtuals.h
-ext/fox16_c/include/FXRbDict.h
-ext/fox16_c/include/FXRbDirBox.h
-ext/fox16_c/include/FXRbDirDialog.h
-ext/fox16_c/include/FXRbDirList.h
-ext/fox16_c/include/FXRbDirSelector.h
-ext/fox16_c/include/FXRbDockBar.h
-ext/fox16_c/include/FXRbDockBarVirtuals.h
-ext/fox16_c/include/FXRbDockHandler.h
-ext/fox16_c/include/FXRbDockSite.h
-ext/fox16_c/include/FXRbDockSiteVirtuals.h
-ext/fox16_c/include/FXRbDockTitle.h
-ext/fox16_c/include/FXRbDocument.h
-ext/fox16_c/include/FXRbDragCorner.h
-ext/fox16_c/include/FXRbDrawable.h
-ext/fox16_c/include/FXRbDrawableVirtuals.h
-ext/fox16_c/include/FXRbDriveBox.h
-ext/fox16_c/include/FXRbFileDialog.h
-ext/fox16_c/include/FXRbFileDict.h
-ext/fox16_c/include/FXRbFileDictVirtuals.h
-ext/fox16_c/include/FXRbFileList.h
-ext/fox16_c/include/FXRbFileSelector.h
-ext/fox16_c/include/FXRbFoldingItemVirtuals.h
-ext/fox16_c/include/FXRbFoldingList.h
-ext/fox16_c/include/FXRbFoldingListVirtuals.h
-ext/fox16_c/include/FXRbFont.h
-ext/fox16_c/include/FXRbFontDialog.h
-ext/fox16_c/include/FXRbFontSelector.h
-ext/fox16_c/include/FXRbFontVirtuals.h
-ext/fox16_c/include/FXRbFrame.h
-ext/fox16_c/include/FXRbGIFCursor.h
-ext/fox16_c/include/FXRbGIFIcon.h
-ext/fox16_c/include/FXRbGIFImage.h
-ext/fox16_c/include/FXRbGLCanvas.h
-ext/fox16_c/include/FXRbGLCanvasVirtuals.h
-ext/fox16_c/include/FXRbGLContext.h
-ext/fox16_c/include/FXRbGLObject.h
-ext/fox16_c/include/FXRbGLObjectVirtuals.h
-ext/fox16_c/include/FXRbGLShape.h
-ext/fox16_c/include/FXRbGLShapeVirtuals.h
-ext/fox16_c/include/FXRbGLViewer.h
-ext/fox16_c/include/FXRbGLViewerVirtuals.h
-ext/fox16_c/include/FXRbGLVisual.h
-ext/fox16_c/include/FXRbGradientBar.h
-ext/fox16_c/include/FXRbGroupBox.h
-ext/fox16_c/include/FXRbHeader.h
-ext/fox16_c/include/FXRbHeaderItemVirtuals.h
-ext/fox16_c/include/FXRbHorizontalFrame.h
-ext/fox16_c/include/FXRbICOIcon.h
-ext/fox16_c/include/FXRbICOImage.h
-ext/fox16_c/include/FXRbIcon.h
-ext/fox16_c/include/FXRbIconItemVirtuals.h
-ext/fox16_c/include/FXRbIconList.h
-ext/fox16_c/include/FXRbIconListVirtuals.h
-ext/fox16_c/include/FXRbIconSource.h
-ext/fox16_c/include/FXRbIconSourceVirtuals.h
-ext/fox16_c/include/FXRbId.h
-ext/fox16_c/include/FXRbIdVirtuals.h
-ext/fox16_c/include/FXRbImage.h
-ext/fox16_c/include/FXRbImageFrame.h
-ext/fox16_c/include/FXRbImageView.h
-ext/fox16_c/include/FXRbImageVirtuals.h
-ext/fox16_c/include/FXRbInputDialog.h
-ext/fox16_c/include/FXRbJPGIcon.h
-ext/fox16_c/include/FXRbJPGImage.h
-ext/fox16_c/include/FXRbKnob.h
-ext/fox16_c/include/FXRbLabel.h
-ext/fox16_c/include/FXRbList.h
-ext/fox16_c/include/FXRbListBox.h
-ext/fox16_c/include/FXRbListBoxVirtuals.h
-ext/fox16_c/include/FXRbListItemVirtuals.h
-ext/fox16_c/include/FXRbListVirtuals.h
-ext/fox16_c/include/FXRbMDIButton.h
-ext/fox16_c/include/FXRbMDIChild.h
-ext/fox16_c/include/FXRbMDIChildVirtuals.h
-ext/fox16_c/include/FXRbMDIClient.h
-ext/fox16_c/include/FXRbMDIClientVirtuals.h
-ext/fox16_c/include/FXRbMainWindow.h
-ext/fox16_c/include/FXRbMatrix.h
-ext/fox16_c/include/FXRbMenuBar.h
-ext/fox16_c/include/FXRbMenuButton.h
-ext/fox16_c/include/FXRbMenuCaption.h
-ext/fox16_c/include/FXRbMenuCascade.h
-ext/fox16_c/include/FXRbMenuCheck.h
-ext/fox16_c/include/FXRbMenuCommand.h
-ext/fox16_c/include/FXRbMenuPane.h
-ext/fox16_c/include/FXRbMenuRadio.h
-ext/fox16_c/include/FXRbMenuSeparator.h
-ext/fox16_c/include/FXRbMenuTitle.h
-ext/fox16_c/include/FXRbMessageBox.h
-ext/fox16_c/include/FXRbObject.h
-ext/fox16_c/include/FXRbObjectVirtuals.h
-ext/fox16_c/include/FXRbOptionMenu.h
-ext/fox16_c/include/FXRbPCXIcon.h
-ext/fox16_c/include/FXRbPCXImage.h
-ext/fox16_c/include/FXRbPNGIcon.h
-ext/fox16_c/include/FXRbPNGImage.h
-ext/fox16_c/include/FXRbPPMIcon.h
-ext/fox16_c/include/FXRbPPMImage.h
-ext/fox16_c/include/FXRbPacker.h
-ext/fox16_c/include/FXRbPicker.h
-ext/fox16_c/include/FXRbPopup.h
-ext/fox16_c/include/FXRbPopupVirtuals.h
-ext/fox16_c/include/FXRbPrintDialog.h
-ext/fox16_c/include/FXRbProgressBar.h
-ext/fox16_c/include/FXRbProgressDialog.h
-ext/fox16_c/include/FXRbRGBIcon.h
-ext/fox16_c/include/FXRbRGBImage.h
-ext/fox16_c/include/FXRbRadioButton.h
-ext/fox16_c/include/FXRbRealSlider.h
-ext/fox16_c/include/FXRbRealSpinner.h
-ext/fox16_c/include/FXRbRealSpinnerVirtuals.h
-ext/fox16_c/include/FXRbRecentFiles.h
-ext/fox16_c/include/FXRbRegistry.h
-ext/fox16_c/include/FXRbReplaceDialog.h
-ext/fox16_c/include/FXRbRootWindow.h
-ext/fox16_c/include/FXRbRuler.h
-ext/fox16_c/include/FXRbRulerView.h
-ext/fox16_c/include/FXRbScintilla.h
-ext/fox16_c/include/FXRbScrollArea.h
-ext/fox16_c/include/FXRbScrollAreaVirtuals.h
-ext/fox16_c/include/FXRbScrollBar.h
-ext/fox16_c/include/FXRbScrollPane.h
-ext/fox16_c/include/FXRbScrollWindow.h
-ext/fox16_c/include/FXRbSearchDialog.h
-ext/fox16_c/include/FXRbSeparator.h
-ext/fox16_c/include/FXRbSettings.h
-ext/fox16_c/include/FXRbShell.h
-ext/fox16_c/include/FXRbShutter.h
-ext/fox16_c/include/FXRbShutterVirtuals.h
-ext/fox16_c/include/FXRbSlider.h
-ext/fox16_c/include/FXRbSpinner.h
-ext/fox16_c/include/FXRbSpinnerVirtuals.h
-ext/fox16_c/include/FXRbSplashWindow.h
-ext/fox16_c/include/FXRbSplitter.h
-ext/fox16_c/include/FXRbSpring.h
-ext/fox16_c/include/FXRbStatusBar.h
-ext/fox16_c/include/FXRbStatusLine.h
-ext/fox16_c/include/FXRbStream.h
-ext/fox16_c/include/FXRbStreamVirtuals.h
-ext/fox16_c/include/FXRbStringDict.h
-ext/fox16_c/include/FXRbSwitcher.h
-ext/fox16_c/include/FXRbTGAIcon.h
-ext/fox16_c/include/FXRbTGAImage.h
-ext/fox16_c/include/FXRbTIFIcon.h
-ext/fox16_c/include/FXRbTIFImage.h
-ext/fox16_c/include/FXRbTabBar.h
-ext/fox16_c/include/FXRbTabBarVirtuals.h
-ext/fox16_c/include/FXRbTabBook.h
-ext/fox16_c/include/FXRbTabItem.h
-ext/fox16_c/include/FXRbTable.h
-ext/fox16_c/include/FXRbTableItemVirtuals.h
-ext/fox16_c/include/FXRbTableVirtuals.h
-ext/fox16_c/include/FXRbText.h
-ext/fox16_c/include/FXRbTextField.h
-ext/fox16_c/include/FXRbTextVirtuals.h
-ext/fox16_c/include/FXRbToggleButton.h
-ext/fox16_c/include/FXRbToolBar.h
-ext/fox16_c/include/FXRbToolBarGrip.h
-ext/fox16_c/include/FXRbToolBarShell.h
-ext/fox16_c/include/FXRbToolBarTab.h
-ext/fox16_c/include/FXRbToolTip.h
-ext/fox16_c/include/FXRbTopWindow.h
-ext/fox16_c/include/FXRbTopWindowVirtuals.h
-ext/fox16_c/include/FXRbTranslator.h
-ext/fox16_c/include/FXRbTranslatorVirtuals.h
-ext/fox16_c/include/FXRbTreeItemVirtuals.h
-ext/fox16_c/include/FXRbTreeList.h
-ext/fox16_c/include/FXRbTreeListBox.h
-ext/fox16_c/include/FXRbTreeListBoxVirtuals.h
-ext/fox16_c/include/FXRbTreeListVirtuals.h
-ext/fox16_c/include/FXRbTriStateButton.h
-ext/fox16_c/include/FXRbVerticalFrame.h
-ext/fox16_c/include/FXRbVisual.h
-ext/fox16_c/include/FXRbWindow.h
-ext/fox16_c/include/FXRbWindowVirtuals.h
-ext/fox16_c/include/FXRbWizard.h
-ext/fox16_c/include/FXRbXBMIcon.h
-ext/fox16_c/include/FXRbXBMImage.h
-ext/fox16_c/include/FXRbXPMIcon.h
-ext/fox16_c/include/FXRbXPMImage.h
-ext/fox16_c/include/FXRuby.h
-ext/fox16_c/include/impl.h
-ext/fox16_c/make_impl.rb
-ext/fox16_c/markfuncs.cpp
-ext/fox16_c/unregisterOwnedObjects.cpp
-fox-includes/FX4Splitter.h
-fox-includes/FX7Segment.h
-fox-includes/FX885910Codec.h
-fox-includes/FX885911Codec.h
-fox-includes/FX885913Codec.h
-fox-includes/FX885914Codec.h
-fox-includes/FX885915Codec.h
-fox-includes/FX885916Codec.h
-fox-includes/FX88591Codec.h
-fox-includes/FX88592Codec.h
-fox-includes/FX88593Codec.h
-fox-includes/FX88594Codec.h
-fox-includes/FX88595Codec.h
-fox-includes/FX88596Codec.h
-fox-includes/FX88597Codec.h
-fox-includes/FX88598Codec.h
-fox-includes/FX88599Codec.h
-fox-includes/FXAccelTable.h
-fox-includes/FXApp.h
-fox-includes/FXArray.h
-fox-includes/FXArrowButton.h
-fox-includes/FXBMPIcon.h
-fox-includes/FXBMPImage.h
-fox-includes/FXBZFileStream.h
-fox-includes/FXBitmap.h
-fox-includes/FXBitmapFrame.h
-fox-includes/FXBitmapView.h
-fox-includes/FXButton.h
-fox-includes/FXCP1250Codec.h
-fox-includes/FXCP1251Codec.h
-fox-includes/FXCP1252Codec.h
-fox-includes/FXCP1253Codec.h
-fox-includes/FXCP1254Codec.h
-fox-includes/FXCP1255Codec.h
-fox-includes/FXCP1256Codec.h
-fox-includes/FXCP1257Codec.h
-fox-includes/FXCP1258Codec.h
-fox-includes/FXCP437Codec.h
-fox-includes/FXCP850Codec.h
-fox-includes/FXCP852Codec.h
-fox-includes/FXCP855Codec.h
-fox-includes/FXCP856Codec.h
-fox-includes/FXCP857Codec.h
-fox-includes/FXCP860Codec.h
-fox-includes/FXCP861Codec.h
-fox-includes/FXCP862Codec.h
-fox-includes/FXCP863Codec.h
-fox-includes/FXCP864Codec.h
-fox-includes/FXCP865Codec.h
-fox-includes/FXCP866Codec.h
-fox-includes/FXCP869Codec.h
-fox-includes/FXCP874Codec.h
-fox-includes/FXCURCursor.h
-fox-includes/FXCanvas.h
-fox-includes/FXCheckButton.h
-fox-includes/FXChoiceBox.h
-fox-includes/FXColorBar.h
-fox-includes/FXColorDialog.h
-fox-includes/FXColorList.h
-fox-includes/FXColorRing.h
-fox-includes/FXColorSelector.h
-fox-includes/FXColorWell.h
-fox-includes/FXColorWheel.h
-fox-includes/FXComboBox.h
-fox-includes/FXComposeContext.h
-fox-includes/FXComposite.h
-fox-includes/FXCursor.h
-fox-includes/FXDC.h
-fox-includes/FXDCPrint.h
-fox-includes/FXDCWindow.h
-fox-includes/FXDLL.h
-fox-includes/FXDataTarget.h
-fox-includes/FXDate.h
-fox-includes/FXDebugTarget.h
-fox-includes/FXDelegator.h
-fox-includes/FXDial.h
-fox-includes/FXDialogBox.h
-fox-includes/FXDict.h
-fox-includes/FXDir.h
-fox-includes/FXDirBox.h
-fox-includes/FXDirDialog.h
-fox-includes/FXDirList.h
-fox-includes/FXDirSelector.h
-fox-includes/FXDockBar.h
-fox-includes/FXDockHandler.h
-fox-includes/FXDockSite.h
-fox-includes/FXDockTitle.h
-fox-includes/FXDocument.h
-fox-includes/FXDragCorner.h
-fox-includes/FXDrawable.h
-fox-includes/FXDriveBox.h
-fox-includes/FXElement.h
-fox-includes/FXException.h
-fox-includes/FXExpression.h
-fox-includes/FXExtentd.h
-fox-includes/FXExtentf.h
-fox-includes/FXFile.h
-fox-includes/FXFileDialog.h
-fox-includes/FXFileDict.h
-fox-includes/FXFileList.h
-fox-includes/FXFileSelector.h
-fox-includes/FXFileStream.h
-fox-includes/FXFoldingList.h
-fox-includes/FXFont.h
-fox-includes/FXFontDialog.h
-fox-includes/FXFontSelector.h
-fox-includes/FXFrame.h
-fox-includes/FXGIFCursor.h
-fox-includes/FXGIFIcon.h
-fox-includes/FXGIFImage.h
-fox-includes/FXGLCanvas.h
-fox-includes/FXGLCone.h
-fox-includes/FXGLContext.h
-fox-includes/FXGLCube.h
-fox-includes/FXGLCylinder.h
-fox-includes/FXGLObject.h
-fox-includes/FXGLShape.h
-fox-includes/FXGLSphere.h
-fox-includes/FXGLTriangleMesh.h
-fox-includes/FXGLViewer.h
-fox-includes/FXGLVisual.h
-fox-includes/FXGUISignal.h
-fox-includes/FXGZFileStream.h
-fox-includes/FXGradientBar.h
-fox-includes/FXGroupBox.h
-fox-includes/FXHash.h
-fox-includes/FXHeader.h
-fox-includes/FXHorizontalFrame.h
-fox-includes/FXICOIcon.h
-fox-includes/FXICOImage.h
-fox-includes/FXIFFIcon.h
-fox-includes/FXIFFImage.h
-fox-includes/FXIO.h
-fox-includes/FXIcon.h
-fox-includes/FXIconDict.h
-fox-includes/FXIconList.h
-fox-includes/FXIconSource.h
-fox-includes/FXId.h
-fox-includes/FXImage.h
-fox-includes/FXImageFrame.h
-fox-includes/FXImageView.h
-fox-includes/FXInputDialog.h
-fox-includes/FXJPGIcon.h
-fox-includes/FXJPGImage.h
-fox-includes/FXKOI8RCodec.h
-fox-includes/FXKnob.h
-fox-includes/FXLabel.h
-fox-includes/FXList.h
-fox-includes/FXListBox.h
-fox-includes/FXMDIButton.h
-fox-includes/FXMDIChild.h
-fox-includes/FXMDIClient.h
-fox-includes/FXMainWindow.h
-fox-includes/FXMat3d.h
-fox-includes/FXMat3f.h
-fox-includes/FXMat4d.h
-fox-includes/FXMat4f.h
-fox-includes/FXMatrix.h
-fox-includes/FXMemMap.h
-fox-includes/FXMemoryStream.h
-fox-includes/FXMenuBar.h
-fox-includes/FXMenuButton.h
-fox-includes/FXMenuCaption.h
-fox-includes/FXMenuCascade.h
-fox-includes/FXMenuCheck.h
-fox-includes/FXMenuCommand.h
-fox-includes/FXMenuPane.h
-fox-includes/FXMenuRadio.h
-fox-includes/FXMenuSeparator.h
-fox-includes/FXMenuTitle.h
-fox-includes/FXMessageBox.h
-fox-includes/FXObject.h
-fox-includes/FXObjectList.h
-fox-includes/FXOptionMenu.h
-fox-includes/FXPCXIcon.h
-fox-includes/FXPCXImage.h
-fox-includes/FXPNGIcon.h
-fox-includes/FXPNGImage.h
-fox-includes/FXPPMIcon.h
-fox-includes/FXPPMImage.h
-fox-includes/FXPacker.h
-fox-includes/FXPath.h
-fox-includes/FXPicker.h
-fox-includes/FXPipe.h
-fox-includes/FXPoint.h
-fox-includes/FXPopup.h
-fox-includes/FXPrintDialog.h
-fox-includes/FXProgressBar.h
-fox-includes/FXProgressDialog.h
-fox-includes/FXQuatd.h
-fox-includes/FXQuatf.h
-fox-includes/FXRASIcon.h
-fox-includes/FXRASImage.h
-fox-includes/FXRGBIcon.h
-fox-includes/FXRGBImage.h
-fox-includes/FXRadioButton.h
-fox-includes/FXRanged.h
-fox-includes/FXRangef.h
-fox-includes/FXRealSlider.h
-fox-includes/FXRealSpinner.h
-fox-includes/FXRecentFiles.h
-fox-includes/FXRectangle.h
-fox-includes/FXRegion.h
-fox-includes/FXRegistry.h
-fox-includes/FXReplaceDialog.h
-fox-includes/FXRex.h
-fox-includes/FXRootWindow.h
-fox-includes/FXRuler.h
-fox-includes/FXRulerView.h
-fox-includes/FXScrollArea.h
-fox-includes/FXScrollBar.h
-fox-includes/FXScrollPane.h
-fox-includes/FXScrollWindow.h
-fox-includes/FXSearchDialog.h
-fox-includes/FXSeparator.h
-fox-includes/FXSettings.h
-fox-includes/FXShell.h
-fox-includes/FXShutter.h
-fox-includes/FXSize.h
-fox-includes/FXSlider.h
-fox-includes/FXSocket.h
-fox-includes/FXSphered.h
-fox-includes/FXSpheref.h
-fox-includes/FXSpinner.h
-fox-includes/FXSplashWindow.h
-fox-includes/FXSplitter.h
-fox-includes/FXSpring.h
-fox-includes/FXStat.h
-fox-includes/FXStatusBar.h
-fox-includes/FXStatusLine.h
-fox-includes/FXStream.h
-fox-includes/FXString.h
-fox-includes/FXStringDict.h
-fox-includes/FXSwitcher.h
-fox-includes/FXSystem.h
-fox-includes/FXTGAIcon.h
-fox-includes/FXTGAImage.h
-fox-includes/FXTIFIcon.h
-fox-includes/FXTIFImage.h
-fox-includes/FXTabBar.h
-fox-includes/FXTabBook.h
-fox-includes/FXTabItem.h
-fox-includes/FXTable.h
-fox-includes/FXText.h
-fox-includes/FXTextCodec.h
-fox-includes/FXTextField.h
-fox-includes/FXThread.h
-fox-includes/FXToggleButton.h
-fox-includes/FXToolBar.h
-fox-includes/FXToolBarGrip.h
-fox-includes/FXToolBarShell.h
-fox-includes/FXToolBarTab.h
-fox-includes/FXToolTip.h
-fox-includes/FXTopWindow.h
-fox-includes/FXTranslator.h
-fox-includes/FXTreeList.h
-fox-includes/FXTreeListBox.h
-fox-includes/FXTriStateButton.h
-fox-includes/FXURL.h
-fox-includes/FXUTF16Codec.h
-fox-includes/FXUTF32Codec.h
-fox-includes/FXUTF8Codec.h
-fox-includes/FXUndoList.h
-fox-includes/FXVec2d.h
-fox-includes/FXVec2f.h
-fox-includes/FXVec3d.h
-fox-includes/FXVec3f.h
-fox-includes/FXVec4d.h
-fox-includes/FXVec4f.h
-fox-includes/FXVerticalFrame.h
-fox-includes/FXVisual.h
-fox-includes/FXWindow.h
-fox-includes/FXWizard.h
-fox-includes/FXXBMIcon.h
-fox-includes/FXXBMImage.h
-fox-includes/FXXPMIcon.h
-fox-includes/FXXPMImage.h
-fox-includes/README
-fox-includes/fx.h
-fox-includes/fx3d.h
-fox-includes/fxascii.h
-fox-includes/fxdefs.h
-fox-includes/fxkeys.h
-fox-includes/fxunicode.h
-fox-includes/fxver.h
-fox-includes/xincs.h
-index.html
-lib/fox16.rb
-lib/fox16/accel_table.rb
-lib/fox16/aliases.rb
-lib/fox16/bitmapview.rb
-lib/fox16/calendar.rb
-lib/fox16/canvas.rb
-lib/fox16/chore.rb
-lib/fox16/colors.rb
-lib/fox16/core.rb
-lib/fox16/dict.rb
-lib/fox16/exceptions_for_fxerror.rb
-lib/fox16/execute_nonmodal.rb
-lib/fox16/glgroup.rb
-lib/fox16/glshapes.rb
-lib/fox16/input.rb
-lib/fox16/irb.rb
-lib/fox16/iterators.rb
-lib/fox16/keys.rb
-lib/fox16/missingdep.rb
-lib/fox16/pseudokeyboard.rb
-lib/fox16/pseudomouse.rb
-lib/fox16/responder.rb
-lib/fox16/responder2.rb
-lib/fox16/scintilla.rb
-lib/fox16/settings.rb
-lib/fox16/signal.rb
-lib/fox16/splashscreen.rb
-lib/fox16/timeout.rb
-lib/fox16/tkcompat.rb
-lib/fox16/undolist.rb
-lib/fox16/version.rb
-rdoc-sources/FX4Splitter.rb
-rdoc-sources/FX7Segment.rb
-rdoc-sources/FXAccelTable.rb
-rdoc-sources/FXApp.rb
-rdoc-sources/FXArrowButton.rb
-rdoc-sources/FXBMPIcon.rb
-rdoc-sources/FXBMPImage.rb
-rdoc-sources/FXBitmap.rb
-rdoc-sources/FXBitmapFrame.rb
-rdoc-sources/FXBitmapView.rb
-rdoc-sources/FXButton.rb
-rdoc-sources/FXCURCursor.rb
-rdoc-sources/FXCanvas.rb
-rdoc-sources/FXCheckButton.rb
-rdoc-sources/FXChoiceBox.rb
-rdoc-sources/FXColorBar.rb
-rdoc-sources/FXColorDialog.rb
-rdoc-sources/FXColorList.rb
-rdoc-sources/FXColorRing.rb
-rdoc-sources/FXColorSelector.rb
-rdoc-sources/FXColorWell.rb
-rdoc-sources/FXColorWheel.rb
-rdoc-sources/FXComboBox.rb
-rdoc-sources/FXComposite.rb
-rdoc-sources/FXCursor.rb
-rdoc-sources/FXDC.rb
-rdoc-sources/FXDCPrint.rb
-rdoc-sources/FXDCWindow.rb
-rdoc-sources/FXDataTarget.rb
-rdoc-sources/FXDebugTarget.rb
-rdoc-sources/FXDelegator.rb
-rdoc-sources/FXDial.rb
-rdoc-sources/FXDialogBox.rb
-rdoc-sources/FXDict.rb
-rdoc-sources/FXDirBox.rb
-rdoc-sources/FXDirDialog.rb
-rdoc-sources/FXDirList.rb
-rdoc-sources/FXDirSelector.rb
-rdoc-sources/FXDockBar.rb
-rdoc-sources/FXDockHandler.rb
-rdoc-sources/FXDockSite.rb
-rdoc-sources/FXDockTitle.rb
-rdoc-sources/FXDocument.rb
-rdoc-sources/FXDragCorner.rb
-rdoc-sources/FXDrawable.rb
-rdoc-sources/FXDriveBox.rb
-rdoc-sources/FXExtentd.rb
-rdoc-sources/FXExtentf.rb
-rdoc-sources/FXFileDialog.rb
-rdoc-sources/FXFileDict.rb
-rdoc-sources/FXFileList.rb
-rdoc-sources/FXFileSelector.rb
-rdoc-sources/FXFileStream.rb
-rdoc-sources/FXFoldingList.rb
-rdoc-sources/FXFont.rb
-rdoc-sources/FXFontDialog.rb
-rdoc-sources/FXFontSelector.rb
-rdoc-sources/FXFrame.rb
-rdoc-sources/FXGIFCursor.rb
-rdoc-sources/FXGIFIcon.rb
-rdoc-sources/FXGIFImage.rb
-rdoc-sources/FXGLCanvas.rb
-rdoc-sources/FXGLContext.rb
-rdoc-sources/FXGLObject.rb
-rdoc-sources/FXGLShape.rb
-rdoc-sources/FXGLViewer.rb
-rdoc-sources/FXGLVisual.rb
-rdoc-sources/FXGradientBar.rb
-rdoc-sources/FXGroupBox.rb
-rdoc-sources/FXHeader.rb
-rdoc-sources/FXHorizontalFrame.rb
-rdoc-sources/FXICOIcon.rb
-rdoc-sources/FXICOImage.rb
-rdoc-sources/FXIcon.rb
-rdoc-sources/FXIconDict.rb
-rdoc-sources/FXIconList.rb
-rdoc-sources/FXIconSource.rb
-rdoc-sources/FXId.rb
-rdoc-sources/FXImage.rb
-rdoc-sources/FXImageFrame.rb
-rdoc-sources/FXImageView.rb
-rdoc-sources/FXInputDialog.rb
-rdoc-sources/FXJPGIcon.rb
-rdoc-sources/FXJPGImage.rb
-rdoc-sources/FXKnob.rb
-rdoc-sources/FXLabel.rb
-rdoc-sources/FXList.rb
-rdoc-sources/FXListBox.rb
-rdoc-sources/FXMDIButton.rb
-rdoc-sources/FXMDIChild.rb
-rdoc-sources/FXMDIClient.rb
-rdoc-sources/FXMainWindow.rb
-rdoc-sources/FXMatrix.rb
-rdoc-sources/FXMemoryBuffer.rb
-rdoc-sources/FXMemoryStream.rb
-rdoc-sources/FXMenuBar.rb
-rdoc-sources/FXMenuButton.rb
-rdoc-sources/FXMenuCaption.rb
-rdoc-sources/FXMenuCascade.rb
-rdoc-sources/FXMenuCheck.rb
-rdoc-sources/FXMenuCommand.rb
-rdoc-sources/FXMenuPane.rb
-rdoc-sources/FXMenuRadio.rb
-rdoc-sources/FXMenuSeparator.rb
-rdoc-sources/FXMenuTitle.rb
-rdoc-sources/FXMessageBox.rb
-rdoc-sources/FXObject.rb
-rdoc-sources/FXOptionMenu.rb
-rdoc-sources/FXPCXIcon.rb
-rdoc-sources/FXPCXImage.rb
-rdoc-sources/FXPNGIcon.rb
-rdoc-sources/FXPNGImage.rb
-rdoc-sources/FXPPMIcon.rb
-rdoc-sources/FXPPMImage.rb
-rdoc-sources/FXPacker.rb
-rdoc-sources/FXPicker.rb
-rdoc-sources/FXPopup.rb
-rdoc-sources/FXPrintDialog.rb
-rdoc-sources/FXProgressBar.rb
-rdoc-sources/FXProgressDialog.rb
-rdoc-sources/FXQuatd.rb
-rdoc-sources/FXQuatf.rb
-rdoc-sources/FXRGBIcon.rb
-rdoc-sources/FXRGBImage.rb
-rdoc-sources/FXRadioButton.rb
-rdoc-sources/FXRanged.rb
-rdoc-sources/FXRangef.rb
-rdoc-sources/FXRealSlider.rb
-rdoc-sources/FXRealSpinner.rb
-rdoc-sources/FXRecentFiles.rb
-rdoc-sources/FXRectangle.rb
-rdoc-sources/FXRegion.rb
-rdoc-sources/FXRegistry.rb
-rdoc-sources/FXReplaceDialog.rb
-rdoc-sources/FXRootWindow.rb
-rdoc-sources/FXRuler.rb
-rdoc-sources/FXRulerView.rb
-rdoc-sources/FXScintilla.rb
-rdoc-sources/FXScrollArea.rb
-rdoc-sources/FXScrollBar.rb
-rdoc-sources/FXScrollPane.rb
-rdoc-sources/FXScrollWindow.rb
-rdoc-sources/FXSearchDialog.rb
-rdoc-sources/FXSeparator.rb
-rdoc-sources/FXSettings.rb
-rdoc-sources/FXShell.rb
-rdoc-sources/FXShutter.rb
-rdoc-sources/FXSize.rb
-rdoc-sources/FXSlider.rb
-rdoc-sources/FXSphered.rb
-rdoc-sources/FXSpheref.rb
-rdoc-sources/FXSpinner.rb
-rdoc-sources/FXSplashWindow.rb
-rdoc-sources/FXSplitter.rb
-rdoc-sources/FXSpring.rb
-rdoc-sources/FXStatusBar.rb
-rdoc-sources/FXStatusLine.rb
-rdoc-sources/FXStream.rb
-rdoc-sources/FXStringDict.rb
-rdoc-sources/FXSwitcher.rb
-rdoc-sources/FXTGAIcon.rb
-rdoc-sources/FXTGAImage.rb
-rdoc-sources/FXTIFIcon.rb
-rdoc-sources/FXTIFImage.rb
-rdoc-sources/FXTabBar.rb
-rdoc-sources/FXTabBook.rb
-rdoc-sources/FXTabItem.rb
-rdoc-sources/FXTable.rb
-rdoc-sources/FXText.rb
-rdoc-sources/FXTextField.rb
-rdoc-sources/FXToggleButton.rb
-rdoc-sources/FXToolBar.rb
-rdoc-sources/FXToolBarGrip.rb
-rdoc-sources/FXToolBarShell.rb
-rdoc-sources/FXToolBarTab.rb
-rdoc-sources/FXToolTip.rb
-rdoc-sources/FXTopWindow.rb
-rdoc-sources/FXTranslator.rb
-rdoc-sources/FXTreeList.rb
-rdoc-sources/FXTreeListBox.rb
-rdoc-sources/FXTriStateButton.rb
-rdoc-sources/FXVec2d.rb
-rdoc-sources/FXVec2f.rb
-rdoc-sources/FXVec3d.rb
-rdoc-sources/FXVec3f.rb
-rdoc-sources/FXVec4d.rb
-rdoc-sources/FXVec4f.rb
-rdoc-sources/FXVerticalFrame.rb
-rdoc-sources/FXVisual.rb
-rdoc-sources/FXWindow.rb
-rdoc-sources/FXWizard.rb
-rdoc-sources/FXXBMIcon.rb
-rdoc-sources/FXXBMImage.rb
-rdoc-sources/FXXPMIcon.rb
-rdoc-sources/FXXPMImage.rb
-rdoc-sources/Makefile
-rdoc-sources/README.rdoc
-rdoc-sources/fxdefs.rb
-scripts/build-fox.rb
-scripts/generate_kwargs_lib.rb
-scripts/iface.rb
-swig-interfaces/FX4Splitter.i
-swig-interfaces/FX7Segment.i
-swig-interfaces/FXAccelTable.i
-swig-interfaces/FXApp.i
-swig-interfaces/FXArrowButton.i
-swig-interfaces/FXBMPIcon.i
-swig-interfaces/FXBMPImage.i
-swig-interfaces/FXBitmap.i
-swig-interfaces/FXBitmapFrame.i
-swig-interfaces/FXBitmapView.i
-swig-interfaces/FXButton.i
-swig-interfaces/FXCURCursor.i
-swig-interfaces/FXCanvas.i
-swig-interfaces/FXCheckButton.i
-swig-interfaces/FXChoiceBox.i
-swig-interfaces/FXColorBar.i
-swig-interfaces/FXColorDialog.i
-swig-interfaces/FXColorList.i
-swig-interfaces/FXColorRing.i
-swig-interfaces/FXColorSelector.i
-swig-interfaces/FXColorWell.i
-swig-interfaces/FXColorWheel.i
-swig-interfaces/FXComboBox.i
-swig-interfaces/FXComposeContext.i
-swig-interfaces/FXComposite.i
-swig-interfaces/FXCursor.i
-swig-interfaces/FXDC.i
-swig-interfaces/FXDCPrint.i
-swig-interfaces/FXDCWindow.i
-swig-interfaces/FXDataTarget.i
-swig-interfaces/FXDebugTarget.i
-swig-interfaces/FXDelegator.i
-swig-interfaces/FXDial.i
-swig-interfaces/FXDialogBox.i
-swig-interfaces/FXDict.i
-swig-interfaces/FXDirBox.i
-swig-interfaces/FXDirDialog.i
-swig-interfaces/FXDirList.i
-swig-interfaces/FXDirSelector.i
-swig-interfaces/FXDockBar.i
-swig-interfaces/FXDockHandler.i
-swig-interfaces/FXDockSite.i
-swig-interfaces/FXDockTitle.i
-swig-interfaces/FXDocument.i
-swig-interfaces/FXDragCorner.i
-swig-interfaces/FXDrawable.i
-swig-interfaces/FXDriveBox.i
-swig-interfaces/FXExtentd.i
-swig-interfaces/FXExtentf.i
-swig-interfaces/FXFileDialog.i
-swig-interfaces/FXFileDict.i
-swig-interfaces/FXFileList.i
-swig-interfaces/FXFileSelector.i
-swig-interfaces/FXFileStream.i
-swig-interfaces/FXFoldingList.i
-swig-interfaces/FXFont.i
-swig-interfaces/FXFontDialog.i
-swig-interfaces/FXFontSelector.i
-swig-interfaces/FXFrame.i
-swig-interfaces/FXGIFCursor.i
-swig-interfaces/FXGIFIcon.i
-swig-interfaces/FXGIFImage.i
-swig-interfaces/FXGLCanvas.i
-swig-interfaces/FXGLContext.i
-swig-interfaces/FXGLObject.i
-swig-interfaces/FXGLShape.i
-swig-interfaces/FXGLViewer.i
-swig-interfaces/FXGLVisual.i
-swig-interfaces/FXGradientBar.i
-swig-interfaces/FXGroupBox.i
-swig-interfaces/FXHeader.i
-swig-interfaces/FXHorizontalFrame.i
-swig-interfaces/FXICOIcon.i
-swig-interfaces/FXICOImage.i
-swig-interfaces/FXIcon.i
-swig-interfaces/FXIconDict.i
-swig-interfaces/FXIconList.i
-swig-interfaces/FXIconSource.i
-swig-interfaces/FXId.i
-swig-interfaces/FXImage.i
-swig-interfaces/FXImageFrame.i
-swig-interfaces/FXImageView.i
-swig-interfaces/FXInputDialog.i
-swig-interfaces/FXJPGIcon.i
-swig-interfaces/FXJPGImage.i
-swig-interfaces/FXKnob.i
-swig-interfaces/FXLabel.i
-swig-interfaces/FXList.i
-swig-interfaces/FXListBox.i
-swig-interfaces/FXMDIButton.i
-swig-interfaces/FXMDIChild.i
-swig-interfaces/FXMDIClient.i
-swig-interfaces/FXMainWindow.i
-swig-interfaces/FXMat3d.i
-swig-interfaces/FXMat3f.i
-swig-interfaces/FXMat4d.i
-swig-interfaces/FXMat4f.i
-swig-interfaces/FXMatrix.i
-swig-interfaces/FXMemoryBuffer.i
-swig-interfaces/FXMemoryStream.i
-swig-interfaces/FXMenuBar.i
-swig-interfaces/FXMenuButton.i
-swig-interfaces/FXMenuCaption.i
-swig-interfaces/FXMenuCascade.i
-swig-interfaces/FXMenuCheck.i
-swig-interfaces/FXMenuCommand.i
-swig-interfaces/FXMenuPane.i
-swig-interfaces/FXMenuRadio.i
-swig-interfaces/FXMenuSeparator.i
-swig-interfaces/FXMenuTitle.i
-swig-interfaces/FXMessageBox.i
-swig-interfaces/FXObject.i
-swig-interfaces/FXOptionMenu.i
-swig-interfaces/FXPCXIcon.i
-swig-interfaces/FXPCXImage.i
-swig-interfaces/FXPNGIcon.i
-swig-interfaces/FXPNGImage.i
-swig-interfaces/FXPPMIcon.i
-swig-interfaces/FXPPMImage.i
-swig-interfaces/FXPacker.i
-swig-interfaces/FXPicker.i
-swig-interfaces/FXPoint.i
-swig-interfaces/FXPopup.i
-swig-interfaces/FXPrintDialog.i
-swig-interfaces/FXProgressBar.i
-swig-interfaces/FXProgressDialog.i
-swig-interfaces/FXQuatd.i
-swig-interfaces/FXQuatf.i
-swig-interfaces/FXRGBIcon.i
-swig-interfaces/FXRGBImage.i
-swig-interfaces/FXRadioButton.i
-swig-interfaces/FXRanged.i
-swig-interfaces/FXRangef.i
-swig-interfaces/FXRealSlider.i
-swig-interfaces/FXRealSpinner.i
-swig-interfaces/FXRecentFiles.i
-swig-interfaces/FXRectangle.i
-swig-interfaces/FXRegion.i
-swig-interfaces/FXRegistry.i
-swig-interfaces/FXReplaceDialog.i
-swig-interfaces/FXRootWindow.i
-swig-interfaces/FXRuler.i
-swig-interfaces/FXRulerView.i
-swig-interfaces/FXScintilla.i
-swig-interfaces/FXScrollArea.i
-swig-interfaces/FXScrollBar.i
-swig-interfaces/FXScrollPane.i
-swig-interfaces/FXScrollWindow.i
-swig-interfaces/FXSearchDialog.i
-swig-interfaces/FXSeparator.i
-swig-interfaces/FXSettings.i
-swig-interfaces/FXShell.i
-swig-interfaces/FXShutter.i
-swig-interfaces/FXSize.i
-swig-interfaces/FXSlider.i
-swig-interfaces/FXSphered.i
-swig-interfaces/FXSpheref.i
-swig-interfaces/FXSpinner.i
-swig-interfaces/FXSplashWindow.i
-swig-interfaces/FXSplitter.i
-swig-interfaces/FXSpring.i
-swig-interfaces/FXStatusBar.i
-swig-interfaces/FXStatusLine.i
-swig-interfaces/FXStream.i
-swig-interfaces/FXStringDict.i
-swig-interfaces/FXSwitcher.i
-swig-interfaces/FXTGAIcon.i
-swig-interfaces/FXTGAImage.i
-swig-interfaces/FXTIFIcon.i
-swig-interfaces/FXTIFImage.i
-swig-interfaces/FXTabBar.i
-swig-interfaces/FXTabBook.i
-swig-interfaces/FXTabItem.i
-swig-interfaces/FXTable.i
-swig-interfaces/FXText.i
-swig-interfaces/FXTextField.i
-swig-interfaces/FXToggleButton.i
-swig-interfaces/FXToolBar.i
-swig-interfaces/FXToolBarGrip.i
-swig-interfaces/FXToolBarShell.i
-swig-interfaces/FXToolBarTab.i
-swig-interfaces/FXToolTip.i
-swig-interfaces/FXTopWindow.i
-swig-interfaces/FXTranslator.i
-swig-interfaces/FXTreeList.i
-swig-interfaces/FXTreeListBox.i
-swig-interfaces/FXTriStateButton.i
-swig-interfaces/FXURL.i
-swig-interfaces/FXVec2d.i
-swig-interfaces/FXVec2f.i
-swig-interfaces/FXVec3d.i
-swig-interfaces/FXVec3f.i
-swig-interfaces/FXVec4d.i
-swig-interfaces/FXVec4f.i
-swig-interfaces/FXVerticalFrame.i
-swig-interfaces/FXVisual.i
-swig-interfaces/FXWindow.i
-swig-interfaces/FXWizard.i
-swig-interfaces/FXXBMIcon.i
-swig-interfaces/FXXBMImage.i
-swig-interfaces/FXXPMIcon.i
-swig-interfaces/FXXPMImage.i
-swig-interfaces/README
-swig-interfaces/common.i
-swig-interfaces/core.i
-swig-interfaces/dcmodule.i
-swig-interfaces/dialogs.i
-swig-interfaces/exceptions.i
-swig-interfaces/framesmodule.i
-swig-interfaces/freefuncs.i
-swig-interfaces/fx3d.i
-swig-interfaces/fxdefs.i
-swig-interfaces/handlers.i
-swig-interfaces/iconlistmodule.i
-swig-interfaces/icons.i
-swig-interfaces/ignore-message-handlers.rb
-swig-interfaces/image.i
-swig-interfaces/labelmodule.i
-swig-interfaces/layout.i
-swig-interfaces/listmodule.i
-swig-interfaces/macros.i
-swig-interfaces/markfuncs.i
-swig-interfaces/mdi.i
-swig-interfaces/menumodule.i
-swig-interfaces/ruby-typemaps.i
-swig-interfaces/scintilla.i
-swig-interfaces/table-module.i
-swig-interfaces/text-module.i
-swig-interfaces/treelist-module.i
-swig-interfaces/ui.i
-test/README
-test/TC_FXAccelTable.rb
-test/TC_FXApp.rb
-test/TC_FXArc.rb
-test/TC_FXBMPIcon.rb
-test/TC_FXBMPImage.rb
-test/TC_FXButton.rb
-test/TC_FXCheckButton.rb
-test/TC_FXComboBox.rb
-test/TC_FXDC.rb
-test/TC_FXDCPrint.rb
-test/TC_FXDCWindow.rb
-test/TC_FXDataTarget.rb
-test/TC_FXDialogBox.rb
-test/TC_FXDirList.rb
-test/TC_FXExtentd.rb
-test/TC_FXExtentf.rb
-test/TC_FXFileAssoc.rb
-test/TC_FXFileStream.rb
-test/TC_FXFoldingList.rb
-test/TC_FXFont.rb
-test/TC_FXFontDesc.rb
-test/TC_FXGLGroup.rb
-test/TC_FXGLShape.rb
-test/TC_FXGLViewer.rb
-test/TC_FXGradientBar.rb
-test/TC_FXHeader.rb
-test/TC_FXHiliteStyle.rb
-test/TC_FXIconDict.rb
-test/TC_FXIconList.rb
-test/TC_FXId.rb
-test/TC_FXImage.rb
-test/TC_FXLight.rb
-test/TC_FXList.rb
-test/TC_FXListBox.rb
-test/TC_FXMainWindow.rb
-test/TC_FXMat4f.rb
-test/TC_FXMaterial.rb
-test/TC_FXMemoryStream.rb
-test/TC_FXMenuCheck.rb
-test/TC_FXMenuCommand.rb
-test/TC_FXMenuRadio.rb
-test/TC_FXMessageBox.rb
-test/TC_FXPoint.rb
-test/TC_FXQuatf.rb
-test/TC_FXRadioButton.rb
-test/TC_FXRanged.rb
-test/TC_FXRangef.rb
-test/TC_FXRectangle.rb
-test/TC_FXRegion.rb
-test/TC_FXRegistry.rb
-test/TC_FXScrollArea.rb
-test/TC_FXScrollWindow.rb
-test/TC_FXSegment.rb
-test/TC_FXSettings.rb
-test/TC_FXShell.rb
-test/TC_FXSize.rb
-test/TC_FXStream.rb
-test/TC_FXTable.rb
-test/TC_FXTableItem.rb
-test/TC_FXText.rb
-test/TC_FXTopWindow.rb
-test/TC_FXTreeList.rb
-test/TC_FXTreeListBox.rb
-test/TC_FXUndoList.rb
-test/TC_FXVec2d.rb
-test/TC_FXVec2f.rb
-test/TC_FXVec3d.rb
-test/TC_FXVec3f.rb
-test/TC_FXVec4f.rb
-test/TC_FXViewport.rb
-test/TC_FXWindow.rb
-test/TC_FXXBMIcon.rb
-test/TC_FXXBMImage.rb
-test/TC_FXXPMIcon.rb
-test/TC_FXXPMImage.rb
-test/TC_Misc.rb
-test/TC_downcast.rb
-test/TS_All.rb
-test/blankpage.ps
-test/howdypage.ps
-test/stress1.rb
-test/stress2.rb
-test/stress3.rb
-test/testcase.rb
-web/community.html
-web/css/style.css
-web/documentation.html
-web/downloads.html
-web/images/bullet.gif
-web/images/button-bg.jpg
-web/images/comment.gif
-web/images/content.jpg
-web/images/dots.jpg
-web/images/footer.jpg
-web/images/fxruby-book.jpg
-web/images/header.png
-web/images/menu.jpg
-web/images/page.gif
-web/images/quote.gif
-web/images/square-green.png
-web/index.html
diff --git a/README.rdoc b/README.rdoc
index 5c45c224..bbd09bdf 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,7 +1,12 @@
 = FXRuby
 
 * http://github.com/larskanis/fxruby
-* API: http://rubydoc.info/gems/fxruby/frames
+* Full API-description: http://rubydoc.info/gems/fxruby/frames
+* Latest fxruby {<img src="https://badge.fury.io/rb/fxruby.svg" alt="Gem Version" />}[http://badge.fury.io/rb/fxruby]
+* Status on Linux: {<img src="https://travis-ci.org/larskanis/fxruby.svg?branch=1.6" alt="Build Status on Linux" />}[https://travis-ci.org/larskanis/fxruby]
+  on Windows: {<img src="https://ci.appveyor.com/api/projects/status/too7sj4gq643ts8w/branch/1.6?svg=true" alt="Build Status on Windows" />}[https://ci.appveyor.com/project/larskanis/fxruby/branch/1.6]
+
+
 
 == DESCRIPTION:
 
@@ -14,7 +19,7 @@ Ruby programming language that you already know and love, while at the
 same time taking advantage of the performance and functionality of a
 featureful, highly optimized C++ toolkit.
 
-== FEATURES/PROBLEMS:
+== FEATURES:
 
 FXRuby supportes everything of FOX, that is useful in Ruby:
 * MDI/SDI application window layouts, floating toolbars
@@ -22,14 +27,15 @@ FXRuby supportes everything of FOX, that is useful in Ruby:
 * Flexible layout management
 * Image read/write support in many formats
 * Embedded OpenGL graphics
+* Thread support
 
 == INSTALL:
 
-FXRuby runs on Linux, Windows and OS-X. Installation on *nix requires
+FXRuby runs on Linux, Windows and OS-X with Ruby-2.2 or newer. Installation on Unix requires
 FOX development headers and libraries installed:
 * on Debian/Ubuntu: <tt>sudo apt-get install g++ libxrandr-dev libfox-1.6-dev</tt>
 * see also detailed installation instructions in the {https://github.com/lylejohnson/fxruby/wiki Wiki}
-* no preparation needed on Windows - the binary gem can be used
+* on Windows: the binary fxruby gems already contain all required libararies
 
 Then, install the gem:
 * gem install fxruby
diff --git a/Rakefile b/Rakefile
index b9527f06..14382f96 100755
--- a/Rakefile
+++ b/Rakefile
@@ -1,177 +1,271 @@
 require 'rubygems'
-require 'hoe'
 require 'erb'
+require 'date'
 require 'rake/extensiontask'
+require 'bundler'
+require 'bundler/gem_helper'
 require './lib/fox16/version.rb'
 
-# Use forked process for chdir'ed environment, to allow parallel execution with drake
-module FileUtils
-  alias unforked_fileutils_cd cd
-  def cd(dir, options={}, &block)
-    raise "chdir called without block" unless block_given?
-    Process.waitpid(fork{ unforked_fileutils_cd(dir, options, &block) })
+
+class FoxGemHelper < Bundler::GemHelper
+  attr_accessor :cross_platforms
+
+  def install
+    super
+
+    task "release:guard_clean" => ["release:update_history"]
+
+    task "release:update_history" do
+      update_history
+    end
+
+    task "release:rubygem_push" => ["gem:windows"]
+  end
+
+  def hfile
+    "History.md"
+  end
+
+  def headline
+    '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
+  end
+
+  def reldate
+    Time.now.strftime("%Y-%m-%d")
+  end
+
+  def update_history
+    hin = File.read(hfile)
+    hout = hin.sub(/#{headline}/) do
+      raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
+      $1 + $2 + $3 + reldate + $5
+    end
+    if hout != hin
+      Bundler.ui.confirm "Updating #{hfile} for release."
+      File.write(hfile, hout)
+      Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
+    end
+  end
+
+  def tag_version
+    Bundler.ui.confirm "Tag release with annotation:"
+    m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
+    Bundler.ui.info(m[:annotation].gsub(/^/, "    "))
+    IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
+      fd.write m[:annotation]
+    end
+    yield if block_given?
+  rescue
+    Bundler.ui.error "Untagging #{version_tag} due to error."
+    sh_with_code "git tag -d #{version_tag}"
+    raise
+  end
+
+  def rubygem_push(path)
+    cross_platforms.each do |ruby_platform|
+      super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
+    end
+    super(path)
   end
-  module_function :cd
-  alias chdir cd
-  module_function :chdir
 end
 
 # Some constants we'll need
-PKG_VERSION = Fox.fxrubyversion
+LIBFXSCINTILLA_VERSION            = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
+LIBFXSCINTILLA_SOURCE_URI         = "http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-#{LIBFXSCINTILLA_VERSION}.tar.gz"
 
 SWIG = (RUBY_PLATFORM =~ /mingw/) ? "swig.exe" : "swig"
 SWIGFLAGS = "-c++ -ruby -nodefaultdtor -nodefaultctor -w302 -features compactdefaultargs -I../fox-includes"
-SWIG_LIB = `#{SWIG} -swiglib`.chomp
-SWIG_MODULES = {
-  "core.i" => "core_wrap.cpp",
-  "dcmodule.i" => "dc_wrap.cpp",
-  "dialogs.i" => "dialogs_wrap.cpp",
-  "framesmodule.i" => "frames_wrap.cpp",
-  "iconlistmodule.i" => "iconlist_wrap.cpp",
-  "icons.i" => "icons_wrap.cpp",
-  "image.i" => "image_wrap.cpp",
-  "labelmodule.i" => "label_wrap.cpp",
-  "layout.i" => "layout_wrap.cpp",
-  "listmodule.i" => "list_wrap.cpp",
-  "mdi.i" => "mdi_wrap.cpp",
-  "menumodule.i" => "menu_wrap.cpp",
-  "fx3d.i" => "fx3d_wrap.cpp",
-  "scintilla.i" => "scintilla_wrap.cpp",
-  "table-module.i" => "table_wrap.cpp",
-  "text-module.i" => "text_wrap.cpp",
-  "treelist-module.i" => "treelist_wrap.cpp",
-  "ui.i" => "ui_wrap.cpp"
-}
-
-
-hoe = Hoe.spec "fxruby" do
-  # ... project specific data ...
-  self.blog_categories = %w{FXRuby}
-  self.clean_globs = [".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_c/*.bundle", "ext/fox16_c/mkmf.log", "ext/fox16_c/conftest.dSYM", "ext/fox16_c/include/swigrubyrun.h", "ext/fox16_c/librb.c", "ext/fox16_c/include/inlinestubs.h", "ext/fox16_c/*_wrap.cpp"]
-  developer("Lyle Johnson", "lyle@lylejohnson.name")
-  developer("Lars Kanis", "kanis@comcard.de")
-  self.extra_rdoc_files = ["rdoc-sources", File.join("rdoc-sources", "README.rdoc")]
-  self.remote_rdoc_dir = "doc/api"
-  self.spec_extras = {
-    :description => "FXRuby is the Ruby binding to the FOX GUI toolkit.",
-    :extensions => ["ext/fox16_c/extconf.rb"],
-    :rdoc_options => ['--main', File.join('rdoc-sources', 'README.rdoc'), '--exclude', 'ext/fox16_c', '--exclude', %r{aliases|kwargs|missingdep|responder}.inspect],
-    :require_paths => ['lib'],
-    :summary => "FXRuby is the Ruby binding to the FOX GUI toolkit."
-  }
-  self.test_globs = ["test/**/TC_*.rb"]
-  self.version = PKG_VERSION
-  self.readme_file = 'README.rdoc'
-  self.extra_rdoc_files << self.readme_file
-
-  spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/).reject{|f| f=~/^fox-includes|^web/ }
-  spec_extras[:files] += SWIG_MODULES.values.map{|f| File.join("ext/fox16_c", f) }
-  spec_extras[:files] << 'ext/fox16_c/include/inlinestubs.h'
-  spec_extras[:files] << 'ext/fox16_c/swigruby.h'
-  spec_extras[:files] << 'doap.rdf'
-  spec_extras[:files] << 'lib/fox16/kwargs.rb'
-end
+
+CLEAN.include( ".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_c/*.bundle", "ext/fox16_c/mkmf.log", "ext/fox16_c/conftest.dSYM", "ext/fox16_c/swigruby.h*", "ext/fox16_c/librb.c", "ext/fox16_c/include/inlinestubs.h", "ext/fox16_c/*_wrap.cpp", "tmp", "ports/*.installed", "ports/*mingw32*" )
+
+CLOBBER.include( "pkg" )
 
 # Make sure extension is built before tests are run
-task :test => [:compile]
+task :test => [:compile] do
+  sh "ruby -w -W2 -Ilib test/TS_All.rb -v"
+end
 
-# The "docs" task created by Hoe assumes that we want to run RDoc
-# over everything under the "lib" and "ext" subdirectories.
-# We need to go back and tell it to skip the stuff under ext.
-# rdoc_target = Rake::Task['docs'].prerequisites.first
-# rdoc_files = Rake::Task[rdoc_target].prerequisites
-# rdoc_files.reject! {|x| x == "ext/fox16_c" }
+task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
 
-# Make sure that all of the package contents exist before we try to build the package
-#Rake::Task['package'].prerequisites.unshift("swig:swig", "fxruby:setversions", "fxruby:generate_kwargs_lib")
 
-# ... project specific tasks ...
+gem_spec = Bundler.load_gemspec('fxruby.gemspec')
 
-Rake::ExtensionTask.new("fox16_c", hoe.spec) do |ext|
+ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext|
   ext.cross_compile = true
   ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
+  # Enable FXTRACE and FXASSERT for 'rake compile'
+  ext.config_options << "--enable-debug"
 
   ext.cross_config_options += [
       "--enable-win32-cross",
       "--with-fxscintilla",
     ]
+  ext.cross_config_options << "--enable-debug" if ENV['FXRUBY_MINGW_DEBUG']
 
   # Add dependent DLLs to the cross gems
   ext.cross_compiling do |spec|
-    plat = spec.platform
-    dlls = Dir["tmp/#{plat}/#{ext.name}/*/*.dll"].map{|dll| File.basename(dll) }.uniq
-    spec.files += dlls.map{|dll| "lib/#{plat}/#{dll}" }
-
-    directory "tmp/#{plat}/stage/lib/#{plat}/"
-    dlls.each do |dll|
-      ENV['RUBY_CC_VERSION'].to_s.split(':').last.tap do |ruby_version|
-        file "tmp/#{plat}/stage/lib/#{plat}/#{dll}" => ["tmp/#{plat}/stage/lib/#{plat}/", "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}"] do
-          cp "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}", "tmp/#{plat}/stage/lib/#{plat}"
-          sh "x86_64-w64-mingw32-strip", "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
+    # The fat binary gem doesn't depend on the fox package, since it bundles the libraries.
+    spec.metadata.delete('msys2_mingw_dependencies')
+
+    platform_host_map =  {
+      'x86-mingw32' => ['i686-w64-mingw32'],
+      'x64-mingw32' => ['x86_64-w64-mingw32'],
+    }
+
+    gemplat = spec.platform.to_s
+    platform_host_map[gemplat].each do |host|
+
+      gcc_shared_dlls = %w[libwinpthread-1.dll libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libgcc_s_seh-1.dll libstdc++-6.dll]
+
+      dlls = gcc_shared_dlls.select{|dll| File.exist?("ports/#{host}/bin/#{dll}") }
+      dlls += [
+          "libfxscintilla-20.dll",
+          "libFOX-1.6-0.dll",
+          "libjpeg-62.dll",
+          "libpng16-16.dll",
+          "libtiff-5.dll",
+          "zlib1.dll",
+      ]
+
+      spec.files += dlls.map{|dll| "ports/#{host}/bin/#{dll}" }
+
+      unless ENV['FXRUBY_MINGW_DEBUG']
+        dlls.each do |dll|
+          task "ports/#{host}/bin/#{dll}" do |t|
+            sh "#{host}-strip", t.name
+          end
         end
       end
-      file "lib/#{plat}/#{dll}" => "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
     end
   end
+
+  FoxGemHelper.install_tasks
+  Bundler::GemHelper.instance.cross_platforms = ext.cross_platform
 end
 
-# To reduce the gem file size strip mingw32 dlls before packaging
-ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
-  task "tmp/x86-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so" do |t|
-    sh "i686-w64-mingw32-strip -S tmp/x86-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so"
-  end
+namespace :gem do
+  ext_task.cross_platform.each do |plat|
+    desc "Build the windows binary gems"
+    multitask 'windows' => plat
 
-  task "tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so" do |t|
-    sh "x86_64-w64-mingw32-strip -S tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so"
+    task 'prepare' do
+      require 'rake_compiler_dock'
+      sh "bundle package"
+    end
+
+    task plat => ['gem', 'prepare'] do
+      debug = "FXRUBY_MINGW_DEBUG=#{ENV['FXRUBY_MINGW_DEBUG'].inspect}" if ENV['FXRUBY_MINGW_DEBUG']
+      RakeCompilerDock.sh <<-EOT, platform: plat
+        sudo apt update &&
+        sudo apt install yasm &&
+        bundle --local --without=test &&
+        rake native:#{plat} pkg/#{ext_task.gem_spec.full_name}-#{plat}.gem MAKE=\"nice make V=1 VERBOSE=1 -j `nproc`\" #{debug}
+      EOT
+    end
   end
 end
 
-# Set environment variable SWIG_LIB to
-# c:/ruby-1.8.6-p383-preview2/devkit/msys/1.0.11/usr/local/share/swig/1.3.22
-# before running swig on MinGW.
 namespace :swig do
+  def patch_swigruby(line)
+    # Ruby-2.7+ finally changed callback function signatures from (*)(ANYARGS) to a proper signature, on which the compiler is able to check parameter types.
+    # Unfortunately this requires a bunch of patches to swig's generated code.
+
+    line.gsub! '#include <ruby.h>', <<-EOT
+      #include <ruby.h>
+
+      #if defined(RB_METHOD_DEFINITION_DECL)
+      # define RUBY_VALUE_METHOD_FUNC(func) (func)
+      # define RUBY_INT_METHOD_FUNC(func) (func)
+      # define RUBY_VOID_METHOD_FUNC(func) (func)
+      # define RUBY_VOIDP_METHOD_FUNC(func) (func)
+      #else
+      # define RUBY_VALUE_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
+      # define RUBY_INT_METHOD_FUNC(func) ((int (*)(ANYARGS))(func))
+      # define RUBY_VOID_METHOD_FUNC(func) ((void (*)(ANYARGS))(func))
+      # define RUBY_VOIDP_METHOD_FUNC(func) ((void *(*)(ANYARGS))(func))
+      #endif
+    EOT
+    line.gsub! /rb_define_virtual_variable\((.*?), (\w+), NULL\)/, <<-EOT
+      rb_define_virtual_variable(\\1, RUBY_VALUE_METHOD_FUNC(\\2), RUBY_VOID_METHOD_FUNC((rb_gvar_setter_t*)NULL))
+    EOT
+
+    line.gsub!('static VALUE swig_ruby_trackings_count(ANYARGS)', 'static VALUE swig_ruby_trackings_count(ID id, VALUE *var)')
+    line.gsub!('SWIG_ruby_failed(void)', 'SWIG_ruby_failed(VALUE, VALUE)')
+
+    line.gsub!(/SWIGINTERN VALUE SWIG_AUX_(\w+)\(VALUE \*args\)\s\{/m, 'SWIGINTERN VALUE SWIG_AUX_\\1(VALUE pargs){VALUE *args=(VALUE *)pargs;')
+
+    line.gsub! /static int swig_ruby_internal_iterate_callback\(void\* ptr, VALUE obj, void\(\*meth\)\(void\* ptr, VALUE obj\)\)\s*{\s*\(\*meth\)\(ptr, obj\);/m, <<-EOT
+      static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
+        ((void(*)(void*, VALUE))meth)((void*)ptr, (VALUE)obj);
+    EOT
+
+    line.gsub!('(int (*)(ANYARGS))&swig_ruby_internal_iterate_callback', 'RUBY_INT_METHOD_FUNC(swig_ruby_internal_iterate_callback)')
+
+    line.gsub! /rb_ensure\(VALUEFUNC\((.*)\), self, VALUEFUNC\((.*)\), self\);/, 'rb_ensure(RUBY_VALUE_METHOD_FUNC(\\1), self, RUBY_VALUE_METHOD_FUNC(\\2), self);'
+    line.gsub! /rb_rescue\(RUBY_METHOD_FUNC\((.*)\), \(VALUE\)a, RUBY_METHOD_FUNC\((.*)\), 0\)/, 'rb_rescue(RUBY_VALUE_METHOD_FUNC(\\1), (VALUE)a, RUBY_VALUE_METHOD_FUNC(\\2), 0)'
+
+    line
+  end
+
   def sed(wrapper_src_file_name)
-    results = []
-    IO.readlines(wrapper_src_file_name).each do |line|
-      line.gsub!(/static VALUE mCore;/, "VALUE mCore;")
-      line.gsub!(/mCore = rb_define_module\("Core"\)/, "mFox = rb_define_module(\"Fox\")")
-      line.gsub!(/mCore/, "mFox")
-      next if line =~ /static VALUE m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui);/
-      next if line =~ /m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui) = rb_define_module/
-      next if line =~ /rb_require/
-      line.gsub!(/m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui),/, "mFox,")
-      results << line
-    end
-    File.open(wrapper_src_file_name, "w") do |io|
-      io.write(results.join)
-    end
+    puts "Update #{wrapper_src_file_name}"
+
+    line = File.read(wrapper_src_file_name)
+    line.gsub!(/static VALUE mCore;/, "VALUE mCore;")
+    line.gsub!(/mCore = rb_define_module\("Core"\)/, "mFox = rb_define_module(\"Fox\")")
+    line.gsub!(/mCore/, "mFox")
+    line.gsub!(/static VALUE m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui);/, '')
+    line.gsub!(/m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui) = rb_define_module.*/, '')
+    line.gsub!(/rb_require.*/, '')
+    line.gsub!(/m(Dc|Dialogs|Frames|Iconlist|Icons|Image|Label|Layout|List|Mdi|Menu|Fx3d|Scintilla|Table|Text|Treelist|Ui),/, "mFox,")
+
+    line = patch_swigruby(line)
+
+    File.write(wrapper_src_file_name, line)
+  end
+
+  def add_with_fxscintilla_cond(file)
+    puts "Update #{file} for fxscintilla"
+    content = File.binread(file)
+    content = "#ifdef WITH_FXSCINTILLA\n" + content + "#endif /* WITH_FXSCINTILLA */\n"
+    File.binwrite(file, content)
   end
 
   def swig(swig_interface_file_name, wrapper_src_file_name)
     cmd = "#{SWIG} #{SWIGFLAGS} -o #{wrapper_src_file_name} #{swig_interface_file_name}"
     puts cmd
     system cmd
+
+    # Do our own wrapper file modifications:
     sed wrapper_src_file_name
+    add_with_fxscintilla_cond(wrapper_src_file_name) if ["scintilla_wrap.cpp"].include?(File.basename(wrapper_src_file_name))
   end
 
   task :swigruby_h => ["ext/fox16_c/swigruby.h"]
-  file "ext/fox16_c/swigruby.h" do |task|
+  file "ext/fox16_c/swigruby.h.orig" do |task|
     puts "generate #{task.name}"
     system "#{SWIG} -ruby -external-runtime #{task.name}"
   end
 
+  file "ext/fox16_c/swigruby.h"=>["ext/fox16_c/swigruby.h.orig"] do |task|
+    puts "generate #{task.name}"
+    text = File.read(task.prerequisites[0])
+    text = patch_swigruby(text)
+    File.write(task.name, text)
+  end
+
   desc "Run SWIG to generate the wrapper files."
-  task :swig => [:swigruby_h] + SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
+  multitask :swig => [:swigruby_h] + SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
+end
 
-  # add dependencies for compile *.i to *_wrap.cpp
-  SWIG_MODULES.each do |ifile, cppfile|
-    cppfile_path = File.join("ext/fox16_c", cppfile)
+# add dependencies for compile *.i to *_wrap.cpp
+SWIG_MODULES.each do |ifile, cppfile|
+  cppfile_path = File.join("ext/fox16_c", cppfile)
 
-    file cppfile_path => [ifile, 'macros.i', 'common.i', 'fxdefs.i', 'ruby-typemaps.i',
-                          'markfuncs.i', 'exceptions.i', 'freefuncs.i', 'macros.i', 'handlers.i'
-                         ].map{|f| File.join("swig-interfaces", f) } do |task|
-      swig(File.join("swig-interfaces", ifile), cppfile_path)
-    end
+  file cppfile_path => [ifile, 'macros.i', 'common.i', 'fxdefs.i', 'ruby-typemaps.i',
+                        'markfuncs.i', 'exceptions.i', 'freefuncs.i', 'macros.i', 'handlers.i'
+                       ].map{|f| File.join("swig-interfaces", f) } do |task|
+    swig(File.join("swig-interfaces", ifile), cppfile_path)
   end
 end
 
@@ -221,8 +315,13 @@ namespace :fxruby do
     make_impl
   end
 
-  file "ext/fox16_c/extconf.rb" => ['ext/fox16_c/swigruby.h', 'ext/fox16_c/impl.cpp', 'ext/fox16_c/include/inlinestubs.h'] +
-      SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
+  file "ext/fox16_c/extconf.rb" => ['ext/fox16_c/impl.cpp', 'ext/fox16_c/include/inlinestubs.h', 'swig:swig']
+
+
+  directory "ports/archives"
+  file "ports/archives/fxscintilla-2.28.0.tar.gz" => ["ports/archives"] do |t|
+    sh "wget #{LIBFXSCINTILLA_SOURCE_URI} -O #{t.name}"
+  end
 
   directory "tmp/fxscintilla"
   task "tmp/fxscintilla/fxscintilla-2.28.0/include/Scintilla.iface" => ["tmp/fxscintilla", "ports/archives/fxscintilla-2.28.0.tar.gz"] do
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..f0a1da71
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,33 @@
+init:
+  - SET PATH=c:/Ruby%ruby_version%/bin;c:/msys64/%MSYSTEM%/bin;%PATH%
+  - SET RAKEOPT=-rdevkit
+install:
+  - ps: |
+      if ($env:ruby_version -like "*head*") {
+        $(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe")
+        cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version
+      }
+  - ruby --version
+  - gem --version
+  - ridk version
+  # Remove gcc-ada and gcc-objc, since they are no longer supported by msys2 and therefore cause a dependency issue
+  - c:/msys64/usr/bin/bash -lc "pacman --noconfirm --remove mingw-w64-i686-gcc-ada mingw-w64-i686-gcc-objc mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc"
+  - c:/msys64/usr/bin/bash -lc "pacman -Syu --noconfirm --ask 20"
+  - c:/msys64/usr/bin/bash -lc "pacman -Su --noconfirm"
+  - c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-fox ${MINGW_PACKAGE_PREFIX}-swig"
+  - swig -version
+  - gem install bundler --conservative
+  - bundle config set force_ruby_platform true
+  - bundle install
+build_script:
+  - bundle exec rake compile
+test_script:
+  - bundle exec rake test
+environment:
+  matrix:
+    - ruby_version: "head-x64"
+      MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
+      MSYSTEM: "MINGW64"
+    - ruby_version: "24"
+      MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
+      MSYSTEM: "MINGW32"
diff --git a/doap.rdf b/doap.rdf
new file mode 100644
index 00000000..d64aaad0
--- /dev/null
+++ b/doap.rdf
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="iso-8859-15"?>
+<rdf:RDF
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+  xmlns:doap="http://usefulinc.com/ns/doap#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <doap:Project>
+    <doap:name>FXRuby</doap:name>
+    <doap:shortname>FXRuby</doap:shortname>
+    <doap:homepage rdf:resource="http://github.com/larskanis/fxruby"/>
+    <doap:old-homepage rdf:resource="http://fxruby.sourceforge.net"/>
+    <doap:created>2001-01-01</doap:created>
+    <doap:description>FXRuby is an extension module for Ruby that provides an interface to the FOX GUI toolkit.</doap:description>
+    <doap:shortdesc>FXRuby is a Ruby interface to the FOX GUI toolkit.</doap:shortdesc>
+    <doap:wiki rdf:resource="http://fxruby.rubyforge.org/wiki/wiki.pl"/>
+    <doap:bug-database rdf:resource="http://rubyforge.org/tracker/?atid=1223&amp;group_id=300&amp;func=browse"/>
+    <doap:mailing-list rdf:resource="http://rubyforge.org/mailman/listinfo/fxruby-users"/>
+    <doap:screenshots rdf:resource="http://www.fxruby.org/doc/examples.html"/>
+    <doap:programming-language>Ruby</doap:programming-language>
+    <doap:license rdf:resource="http://usefulinc.com/doap/licenses/lgpl"/>
+    <doap:download-page rdf:resource="http://rubyforge.org/frs/?group_id=300"/>
+
+    <doap:maintainer>
+      <foaf:Person>
+        <foaf:name>Lyle Johnson</foaf:name>
+        <foaf:nick>lyle</foaf:nick>
+        <foaf:mbox_sha1sum>6a53ac5fe72eaa9e17d14207ed0bbdaa2fb8aed9</foaf:mbox_sha1sum>
+        <rdfs:seeAlso rdf:resource="http://lylejohnson.name/foaf.rdf"/>
+      </foaf:Person>
+    </doap:maintainer>
+
+    <doap:repository>
+      <doap:CVSRepository>
+        <doap:anon-root>:pserver:anonymous@rubyforge.org:/var/cvs/fxruby</doap:anon-root>
+        <doap:module>FXRuby</doap:module>
+        <doap:browse rdf:resource="http://rubyforge.org/cgi-bin/viewcvs/cgi/viewcvs.cgi/?cvsroot=fxruby"/>
+      </doap:CVSRepository>
+    </doap:repository>
+
+    <!-- Software Development :: Libraries :: Ruby Modules -->
+    <doap:category rdf:resource="http://freshmeat.net/browse/955/"/>
+
+    <!-- Software Development :: User Interfaces -->
+    <doap:category rdf:resource="http://freshmeat.net/browse/909/"/>
+
+    <!-- Software Development :: Widget Sets -->
+    <doap:category rdf:resource="http://freshmeat.net/browse/851/"/>
+
+    <!-- current fox release -->
+    <doap:release>
+      <doap:Version>
+        <doap:branch>fox</doap:branch>
+        <doap:created>2004-06-16</doap:created>
+        <doap:revision>1.0.29</doap:revision>
+      </doap:Version>
+    </doap:release>
+
+    <!-- current fox12 release -->
+    <doap:release>
+      <doap:Version>
+        <doap:branch>fox12</doap:branch>
+        <doap:created>2005-04-15</doap:created>
+        <doap:revision>1.2.6</doap:revision>
+      </doap:Version>
+    </doap:release>
+
+    <!-- current fox14 release -->
+    <doap:release>
+      <doap:Version>
+        <doap:branch>fox14</doap:branch>
+        <doap:created>2006-09-13</doap:created>
+        <doap:revision>1.4.7</doap:revision>
+      </doap:Version>
+    </doap:release>
+
+    <!-- current fox16 release -->
+    <doap:release>
+      <doap:Version>
+        <doap:branch>fox16</doap:branch>
+        <doap:created>2017-06-15</doap:created>
+        <doap:revision>1.6.37-rc1</doap:revision>
+      </doap:Version>
+    </doap:release>
+
+  </doap:Project>
+</rdf:RDF>
+
diff --git a/doap.rdf.erb b/doap.rdf.erb
index 1833e9ef..ed079a52 100755
--- a/doap.rdf.erb
+++ b/doap.rdf.erb
@@ -78,7 +78,7 @@
       <doap:Version>
         <doap:branch>fox16</doap:branch>
         <doap:created><%= Date.today %></doap:created>
-        <doap:revision><%= PKG_VERSION %></doap:revision>
+        <doap:revision><%= Fox.fxrubyversion %></doap:revision>
       </doap:Version>
     </doap:release>
 
diff --git a/examples/WhatAQuietStiff.rb b/examples/WhatAQuietStiff.rb
index d87da665..5b0318dd 100755
--- a/examples/WhatAQuietStiff.rb
+++ b/examples/WhatAQuietStiff.rb
@@ -134,7 +134,7 @@ class WhatAQuietWindow < FXMainWindow
     saveDialog = FXFileDialog.new(self, "Save Image")
     saveDialog.filename = @itemList.getItemText(@itemList.currentItem)
     if saveDialog.execute != 0
-      if File.exists? saveDialog.filename
+      if File.exist? saveDialog.filename
         if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
           "Overwrite Image", "Overwrite existing image?")
           return 1
diff --git a/examples/gltest.rb b/examples/gltest.rb
index bcc3baeb..fdb8f4ae 100755
--- a/examples/gltest.rb
+++ b/examples/gltest.rb
@@ -312,13 +312,6 @@ if __FILE__ == $0
   # Construct the application
   application = FXApp.new("GLTest", "FoxTest")
 
-  # To ensure that the chores-based spin will run as fast as possible,
-  # we can disable the chore in FXRuby's event loop that tries to schedule
-  # other threads. This is OK for this program because there aren't any
-  # other Ruby threads running.
-
-  application.disableThreads
-
   # Construct the main window
   GLTestWindow.new(application)
 
diff --git a/examples/groupbox.rb b/examples/groupbox.rb
index 26a99b7a..6076d99a 100755
--- a/examples/groupbox.rb
+++ b/examples/groupbox.rb
@@ -361,12 +361,14 @@ class GroupWindow < FXMainWindow
     show(PLACEMENT_SCREEN)
 
     # Create a thread to update the clock
-    @clockThread = Thread.new(@clockLabel) { |clockLabel|
+    @clockThread = Thread.new(@clockLabel) do |clockLabel|
       while true
-        clockLabel.text = Time.now.strftime("%I:%M:%S %p")
+        runOnUiThread do
+          clockLabel.text = Time.now.strftime("%I:%M:%S %p")
+        end
         sleep(1)
       end
-    }
+    end
   end
 end
 
diff --git a/examples/imageviewer.rb b/examples/imageviewer.rb
index 85ece9b3..3961e7f3 100755
--- a/examples/imageviewer.rb
+++ b/examples/imageviewer.rb
@@ -326,7 +326,7 @@ class ImageWindow < FXMainWindow
   def onCmdSave(sender, sel, ptr)
     saveDialog = FXFileDialog.new(self, "Save Image")
     if saveDialog.execute != 0
-      if File.exists? saveDialog.filename
+      if File.exist? saveDialog.filename
         if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
           "Overwrite Image", "Overwrite existing image?")
           return 1
diff --git a/examples/inputs.rb b/examples/inputs.rb
index af64aa3a..2e15e419 100755
--- a/examples/inputs.rb
+++ b/examples/inputs.rb
@@ -21,6 +21,7 @@ class InputHandlerWindow < FXMainWindow
 
     # Output will be displayed in a multiline text area
     @cmdOutput = FXText.new(textFrame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
+    @cmdInput.text = "ping rubyinstaller.org"
 
     # Initialize the pipe
     @pipe = nil
@@ -30,6 +31,7 @@ class InputHandlerWindow < FXMainWindow
   def create
     super
     show(PLACEMENT_SCREEN)
+    @cmdInput.setFocus
   end
 
   # Remove previous input (if any)
@@ -54,11 +56,14 @@ class InputHandlerWindow < FXMainWindow
     getApp().addInput(@pipe, INPUT_READ|INPUT_EXCEPT) do |sender, sel, ptr|
       case FXSELTYPE(sel)
       when SEL_IO_READ
-        text = @pipe.read_nonblock(256)
-        if text && text.length > 0
-          @cmdOutput.appendText(text)
-        else
+        begin
+          text = @pipe.read_nonblock(256)
+        rescue IO::WaitReadable
+        rescue EOFError
+          @cmdOutput.appendText("[EOF]")
           closePipe
+        else
+          @cmdOutput.appendText(text)
         end
       when SEL_IO_EXCEPT
         #         puts 'onPipeExcept'
diff --git a/examples/pig.rb b/examples/pig.rb
index 32c92b96..6bcbbcaa 100755
--- a/examples/pig.rb
+++ b/examples/pig.rb
@@ -47,9 +47,8 @@ class PigBox < FXMainWindow
       theLabel.layoutHints = LAYOUT_FILL_X
     end
 
-    FXTextField.new(top, 20, @text, FXDataTarget::ID_VALUE) do |theTextField|
+    @theTextField = FXTextField.new(top, 20, @text, FXDataTarget::ID_VALUE) do |theTextField|
       theTextField.layoutHints = LAYOUT_FILL_X
-      theTextField.setFocus()
     end
 
     FXButton.new(top, 'Pig It') do |pigButton|
@@ -66,6 +65,7 @@ class PigBox < FXMainWindow
   def create
     super
     show(PLACEMENT_SCREEN)
+    @theTextField.setFocus
   end
 end
 
diff --git a/examples/textedit/textedit.rb b/examples/textedit/textedit.rb
index 75cf6345..f503a41a 100755
--- a/examples/textedit/textedit.rb
+++ b/examples/textedit/textedit.rb
@@ -1025,7 +1025,7 @@ class TextWindow < FXMainWindow
           return false if (savedialog.execute == 0)
           setCurrentPattern(savedialog.currentPattern)
           file = savedialog.filename
-          if File.exists?(file)
+          if File.exist?(file)
             if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
               "Overwrite Document", "Overwrite existing document: #{file}?")
               return false
@@ -1092,7 +1092,7 @@ class TextWindow < FXMainWindow
     if savedialog.execute != 0
       setCurrentPattern(savedialog.currentPattern)
       file = savedialog.filename
-      if File.exists?(file)
+      if File.exist?(file)
         if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
           "Overwrite Document", "Overwrite existing document: #{file}?")
           return 1
@@ -1134,24 +1134,24 @@ class TextWindow < FXMainWindow
       # Attempt to extract the file name from various forms
       if    string =~ /#include \".*\"/
         file = File.expand_path(name, dir)
-        if !File.exists?(file)
+        if !File.exist?(file)
           Find.find(@searchpath) { |f| file = f if (f == name) }
         end
       elsif string =~ /#include <.*>/
         file = File.expand_path(name, dir)
-        if !File.exists?(file)
+        if !File.exist?(file)
           Find.find(@searchpath) { |f| file = f if (f == name) }
         end
       elsif string =~ /.*:.*:.*/
         file = File.expand_path(name, dir)
-        if !File.exists?(file)
+        if !File.exist?(file)
           Find.find(@searchpath) { |f| file = f if (f == name) }
         end
       else
         file = File.expand_path(string, dir)
       end
 
-      if File.exists?(file)
+      if File.exist?(file)
         # Different from current file?
         if file != @filename
           # Save old file first
@@ -1213,7 +1213,7 @@ class TextWindow < FXMainWindow
     if savedialog.execute != 0
       setCurrentPattern(savedialog.currentPattern)
       file = savedialog.filename
-      if File.exists?(file)
+      if File.exist?(file)
         if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
           "Overwrite Document", "Overwrite existing document: #{file}?")
           return 1
@@ -1690,7 +1690,7 @@ class TextWindow < FXMainWindow
 
   # Update box for readonly display
   def onCheckFile(sender, sel, ptr)
-    mtime = File.exists?(@filename) ? File.mtime(@filename) : nil
+    mtime = File.exist?(@filename) ? File.mtime(@filename) : nil
     if @filetime && mtime && mtime != @filetime
       @filetime = mtime
       if MBOX_CLICKED_OK == FXMessageBox.warning(self, MBOX_OK_CANCEL,
diff --git a/examples/thread.rb b/examples/thread.rb
new file mode 100644
index 00000000..02459def
--- /dev/null
+++ b/examples/thread.rb
@@ -0,0 +1,55 @@
+#!/usr/bin/env ruby
+
+require 'fox16'
+
+class ThreadedWindow < Fox::FXMainWindow
+  include Fox
+
+  def initialize(app)
+    # Call the base class initializer first
+    super(app, "Threaded Widget Test", :opts => DECOR_ALL, width: 200, height: 500)
+
+    @vframe = FXVerticalFrame.new(self,
+      FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL, :padding => 0) do |frame|
+      FXButton.new(frame, "Click to add", opts: FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X) do |button|
+        button.connect(SEL_COMMAND, method(:on_button_clicked))
+      end
+    end
+  end
+
+  def on_button_clicked(sender, sel, ptr)
+    FXHorizontalFrame.new(@vframe,
+      FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL, :padding => 10) do |frame|
+
+      label = FXLabel.new frame, "..."
+
+      Thread.new do
+        50.times do |seconds|
+          runOnUiThread do
+            label.text = "#{(50 - seconds)/10.0} seconds to remove"
+          end
+          sleep 0.1
+        end
+
+        runOnUiThread do
+          @vframe.removeChild(frame)
+          @vframe.create; @vframe.show; @vframe.recalc
+        end
+      end
+    end
+    @vframe.create; @vframe.show; @vframe.recalc
+  end
+
+  # Create and show this window
+  def create
+    super
+    show(PLACEMENT_SCREEN)
+  end
+end
+
+if __FILE__ == $0
+  application = Fox::FXApp.new("ThreadApp", "FoxTest")
+  ThreadedWindow.new(application)
+  application.create
+  application.run
+end
diff --git a/examples/unicode.rb b/examples/unicode.rb
index e899cb7e..a87d13fa 100755
--- a/examples/unicode.rb
+++ b/examples/unicode.rb
@@ -1,36 +1,15 @@
 #!/usr/bin/env ruby
+# -*- encoding: UTF-8 -*-
 
 require 'fox16'
-require 'jcode'
-
-$KCODE = 'UTF8'
-
-class UString < String
-  # Show u-prefix as in Python
-  def inspect; "u#{ super }" end
-
-  # Count multibyte characters
-  def length; self.scan(/./).length end
-
-  # Reverse the string
-  def reverse; self.scan(/./).reverse.join end
-end
-
-module Kernel
-  def u( str )
-    UString.new str.gsub(/U\+([0-9a-fA-F]{4,4})/u){["#$1".hex ].pack('U*')}
-  end
-end
-
-include Fox
 
 # Pass UTF-8 encoded Unicode strings to FXRuby.
-label = u"Les enfants vont U+00E0 l'U+00E9cole.\nLa boulangU+00E8re vend-elle le pain en aoU+00FBt?"
+label = "Les enfants vont \u00E0 l'\u00E9cole.\nLa boulang\u00E8re vend-elle le pain en ao\u00FBt?"
 
-FXApp.new("Unicode Example", "FoxTest") do |app|
-  main = FXMainWindow.new(app, "Unicode Text", nil, nil, DECOR_ALL)
-  FXLabel.new(main, label)
+Fox::FXApp.new("Unicode Example", "FoxTest") do |app|
+  main = Fox::FXMainWindow.new(app, "Unicode Text", nil, nil, Fox::DECOR_ALL)
+  Fox::FXLabel.new(main, label)
   app.create
-  main.show(PLACEMENT_SCREEN)
+  main.show(Fox::PLACEMENT_SCREEN)
   app.run
 end
diff --git a/ext/fox16_c/FXRbApp.cpp b/ext/fox16_c/FXRbApp.cpp
index 11d8bb5a..397aeea6 100644
--- a/ext/fox16_c/FXRbApp.cpp
+++ b/ext/fox16_c/FXRbApp.cpp
@@ -26,29 +26,36 @@
 
 #include "FXRbCommon.h"
 
-#if defined(RUBY_1_8)
-extern "C" {
-#include "rubysig.h" /* For CHECK_INTS */
-}
-#endif
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h> /* For struct timeval */
 #endif
 
+#ifndef WIN32
+  #include <unistd.h>
+  #include <fcntl.h>
+#endif
+
 // Message map
 FXDEFMAP(FXRbApp) FXRbAppMap[]={
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+  FXMAPFUNC(SEL_IO_READ,FXRbApp::ID_CHORE_THREADS,FXRbApp::onChoreThreads),
+#else
   FXMAPFUNC(SEL_CHORE,FXRbApp::ID_CHORE_THREADS,FXRbApp::onChoreThreads),
+#endif
   };
 
 // Class implementation
 FXRbIMPLEMENT(FXRbApp,FXApp,FXRbAppMap,ARRAYNUMBER(FXRbAppMap))
 
+#ifdef WIN32
+WSAEVENT FXRbApp::interrupt_event = NULL;
+#else
+int FXRbApp::interrupt_fds[2] = {-1, -1};
+#endif
+
 // Constructor
-FXRbApp::FXRbApp(const FXchar* appname,const FXchar* vendor) : FXApp(appname,vendor),m_bThreadsEnabled(TRUE),sleepTime(100){
-  if(m_bThreadsEnabled){
-    addChore(this,ID_CHORE_THREADS);
-    }
+FXRbApp::FXRbApp(const FXchar* appname,const FXchar* vendor) : FXApp(appname,vendor),m_bThreadsEnabled(FALSE),sleepTime(100){
+  setThreadsEnabled(TRUE);
   }
 
 
@@ -67,12 +74,34 @@ void FXRbApp::setThreadsEnabled(FXbool enabled){
   if(enabled){
     if(!m_bThreadsEnabled){
       m_bThreadsEnabled=TRUE;
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+#ifdef WIN32
+      interrupt_event = CreateEvent(NULL, TRUE, FALSE, NULL);
+      addInput(interrupt_event,INPUT_READ,this,ID_CHORE_THREADS);
+#else
+      if(pipe(interrupt_fds) == -1) rb_fatal("failed to allocate pipe for interrupt events");
+      fcntl(interrupt_fds[0], F_SETFL, O_NONBLOCK);
+      addInput(interrupt_fds[0],INPUT_READ,this,ID_CHORE_THREADS);
+#endif
+#else
       addChore(this,ID_CHORE_THREADS);
+#endif
       }
     }
   else{
     m_bThreadsEnabled=FALSE;
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+#ifdef WIN32
+    removeInput(interrupt_event,INPUT_READ);
+    CloseHandle(interrupt_event); interrupt_event = NULL;
+#else
+    removeInput(interrupt_fds[0],INPUT_READ);
+    close(interrupt_fds[0]); interrupt_fds[0] = -1;
+    close(interrupt_fds[1]); interrupt_fds[1] = -1;
+#endif
+#else
     removeChore(this,ID_CHORE_THREADS);
+#endif
     }
   }
 
@@ -88,36 +117,57 @@ FXuint FXRbApp::getSleepTime() const {
   return sleepTime;
   }
 
+long FXRbApp::onChoreThreads(FXObject *obj,FXSelector sel,void *p){
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+#ifdef WIN32
+  ResetEvent(interrupt_event);
+#else
+  char byte;
+  // clear the pipe
+  if(read(interrupt_fds[0], &byte, 1) != 1) rb_fatal("failed to read from pipe for interrupt events");
+#endif
+#endif
+  return FXRbApp_onChoreThreads(this, obj, sel, p);
+  }
+
+long FXRbApp_onChoreThreads_gvlcb(FXRbApp *self,FXObject *obj,FXSelector sel,void *p){
+  return self->onChoreThreads_gvlcb(obj, sel, p);
+  }
 
 // Process threads
-long FXRbApp::onChoreThreads(FXObject*,FXSelector,void*){
+long FXRbApp::onChoreThreads_gvlcb(FXObject*,FXSelector,void*){
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+#else
   // Pause for 'sleepTime' millseconds
   struct timeval wait;
   wait.tv_sec=0;
   wait.tv_usec=100*sleepTime;
 
-  // Confirm that this thread can be interrupted, then go to sleep
-#if defined(RUBY_1_8)
-  CHECK_INTS;
-  if(!rb_thread_critical)
-    rb_thread_wait_for(wait);
-#else
-  // if(!rb_thread_critical) rb_thread_wait_for(wait);
   rb_thread_wait_for(wait);
-#endif /* RUBY_1_8 */
 
   // Re-register this chore for next time
   addChore(this,ID_CHORE_THREADS);
+#endif
 
   // Back to work...
   return 1;
   }
 
+#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+void fxrb_wakeup_fox(void *){
+#ifdef WIN32
+  SetEvent(FXRbApp::interrupt_event);
+#else
+  if(write(FXRbApp::interrupt_fds[1], "X", 1) != 1) rb_fatal("failed to write to pipe for interrupt events");
+#endif
+  }
+#endif
 
 // Destructor
 FXRbApp::~FXRbApp(){
   FXTRACE((100,"FXRbApp::~FXRbApp()\n"));
   VALUE myRegistry;
+  setThreadsEnabled(FALSE);
   FXRbDestroyAppSensitiveObjects();
   myRegistry=FXRbGetRubyObj(&(reg()),true);
   if(!NIL_P(myRegistry)){
diff --git a/ext/fox16_c/FXRbObjRegistry.cpp b/ext/fox16_c/FXRbObjRegistry.cpp
new file mode 100644
index 00000000..953adcb3
--- /dev/null
+++ b/ext/fox16_c/FXRbObjRegistry.cpp
@@ -0,0 +1,169 @@
+/***********************************************************************
+ * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
+ * Copyright (c) 2017-2017 by Lyle Johnson. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For further information please contact the author by e-mail
+ * at "lars@greiz-reinsdorf.de".
+ ***********************************************************************/
+
+#include "FXRbCommon.h"
+#include "FXRbObjRegistry.h"
+#include "swigruby.h"
+
+FXRbObjRegistry::FXRbObjRegistry(){
+  FXRuby_Objects=st_init_numtable();
+}
+
+const char * FXRbObjRegistry::safe_rb_obj_classname(VALUE obj)
+{
+  int tdata = TYPE(obj)==T_DATA;
+  if( (tdata && IsInGC(DATA_PTR(obj)))
+#ifdef HAVE_RB_DURING_GC
+      || rb_during_gc()
+#endif
+  ){
+    /* It's not safe to call rb_obj_classname() during GC.
+    * Return dummy value in this case. */
+    return "during GC";
+  } else if (tdata) {
+    return rb_obj_classname(obj);
+  } else {
+    return "no T_DATA";
+  }
+}
+
+VALUE FXRbObjRegistry::NewBorrowedObj(void *ptr,swig_type_info* ty){
+  if(ptr!=0){
+    FXASSERT(ty!=0);
+    ObjDesc *desc;
+
+    if(FXMALLOC(&desc,ObjDesc,1)){
+      VALUE obj = SWIG_Ruby_NewPointerObj(ptr,ty,1);
+      FXTRACE((1,"FXRbNewPointerObj(foxObj=%p) => rubyObj=%p (%s)\n",ptr,(void *)obj,safe_rb_obj_classname(obj)));
+      desc->obj = obj;
+      desc->type = borrowed;
+      desc->in_gc = false;
+      int overwritten = st_insert(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t>(desc));
+      FXASSERT(!overwritten);
+      return obj;
+    } else {
+      FXASSERT(FALSE);
+      return Qnil;
+    }
+  }
+  else{
+    return Qnil;
+  }
+}
+
+void FXRbObjRegistry::RegisterRubyObj(VALUE rubyObj,const void* foxObj) {
+  FXASSERT(!NIL_P(rubyObj));
+  FXASSERT(foxObj!=0);
+  ObjDesc* desc;
+  FXTRACE((1,"FXRbRegisterRubyObj(rubyObj=%p (%s),foxObj=%p)\n",(void *)rubyObj,safe_rb_obj_classname(rubyObj),foxObj));
+  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
+    FXASSERT(desc->type == borrowed);
+    /* There is already a Ruby object registered for this foxObj.
+     * This can happen, if libfox calls methods out of the C++ object constructor,
+     * that can be overwritten in Ruby (like changeFocus) with the object as
+     * parameter. FXFileSelector is one example.
+     * To avoid double references to the same foxObj from different Ruby objects,
+     * we decouple the foxObj from previoius ruby object and point to the new one.
+     */
+    DATA_PTR(desc->obj) = 0;
+    desc->obj = rubyObj;
+    desc->type = own;
+  } else {
+    if(FXMALLOC(&desc,ObjDesc,1)){
+      desc->obj = rubyObj;
+      desc->type = own;
+      desc->in_gc = false;
+      int overwritten = st_insert(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t>(desc));
+      FXASSERT(!overwritten);
+    } else {
+      FXASSERT(FALSE);
+    }
+  }
+  FXASSERT(GetRubyObj(foxObj,false)==rubyObj);
+}
+
+void FXRbObjRegistry::UnregisterRubyObj(const void* foxObj, bool alsoOwned){
+  if(foxObj!=0){
+    ObjDesc* desc;
+    if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
+      if( !alsoOwned && desc->type!=borrowed ) return;
+      FXTRACE((1,"FXRbUnregisterRubyObj(rubyObj=%p (%s),foxObj=%p)\n",(void *)desc->obj,safe_rb_obj_classname(desc->obj),foxObj));
+      DATA_PTR(desc->obj)=0;
+      FXFREE(&desc);
+      st_delete(FXRuby_Objects,reinterpret_cast<st_data_t *>(const_cast<void**>(&foxObj)),reinterpret_cast<st_data_t *>(0));
+      FXASSERT(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(0))==0);
+    }
+  }
+}
+
+
+VALUE FXRbObjRegistry::GetRubyObj(const void *foxObj,bool alsoBorrowed, bool in_gc_mark){
+  ObjDesc* desc;
+  if(foxObj!=0 && st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
+    FXASSERT(desc!=0);
+    if(alsoBorrowed || desc->type!=borrowed){
+      const char *classname = in_gc_mark ? "in GC" : safe_rb_obj_classname(desc->obj);
+      FXTRACE((2,"%s(foxObj=%p) => rubyObj=%p (%s)\n", in_gc_mark ? "FXRbGcMark" : "FXRbGetRubyObj", foxObj, (void *)desc->obj, classname));
+      return desc->obj;
+    }
+  }
+  return Qnil;
+}
+
+
+bool FXRbObjRegistry::IsBorrowed(void* ptr){
+  FXASSERT(ptr!=0);
+  ObjDesc *desc;
+  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
+    return desc->type == borrowed;
+  }
+  else{
+    return true;
+  }
+}
+
+bool FXRbObjRegistry::SetInGC(const void* ptr, bool enabled){
+  FXASSERT(ptr!=0);
+  ObjDesc *desc;
+  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
+    desc->in_gc=enabled;
+    return enabled;
+  }
+  return false;
+}
+
+bool FXRbObjRegistry::IsInGC(const void* ptr){
+  FXASSERT(ptr!=0);
+  ObjDesc *desc;
+
+#ifdef HAVE_RB_DURING_GC
+  if( rb_during_gc() ){
+    return true;
+  }
+#endif
+  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
+    return desc->in_gc;
+  }
+  return false;
+}
+
+FXRbObjRegistry FXRbObjRegistry::main;
diff --git a/ext/fox16_c/FXRuby.cpp b/ext/fox16_c/FXRuby.cpp
index 61f1715b..5e138962 100644
--- a/ext/fox16_c/FXRuby.cpp
+++ b/ext/fox16_c/FXRuby.cpp
@@ -29,6 +29,7 @@
 #endif
 
 #include "FXRbCommon.h"
+#include "FXRbObjRegistry.h"
 #include "impl.h"
 
 // SWIG runtime functions we need
@@ -42,24 +43,18 @@
 #include <signal.h>	// for definitions of SIGINT, etc.
 #endif
 
-#if defined(RUBY_1_8)
-
-extern "C" {
-#include "st.h"
-#include "rubyio.h"     // for GetOpenFile(), etc.
-}
-
-#else
-
 #include "ruby/io.h"
 #include "ruby/st.h"
 
-#endif /* RUBY_1_8 */
-
 
 // Opaque type declaration from SWIG runtime
 struct swig_type_info;
 
+static int FXSWIG_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags){
+  return SWIG_ConvertPtr(obj, ptr, ty, flags);
+}
+
+
 // Wrapper around SWIG_TypeQuery() that caches results for performance
 swig_type_info *FXRbTypeQuery(const char *desc){
   FXASSERT(desc!=0);
@@ -74,64 +69,13 @@ swig_type_info *FXRbTypeQuery(const char *desc){
   }
 
 
-/**
- * The FXRuby_Objects hash table basically maps C++ objects to Ruby instances.
- * Each key in the table is a pointer to a C++ object we've seen before, and
- * the corresponding value is an FXRubyObjDesc struct (see below) that tells
- * us which Ruby instance corresponds to that C++ object.
- */
-
-static st_table * FXRuby_Objects;
-
-/**
- * Each value in the FXRuby_Objects hash table is an instance of this
- * struct. It identifies the Ruby instance associated with a C++ object.
- * It also indicates whether this is merely a "borrowed" reference to
- * some C++ object (i.e. it's not one we need to destroy later).
- *
- * in_gc is set for FXWindows that are in garbage collection and must
- * not call ruby code anymore.
- */
-
-struct FXRubyObjDesc {
-  VALUE obj;
-  bool borrowed;
-  bool in_gc;
-  };
-
-
-/**
- * FXRbNewPointerObj() is a wrapper around SWIG_Ruby_NewPointerObj() that also
- * registers this C++ object & Ruby instance pair in our FXRuby_Objects
- * hash table. This function should only get called for methods that return
- * a reference to an already-existing C++ object (i.e. one that FOX "owns")
- * and for that reason we mark these objects as "borrowed".
- */
-
 VALUE FXRbNewPointerObj(void *ptr,swig_type_info* ty){
-  if(ptr!=0){
-    FXASSERT(ty!=0);
-    VALUE obj;
-    FXRubyObjDesc *desc;
-    if(FXMALLOC(&desc,FXRubyObjDesc,1)){
-      obj=SWIG_Ruby_NewPointerObj(ptr,ty,1);
-      FXTRACE((1,"FXRbNewPointerObj(rubyObj=%d,foxObj=%p)\n",static_cast<int>(obj),ptr));
-      desc->obj=obj;
-      desc->borrowed=true;
-      desc->in_gc=false;
-      int overwritten = st_insert(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t>(desc));
-      FXASSERT(!overwritten);
-      return obj;
-      }
-    else{
-      FXASSERT(FALSE);
-      return Qnil;
-      }
-    }
-  else{
-    return Qnil;
-    }
-  }
+  return FXRbObjRegistry::main.NewBorrowedObj(ptr,ty);
+}
+
+VALUE FXRbNewPointerObjCb(void *ptr,swig_type_info* ty){
+  return SWIG_Ruby_NewPointerObj(ptr, ty, 1);
+}
 
 
 /**
@@ -140,205 +84,136 @@ VALUE FXRbNewPointerObj(void *ptr,swig_type_info* ty){
  */
 
 bool FXRbIsBorrowed(void* ptr){
-  FXASSERT(ptr!=0);
-  FXRubyObjDesc *desc;
-  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
-    return desc->borrowed;
-    }
-  else{
-    return true;
-    }
-  }
+  return FXRbObjRegistry::main.IsBorrowed(ptr);
+}
 
 bool FXRbSetInGC(const void* ptr, bool enabled){
-  FXASSERT(ptr!=0);
-  FXRubyObjDesc *desc;
-  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
-    desc->in_gc=enabled;
-    return enabled;
-    }
-  return false;
-  }
+  return FXRbObjRegistry::main.SetInGC(ptr, enabled);
+}
 
 bool FXRbIsInGC(const void* ptr){
-  FXASSERT(ptr!=0);
-  FXRubyObjDesc *desc;
-  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(ptr),reinterpret_cast<st_data_t *>(&desc))!=0){
-    return desc->in_gc;
-    }
-  return false;
-  }
-
-
-/**
- * FXRbConvertPtr() is just a wrapper around SWIG_ConvertPtr().
- */
-
-void* FXRbConvertPtr(VALUE obj,swig_type_info* ty){
-  void *ptr;
-  SWIG_ConvertPtr(obj,&ptr,ty,1);
-  return ptr;
-  }
-
-
-// Should we catch exceptions thrown by message handlers?
-FXbool FXRbCatchExceptions=FALSE;
-
-// Returns an FXInputHandle for this Ruby file object
-FXInputHandle FXRbGetReadFileHandle(VALUE obj) {
-  int fd;
-  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
-#ifdef WIN32
-#ifdef __CYGWIN__
-  return (FXInputHandle) get_osfhandle(fd);
-#else
-  return (FXInputHandle) _get_osfhandle(fd);
-#endif
-#else
-  return (FXInputHandle) fd;
-#endif
-  }
-
-
-// Returns an FXInputHandle for this Ruby file object
-FXInputHandle FXRbGetWriteFileHandle(VALUE obj) {
-  int fd;
-#if defined(RUBINIUS)
-  VALUE vwrite = rb_intern("@write");
-  if(rb_ivar_defined(obj, vwrite)) obj = rb_ivar_get(obj, vwrite);
-  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
-#elif defined(RUBY_1_8)
-  OpenFile *fptr;
-  GetOpenFile(obj, fptr);
-  FILE *fpw=GetWriteFile(fptr);
-  fd = fileno(fpw);
-#else
-  rb_io_t *fptr;
-  GetOpenFile(obj, fptr);
-  VALUE wrio = fptr->tied_io_for_writing;
-  if(wrio) obj = wrio;
-  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
-#endif
-#ifdef WIN32
-#ifdef __CYGWIN__
-  return (FXInputHandle) get_osfhandle(fd);
-#else
-  return (FXInputHandle) _get_osfhandle(fd);
-#endif
-#else
-  return (FXInputHandle) fd;
-#endif
-  }
+  return FXRbObjRegistry::main.IsInGC(ptr);
+}
 
 
 // Register this Ruby class instance
 void FXRbRegisterRubyObj(VALUE rubyObj,const void* foxObj) {
-  FXASSERT(!NIL_P(rubyObj));
-  FXASSERT(foxObj!=0);
-  FXRubyObjDesc* desc;
-  FXTRACE((1,"FXRbRegisterRubyObj(rubyObj=%d,foxObj=%p)\n",static_cast<int>(rubyObj),foxObj));
-  if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
-    FXASSERT(desc->borrowed);
-    /* There is already a Ruby object registered for this foxObj.
-     * This can happen, if libfox calls methods out of the C++ object constructor,
-     * that can be overwritten in Ruby (like changeFocus) with the object as
-     * parameter. FXFileSelector is one example.
-     * To avoid double references to the same foxObj from different Ruby objects,
-     * we decouple the foxObj from previoius ruby object and point to the new one.
-     */
-    DATA_PTR(desc->obj) = 0;
-    desc->obj=rubyObj;
-    desc->borrowed=false;
-    }
-  else{
-    if(FXMALLOC(&desc,FXRubyObjDesc,1)){
-      desc->obj=rubyObj;
-      desc->borrowed=false;
-      desc->in_gc=false;
-      int overwritten = st_insert(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t>(desc));
-      FXASSERT(!overwritten);
-      }
-    else{
-      FXASSERT(FALSE);
-      }
-    }
-  FXASSERT(FXRbGetRubyObj(foxObj,false)==rubyObj);
-  }
+  return FXRbObjRegistry::main.RegisterRubyObj(rubyObj, foxObj);
+}
+
+static void FXRbUnregisterRubyObj2(const void* foxObj, bool alsoOwned){
+  return FXRbObjRegistry::main.UnregisterRubyObj(foxObj, alsoOwned);
+}
 
 /**
  * Remove this mapping between a Ruby instance and a C++ object
  */
 void FXRbUnregisterRubyObj(const void* foxObj){
-  if(foxObj!=0){
-    FXRubyObjDesc* desc;
-    if(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
-      FXTRACE((1,"FXRbUnregisterRubyObj(rubyObj=%d,foxObj=%p)\n",static_cast<int>(desc->obj),foxObj));
-      DATA_PTR(desc->obj)=0;
-      FXFREE(&desc);
-      st_delete(FXRuby_Objects,reinterpret_cast<st_data_t *>(const_cast<void**>(&foxObj)),reinterpret_cast<st_data_t *>(0));
-      FXASSERT(st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(0))==0);
-      }
-    }
-  }
+  FXRbUnregisterRubyObj2(foxObj, true);
+}
 
 
-VALUE to_ruby(const FXObject* obj){
-  if(obj!=0){
-    FXString className=obj->getClassName();
-    if(className.length()>3){
-      if(className.left(4)=="FXRb"){ className.replace(0,4,"FX"); }
-      }
-    FXString desc=className+" *";
-    return FXRbGetRubyObj(obj,desc.text());
-    }
-  return Qnil;
-  }
-
+/* We now have 3 types of FXObject wrappers:
+ *
+ * Own objects :
+ * These objects are allocated by FXRuby on the heap.
+ * They are free'd when the FXRuby wrapper is GC'ed and no other reference to the object exists.
+ * They are registered in FXRbObjRegistry as owned object.
+ * They are built per FXRbRegisterRubyObj().
+ *
+ * Borrowed objects :
+ * These objects are allocated by libfox on the heap.
+ * They are free'd by libfox when the owning fox object gets destroyed.
+ * Only the ruby wrapper is GC'ed.
+ * They are registered in FXRbObjRegistry as borrowed object.
+ * They are built per FXGetRubyObj().
+ *
+ * Callback objects :
+ * This is the new type.
+ * These objects are allocated by libfox on the heap or on the stack.
+ * They are wrapped for the time of one callback only, because stack memory is free'd afterwards.
+ * They are not registered in FXRbObjRegistry, but stored on the stack only.
+ * Therefore callback objects aren't re-used, but newly wrapped for each call.
+ * The same goes for arguments to ruby blocks.
+ * They are built per FXGetRubyObjCb().
+ */
 
 /**
  * Return the registered Ruby class instance associated with this
  * FOX object, or Qnil if not found.
  */
-VALUE FXRbGetRubyObj(const void *foxObj,bool searchBoth){
-  FXRubyObjDesc* desc;
-  if(foxObj!=0 && st_lookup(FXRuby_Objects,reinterpret_cast<st_data_t>(const_cast<void*>(foxObj)),reinterpret_cast<st_data_t *>(&desc))!=0){
-    FXASSERT(desc!=0);
-    if(searchBoth){
-      return desc->obj;
-      }
-    else{
-      return desc->borrowed ? Qnil : desc->obj;
-      }
-    }
-  else{
-    return Qnil;
-    }
-  }
+VALUE FXRbGetRubyObj(const void *foxObj,bool alsoBorrowed, bool in_gc_mark){
+  return FXRbObjRegistry::main.GetRubyObj(foxObj, alsoBorrowed, in_gc_mark);
+}
 
 /**
  * Return the registered Ruby class instance associated with this
- * FOX object, or a new registered instance if not found.
+ * FOX object, or a new registered instance of a borrowed object if not found.
+ *
+ * This is suitable for objects on the heap, but not suitable for callbacks,
+ * because callback values might be on the stack.
+ * These stack objects should not be registered, because they are temporary only.
  */
 VALUE FXRbGetRubyObj(const void *foxObj,swig_type_info* ty){
   if(foxObj!=0){
     VALUE rbObj=FXRbGetRubyObj(foxObj,true);
-    return NIL_P(rbObj) ? FXRbNewPointerObj(const_cast<void*>(foxObj),ty) : rbObj;
+    if( NIL_P(rbObj) ){
+      return FXRbNewPointerObj(const_cast<void*>(foxObj),ty);
+    }else{
+      // The requested type should match the registered class.
+      FXASSERT(SWIG_CheckConvert(rbObj, ty));
+      return rbObj;
     }
-  else{
+  }else{
     return Qnil;
-    }
   }
+}
 
 VALUE FXRbGetRubyObj(const void *foxObj,const char *type){
+  return FXRbGetRubyObj(foxObj, FXRbTypeQuery(type));
+}
+
+/* Get an already registered object or wrap a new one for use in a callback.
+ *
+ * This is suitable for objects on the heap or on the stack.
+ * If an object is already registered per FXRbGetRubyObj(), this instance is returned.
+ * If it is not registered, a new wrapping object is built and returned, but is not registered.
+ */
+VALUE FXRbGetRubyObjCb(const void *foxObj,swig_type_info* ty){
   if(foxObj!=0){
-    FXASSERT(type!=0);
-    VALUE rbObj=FXRbGetRubyObj(foxObj,true);
-    return NIL_P(rbObj) ? FXRbNewPointerObj(const_cast<void*>(foxObj),FXRbTypeQuery(type)) : rbObj;
+    VALUE rbObj=FXRbGetRubyObj(foxObj, true);
+    if( NIL_P(rbObj) ){
+      return FXRbNewPointerObjCb(const_cast<void*>(foxObj), ty);
+    }else{
+      // The requested type should match the registered class.
+      FXASSERT(SWIG_CheckConvert(rbObj, ty));
+      return rbObj;
     }
-  else{
+  }else{
     return Qnil;
+  }
+}
+
+static VALUE to_ruby_obj(const FXObject* obj, VALUE (*get_value)(const void*, swig_type_info*)){
+  if(obj){
+    FXString className = obj->getClassName();
+    if(className.length() > 3){
+      if(className.left(4)=="FXRb"){ className.replace(0,4,"FX"); }
     }
+    FXString desc = className+" *";
+    return get_value(obj, FXRbTypeQuery(desc.text()));
   }
+  return Qnil;
+}
+
+VALUE to_ruby(const FXObject* obj){
+  return to_ruby_obj(obj, FXRbGetRubyObj);
+}
+
+VALUE to_ruby_cb(const FXObject* obj){
+  return to_ruby_obj(obj, FXRbGetRubyObjCb);
+}
+
 
 /**
  * Look up the Ruby instance associated with this C++ object, if any, and mark
@@ -362,7 +237,7 @@ void FXRbGcMark(void *obj){
      * example program works if you invoke the GC in ShutterWindow#create;
      * make sure that the shutter items' contents don't get blown away!
      */
-    VALUE value=FXRbGetRubyObj(obj,true);
+    VALUE value=FXRbGetRubyObj(obj, true, true);
     if(!NIL_P(value)){
       rb_gc_mark(value);
       }
@@ -415,7 +290,7 @@ VALUE FXRbMakeArray(const FXchar* dashpattern,FXuint dashlength){
 VALUE FXRbMakeArray(const FXArc* arcs,FXuint narcs){
   VALUE result=rb_ary_new();
   for(FXuint i=0; i<narcs; i++)
-    rb_ary_push(result,FXRbGetRubyObj(&arcs[i],"FXArc *"));
+    rb_ary_push(result, FXRbNewPointerObjCb(const_cast<FXArc*>(&arcs[i]), FXRbTypeQuery("FXArc *")));
   return result;
   }
 
@@ -423,7 +298,7 @@ VALUE FXRbMakeArray(const FXArc* arcs,FXuint narcs){
 VALUE FXRbMakeArray(const FXPoint* points,FXuint npoints){
   VALUE result=rb_ary_new();
   for(FXuint i=0; i<npoints; i++)
-    rb_ary_push(result,FXRbGetRubyObj(&points[i],"FXPoint *"));
+    rb_ary_push(result,FXRbNewPointerObjCb(const_cast<FXPoint*>(&points[i]), FXRbTypeQuery("FXPoint *")));
   return result;
   }
 
@@ -431,7 +306,7 @@ VALUE FXRbMakeArray(const FXPoint* points,FXuint npoints){
 VALUE FXRbMakeArray(const FXRectangle* rectangles,FXuint nrectangles){
   VALUE result=rb_ary_new();
   for(FXuint i=0; i<nrectangles; i++)
-    rb_ary_push(result,FXRbGetRubyObj(&rectangles[i],"FXRectangle *"));
+    rb_ary_push(result,FXRbNewPointerObjCb(const_cast<FXRectangle*>(&rectangles[i]), FXRbTypeQuery("FXRectangle *")));
   return result;
   }
 
@@ -439,14 +314,14 @@ VALUE FXRbMakeArray(const FXRectangle* rectangles,FXuint nrectangles){
 VALUE FXRbMakeArray(const FXSegment* segments,FXuint nsegments){
   VALUE result=rb_ary_new();
   for(FXuint i=0; i<nsegments; i++)
-    rb_ary_push(result,FXRbGetRubyObj(&segments[i],"FXSegment *"));
+    rb_ary_push(result,FXRbNewPointerObjCb(const_cast<FXSegment*>(&segments[i]), FXRbTypeQuery("FXSegment *")));
   return result;
   }
 
 // Returns a Ruby array of FXColor values
 VALUE FXRbMakeColorArray(const FXColor* colors,FXint w,FXint h){
   VALUE result=rb_ary_new();
-  FXint size=w*h;
+  FXuint size=w*h;
   for(FXuint i=0; i<size; i++)
     rb_ary_push(result,to_ruby(colors[i]));
   return result;
@@ -499,7 +374,6 @@ FXColor *FXRbConvertToFXColors(VALUE string_or_ary, FXuint *opts){
  */
 static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector sel,void* ptr){
   FXTRACE((1,"FXRbConvertMessageData(%s(%p),FXSEL(%s,%d),%p)\n",sender->getClassName(),sender,FXDebugTarget::messageTypeName[FXSELTYPE(sel)],FXSELID(sel),ptr));
-  FXInputHandle fff;
   FXushort type=FXSELTYPE(sel);
   FXushort id=FXSELID(sel);
 
@@ -555,22 +429,17 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
      type==SEL_PICKED ||
      type==SEL_SESSION_NOTIFY ||
      type==SEL_SESSION_CLOSED) {
-    return to_ruby(reinterpret_cast<FXEvent*>(ptr));
+    return to_ruby_cb(reinterpret_cast<FXEvent*>(ptr));
     }
   else if(type==SEL_DRAGGED && !sender->isMemberOf(FXMETACLASS(FXGLViewer))){
-    return to_ruby(reinterpret_cast<FXEvent*>(ptr));
+    return to_ruby_cb(reinterpret_cast<FXEvent*>(ptr));
     }
   else if(type==SEL_SIGNAL){
-    return to_ruby(static_cast<int>(reinterpret_cast<FXuval>(ptr)));
+    return to_ruby_cb(static_cast<int>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(type==SEL_IO_READ ||
           type==SEL_IO_WRITE ||
 	  type==SEL_IO_EXCEPT){
-#ifdef WIN32
-    fff=reinterpret_cast<FXInputHandle>(ptr);
-#else
-    fff=static_cast<FXInputHandle>(reinterpret_cast<long>(ptr));
-#endif
     return Qnil;
     }
   else if(type==SEL_CLOSE ||
@@ -588,37 +457,37 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
     if(type==SEL_CHANGED||type==SEL_COMMAND) return Qnil;
     }
   else if(sender->isMemberOf(FXMETACLASS(FXArrowButton))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXuint>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXuint>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXPicker))){
-    if(type==SEL_COMMAND || type==SEL_CHANGED) return to_ruby(reinterpret_cast<FXPoint*>(ptr));
+    if(type==SEL_COMMAND || type==SEL_CHANGED) return to_ruby_cb(reinterpret_cast<FXPoint*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXButton))){
     if(type==SEL_CLICKED ||
        type==SEL_DOUBLECLICKED ||
        type==SEL_TRIPLECLICKED ||
-       type==SEL_COMMAND) return to_ruby(static_cast<FXuint>(reinterpret_cast<FXuval>(ptr)));
+       type==SEL_COMMAND) return to_ruby_cb(static_cast<FXuint>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXCheckButton))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorBar))){
     if(type==SEL_CHANGED || type==SEL_COMMAND){
       FXfloat* hsv=reinterpret_cast<FXfloat*>(ptr);
-      return rb_ary_new3(3,to_ruby(hsv[0]),to_ruby(hsv[1]),to_ruby(hsv[2]));
+      return rb_ary_new3(3,to_ruby_cb(hsv[0]),to_ruby_cb(hsv[1]),to_ruby_cb(hsv[2]));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorDialog))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorRing))){
     if(type==SEL_CHANGED || type==SEL_COMMAND){
       FXfloat* hsv=reinterpret_cast<FXfloat*>(ptr);
-      return rb_ary_new3(3,to_ruby(hsv[0]),to_ruby(hsv[1]),to_ruby(hsv[2]));
+      return rb_ary_new3(3,to_ruby_cb(hsv[0]),to_ruby_cb(hsv[1]),to_ruby_cb(hsv[2]));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorSelector))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorWell))){
     if(type==SEL_CHANGED ||
@@ -626,29 +495,29 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_CLICKED ||
        type==SEL_DOUBLECLICKED ||
        type==SEL_TRIPLECLICKED) {
-	       VALUE v=to_ruby(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
+	       VALUE v=to_ruby_cb(static_cast<FXColor>(reinterpret_cast<FXuval>(ptr)));
 	       return v;
     }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXColorWheel))){
     if(type==SEL_CHANGED || type==SEL_COMMAND){
       FXfloat* hsv=reinterpret_cast<FXfloat*>(ptr);
-      return rb_ary_new3(3,to_ruby(hsv[0]),to_ruby(hsv[1]),to_ruby(hsv[2]));
+      return rb_ary_new3(3,to_ruby_cb(hsv[0]),to_ruby_cb(hsv[1]),to_ruby_cb(hsv[2]));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXComboBox))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXchar*>(ptr));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXchar*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXDataTarget))){
     if(type==SEL_COMMAND || type==SEL_CHANGED){
       if(recv->isMemberOf(FXMETACLASS(FXWindow))){
         switch(id){
           case FXWindow::ID_SETINTVALUE:
-            return to_ruby(*reinterpret_cast<FXint*>(ptr));
+            return to_ruby_cb(*reinterpret_cast<FXint*>(ptr));
           case FXWindow::ID_SETREALVALUE:
-            return to_ruby(*reinterpret_cast<FXdouble*>(ptr));
+            return to_ruby_cb(*reinterpret_cast<FXdouble*>(ptr));
           case FXWindow::ID_SETSTRINGVALUE:
-            return to_ruby(*reinterpret_cast<FXString*>(ptr));
+            return to_ruby_cb(*reinterpret_cast<FXString*>(ptr));
           case FXWindow::ID_GETINTVALUE:
           case FXWindow::ID_GETREALVALUE:
           case FXWindow::ID_GETSTRINGVALUE:
@@ -666,20 +535,20 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXDial))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXDirBox))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXchar*>(ptr));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXchar*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXDockBar))){
-    if(type==SEL_DOCKED || type==SEL_FLOATED) return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXDockSite *"));
+    if(type==SEL_DOCKED || type==SEL_FLOATED) return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXDockSite *"));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXFileList))){
     if (type==SEL_CHANGED ||
         type==SEL_CLICKED ||
         type==SEL_DOUBLECLICKED ||
         type==SEL_TRIPLECLICKED ||
-        type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+        type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXFoldingList))){
     if(type==SEL_COLLAPSED ||
@@ -695,7 +564,7 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_DESELECTED ||
        type==SEL_INSERTED ||
        type==SEL_DELETED){
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXFoldingItem *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXFoldingItem *"));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXGLViewer))){
@@ -704,13 +573,13 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_DOUBLECLICKED ||
        type==SEL_TRIPLECLICKED ||
        type==SEL_DRAGGED){
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXGLObject *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXGLObject *"));
       }
     else if(type==SEL_COMMAND){
       if(id==FXWindow::ID_QUERY_MENU)
-        return to_ruby(reinterpret_cast<FXEvent*>(ptr));
+        return to_ruby_cb(reinterpret_cast<FXEvent*>(ptr));
       else
-        return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXGLObject *"));
+        return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXGLObject *"));
       }
     else if(type==SEL_LASSOED ||
             type==SEL_INSERTED ||
@@ -725,7 +594,7 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
     }
   else if(sender->isMemberOf(FXMETACLASS(FXGradientBar))){
     if(type==SEL_CHANGED){
-      return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+      return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
       }
     else if(type==SEL_SELECTED || type==SEL_DESELECTED){
       return Qnil;
@@ -737,7 +606,7 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_CLICKED ||
        type==SEL_REPLACED ||
        type==SEL_INSERTED ||
-       type==SEL_DELETED) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+       type==SEL_DELETED) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXIconList))){
     if(type==SEL_CHANGED ||
@@ -749,10 +618,10 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_DESELECTED ||
        type==SEL_REPLACED ||
        type==SEL_INSERTED ||
-       type==SEL_DELETED) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+       type==SEL_DELETED) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXKnob))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXList))){
     if(type==SEL_CHANGED ||
@@ -764,10 +633,10 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_REPLACED ||
        type==SEL_INSERTED ||
        type==SEL_DELETED ||
-       type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+       type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXListBox))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     else if(type==SEL_CHANGED) return Qnil;
     }
   else if(sender->isMemberOf(FXMETACLASS(FXMDIChild))){
@@ -779,66 +648,66 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
       }
     else if(type==SEL_SELECTED ||
             type==SEL_DESELECTED){
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXMDIChild *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXMDIChild *"));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXMDIClient))){
-    if(type==SEL_CHANGED) return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXMDIChild *"));
+    if(type==SEL_CHANGED) return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXMDIChild *"));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXMenuCheck))){
-    if(type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXuval>(ptr));
+    if(type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXuval>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXMenuRadio))){
-    if(type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXuval>(ptr));
+    if(type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXuval>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXMenuCommand))){
-    if(type==SEL_COMMAND) return to_ruby(true);
+    if(type==SEL_COMMAND) return to_ruby_cb(true);
     }
   else if(sender->isMemberOf(FXMETACLASS(FXOption))){
-    if(type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXEvent*>(ptr));
+    if(type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXEvent*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXOptionMenu))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXRadioButton))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXRealSlider))){
     if(type==SEL_CHANGED || type==SEL_COMMAND)
-      return to_ruby(*(reinterpret_cast<FXdouble *>(ptr)));
+      return to_ruby_cb(*(reinterpret_cast<FXdouble *>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXRealSpinner))){
-    if(type==SEL_COMMAND || type==SEL_CHANGED) return to_ruby(*(reinterpret_cast<FXdouble *>(ptr)));
+    if(type==SEL_COMMAND || type==SEL_CHANGED) return to_ruby_cb(*(reinterpret_cast<FXdouble *>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXRecentFiles))){
-    if(type==SEL_COMMAND) return to_ruby(reinterpret_cast<FXchar*>(ptr));
+    if(type==SEL_COMMAND) return to_ruby_cb(reinterpret_cast<FXchar*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXRuler))){
     if(type==SEL_CHANGED) return Qnil;
     }
   else if(sender->isMemberOf(FXMETACLASS(FXScrollBar))){
-    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_CHANGED || type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXShutter))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXSlider))){
     if(type==SEL_CHANGED || type==SEL_COMMAND)
-      return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+      return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXSpinner))){
     if(type==SEL_CHANGED || type==SEL_COMMAND)
-      return to_ruby(static_cast<FXint>(reinterpret_cast<FXuval>(ptr)));
+      return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXSplitter))){
     if(type==SEL_CHANGED || type==SEL_COMMAND)
-      return to_ruby(reinterpret_cast<FXWindow *>(ptr));
+      return to_ruby_cb(reinterpret_cast<FXWindow *>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXSwitcher))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTabBar))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTable))){
     if(type==SEL_CLICKED ||
@@ -847,11 +716,11 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_CHANGED ||
        type==SEL_COMMAND ||
        type==SEL_SELECTED ||
-       type == SEL_DESELECTED) return to_ruby(reinterpret_cast<FXTablePos*>(ptr));
+       type == SEL_DESELECTED) return to_ruby_cb(reinterpret_cast<FXTablePos*>(ptr));
     else if(type == SEL_INSERTED ||
             type == SEL_DELETED ||
             type == SEL_REPLACED){
-	      return to_ruby(reinterpret_cast<FXTableRange*>(ptr));
+	      return to_ruby_cb(reinterpret_cast<FXTableRange*>(ptr));
 	      }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXText))){
@@ -868,31 +737,31 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
         }
       }
     else if(type==SEL_CHANGED){
-      return to_ruby(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
+      return to_ruby_cb(static_cast<FXint>(reinterpret_cast<FXival>(ptr)));
       }
     else if(type==SEL_SELECTED ||
             type == SEL_DESELECTED) {
       FXint* what=reinterpret_cast<FXint*>(ptr);
       FXASSERT(what!=0);
       VALUE ary=rb_ary_new();
-      rb_ary_push(ary,to_ruby(what[0])); // start position of text
-      rb_ary_push(ary,to_ruby(what[1])); // length of text
+      rb_ary_push(ary,to_ruby_cb(what[0])); // start position of text
+      rb_ary_push(ary,to_ruby_cb(what[1])); // length of text
       return ary;
       }
     else if(type==SEL_INSERTED || type==SEL_DELETED || type==SEL_REPLACED) {
-      return to_ruby(reinterpret_cast<FXTextChange*>(ptr));
+      return to_ruby_cb(reinterpret_cast<FXTextChange*>(ptr));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTextField))){
     if(type==SEL_CHANGED ||
        type==SEL_COMMAND ||
-       type==SEL_VERIFY) return to_ruby(reinterpret_cast<FXchar*>(ptr));
+       type==SEL_VERIFY) return to_ruby_cb(reinterpret_cast<FXchar*>(ptr));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXToggleButton))){
-    if(type==SEL_COMMAND) return to_ruby(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
+    if(type==SEL_COMMAND) return to_ruby_cb(static_cast<FXuchar>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXToolBarTab))){
-    if (type==SEL_COMMAND) return to_ruby(static_cast<FXbool>(reinterpret_cast<FXuval>(ptr)));
+    if (type==SEL_COMMAND) return to_ruby_cb(static_cast<FXbool>(reinterpret_cast<FXuval>(ptr)));
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTopWindow))){
     if(type==SEL_MINIMIZE ||
@@ -903,7 +772,7 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
       }
     else if (type==SEL_SESSION_NOTIFY ||
              type==SEL_SESSION_CLOSED) {
-      return to_ruby(reinterpret_cast<FXEvent*>(ptr));
+      return to_ruby_cb(reinterpret_cast<FXEvent*>(ptr));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTreeList))){
@@ -920,17 +789,17 @@ static VALUE FXRbConvertMessageData(FXObject* sender,FXObject* recv,FXSelector s
        type==SEL_DESELECTED ||
        type==SEL_INSERTED ||
        type==SEL_DELETED){
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXTreeItem *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXTreeItem *"));
       }
     }
   else if(sender->isMemberOf(FXMETACLASS(FXTreeListBox))){
     if(type==SEL_CHANGED || type==SEL_COMMAND)
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("FXTreeItem *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("FXTreeItem *"));
     }
 #ifdef WITH_FXSCINTILLA
   else if(sender->isMemberOf(FXMETACLASS(FXScintilla))){
     if(type==SEL_COMMAND){
-      return FXRbGetRubyObj(ptr,FXRbTypeQuery("SCNotification *"));
+      return FXRbGetRubyObjCb(ptr,FXRbTypeQuery("SCNotification *"));
       }
     }
 #endif
@@ -1049,7 +918,6 @@ void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE value){
     case SEL_CLICKED:
     case SEL_DOUBLECLICKED:
     case SEL_TRIPLECLICKED:
-    case SEL_CHANGED:
     case SEL_DESELECTED:
     case SEL_SELECTED:
     case SEL_INSERTED:
@@ -1165,7 +1033,7 @@ void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE value){
           return NULL;
         case FXWindow::ID_HSCROLLED:
         case FXWindow::ID_VSCROLLED:
-          return reinterpret_cast<void*>(static_cast<unsigned long>(NUM2UINT(value)));
+          return reinterpret_cast<void*>(static_cast<long>(NUM2INT(value)));
         case FXWindow::ID_SETINTVALUE:
           if(obj->isMemberOf(FXMETACLASS(FXColorWell))){
             colorValue=NUM2UINT(value);
@@ -1206,9 +1074,16 @@ void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE value){
 	  if(obj->isMemberOf(FXMETACLASS(FXPicker))){
 			SWIG_ConvertPtr(value,&ptr,FXRbTypeQuery("FXPoint *"),1);
 			return ptr;
-	    }
-		return 0;
     }
+    if(obj->isMemberOf(FXMETACLASS(FXWindow))){
+      switch(id){
+        case FXWindow::ID_HSCROLLED:
+        case FXWindow::ID_VSCROLLED:
+          return reinterpret_cast<void*>(static_cast<long>(NUM2INT(value)));
+      }
+    }
+    return 0;
+  }
 
 	if(type==SEL_DRAGGED){
 	    SWIG_ConvertPtr(value,&ptr,FXRbTypeQuery("FXEvent *"),1);
@@ -1229,7 +1104,7 @@ static ID id_assocs;
  * or return zero if the designated receiver doesn't handle this
  * message.
  */
-ID FXRbLookupHandler(FXObject* recv,FXSelector key){
+ID FXRbLookupHandler_gvlcb(FXObject* recv,FXSelector key){
   FXTRACE((100,"FXRbLookupHandler(recv=%p(%s),FXSEL(%d,%d))\n",recv,recv->getClassName(),FXSELTYPE(key),FXSELID(key)));
   ID id=0;
   VALUE rubyObj=to_ruby(recv);
@@ -1276,26 +1151,32 @@ static ID id_backtrace;
 static VALUE handle_rescue(VALUE args,VALUE error){
   VALUE info=rb_gv_get("$!");
   VALUE errat=rb_funcall(info,id_backtrace,0);
-  VALUE mesg=RARRAY_PTR(errat)[0];
+  VALUE mesg=rb_ary_entry(errat, 0);
+  VALUE info_str=rb_obj_as_string(info);
   fprintf(stderr,"%s: %s (%s)\n",
-    StringValuePtr(mesg),
-    RSTRING_PTR(rb_obj_as_string(info)),
+    StringValueCStr(mesg),
+    StringValueCStr(info_str),
     rb_class2name(CLASS_OF(info)));
   for(int i=1;i<RARRAY_LEN(errat);i++){
-    if(TYPE(RARRAY_PTR(errat)[i])==T_STRING){
-      fprintf(stderr,"\tfrom %s\n",StringValuePtr(RARRAY_PTR(errat)[i]));
+    VALUE entry = rb_ary_entry(errat, i);
+    if(TYPE(entry)==T_STRING){
+      fprintf(stderr,"\tfrom %s\n",StringValueCStr(entry));
       }
     }
   return Qnil;
   }
 
 
+// Should we catch exceptions thrown by message handlers?
+FXbool FXRbCatchExceptions=FALSE;
+
+
 // Call the designated function and return its result (which should be a long).
-long FXRbHandleMessage(FXObject* recv,ID func,FXObject* sender,FXSelector key,void* ptr){
+long FXRbHandleMessage_gvlcb(FXObject* recv,ID func,FXObject* sender,FXSelector key,void* ptr){
   FXRbHandleArgs hArgs;
-  hArgs.recv=to_ruby(recv);
-  hArgs.sender=to_ruby(sender);
-  hArgs.key=to_ruby(key);
+  hArgs.recv=to_ruby_cb(recv);
+  hArgs.sender=to_ruby_cb(sender);
+  hArgs.key=to_ruby_cb(key);
   hArgs.data=FXRbConvertMessageData(sender,recv,key,ptr);
   hArgs.id=func;
   hArgs.nargs=3;
@@ -1304,8 +1185,8 @@ long FXRbHandleMessage(FXObject* recv,ID func,FXObject* sender,FXSelector key,vo
   FXTRACE((100,"FXRbHandleMessage(recv=%p(%s),FXSEL(%s,%d)\n",recv,recv->getClassName(),FXDebugTarget::messageTypeName[FXSELTYPE(key)],FXSELID(key)));
 
   if(FXRbCatchExceptions){
-    retval=rb_rescue2((VALUE(*)(ANYARGS)) handle_body, reinterpret_cast<VALUE>(&hArgs),
-                      (VALUE(*)(ANYARGS)) handle_rescue, Qnil,
+    retval=rb_rescue2(RUBY_VALUE_METHOD_FUNC(handle_body), reinterpret_cast<VALUE>(&hArgs),
+                      RUBY_VALUE_METHOD_FUNC(handle_rescue), Qnil,
                       rb_eStandardError, rb_eNameError, 0);
     }
   else{
@@ -1351,9 +1232,9 @@ void FXRbRange2LoHi(VALUE range,FXint& lo,FXint& hi){
     rb_raise(rb_eTypeError,"wrong argument type %s (expected %s)",rb_class2name(CLASS_OF(range)),rb_class2name(rb_cRange));
     }
   else{
-    VALUE beg=rb_funcall(range,id_begin,0,NULL);
-    VALUE end=rb_funcall(range,id_end,0,NULL);
-    VALUE excl=rb_funcall(range,id_exclude_endp,0,NULL);
+    VALUE beg=rb_funcall(range,id_begin,0);
+    VALUE end=rb_funcall(range,id_end,0);
+    VALUE excl=rb_funcall(range,id_exclude_endp,0);
     lo=NUM2INT(beg);
     hi=NUM2INT(end);
     if(excl==Qtrue){
@@ -1367,9 +1248,9 @@ void FXRbRange2LoHi(VALUE range,FXdouble& lo,FXdouble& hi){
     rb_raise(rb_eTypeError,"wrong argument type %s (expected %s)",rb_class2name(CLASS_OF(range)),rb_class2name(rb_cRange));
     }
   else{
-    VALUE beg=rb_funcall(range,id_begin,0,NULL);
-    VALUE end=rb_funcall(range,id_end,0,NULL);
-    VALUE excl=rb_funcall(range,id_exclude_endp,0,NULL);
+    VALUE beg=rb_funcall(range,id_begin,0);
+    VALUE end=rb_funcall(range,id_end,0);
+    VALUE excl=rb_funcall(range,id_exclude_endp,0);
     lo=NUM2DBL(beg);
     hi=NUM2DBL(end);
     if(excl==Qtrue){
@@ -1380,70 +1261,70 @@ void FXRbRange2LoHi(VALUE range,FXdouble& lo,FXdouble& hi){
 
 //----------------------------------------------------------------------
 
-void FXRbCallVoidMethod(FXObject* recv, ID func) {
+void FXRbCallVoidMethod_gvlcb(FXObject* recv, const char *func) {
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
   FXASSERT(!FXRbIsInGC(recv));
-  rb_funcall(obj,func,0,NULL);
+  rb_funcall(obj,rb_intern(func),0);
   }
 
-void FXRbCallVoidMethod(FXDC* recv,ID func) {
+void FXRbCallVoidMethod_gvlcb(FXDC* recv,const char *func) {
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  rb_funcall(obj,func,0,NULL);
+  rb_funcall(obj,rb_intern(func),0);
   }
 
 //----------------------------------------------------------------------
 
-bool FXRbCallBoolMethod(const FXObject* recv,ID func){
+bool FXRbCallBoolMethod_gvlcb(const FXObject* recv,const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE v=rb_funcall(obj,func,0,NULL);
+  VALUE v=rb_funcall(obj,rb_intern(func),0);
   return (v==Qtrue);
   }
 
 //----------------------------------------------------------------------
 
 // Call function with "FXint" return value
-FXint FXRbCallIntMethod(const FXObject* recv,ID func){
+FXint FXRbCallIntMethod_gvlcb(const FXObject* recv,const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,0,NULL);
+  VALUE result=rb_funcall(obj,rb_intern(func),0);
   return static_cast<FXint>(NUM2INT(result));
   }
 
 //----------------------------------------------------------------------
 
 // Call function with "FXGLObject*" return value
-FXGLObject* FXRbCallGLObjectMethod(FXGLObject* recv,ID func){
+FXGLObject* FXRbCallGLObjectMethod_gvlcb(FXGLObject* recv,const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,0,NULL);
+  VALUE result=rb_funcall(obj,rb_intern(func),0);
   return NIL_P(result) ? 0 : reinterpret_cast<FXGLObject*>(DATA_PTR(result));
   }
 
-FXGLObject* FXRbCallGLObjectMethod(FXGLViewer* recv,ID func,FXint x,FXint y){
+FXGLObject* FXRbCallGLObjectMethod_gvlcb(FXGLViewer* recv,const char *func,FXint x,FXint y){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,2,INT2NUM(x),INT2NUM(y));
+  VALUE result=rb_funcall(obj,rb_intern(func),2,INT2NUM(x),INT2NUM(y));
   return NIL_P(result) ? 0 : reinterpret_cast<FXGLObject*>(DATA_PTR(result));
   }
 
-FXGLObject* FXRbCallGLObjectMethod(FXGLObject* recv,ID func,FXuint* path,FXint n){
+FXGLObject* FXRbCallGLObjectMethod_gvlcb(FXGLObject* recv,const char *func,FXuint* path,FXint n){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,1,FXRbMakeArray(path,n));
+  VALUE result=rb_funcall(obj,rb_intern(func),1,FXRbMakeArray(path,n));
   return NIL_P(result) ? 0 : reinterpret_cast<FXGLObject*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
 // Call function with "FXGLObject**" return value
-FXGLObject** FXRbCallGLObjectArrayMethod(FXGLViewer* recv,ID func,FXint x,FXint y,FXint w,FXint h){
+FXGLObject** FXRbCallGLObjectArrayMethod_gvlcb(FXGLViewer* recv,const char *func,FXint x,FXint y,FXint w,FXint h){
   FXGLObject** objects=NULL;
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,4,INT2NUM(x),INT2NUM(y),INT2NUM(w),INT2NUM(h));
+  VALUE result=rb_funcall(obj,rb_intern(func),4,INT2NUM(x),INT2NUM(y),INT2NUM(w),INT2NUM(h));
   if(!NIL_P(result)){
     Check_Type(result,T_ARRAY);
     if(FXMALLOC(&objects,FXGLObject*,RARRAY_LEN(result)+1)){
@@ -1458,55 +1339,55 @@ FXGLObject** FXRbCallGLObjectArrayMethod(FXGLViewer* recv,ID func,FXint x,FXint
 
 //----------------------------------------------------------------------
 
-FXTableItem* FXRbCallTableItemMethod(FXTable* recv,ID func,const FXString& text,FXIcon* icon,void* ptr){
+FXTableItem* FXRbCallTableItemMethod_gvlcb(FXTable* recv,const char *func,const FXString& text,FXIcon* icon,void* ptr){
   VALUE itemData=(ptr==0)?Qnil:reinterpret_cast<VALUE>(ptr);
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,3,to_ruby(text),to_ruby(icon),itemData);
+  VALUE result=rb_funcall(obj,rb_intern(func),3,to_ruby(text),to_ruby_cb(icon),itemData);
   return NIL_P(result)?0:reinterpret_cast<FXTableItem*>(DATA_PTR(result));
   }
 
-FXTableItem* FXRbCallTableItemMethod(FXTable* recv,ID func,FXint row,FXint col,FXbool notify){
+FXTableItem* FXRbCallTableItemMethod_gvlcb(FXTable* recv,const char *func,FXint row,FXint col,FXbool notify){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,3,to_ruby(row),to_ruby(col),to_ruby(notify));
+  VALUE result=rb_funcall(obj,rb_intern(func),3,to_ruby(row),to_ruby(col),to_ruby(notify));
   return NIL_P(result)?0:reinterpret_cast<FXTableItem*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
-FXTreeItem* FXRbCallTreeItemMethod(const FXTreeList* recv,ID func,FXint x,FXint y){
+FXTreeItem* FXRbCallTreeItemMethod_gvlcb(const FXTreeList* recv,const char *func,FXint x,FXint y){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,2,INT2NUM(x),INT2NUM(y));
+  VALUE result=rb_funcall(obj,rb_intern(func),2,INT2NUM(x),INT2NUM(y));
   return NIL_P(result) ? 0 : reinterpret_cast<FXTreeItem*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
-FXFoldingItem* FXRbCallFoldingItemMethod(const FXFoldingList* recv,ID func,FXint x,FXint y){
+FXFoldingItem* FXRbCallFoldingItemMethod_gvlcb(const FXFoldingList* recv,const char *func,FXint x,FXint y){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,2,INT2NUM(x),INT2NUM(y));
+  VALUE result=rb_funcall(obj,rb_intern(func),2,INT2NUM(x),INT2NUM(y));
   return NIL_P(result) ? 0 : reinterpret_cast<FXFoldingItem*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
-FXFileAssoc* FXRbCallFileAssocMethod(const FXFileDict* recv,ID func,const FXchar* pathname){
+FXFileAssoc* FXRbCallFileAssocMethod_gvlcb(const FXFileDict* recv,const char *func,const FXchar* pathname){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,1,to_ruby(pathname));
+  VALUE result=rb_funcall(obj,rb_intern(func),1,to_ruby(pathname));
   return NIL_P(result) ? 0 : reinterpret_cast<FXFileAssoc*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
-FXIcon* FXRbCallIconMethod(const FXTableItem* recv,ID func){
+FXIcon* FXRbCallIconMethod_gvlcb(const FXTableItem* recv,const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
 	if(!NIL_P(obj)){
-	  VALUE result=rb_funcall(obj,func,0,NULL);
+	  VALUE result=rb_funcall(obj,rb_intern(func),0);
 	  return NIL_P(result) ? 0 : reinterpret_cast<FXIcon*>(DATA_PTR(result));
 		}
 	else{
@@ -1516,60 +1397,72 @@ FXIcon* FXRbCallIconMethod(const FXTableItem* recv,ID func){
 
 //----------------------------------------------------------------------
 
-FXWindow* FXRbCallWindowMethod(const FXTableItem* recv,ID func,FXTable* table){
+FXWindow* FXRbCallWindowMethod_gvlcb(const FXTableItem* recv,const char *func,FXTable* table){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,1,to_ruby(table));
+  VALUE result=rb_funcall(obj,rb_intern(func),1,to_ruby_cb(table));
   return NIL_P(result) ? 0 : reinterpret_cast<FXWindow*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
 // Call function with "FXRange" return value
-FXRangef FXRbCallRangeMethod(FXObject* recv,ID func){
+FXRangef FXRbCallRangeMethod_gvlcb(FXObject* recv,const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,0,NULL);
+  VALUE result=rb_funcall(obj,rb_intern(func),0);
   return *reinterpret_cast<FXRangef*>(DATA_PTR(result));
   }
 
 //----------------------------------------------------------------------
 
 // Call functions with FXString return value
-FXString FXRbCallStringMethod(const FXObject* recv, ID func){
+FXString FXRbCallStringMethod_gvlcb(const FXObject* recv, const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,0,NULL);
+  VALUE result=rb_funcall(obj,rb_intern(func),0);
   return FXString(StringValuePtr(result));
   }
 
 //----------------------------------------------------------------------
 
 // Call functions with const FXchar* return value
-const FXchar* FXRbCallCStringMethod(const FXObject* recv, ID func, const FXchar* message, const FXchar* hint){
+const FXchar* FXRbCallCStringMethod_gvlcb(const FXObject* recv, const char *func, const FXchar* message, const FXchar* hint){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,2,to_ruby(message),to_ruby(hint));
+  VALUE result=rb_funcall(obj,rb_intern(func),2,to_ruby(message),to_ruby(hint));
   return NIL_P(result) ? 0 : StringValuePtr(result);
   }
 
 // Call functions with const FXchar* return value
-const FXchar* FXRbCallCStringMethod(const FXObject* recv, ID func, const FXchar* context, const FXchar* message, const FXchar* hint){
+const FXchar* FXRbCallCStringMethod_gvlcb(const FXObject* recv, const char *func, const FXchar* context, const FXchar* message, const FXchar* hint){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,3,to_ruby(context),to_ruby(message),to_ruby(hint));
+  VALUE result=rb_funcall(obj,rb_intern(func),3,to_ruby(context),to_ruby(message),to_ruby(hint));
   return NIL_P(result) ? 0 : StringValuePtr(result);
   }
 //----------------------------------------------------------------------
 
 // Call functions with FXwchar return value
-FXwchar FXRbCallWCharMethod(const FXObject* recv, ID func){
+FXwchar FXRbCallWCharMethod_gvlcb(const FXObject* recv, const char *func){
   VALUE obj=FXRbGetRubyObj(recv,false);
   FXASSERT(!NIL_P(obj));
-  VALUE result=rb_funcall(obj,func,0,NULL);
+  VALUE result=rb_funcall(obj,rb_intern(func),0);
   return static_cast<FXwchar>(NUM2ULONG(result));
   }
 
+void FXRbCallSetDashes_gvlcb(FXDC* recv,const char *func,FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength){
+  rb_funcall(FXRbGetRubyObj(recv,false),rb_intern(func),2,to_ruby(dashoffset),FXRbMakeArray(dashpattern,dashlength));
+  }
+
+void FXRbCallDCDrawMethod_gvlcb(FXDC* recv, const char * func, FXint x,FXint y,const FXString& string){
+  rb_funcall(FXRbGetRubyObj(recv,false),rb_intern(func),3,to_ruby(x),to_ruby(y),to_ruby(string)); \
+  }
+
+void FXRbCallDCDrawMethod_gvlcb(FXDC* recv, const char * func, FXint x,FXint y,const FXchar* string,FXuint length){
+  rb_funcall(FXRbGetRubyObj(recv,false),rb_intern(func),3,to_ruby(x),to_ruby(y),to_ruby(string,length)); \
+  }
+
 //----------------------------------------------------------------------
 
 // Special destructors to handle order dependencies
@@ -1585,7 +1478,7 @@ FXRbMenuCommand::~FXRbMenuCommand(){
         }
       }
     }
-  acckey=(FXHotKey)NULL;
+  acckey=(FXHotKey)0;
   FXRbUnregisterRubyObj(this);
   }
 
@@ -1601,7 +1494,7 @@ FXRbMenuCheck::~FXRbMenuCheck(){
         }
       }
     }
-  acckey=(FXHotKey)NULL;
+  acckey=(FXHotKey)0;
   FXRbUnregisterRubyObj(this);
   }
 
@@ -1617,7 +1510,7 @@ FXRbMenuRadio::~FXRbMenuRadio(){
         }
       }
     }
-  acckey=(FXHotKey)NULL;
+  acckey=(FXHotKey)0;
   FXRbUnregisterRubyObj(this);
   }
 
@@ -1684,64 +1577,113 @@ void FXRbFoldingList::enumerateItems(FXFoldingItem* fm,FXFoldingItem* to,FXObjec
 
 static ID id_cmp;
 
-// Sort function stand-in for FXComboBox
-FXint FXRbComboBox::sortFunc(const FXListItem* a,const FXListItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXListItem*>(a), "FXListItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXListItem*>(b), "FXListItem *");
-  VALUE result=rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
+#define SORTFUNC(list, item) \
+FXint list::sortFunc(const item* a,const item* b){ \
+  return list##_sortFunc(a, b); \
+  } \
+FXint list##_sortFunc_gvlcb(const item* a,const item* b){ \
+  VALUE itemA = FXRbGetRubyObj(const_cast<item*>(a), #item " *"); \
+  VALUE itemB = FXRbGetRubyObj(const_cast<item*>(b), #item " *"); \
+  VALUE result=rb_funcall(itemA,id_cmp,1,itemB); \
+  return static_cast<FXint>(NUM2INT(result)); \
   }
 
+SORTFUNC( FXRbComboBox, FXListItem )
+SORTFUNC( FXRbFoldingList, FXFoldingItem )
+SORTFUNC( FXRbIconList, FXIconItem )
+SORTFUNC( FXRbList, FXListItem )
+SORTFUNC( FXRbListBox, FXListItem )
+SORTFUNC( FXRbTreeList, FXTreeItem )
 
-// Sort function stand-in for FXFoldingList
-FXint FXRbFoldingList::sortFunc(const FXFoldingItem* a,const FXFoldingItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXFoldingItem*>(a), "FXFoldingItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXFoldingItem*>(b), "FXFoldingItem *");
-  VALUE result=rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
-  }
+#undef SORTFUNC
 
-
-// Sort function stand-in for FXIconList
-FXint FXRbIconList::sortFunc(const FXIconItem* a,const FXIconItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXIconItem*>(a), "FXIconItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXIconItem*>(b), "FXIconItem *");
-  VALUE result = rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
+// Feedback buffer sort routine stand-in for FXGLViewer
+FXbool FXRbGLViewer::sortProc(FXfloat*& buffer,FXint& used,FXint& size){
+  return TRUE;
   }
 
+/**
+ * FXRbConvertPtr() is just a wrapper around SWIG_ConvertPtr().
+ */
 
-// Sort function stand-in for FXList
-FXint FXRbList::sortFunc(const FXListItem* a,const FXListItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXListItem*>(a), "FXListItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXListItem*>(b), "FXListItem *");
-  VALUE result=rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
+void* FXRbConvertPtr(VALUE obj,swig_type_info* ty){
+  void *ptr;
+  SWIG_ConvertPtr(obj,&ptr,ty,1);
+  return ptr;
   }
 
 
-// Sort function stand-in for FXListBox
-FXint FXRbListBox::sortFunc(const FXListItem* a,const FXListItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXListItem*>(a), "FXListItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXListItem*>(b), "FXListItem *");
-  VALUE result=rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
+// Returns an FXInputHandle for this Ruby file object
+FXInputHandle FXRbGetReadFileHandle(VALUE obj,FXuint mode) {
+  int fd;
+  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
+#ifdef WIN32
+#ifdef __CYGWIN__
+  return (FXInputHandle) get_osfhandle(fd);
+#else
+  WSAEVENT hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+  long events = 0;
+  if(mode&INPUT_READ) events |= FD_READ|FD_ACCEPT|FD_OOB;
+  if(mode&INPUT_EXCEPT) events |= FD_CLOSE|FD_QOS|FD_GROUP_QOS|FD_ROUTING_INTERFACE_CHANGE|FD_ADDRESS_LIST_CHANGE;
+  if ( WSAEventSelect(_get_osfhandle(fd), hEvent, events) == SOCKET_ERROR ) {
+    WSACloseEvent( hEvent );
+    rb_raise( rb_eRuntimeError, "WSAEventSelect sockett error: %d", WSAGetLastError() );
+  }
+  rb_iv_set(obj, "FXRuby::FXRbGetReadFileHandle", ULL2NUM((intptr_t)hEvent));
+  return (FXInputHandle) hEvent;
+#endif
+#else
+  return (FXInputHandle) fd;
+#endif
   }
 
+void FXRbRemoveReadFileHandle(VALUE obj,FXuint mode) {
+#ifdef WIN32
+  WSAEVENT hEvent = (HANDLE)NUM2ULL(rb_iv_get(obj, "FXRuby::FXRbGetReadFileHandle"));
+  CloseHandle( hEvent );
+#endif
+}
 
-// Sort function stand-in for FXTreeList
-FXint FXRbTreeList::sortFunc(const FXTreeItem* a,const FXTreeItem* b){
-  VALUE itemA = FXRbGetRubyObj(const_cast<FXTreeItem*>(a), "FXTreeItem *");
-  VALUE itemB = FXRbGetRubyObj(const_cast<FXTreeItem*>(b), "FXTreeItem *");
-  VALUE result=rb_funcall(itemA,id_cmp,1,itemB);
-  return static_cast<FXint>(NUM2INT(result));
+// Returns an FXInputHandle for this Ruby file object
+FXInputHandle FXRbGetWriteFileHandle(VALUE obj,FXuint mode) {
+  int fd;
+#if defined(RUBINIUS)
+  VALUE vwrite = rb_intern("@write");
+  if(rb_ivar_defined(obj, vwrite)) obj = rb_ivar_get(obj, vwrite);
+  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
+#else
+  rb_io_t *fptr;
+  GetOpenFile(obj, fptr);
+  VALUE wrio = fptr->tied_io_for_writing;
+  if(wrio) obj = wrio;
+  fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
+#endif
+#ifdef WIN32
+#ifdef __CYGWIN__
+  return (FXInputHandle) get_osfhandle(fd);
+#else
+  WSAEVENT hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+  long events = 0;
+  if(mode&INPUT_WRITE) events |= FD_WRITE|FD_CONNECT;
+  if(mode&INPUT_EXCEPT) events |= FD_CLOSE|FD_QOS|FD_GROUP_QOS|FD_ROUTING_INTERFACE_CHANGE|FD_ADDRESS_LIST_CHANGE;
+  if ( WSAEventSelect(_get_osfhandle(fd), hEvent, events) == SOCKET_ERROR ) {
+    WSACloseEvent( hEvent );
+    rb_raise( rb_eRuntimeError, "WSAEventSelect sockettt error: %d", WSAGetLastError() );
+  }
+  rb_iv_set(obj, "FXRuby::FXRbGetWriteFileHandle", ULL2NUM((intptr_t)hEvent));
+  return (FXInputHandle) hEvent;
+#endif
+#else
+  return (FXInputHandle) fd;
+#endif
   }
 
-
-// Feedback buffer sort routine stand-in for FXGLViewer
-FXbool FXRbGLViewer::sortProc(FXfloat*& buffer,FXint& used,FXint& size){
-  return TRUE;
-  }
+void FXRbRemoveWriteFileHandle(VALUE obj,FXuint mode) {
+#ifdef WIN32
+  WSAEVENT hEvent = (HANDLE)NUM2ULL(rb_iv_get(obj, "FXRuby::FXRbGetWriteFileHandle"));
+  CloseHandle( hEvent );
+#endif
+}
 
 //----------------------------------------------------------------------
 
@@ -1945,7 +1887,7 @@ void FXRbUnregisterAppSensitiveObject(FXDC* dc){
   FXASSERT(st_lookup(appSensitiveDCs,reinterpret_cast<st_data_t>(dc),reinterpret_cast<st_data_t *>(0))==0);
   }
 
-static int st_cbfunc_obj(st_data_t key,st_data_t,st_data_t arg,int){
+static int st_cbfunc_obj(st_data_t key,st_data_t,st_data_t arg){
   FXASSERT(key!=0);
   FXASSERT(arg!=0);
   FXObjectListOf<FXObject> *pObjectList=reinterpret_cast<FXObjectListOf<FXObject>*>(arg);
@@ -1954,7 +1896,7 @@ static int st_cbfunc_obj(st_data_t key,st_data_t,st_data_t arg,int){
   return 0;
   }
 
-static int st_cbfunc_dc(st_data_t key,st_data_t,st_data_t arg,int){
+static int st_cbfunc_dc(st_data_t key,st_data_t,st_data_t arg){
   FXASSERT(key!=0);
   FXASSERT(arg!=0);
   FXArray<FXDC*> *pDCArray=reinterpret_cast<FXArray<FXDC*>*>(arg);
@@ -1967,7 +1909,7 @@ void FXRbDestroyAppSensitiveObjects(){
   FXTRACE((100,"%s:%d: Begin destroying objects that hold references to the FXApp...\n",__FILE__,__LINE__));
 
   FXObjectListOf<FXObject> objs;
-  st_foreach(appSensitiveObjs,reinterpret_cast<int (*)(ANYARGS)>(st_cbfunc_obj),reinterpret_cast<st_data_t>(&objs));
+  st_foreach(appSensitiveObjs,RUBY_INT_METHOD_FUNC(st_cbfunc_obj),reinterpret_cast<st_data_t>(&objs));
   for(FXint i=0;i<objs.no();i++){
     if(objs[i]->isMemberOf(FXMETACLASS(FXRbCursor))){
       if(dynamic_cast<FXRbCursor*>(objs[i])->ownedByApp)
@@ -1997,7 +1939,7 @@ void FXRbDestroyAppSensitiveObjects(){
     }
 
   FXArray<FXDC*> dcs;
-  st_foreach(appSensitiveDCs,reinterpret_cast<int (*)(ANYARGS)>(st_cbfunc_dc),reinterpret_cast<st_data_t>(&dcs));
+  st_foreach(appSensitiveDCs,RUBY_INT_METHOD_FUNC(st_cbfunc_dc),reinterpret_cast<st_data_t>(&dcs));
   for(FXint j=0;j<dcs.no();j++){
     delete dcs[j];
     }
@@ -2066,7 +2008,6 @@ Init_fox16_c(void) {
   utf8_enc_idx = rb_enc_find_index("UTF-8");
 #endif
 
-  FXRuby_Objects=st_init_numtable();
   appSensitiveObjs=st_init_numtable();
   appSensitiveDCs=st_init_numtable();
   }
diff --git a/ext/fox16_c/core_wrap.cpp b/ext/fox16_c/core_wrap.cpp
new file mode 100644
index 00000000..12061ce1
--- /dev/null
+++ b/ext/fox16_c/core_wrap.cpp
@@ -0,0 +1,44884 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 3.0.12
+ *
+ * This file is not intended to be easily readable and contains a number of
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+
+#ifndef SWIGRUBY
+#define SWIGRUBY
+#endif
+
+
+
+#ifdef __cplusplus
+/* SwigValueWrapper is described in swig.swg */
+template<typename T> class SwigValueWrapper {
+  struct SwigMovePointer {
+    T *ptr;
+    SwigMovePointer(T *p) : ptr(p) { }
+    ~SwigMovePointer() { delete ptr; }
+    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+  } pointer;
+  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
+public:
+  SwigValueWrapper() : pointer(0) { }
+  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
+  operator T&() const { return *pointer.ptr; }
+  T *operator&() { return pointer.ptr; }
+};
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__))
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__))
+# else
+#   define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if defined(__GNUC__)
+#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#    ifndef GCC_HASCLASSVISIBILITY
+#      define GCC_HASCLASSVISIBILITY
+#    endif
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used.  So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__))
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__))
+# else
+#   define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if defined(__GNUC__)
+#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#    ifndef GCC_HASCLASSVISIBILITY
+#      define GCC_HASCLASSVISIBILITY
+#    endif
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used.  So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the SWIG runtime code.
+  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/*
+   Flags/methods for returning states.
+
+   The SWIG conversion methods, as ConvertPtr, return an integer
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+
+   Use the following macros/flags to set or process the returning
+   states.
+
+   In old versions of SWIG, code such as the following was usually written:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   which is the same really, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   also requires SWIG_ConvertPtr to return new result values, such as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {
+        if (<obj is ok>) {
+          if (<need new object>) {
+            *ptr = <ptr to new allocated object>;
+            return SWIG_NEWOBJ;
+          } else {
+            *ptr = <ptr to old object>;
+            return SWIG_OLDOBJ;
+          }
+        } else {
+          return SWIG_BADOBJ;
+        }
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   SWIG errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK                    (0)
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast(r) (r)
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/*
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCmp(const char *nb, const char *tb) {
+  int equiv = 1;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (equiv != 0 && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
+}
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (strcmp(iter->type->name, c) == 0) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (iter->type == from) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/*
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/*
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+
+  We start searching at module start, and finish searching when start == end.
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start,
+                            swig_module_info *end,
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      size_t l = 0;
+      size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	size_t i = (l + r) >> 1;
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  int compare = strcmp(name, iname);
+	  if (compare == 0) {
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+
+  We start searching at module start, and finish searching when start == end.
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start,
+                     swig_module_info *end,
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+
+  /* neither found a match */
+  return 0;
+}
+
+/*
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  const unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/*
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    char d = *(c++);
+    unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = (unsigned char)((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = (unsigned char)((d - ('a'-10)) << 4);
+    else
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (unsigned char)(d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (unsigned char)(d - ('a'-10));
+    else
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/*
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1
+#define  SWIG_IOError        	   -2
+#define  SWIG_RuntimeError   	   -3
+#define  SWIG_IndexError     	   -4
+#define  SWIG_TypeError      	   -5
+#define  SWIG_DivisionByZero 	   -6
+#define  SWIG_OverflowError  	   -7
+#define  SWIG_SyntaxError    	   -8
+#define  SWIG_ValueError     	   -9
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12
+#define  SWIG_NullReferenceError   -13
+
+
+
+      #include <ruby.h>
+
+      #if defined(RB_METHOD_DEFINITION_DECL)
+      # define RUBY_VALUE_METHOD_FUNC(func) (func)
+      # define RUBY_INT_METHOD_FUNC(func) (func)
+      # define RUBY_VOID_METHOD_FUNC(func) (func)
+      # define RUBY_VOIDP_METHOD_FUNC(func) (func)
+      #else
+      # define RUBY_VALUE_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
+      # define RUBY_INT_METHOD_FUNC(func) ((int (*)(ANYARGS))(func))
+      # define RUBY_VOID_METHOD_FUNC(func) ((void (*)(ANYARGS))(func))
+      # define RUBY_VOIDP_METHOD_FUNC(func) ((void *(*)(ANYARGS))(func))
+      #endif
+
+
+/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
+ * breaks using rb_intern as an lvalue, as SWIG does.  We work around this
+ * issue for now by disabling this.
+ * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
+ */
+#ifdef rb_intern
+# undef rb_intern
+#endif
+
+/* Remove global macros defined in Ruby's win32.h */
+#ifdef write
+# undef write
+#endif
+#ifdef read
+# undef read
+#endif
+#ifdef bind
+# undef bind
+#endif
+#ifdef close
+# undef close
+#endif
+#ifdef connect
+# undef connect
+#endif
+
+
+/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
+#ifndef NUM2LL
+#define NUM2LL(x) NUM2LONG((x))
+#endif
+#ifndef LL2NUM
+#define LL2NUM(x) INT2NUM((long) (x))
+#endif
+#ifndef ULL2NUM
+#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
+#endif
+
+/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
+#ifndef NUM2ULL
+#ifdef HAVE_LONG_LONG
+#define NUM2ULL(x) rb_num2ull((x))
+#else
+#define NUM2ULL(x) NUM2ULONG(x)
+#endif
+#endif
+
+/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
+/* Define these for older versions so we can just write code the new way */
+#ifndef RSTRING_LEN
+# define RSTRING_LEN(x) RSTRING(x)->len
+#endif
+#ifndef RSTRING_PTR
+# define RSTRING_PTR(x) RSTRING(x)->ptr
+#endif
+#ifndef RSTRING_END
+# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
+#endif
+#ifndef RARRAY_LEN
+# define RARRAY_LEN(x) RARRAY(x)->len
+#endif
+#ifndef RARRAY_PTR
+# define RARRAY_PTR(x) RARRAY(x)->ptr
+#endif
+#ifndef RFLOAT_VALUE
+# define RFLOAT_VALUE(x) RFLOAT(x)->value
+#endif
+#ifndef DOUBLE2NUM
+# define DOUBLE2NUM(x) rb_float_new(x)
+#endif
+#ifndef RHASH_TBL
+# define RHASH_TBL(x) (RHASH(x)->tbl)
+#endif
+#ifndef RHASH_ITER_LEV
+# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
+#endif
+#ifndef RHASH_IFNONE
+# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
+#endif
+#ifndef RHASH_SIZE
+# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
+#endif
+#ifndef RHASH_EMPTY_P
+# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
+#endif
+#ifndef RSTRUCT_LEN
+# define RSTRUCT_LEN(x) RSTRUCT(x)->len
+#endif
+#ifndef RSTRUCT_PTR
+# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
+#endif
+
+
+
+/*
+ * Need to be very careful about how these macros are defined, especially
+ * when compiling C++ code or C code with an ANSI C compiler.
+ *
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
+ * a Ruby method so that it can be passed as an argument to API functions
+ * like rb_define_method() and rb_define_singleton_method().
+ *
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
+ * and Data_Make_Struct().
+ */
+ 
+#ifdef __cplusplus
+#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
+#    define PROTECTFUNC(f) ((VALUE (*)()) f)
+#    define VALUEFUNC(f) ((VALUE (*)()) f)
+#    define VOIDFUNC(f)  ((void (*)()) f)
+#  else
+#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
+#      define PROTECTFUNC(f) ((VALUE (*)()) f)
+#      define VALUEFUNC(f) ((VALUE (*)()) f)
+#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
+#    else /* These definitions should work for Ruby 1.7+ */
+#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
+#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
+#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
+#    endif
+#  endif
+#else
+#  define VALUEFUNC(f) (f)
+#  define VOIDFUNC(f) (f)
+#endif
+
+/* Don't use for expressions have side effect */
+#ifndef RB_STRING_VALUE
+#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
+#endif
+#ifndef StringValue
+#define StringValue(s) RB_STRING_VALUE(s)
+#endif
+#ifndef StringValuePtr
+#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
+#endif
+#ifndef StringValueLen
+#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
+#endif
+#ifndef SafeStringValue
+#define SafeStringValue(v) do {\
+    StringValue(v);\
+    rb_check_safe_str(v);\
+} while (0)
+#endif
+
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
+#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
+#endif
+
+static VALUE _mSWIG = Qnil;
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+
+/* Define some additional error types */
+#define SWIG_ObjectPreviouslyDeletedError  -100
+
+
+/* Define custom exceptions for errors that do not map to existing Ruby
+   exceptions.  Note this only works for C++ since a global cannot be
+   initialized by a function in C.  For C, fallback to rb_eRuntimeError.*/
+
+SWIGINTERN VALUE 
+getNullReferenceError(void) {
+  static int init = 0;
+  static VALUE rb_eNullReferenceError ;
+  if (!init) {
+    init = 1;
+    rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
+  }
+  return rb_eNullReferenceError;
+} 
+
+SWIGINTERN VALUE 
+getObjectPreviouslyDeletedError(void) {
+  static int init = 0;
+  static VALUE rb_eObjectPreviouslyDeleted ;
+  if (!init) {
+    init = 1;
+    rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
+  }
+  return rb_eObjectPreviouslyDeleted;
+} 
+
+
+SWIGINTERN VALUE
+SWIG_Ruby_ErrorType(int SWIG_code) {
+  VALUE type;
+  switch (SWIG_code) {
+  case SWIG_MemoryError:
+    type = rb_eNoMemError;
+    break;
+  case SWIG_IOError:
+    type = rb_eIOError;
+    break;
+  case SWIG_RuntimeError:
+    type = rb_eRuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = rb_eIndexError;
+    break;
+  case SWIG_TypeError:
+    type = rb_eTypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = rb_eZeroDivError;
+    break;
+  case SWIG_OverflowError:
+    type = rb_eRangeError;
+    break;
+  case SWIG_SyntaxError:
+    type = rb_eSyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = rb_eArgError;
+    break;
+  case SWIG_SystemError:
+    type = rb_eFatal;
+    break;
+  case SWIG_AttributeError:
+    type = rb_eRuntimeError;
+    break;
+  case SWIG_NullReferenceError:
+    type = getNullReferenceError();
+    break;
+  case SWIG_ObjectPreviouslyDeletedError:
+    type = getObjectPreviouslyDeletedError();
+    break;
+  case SWIG_UnknownError:
+    type = rb_eRuntimeError;
+    break;
+  default:
+    type = rb_eRuntimeError;
+  }
+  return type;
+}
+
+
+/* This function is called when a user inputs a wrong argument to
+   a method.
+ */
+SWIGINTERN 
+const char* Ruby_Format_TypeError( const char* msg,
+				   const char* type, 
+				   const char* name, 
+				   const int argn,
+				   VALUE input )
+{
+  char buf[128];
+  VALUE str;
+  VALUE asStr;
+  if ( msg && *msg )
+    {
+      str = rb_str_new2(msg);
+    }
+  else
+    {
+      str = rb_str_new(NULL, 0);
+    }
+
+  str = rb_str_cat2( str, "Expected argument " );
+  sprintf( buf, "%d of type ", argn-1 );
+  str = rb_str_cat2( str, buf );
+  str = rb_str_cat2( str, type );
+  str = rb_str_cat2( str, ", but got " );
+  str = rb_str_cat2( str, rb_obj_classname(input) );
+  str = rb_str_cat2( str, " " );
+  asStr = rb_inspect(input);
+  if ( RSTRING_LEN(asStr) > 30 )
+    {
+      str = rb_str_cat( str, StringValuePtr(asStr), 30 );
+      str = rb_str_cat2( str, "..." );
+    }
+  else
+    {
+      str = rb_str_append( str, asStr );
+    }
+
+  if ( name )
+    {
+      str = rb_str_cat2( str, "\n\tin SWIG method '" );
+      str = rb_str_cat2( str, name );
+      str = rb_str_cat2( str, "'" );
+    }
+
+  return StringValuePtr( str );
+}
+
+/* This function is called when an overloaded method fails */
+SWIGINTERN 
+void Ruby_Format_OverloadedError(
+				 const int argc,
+				 const int maxargs,
+				 const char* method, 
+				 const char* prototypes 
+				 )
+{
+  const char* msg = "Wrong # of arguments";
+  if ( argc <= maxargs ) msg = "Wrong arguments";
+  rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"  
+	   "Possible C/C++ prototypes are:\n%s",
+	   msg, method, prototypes);
+}
+
+/* -----------------------------------------------------------------------------
+ * rubytracking.swg
+ *
+ * This file contains support for tracking mappings from 
+ * Ruby objects to C++ objects.  This functionality is needed
+ * to implement mark functions for Ruby's mark and sweep
+ * garbage collector.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(ST_DATA_T_DEFINED)
+/* Needs to be explicitly included for Ruby 1.8 and earlier */
+#include <st.h>
+#endif
+
+/* Ruby 1.8 actually assumes the first case. */
+#if SIZEOF_VOIDP == SIZEOF_LONG
+#  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
+#  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
+#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
+#  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
+#  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
+#else
+#  error sizeof(void*) is not the same as long or long long
+#endif
+
+/* Global hash table to store Trackings from C/C++
+   structs to Ruby Objects. 
+*/
+static st_table* swig_ruby_trackings = NULL;
+
+static VALUE swig_ruby_trackings_count(ID id, VALUE *var) {
+  return SWIG2NUM(swig_ruby_trackings->num_entries);
+}
+
+
+/* Setup a hash table to store Trackings */
+SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
+  /* Create a hash table to store Trackings from C++
+     objects to Ruby objects. */
+
+  /* Try to see if some other .so has already created a 
+     tracking hash table, which we keep hidden in an instance var
+     in the SWIG module.
+     This is done to allow multiple DSOs to share the same
+     tracking table.
+  */
+  VALUE trackings_value = Qnil;
+  /* change the variable name so that we can mix modules
+     compiled with older SWIG's - this used to be called "@__trackings__" */
+  ID trackings_id = rb_intern( "@__safetrackings__" );
+  VALUE verbose = rb_gv_get("VERBOSE");
+  rb_gv_set("VERBOSE", Qfalse);
+  trackings_value = rb_ivar_get( _mSWIG, trackings_id );
+  rb_gv_set("VERBOSE", verbose);
+
+  /* The trick here is that we have to store the hash table
+  pointer in a Ruby variable. We do not want Ruby's GC to
+  treat this pointer as a Ruby object, so we convert it to
+  a Ruby numeric value. */
+  if (trackings_value == Qnil) {
+    /* No, it hasn't.  Create one ourselves */
+    swig_ruby_trackings = st_init_numtable();
+    rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
+  } else {
+    swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
+  }
+
+        rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", RUBY_VALUE_METHOD_FUNC(swig_ruby_trackings_count), RUBY_VOID_METHOD_FUNC((rb_gvar_setter_t*)NULL))
+;
+}
+
+/* Add a Tracking from a C/C++ struct to a Ruby object */
+SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
+  /* Store the mapping to the global hash table. */
+  st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
+}
+
+/* Get the Ruby object that owns the specified C/C++ struct */
+SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
+  /* Now lookup the value stored in the global hash table */
+  VALUE value;
+
+  if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
+    return value;
+  } else {
+    return Qnil;
+  }
+}
+
+/* Remove a Tracking from a C/C++ struct to a Ruby object.  It
+   is very important to remove objects once they are destroyed
+   since the same memory address may be reused later to create
+   a new object. */
+SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
+  /* Delete the object from the hash table */
+  st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
+}
+
+/* This is a helper method that unlinks a Ruby object from its
+   underlying C++ object.  This is needed if the lifetime of the
+   Ruby object is longer than the C++ object */
+SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
+  VALUE object = SWIG_RubyInstanceFor(ptr);
+
+  if (object != Qnil) {
+    if (TYPE(object) != T_DATA)
+      abort();
+    DATA_PTR(object) = 0;
+  }
+}
+
+/* This is a helper method that iterates over all the trackings
+   passing the C++ object pointer and its related Ruby object
+   to the passed callback function. */
+
+/* Proxy method to abstract the internal trackings datatype */
+      static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
+        ((void(*)(void*, VALUE))meth)((void*)ptr, (VALUE)obj);
+
+  return ST_CONTINUE;
+}
+
+SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
+  st_foreach(swig_ruby_trackings, RUBY_INT_METHOD_FUNC(swig_ruby_internal_iterate_callback), (st_data_t)meth);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Ruby API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGINTERN VALUE
+SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
+  if (NIL_P(target)) {
+    target = o;
+  } else {
+    if (TYPE(target) != T_ARRAY) {
+      VALUE o2 = target;
+      target = rb_ary_new();
+      rb_ary_push(target, o2);
+    }
+    rb_ary_push(target, o);
+  }
+  return target;
+}
+
+/* For ruby1.8.4 and earlier. */
+#ifndef RUBY_INIT_STACK
+   RUBY_EXTERN void Init_stack(VALUE* addr);
+#  define RUBY_INIT_STACK \
+   VALUE variable_in_this_stack_frame; \
+   Init_stack(&variable_in_this_stack_frame);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * rubyrun.swg
+ *
+ * This file contains the runtime support for Ruby modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* For backward compatibility only */
+#define SWIG_POINTER_EXCEPTION  0
+
+/* for raw pointers */
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
+#define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
+#define swig_owntype                                    swig_ruby_owntype
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule(clientdata)
+#define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)
+
+
+/* Error manipulation */
+
+#define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
+#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
+#define SWIG_fail                        		goto fail				 
+
+
+/* Ruby-specific SWIG API */
+
+#define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()              
+#define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
+#define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
+#define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
+#define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
+
+#include "assert.h"
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+  VALUE klass;
+  VALUE mImpl;
+  void  (*mark)(void *);
+  void  (*destroy)(void *);
+  int trackObjects;
+} swig_class;
+
+
+/* Global pointer used to keep some internal SWIG stuff */
+static VALUE _cSWIG_Pointer = Qnil;
+static VALUE swig_runtime_data_type_pointer = Qnil;
+
+/* Global IDs used to keep some internal SWIG stuff */
+static ID swig_arity_id = 0;
+static ID swig_call_id  = 0;
+
+/*
+  If your swig extension is to be run within an embedded ruby and has
+  director callbacks, you should set -DRUBY_EMBEDDED during compilation.  
+  This will reset ruby's stack frame on each entry point from the main 
+  program the first time a virtual director function is invoked (in a 
+  non-recursive way).
+  If this is not done, you run the risk of Ruby trashing the stack.
+*/
+
+#ifdef RUBY_EMBEDDED
+
+#  define SWIG_INIT_STACK                            \
+      if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
+      ++swig_virtual_calls;
+#  define SWIG_RELEASE_STACK --swig_virtual_calls;
+#  define Ruby_DirectorTypeMismatchException(x) \
+          rb_raise( rb_eTypeError, "%s", x ); return c_result;
+
+      static unsigned int swig_virtual_calls = 0;
+
+#else  /* normal non-embedded extension */
+
+#  define SWIG_INIT_STACK
+#  define SWIG_RELEASE_STACK
+#  define Ruby_DirectorTypeMismatchException(x) \
+          throw Swig::DirectorTypeMismatchException( x );
+
+#endif  /* RUBY_EMBEDDED */
+
+
+SWIGRUNTIME VALUE 
+getExceptionClass(void) {
+  static int init = 0;
+  static VALUE rubyExceptionClass ;
+  if (!init) {
+    init = 1;
+    rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
+  }
+  return rubyExceptionClass;
+} 
+
+/* This code checks to see if the Ruby object being raised as part
+   of an exception inherits from the Ruby class Exception.  If so,
+   the object is simply returned.  If not, then a new Ruby exception
+   object is created and that will be returned to Ruby.*/
+SWIGRUNTIME VALUE
+SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
+  VALUE exceptionClass = getExceptionClass();
+  if (rb_obj_is_kind_of(obj, exceptionClass)) {
+    return obj;
+  }  else {
+    return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
+  }
+}
+
+/* Initialize Ruby runtime support */
+SWIGRUNTIME void
+SWIG_Ruby_InitRuntime(void)
+{
+  if (_mSWIG == Qnil) {
+    _mSWIG = rb_define_module("SWIG");
+    swig_call_id  = rb_intern("call");
+    swig_arity_id = rb_intern("arity");
+  }
+}
+
+/* Define Ruby class for C type */
+SWIGRUNTIME void
+SWIG_Ruby_define_class(swig_type_info *type)
+{
+  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
+  sprintf(klass_name, "TYPE%s", type->name);
+  if (NIL_P(_cSWIG_Pointer)) {
+    _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
+    rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
+  }
+  rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
+  free((void *) klass_name);
+}
+
+/* Create a new pointer object */
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
+{
+  int own =  flags & SWIG_POINTER_OWN; 
+  int track;
+  char *klass_name;
+  swig_class *sklass;
+  VALUE klass;
+  VALUE obj;
+  
+  if (!ptr)
+    return Qnil;
+  
+  if (type->clientdata) {
+    sklass = (swig_class *) type->clientdata;
+		
+    /* Are we tracking this class and have we already returned this Ruby object? */
+    track = sklass->trackObjects;
+    if (track) {
+      obj = SWIG_RubyInstanceFor(ptr);
+      
+      /* Check the object's type and make sure it has the correct type.
+        It might not in cases where methods do things like 
+        downcast methods. */
+      if (obj != Qnil) {
+        VALUE value = rb_iv_get(obj, "@__swigtype__");
+        const char* type_name = RSTRING_PTR(value);
+				
+        if (strcmp(type->name, type_name) == 0) {
+          return obj;
+        }
+      }
+    }
+
+    /* Create a new Ruby object */
+    obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
+			   ( own ? VOIDFUNC(sklass->destroy) : 
+			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
+			     ), ptr);
+
+    /* If tracking is on for this class then track this object. */
+    if (track) {
+      SWIG_RubyAddTracking(ptr, obj);
+    }
+  } else {
+    klass_name = (char *) malloc(4 + strlen(type->name) + 1);
+    sprintf(klass_name, "TYPE%s", type->name);
+    klass = rb_const_get(_mSWIG, rb_intern(klass_name));
+    free((void *) klass_name);
+    obj = Data_Wrap_Struct(klass, 0, 0, ptr);
+  }
+  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
+  
+  return obj;
+}
+
+/* Create a new class instance (always owned) */
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
+{
+  VALUE obj;
+  swig_class *sklass = (swig_class *) type->clientdata;
+  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
+  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
+  return obj;
+}
+
+/* Get type mangle from class name */
+SWIGRUNTIMEINLINE char *
+SWIG_Ruby_MangleStr(VALUE obj)
+{
+  VALUE stype = rb_iv_get(obj, "@__swigtype__");
+  return StringValuePtr(stype);
+}
+
+/* Acquire a pointer value */
+typedef struct {
+  void (*datafree)(void *);
+  int own;
+} swig_ruby_owntype;
+
+SWIGRUNTIME swig_ruby_owntype
+SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
+  swig_ruby_owntype oldown = {0, 0};
+  if (obj) {
+    oldown.datafree = RDATA(obj)->dfree;
+    RDATA(obj)->dfree = own.datafree;
+  }
+  return oldown;
+}
+
+/* Convert a pointer value */
+SWIGRUNTIME int
+SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
+{
+  char *c;
+  swig_cast_info *tc;
+  void *vptr = 0;
+
+  /* Grab the pointer */
+  if (NIL_P(obj)) {
+    if (ptr)
+      *ptr = 0;
+    return SWIG_OK;
+  } else {
+    if (TYPE(obj) != T_DATA) {
+      return SWIG_ERROR;
+    }
+    Data_Get_Struct(obj, void, vptr);
+  }
+  
+  if (own) {
+    own->datafree = RDATA(obj)->dfree;
+    own->own = 0;
+  }
+    
+  /* Check to see if the input object is giving up ownership
+     of the underlying C struct or C++ object.  If so then we
+     need to reset the destructor since the Ruby object no 
+     longer owns the underlying C++ object.*/ 
+  if (flags & SWIG_POINTER_DISOWN) {
+    /* Is tracking on for this class? */
+    int track = 0;
+    if (ty && ty->clientdata) {
+      swig_class *sklass = (swig_class *) ty->clientdata;
+      track = sklass->trackObjects;
+    }
+		
+    if (track) {
+      /* We are tracking objects for this class.  Thus we change the destructor
+       * to SWIG_RubyRemoveTracking.  This allows us to
+       * remove the mapping from the C++ to Ruby object
+       * when the Ruby object is garbage collected.  If we don't
+       * do this, then it is possible we will return a reference 
+       * to a Ruby object that no longer exists thereby crashing Ruby. */
+      RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
+    } else {    
+      RDATA(obj)->dfree = 0;
+    }
+  }
+
+  /* Do type-checking if type info was provided */
+  if (ty) {
+    if (ty->clientdata) {
+      if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
+        if (vptr == 0) {
+          /* The object has already been deleted */
+          return SWIG_ObjectPreviouslyDeletedError;
+        }
+      }
+    }
+    if ((c = SWIG_MangleStr(obj)) == NULL) {
+      return SWIG_ERROR;
+    }
+    tc = SWIG_TypeCheck(c, ty);
+    if (!tc) {
+      return SWIG_ERROR;
+    } else {
+      if (ptr) {
+        if (tc->type == ty) {
+          *ptr = vptr;
+        } else {
+          int newmemory = 0;
+          *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
+          if (newmemory == SWIG_CAST_NEW_MEMORY) {
+            assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+            if (own)
+              own->own = own->own | SWIG_CAST_NEW_MEMORY;
+          }
+        }
+      }
+    }
+  } else {
+    if (ptr)
+      *ptr = vptr;
+  }
+  
+  return SWIG_OK;
+}
+
+/* Check convert */
+SWIGRUNTIMEINLINE int
+SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
+{
+  char *c = SWIG_MangleStr(obj);
+  if (!c) return 0;
+  return SWIG_TypeCheck(c,ty) != 0;
+}
+
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
+  char result[1024];
+  char *r = result;
+  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r, ptr, sz);
+  strcpy(r, type->name);
+  return rb_str_new2(result);
+}
+
+/* Convert a packed value value */
+SWIGRUNTIME int
+SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
+  swig_cast_info *tc;
+  const char  *c;
+
+  if (TYPE(obj) != T_STRING) goto type_error;
+  c = StringValuePtr(obj);
+  /* Pointer values must start with leading underscore */
+  if (*c != '_') goto type_error;
+  c++;
+  c = SWIG_UnpackData(c, ptr, sz);
+  if (ty) {
+    tc = SWIG_TypeCheck(c, ty);
+    if (!tc) goto type_error;
+  }
+  return SWIG_OK;
+
+ type_error:
+  return SWIG_ERROR;
+}
+
+SWIGRUNTIME swig_module_info *
+SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
+{
+  VALUE pointer;
+  swig_module_info *ret = 0;
+  VALUE verbose = rb_gv_get("VERBOSE");
+
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
+  rb_gv_set("VERBOSE", Qfalse);
+  
+  /* first check if pointer already created */
+  pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
+  if (pointer != Qnil) {
+    Data_Get_Struct(pointer, swig_module_info, ret);
+  }
+
+  /* reinstate warnings */
+  rb_gv_set("VERBOSE", verbose);
+  return ret;
+}
+
+SWIGRUNTIME void 
+SWIG_Ruby_SetModule(swig_module_info *pointer)
+{
+  /* register a new class */
+  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
+  /* create and store the structure pointer to a global variable */
+  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
+  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
+}
+
+/* This function can be used to check whether a proc or method or similarly
+   callable function has been passed.  Usually used in a %typecheck, like:
+
+   %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
+        $result = SWIG_Ruby_isCallable( $input );
+   }
+ */
+SWIGINTERN
+int SWIG_Ruby_isCallable( VALUE proc )
+{
+  if ( rb_respond_to( proc, swig_call_id ) )
+    return 1;
+  return 0;
+}
+
+/* This function can be used to check the arity (number of arguments)
+   a proc or method can take.  Usually used in a %typecheck.
+   Valid arities will be that equal to minimal or those < 0
+   which indicate a variable number of parameters at the end.
+ */
+SWIGINTERN
+int SWIG_Ruby_arity( VALUE proc, int minimal )
+{
+  if ( rb_respond_to( proc, swig_arity_id ) )
+    {
+      VALUE num = rb_funcall( proc, swig_arity_id, 0 );
+      int arity = NUM2INT(num);
+      if ( arity < 0 && (arity+1) < -minimal ) return 1;
+      if ( arity == minimal ) return 1;
+      return 1;
+    }
+  return 0;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) 
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_FXAccelTable swig_types[0]
+#define SWIGTYPE_p_FXApp swig_types[1]
+#define SWIGTYPE_p_FXBitmap swig_types[2]
+#define SWIGTYPE_p_FXCURCursor swig_types[3]
+#define SWIGTYPE_p_FXChore swig_types[4]
+#define SWIGTYPE_p_FXComposeContext swig_types[5]
+#define SWIGTYPE_p_FXComposite swig_types[6]
+#define SWIGTYPE_p_FXCursor swig_types[7]
+#define SWIGTYPE_p_FXDataTarget swig_types[8]
+#define SWIGTYPE_p_FXDebugTarget swig_types[9]
+#define SWIGTYPE_p_FXDelegator swig_types[10]
+#define SWIGTYPE_p_FXDict swig_types[11]
+#define SWIGTYPE_p_FXDocument swig_types[12]
+#define SWIGTYPE_p_FXDrawable swig_types[13]
+#define SWIGTYPE_p_FXEvent swig_types[14]
+#define SWIGTYPE_p_FXFileAssoc swig_types[15]
+#define SWIGTYPE_p_FXFileDict swig_types[16]
+#define SWIGTYPE_p_FXFileStream swig_types[17]
+#define SWIGTYPE_p_FXFont swig_types[18]
+#define SWIGTYPE_p_FXFontDesc swig_types[19]
+#define SWIGTYPE_p_FXFrame swig_types[20]
+#define SWIGTYPE_p_FXGIFCursor swig_types[21]
+#define SWIGTYPE_p_FXID swig_types[22]
+#define SWIGTYPE_p_FXIcon swig_types[23]
+#define SWIGTYPE_p_FXIconDict swig_types[24]
+#define SWIGTYPE_p_FXIconSource swig_types[25]
+#define SWIGTYPE_p_FXId swig_types[26]
+#define SWIGTYPE_p_FXMainWindow swig_types[27]
+#define SWIGTYPE_p_FXMemoryStream swig_types[28]
+#define SWIGTYPE_p_FXMutex swig_types[29]
+#define SWIGTYPE_p_FXObject swig_types[30]
+#define SWIGTYPE_p_FXPoint swig_types[31]
+#define SWIGTYPE_p_FXPopup swig_types[32]
+#define SWIGTYPE_p_FXRecentFiles swig_types[33]
+#define SWIGTYPE_p_FXRectangle swig_types[34]
+#define SWIGTYPE_p_FXRegion swig_types[35]
+#define SWIGTYPE_p_FXRegistry swig_types[36]
+#define SWIGTYPE_p_FXRootWindow swig_types[37]
+#define SWIGTYPE_p_FXSettings swig_types[38]
+#define SWIGTYPE_p_FXShell swig_types[39]
+#define SWIGTYPE_p_FXSize swig_types[40]
+#define SWIGTYPE_p_FXSplashWindow swig_types[41]
+#define SWIGTYPE_p_FXStream swig_types[42]
+#define SWIGTYPE_p_FXString swig_types[43]
+#define SWIGTYPE_p_FXStringDict swig_types[44]
+#define SWIGTYPE_p_FXTextCodec swig_types[45]
+#define SWIGTYPE_p_FXTimer swig_types[46]
+#define SWIGTYPE_p_FXTopWindow swig_types[47]
+#define SWIGTYPE_p_FXTranslator swig_types[48]
+#define SWIGTYPE_p_FXVisual swig_types[49]
+#define SWIGTYPE_p_FXWindow swig_types[50]
+#define SWIGTYPE_p_char swig_types[51]
+#define SWIGTYPE_p_double swig_types[52]
+#define SWIGTYPE_p_float swig_types[53]
+#define SWIGTYPE_p_int swig_types[54]
+#define SWIGTYPE_p_long swig_types[55]
+#define SWIGTYPE_p_p_FXComposite swig_types[56]
+#define SWIGTYPE_p_p_FXFrame swig_types[57]
+#define SWIGTYPE_p_p_FXMainWindow swig_types[58]
+#define SWIGTYPE_p_p_FXPopup swig_types[59]
+#define SWIGTYPE_p_p_FXRootWindow swig_types[60]
+#define SWIGTYPE_p_p_FXShell swig_types[61]
+#define SWIGTYPE_p_p_FXSplashWindow swig_types[62]
+#define SWIGTYPE_p_p_FXTopWindow swig_types[63]
+#define SWIGTYPE_p_p_FXWindow swig_types[64]
+#define SWIGTYPE_p_p_char swig_types[65]
+#define SWIGTYPE_p_short swig_types[66]
+#define SWIGTYPE_p_unsigned_char swig_types[67]
+#define SWIGTYPE_p_unsigned_int swig_types[68]
+#define SWIGTYPE_p_unsigned_long swig_types[69]
+#define SWIGTYPE_p_unsigned_short swig_types[70]
+#define SWIGTYPE_p_void swig_types[71]
+static swig_type_info *swig_types[73];
+static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#define SWIG_init    Init_core
+#define SWIG_name    "Core"
+
+VALUE mFox;
+
+#define SWIG_RUBY_THREAD_BEGIN_BLOCK
+#define SWIG_RUBY_THREAD_END_BLOCK
+
+
+#define SWIGVERSION 0x030012 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
+
+
+#include <stdexcept>
+
+
+#include "FXRbCommon.h"
+
+
+inline FXColor to_FXColor(VALUE obj){
+  if(TYPE(obj)==T_STRING){
+    return fxcolorfromname(StringValuePtr(obj));
+    }
+  else if(TYPE(obj)==T_SYMBOL){
+    return fxcolorfromname(rb_id2name(SYM2ID(obj)));
+    }
+  else{
+    return NUM2ULONG(obj);
+    }
+  }
+
+
+inline FXString to_FXString(VALUE obj){
+  if(!NIL_P(obj)){
+    Check_Type(obj,T_STRING);
+    return FXString(StringValuePtr(obj));
+    }
+  else{
+    return FXString::null;
+    }
+  }
+
+
+inline FXbool to_FXbool(VALUE obj){
+  if (obj == Qtrue || obj == Qfalse){
+    return (obj == Qtrue) ? TRUE : FALSE;
+    }
+  else{
+    return static_cast<FXbool>(NUM2UINT(obj));
+    }
+  }
+
+
+static swig_type_info* FXEventTypeInfo=0;
+
+inline void* to_FXEvent(VALUE obj){
+  void* ptr;
+  if(!FXEventTypeInfo){
+    FXEventTypeInfo=SWIG_TypeQuery("FXEvent *");
+    FXASSERT(FXEventTypeInfo!=0);
+    }
+  SWIG_ConvertPtr(obj,&ptr,FXEventTypeInfo,1);
+  return ptr;
+  }
+
+
+void setIgnoreExceptions(VALUE ignore){
+  extern FXbool FXRbCatchExceptions;
+  FXRbCatchExceptions=(ignore==Qtrue)? TRUE : FALSE;
+  }
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+  #define SWIG_From_long   LONG2NUM 
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+static FXuint _MKUINT(FXushort l,FXushort h){
+  return MKUINT(l,h);
+  }
+
+static FXuint _FXSEL(FXushort type,FXushort id){
+  return FXSEL(type,id);
+  }
+
+static FXushort _FXSELTYPE(FXuint s){
+  return FXSELTYPE(s);
+  }
+
+static FXushort _FXSELID(FXuint s){
+  return FXSELID(s);
+  }
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_long  (unsigned long value)
+{
+  return ULONG2NUM(value); 
+}
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_int  (unsigned int value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_short  (unsigned short value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+static FXuint _FXRGB(FXuchar r,FXuchar g,FXuchar b){
+  return FXRGB(r,g,b);
+  }
+
+static FXuint _FXRGBA(FXuchar r,FXuchar g,FXuchar b,FXuchar a){
+  return FXRGBA(r,g,b,a);
+  }
+
+static FXuchar _FXREDVAL(FXuint rgba){
+  return FXREDVAL(rgba);
+  }
+
+static FXuchar _FXGREENVAL(FXuint rgba){
+  return FXGREENVAL(rgba);
+  }
+
+static FXuchar _FXBLUEVAL(FXuint rgba){
+  return FXBLUEVAL(rgba);
+  }
+
+static FXuchar _FXALPHAVAL(FXuint rgba){
+  return FXALPHAVAL(rgba);
+  }
+
+static FXuchar _FXRGBACOMPVAL(FXuint rgba,FXuchar comp){
+  return FXRGBACOMPVAL(rgba,comp);
+  }
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_char  (unsigned char value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERN VALUE
+SWIG_ruby_failed(VALUE, VALUE)
+{
+  return Qnil;
+} 
+
+
+/*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE pargs){VALUE *args=(VALUE *)pargs;
+  VALUE obj = args[0];
+  VALUE type = TYPE(obj);
+  unsigned long *res = (unsigned long *)(args[1]);
+  *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
+  return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) 
+{
+  VALUE type = TYPE(obj);
+  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
+    unsigned long v;
+    VALUE a[2];
+    a[0] = obj;
+    a[1] = (VALUE)(&v);
+    if (rb_rescue(RUBY_VALUE_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_VALUE_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+      if (val) *val = v;
+      return SWIG_OK;
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = static_cast< unsigned int >(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery("_p_char");
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
+{
+  if (TYPE(obj) == T_STRING) {
+    char *cstr = StringValuePtr(obj); 
+    size_t size = RSTRING_LEN(obj) + 1;
+    if (cptr)  {
+      if (alloc) {
+	if (*alloc == SWIG_NEWOBJ) {
+	  *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size)));
+	} else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      }
+    }
+    if (psize) *psize = size;
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *)vptr;
+	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }  
+  return SWIG_TypeError;
+}
+
+
+
+
+
+  /// Get name of (closest) color to RGB
+  FXchar* fxnamefromcolor(FXColor color){
+    static FXchar colorname[128]; // should be large enough, but still a buffer overflow risk!
+    return fxnamefromcolor(colorname,color);
+    }
+
+
+SWIGINTERNINLINE VALUE 
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+  if (carray) {
+    if (size > LONG_MAX) {
+      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+      return pchar_descriptor ? 
+	SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
+    } else {
+      return rb_str_new(carray, static_cast< long >(size));
+    }
+  } else {
+    return Qnil;
+  }
+}
+
+
+SWIGINTERNINLINE VALUE 
+SWIG_FromCharPtr(const char *cptr)
+{ 
+  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+/// Convert RGB to HSV
+VALUE fxrgb_to_hsv(FXfloat r,FXfloat g,FXfloat b){
+  FXfloat h,s,v;
+  fxrgb_to_hsv(h,s,v,r,g,b);
+  VALUE ary=rb_ary_new();
+  rb_ary_push(ary,rb_float_new(h));
+  rb_ary_push(ary,rb_float_new(s));
+  rb_ary_push(ary,rb_float_new(v));
+  return ary;
+  }
+
+/// Convert HSV to RGB
+VALUE fxhsv_to_rgb(FXfloat h,FXfloat s,FXfloat v){
+  FXfloat r,g,b;
+  fxhsv_to_rgb(r,g,b,h,s,v);
+  VALUE ary=rb_ary_new();
+  rb_ary_push(ary,rb_float_new(r));
+  rb_ary_push(ary,rb_float_new(g));
+  rb_ary_push(ary,rb_float_new(b));
+  return ary;
+  }
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
+#ifndef SWIG_isfinite
+/* isfinite() is a macro for C99 */
+# if defined(isfinite)
+#  define SWIG_isfinite(X) (isfinite(X))
+# elif defined __cplusplus && __cplusplus >= 201103L
+/* Use a template so that this works whether isfinite() is std::isfinite() or
+ * in the global namespace.  The reality seems to vary between compiler
+ * versions.
+ *
+ * Make sure namespace std exists to avoid compiler warnings.
+ *
+ * extern "C++" is required as this fragment can end up inside an extern "C" { } block
+ */
+namespace std { }
+extern "C++" template<typename T>
+inline int SWIG_isfinite_func(T x) {
+  using namespace std;
+  return isfinite(x);
+}
+#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
+# elif defined(_MSC_VER)
+#  define SWIG_isfinite(X) (_finite(X))
+# elif defined(__sun) && defined(__SVR4)
+#  include <ieeefp.h>
+#  define SWIG_isfinite(X) (finite(X))
+# endif
+#endif
+
+
+/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
+#ifdef SWIG_isfinite
+# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
+#else
+# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
+#endif
+
+
+/*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE pargs){VALUE *args=(VALUE *)pargs;
+  VALUE obj = args[0];
+  VALUE type = TYPE(obj);
+  double *res = (double *)(args[1]);
+  *res = NUM2DBL(obj); (void)type;
+  return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_double (VALUE obj, double *val)
+{
+  VALUE type = TYPE(obj);
+  if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
+    double v;
+    VALUE a[2];
+    a[0] = obj;
+    a[1] = (VALUE)(&v);
+    if (rb_rescue(RUBY_VALUE_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_VALUE_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+      if (val) *val = v;
+      return SWIG_OK;
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_float (VALUE obj, float *val)
+{
+  double v;
+  int res = SWIG_AsVal_double (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if (SWIG_Float_Overflow_Check(v)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = static_cast< float >(v);
+    }
+  }  
+  return res;
+}
+
+
+VALUE fxparsegeometry(const FXchar *string){
+  FXint x,y,w,h;
+  FXint result=fxparsegeometry(string,x,y,w,h);
+  VALUE ary=rb_ary_new();
+  rb_ary_push(ary,INT2NUM(result));
+  rb_ary_push(ary,INT2NUM(x));
+  rb_ary_push(ary,INT2NUM(y));
+  rb_ary_push(ary,INT2NUM(w));
+  rb_ary_push(ary,INT2NUM(h));
+  return ary;
+  }
+
+
+/// Version number that the library has been compiled with
+VALUE _fxversion(){
+  FXString version=FXStringFormat("%d.%d.%d",fxversion[0],fxversion[1],fxversion[2]);
+  return to_ruby(version);
+  }
+
+SWIGINTERN FXStream *new_FXStream(FXObject const *cont=0){
+      return new FXRbStream(cont);
+      }
+
+/*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE pargs){VALUE *args=(VALUE *)pargs;
+  VALUE obj = args[0];
+  VALUE type = TYPE(obj);
+  long *res = (long *)(args[1]);
+  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
+  return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_long (VALUE obj, long* val)
+{
+  VALUE type = TYPE(obj);
+  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
+    long v;
+    VALUE a[2];
+    a[0] = obj;
+    a[1] = (VALUE)(&v);
+    if (rb_rescue(RUBY_VALUE_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_VALUE_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+      if (val) *val = v;
+      return SWIG_OK;
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (VALUE obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = static_cast< int >(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_bool  (bool value)
+{
+  return value ? Qtrue : Qfalse;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_bool (VALUE obj, bool *val)
+{
+  if (obj == Qtrue) {
+    if (val) *val = true;
+    return SWIG_OK;
+  } else if (obj == Qfalse) {
+    if (val) *val = false;
+    return SWIG_OK;
+  } else {
+    int res = 0;
+    if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {    
+      if (val) *val = res ? true : false;
+      return SWIG_OK;
+    }
+  }  
+  return SWIG_TypeError;
+}
+
+SWIGINTERN FXFileStream *new_FXFileStream(FXObject const *cont=0){
+      return new FXRbFileStream(cont);
+      }
+SWIGINTERN FXMemoryStream *new_FXMemoryStream(FXObject const *cont=0){
+      return new FXRbMemoryStream(cont);
+      }
+SWIGINTERN bool FXMemoryStream_open(FXMemoryStream *self,FXStreamDirection save_or_load,VALUE str){
+      FXuval size=0;
+      FXuchar *data=0;
+      if(!NIL_P(str)){
+        size=RSTRING_LEN(str);
+        data=reinterpret_cast<FXuchar*>(StringValuePtr(str));
+        return self->open(save_or_load,size,data);
+        }
+      else{
+        return self->open(save_or_load,data);
+        }
+      }
+SWIGINTERN VALUE FXMemoryStream_takeBuffer(FXMemoryStream *self){
+      FXuchar* buffer;
+      FXuval sp;
+      self->takeBuffer(buffer,sp);
+      VALUE result=rb_str_new(const_cast<const char *>(reinterpret_cast<char*>(buffer)),sp);
+      FXFREE(&buffer);
+      return result;
+      }
+SWIGINTERN void FXMemoryStream_giveBuffer(FXMemoryStream *self,VALUE str){
+      FXuchar* copy = 0;
+      Check_Type(str,T_STRING);
+      FXuchar* buffer=reinterpret_cast<FXuchar*>(StringValuePtr(str));
+      FXuval sp=RSTRING_LEN(str);
+      if( FXMALLOC(&copy, FXuchar *, sp)) {
+        memcpy(copy, buffer, sp);
+        self->giveBuffer(copy,sp);
+        }
+      }
+
+SWIGINTERNINLINE VALUE
+SWIG_From_short  (short value)
+{    
+  return SWIG_From_long  (value);
+}
+
+SWIGINTERN bool FXSize_operator_Se__Se_(FXSize const *self,FXSize const &s){ return (*self == s); }
+SWIGINTERN FXSize FXSize_operator_Sa_(FXSize const *self,FXSize const &s){ return *self + s; }
+SWIGINTERN FXSize FXSize_operator_Ss_(FXSize const *self,FXSize const &s){ return *self - s; }
+SWIGINTERN FXSize FXSize_operator_Sm_(FXSize const *self,FXshort c){ return *self * c; }
+SWIGINTERN FXSize FXSize_operator_Sd_(FXSize const *self,FXshort c){ return *self / c; }
+SWIGINTERN bool FXPoint_operator_Se__Se_(FXPoint const *self,FXPoint const &p){ return *self == p; }
+SWIGINTERN FXPoint FXPoint_operator_Sa___SWIG_0(FXPoint const *self,FXPoint const &p){ return *self + p; }
+SWIGINTERN FXPoint FXPoint_operator_Sa___SWIG_1(FXPoint const *self,FXSize const &s){ return *self + s; }
+SWIGINTERN FXPoint FXPoint_operator_Ss___SWIG_0(FXPoint const *self,FXPoint const &p){ return *self - p; }
+SWIGINTERN FXPoint FXPoint_operator_Ss___SWIG_1(FXPoint const *self,FXSize const &s){ return *self - s; }
+SWIGINTERN FXPoint FXPoint_operator_Sm_(FXPoint const *self,FXshort c){ return *self * c; }
+SWIGINTERN FXPoint FXPoint_operator_Sd_(FXPoint const *self,FXshort c){ return *self / c; }
+SWIGINTERN bool FXRectangle_operator_Se__Se_(FXRectangle const *self,FXRectangle const &p){
+      return *self == p;
+      }
+SWIGINTERN bool FXRectangle_overlap(FXRectangle const *self,FXRectangle const &p){
+      return overlap(*self,p);
+      }
+SWIGINTERN FXRectangle FXRectangle_operator_Sa_(FXRectangle const *self,FXRectangle const &p){
+      return *self + p;
+      }
+SWIGINTERN FXRectangle FXRectangle_operator_Sm_(FXRectangle const *self,FXRectangle const &p){
+      return *self * p;
+      }
+SWIGINTERN FXRegion FXRegion_operator_Sa_(FXRegion const *self,FXRegion const &other){ return (*self)+other; }
+SWIGINTERN FXRegion FXRegion_operator_Sm_(FXRegion const *self,FXRegion const &other){ return (*self)*other; }
+SWIGINTERN FXRegion FXRegion_operator_Ss_(FXRegion const *self,FXRegion const &other){ return (*self)-other; }
+SWIGINTERN FXRegion FXRegion_operator_Sx_(FXRegion const *self,FXRegion const &other){ return (*self)^other; }
+SWIGINTERN bool FXRegion_operator_Se__Se_(FXRegion const *self,FXRegion const &other){ return (*self)==other; }
+SWIGINTERN FXObject *new_FXObject(){
+      return new FXRbObject();
+      }
+
+static swig_type_info *FXObject_dynamic_cast(void **ptr) {
+    FXObject **ppObject = reinterpret_cast<FXObject **>(ptr);
+    FXAccelTable *pAccelTable=dynamic_cast<FXAccelTable*>(*ppObject);
+    if(pAccelTable){
+      *ptr=reinterpret_cast<void*>(pAccelTable);
+      return SWIG_TypeQuery("FXAccelTable *");
+      }
+    FXApp *pApp=dynamic_cast<FXApp*>(*ppObject);
+    if(pApp){
+      *ptr=reinterpret_cast<void*>(pApp);
+      return SWIG_TypeQuery("FXApp *");
+      }
+    FXDataTarget *pDataTarget=dynamic_cast<FXDataTarget*>(*ppObject);
+    if(pDataTarget){
+      *ptr=reinterpret_cast<void*>(pDataTarget);
+      return SWIG_TypeQuery("FXDataTarget *");
+      }
+    FXDebugTarget *pDebugTarget=dynamic_cast<FXDebugTarget*>(*ppObject);
+    if(pDebugTarget){
+      *ptr=reinterpret_cast<void*>(pDebugTarget);
+      return SWIG_TypeQuery("FXDebugTarget *");
+      }
+    FXDelegator *pDelegator=dynamic_cast<FXDelegator*>(*ppObject);
+    if(pDelegator){
+      *ptr=reinterpret_cast<void*>(pDelegator);
+      return SWIG_TypeQuery("FXDelegator *");
+      }
+    FXDict *pDict=dynamic_cast<FXDict*>(*ppObject);
+    if(pDict){
+      *ptr=reinterpret_cast<void*>(pDict);
+      return SWIG_TypeQuery("FXDict *");
+      }
+    FXDocument *pDocument=dynamic_cast<FXDocument*>(*ppObject);
+    if(pDocument){
+      *ptr=reinterpret_cast<void*>(pDocument);
+      return SWIG_TypeQuery("FXDocument *");
+      }
+    FXGLObject *pGLObject=dynamic_cast<FXGLObject*>(*ppObject);
+    if(pGLObject){
+      *ptr=reinterpret_cast<void*>(pGLObject);
+      return SWIG_TypeQuery("FXGLObject *");
+      }
+    FXHeaderItem *pHeaderItem=dynamic_cast<FXHeaderItem*>(*ppObject);
+    if(pHeaderItem){
+      *ptr=reinterpret_cast<void*>(pHeaderItem);
+      return SWIG_TypeQuery("FXHeaderItem *");
+      }
+    FXIconItem *pIconItem=dynamic_cast<FXIconItem*>(*ppObject);
+    if(pIconItem){
+      *ptr=reinterpret_cast<void*>(pIconItem);
+      return SWIG_TypeQuery("FXIconItem *");
+      }
+    FXIconSource *pIconSource=dynamic_cast<FXIconSource*>(*ppObject);
+    if(pIconSource){
+      *ptr=reinterpret_cast<void*>(pIconSource);
+      return SWIG_TypeQuery("FXIconSource *");
+      }
+    FXId *pId=dynamic_cast<FXId*>(*ppObject);
+    if(pId){
+      *ptr=reinterpret_cast<void*>(pId);
+      return SWIG_TypeQuery("FXId *");
+      }
+    FXListItem *pListItem=dynamic_cast<FXListItem*>(*ppObject);
+    if(pListItem){
+      *ptr=reinterpret_cast<void*>(pListItem);
+      return SWIG_TypeQuery("FXListItem *");
+      }
+    FXRecentFiles *pRecentFiles=dynamic_cast<FXRecentFiles*>(*ppObject);
+    if(pRecentFiles){
+      *ptr=reinterpret_cast<void*>(pRecentFiles);
+      return SWIG_TypeQuery("FXRecentFiles *");
+      }
+    FXTableItem *pTableItem=dynamic_cast<FXTableItem*>(*ppObject);
+    if(pTableItem){
+      *ptr=reinterpret_cast<void*>(pTableItem);
+      return SWIG_TypeQuery("FXTableItem *");
+      }
+    FXTreeItem *pTreeItem=dynamic_cast<FXTreeItem*>(*ppObject);
+    if(pTreeItem){
+      *ptr=reinterpret_cast<void*>(pTreeItem);
+      return SWIG_TypeQuery("FXTreeItem *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXAccelTable *new_FXAccelTable(){
+      return new FXRbAccelTable();
+      }
+SWIGINTERN VALUE FXApp_copyright(){
+      return to_ruby(FXApp::copyright);
+    }
+SWIGINTERN FXApp *new_FXApp(FXchar const *name="Application",FXchar const *vendor="FoxDefault"){
+      if(FXApp::instance()){
+        rb_raise(rb_eRuntimeError,"attempted to create more than one FXApp instance");
+        return 0;
+        }
+      else{
+        return FXRbApp::constructAndInit(name,vendor);
+        }
+      }
+SWIGINTERN FXuval FXApp_getDisplay(FXApp const *self){
+      return reinterpret_cast<FXuval>(self->getDisplay());
+      }
+SWIGINTERN void FXApp_setDefaultVisual(FXApp *self,FXVisual *vis){
+      FXASSERT(vis);
+      if(vis->isMemberOf(FXMETACLASS(FXRbVisual))){
+        dynamic_cast<FXRbVisual*>(vis)->ownedByApp=1;
+        }
+      else if(vis->isMemberOf(FXMETACLASS(FXRbGLVisual))){
+        dynamic_cast<FXRbGLVisual*>(vis)->ownedByApp=1;
+        }
+      self->setDefaultVisual(vis);
+      }
+SWIGINTERN void FXApp_addSignal(FXApp *self,VALUE sigObj,FXObject *tgt,FXSelector sel,FXbool immediate=0,FXuint flags=0){
+      const char *s;
+      FXint sig;
+      switch(TYPE(sigObj)){
+        case T_STRING:
+          s=StringValuePtr(sigObj);
+          sig=FXRbSignalNameToNumber(s);
+          if(sig==0) rb_raise(rb_eArgError,"unrecognized signal name `%s'",s);
+          break;
+        case T_FIXNUM:
+          sig=(FXint)NUM2INT(sigObj);
+          break;
+        default:
+          rb_raise(rb_eArgError,"bad signal type %s",rb_class2name(CLASS_OF(sigObj)));
+          break;
+        }
+      self->addSignal(sig,tgt,sel,immediate,flags);
+      }
+SWIGINTERN void FXApp_removeSignal(FXApp *self,VALUE sigObj){
+      const char *s;
+      FXint sig;
+      switch(TYPE(sigObj)){
+        case T_STRING:
+          s=StringValuePtr(sigObj);
+          sig=FXRbSignalNameToNumber(s);
+          if(sig==0) rb_raise(rb_eArgError,"unrecognized signal name `%s'",s);
+          break;
+        case T_FIXNUM:
+          sig=(FXint)NUM2INT(sigObj);
+          break;
+        default:
+          rb_raise(rb_eArgError,"bad signal type %s",rb_class2name(CLASS_OF(sigObj)));
+          break;
+        }
+      self->removeSignal(sig);
+      }
+SWIGINTERN bool FXApp_addInput(FXApp *self,VALUE obj,FXuint mode,FXObject *tgt,FXSelector sel){
+      FXInputHandle fd;
+      if(mode&(INPUT_READ|INPUT_EXCEPT)){
+        fd=FXRbGetReadFileHandle(obj, mode);
+        self->addInput(fd,mode,tgt,sel);
+        }
+      if(mode&(INPUT_WRITE|INPUT_EXCEPT)){
+        fd=FXRbGetWriteFileHandle(obj, mode);
+        self->addInput(fd,mode,tgt,sel);
+        }
+      return true;
+      }
+SWIGINTERN bool FXApp_removeInput(FXApp *self,VALUE obj,FXuint mode){
+      FXInputHandle fd;
+      if(mode&(INPUT_READ|INPUT_EXCEPT)){
+        fd=FXRbGetReadFileHandle(obj, mode);
+        self->removeInput(fd,mode);
+        FXRbRemoveReadFileHandle(obj, mode);
+        }
+      if(mode&(INPUT_WRITE|INPUT_EXCEPT)){
+        fd=FXRbGetWriteFileHandle(obj, mode);
+        self->removeInput(fd,mode);
+        FXRbRemoveWriteFileHandle(obj, mode);
+        }
+      return true;
+      }
+SWIGINTERN void FXApp_setNormalFont(FXApp *self,FXFont *font){
+      FXASSERT(font);
+      if(font->isMemberOf(FXMETACLASS(FXRbFont))){
+        dynamic_cast<FXRbFont*>(font)->ownedByApp=1;
+	}
+      self->setNormalFont(font);
+      }
+SWIGINTERN void FXApp_setWaitCursor(FXApp *self,FXCursor *cur){
+      FXASSERT(cur);
+      if(cur->isMemberOf(FXMETACLASS(FXRbCursor))){
+        dynamic_cast<FXRbCursor*>(cur)->ownedByApp=1;
+        }
+      else if(cur->isMemberOf(FXMETACLASS(FXRbCURCursor))){
+        dynamic_cast<FXRbCURCursor*>(cur)->ownedByApp=1;
+        }
+      else if(cur->isMemberOf(FXMETACLASS(FXRbGIFCursor))){
+        dynamic_cast<FXRbGIFCursor*>(cur)->ownedByApp=1;
+        }
+      self->setWaitCursor(cur);
+      }
+SWIGINTERN void FXApp_setDefaultCursor(FXApp *self,FXDefaultCursor which,FXCursor *cur){
+      FXASSERT(cur);
+      if(cur->isMemberOf(FXMETACLASS(FXRbCursor))){
+        dynamic_cast<FXRbCursor*>(cur)->ownedByApp=1;
+        }
+      else if(cur->isMemberOf(FXMETACLASS(FXRbCURCursor))){
+        dynamic_cast<FXRbCURCursor*>(cur)->ownedByApp=1;
+        }
+      else if(cur->isMemberOf(FXMETACLASS(FXRbGIFCursor))){
+        dynamic_cast<FXRbGIFCursor*>(cur)->ownedByApp=1;
+        }
+      self->setDefaultCursor(which,cur);
+      }
+SWIGINTERN FXWindow *FXApp_readWindow(FXApp *self,FXStream &store,FXWindow *&window,FXWindow *father,FXWindow *owner){
+      window=0;
+      self->readWindow(store,window,father,owner);
+      return window;
+      }
+SWIGINTERN void FXApp_setThreadsEnabled(FXApp *self,FXbool enabled){
+    FXASSERT(self->isMemberOf(FXMETACLASS(FXRbApp)));
+    dynamic_cast<FXRbApp*>(self)->setThreadsEnabled(enabled);
+    }
+SWIGINTERN FXbool FXApp_threadsEnabled(FXApp const *self){
+    FXASSERT(self->isMemberOf(FXMETACLASS(FXRbApp)));
+    return dynamic_cast<const FXRbApp*>(self)->threadsEnabled();
+    }
+SWIGINTERN void FXApp_setSleepTime(FXApp *self,FXuint sleepTime){
+    FXASSERT(self->isMemberOf(FXMETACLASS(FXRbApp)));
+    dynamic_cast<FXRbApp*>(self)->setSleepTime(sleepTime);
+    }
+SWIGINTERN FXuint FXApp_getSleepTime(FXApp const *self){
+    FXASSERT(self->isMemberOf(FXMETACLASS(FXRbApp)));
+    return dynamic_cast<const FXRbApp*>(self)->getSleepTime();
+    }
+SWIGINTERN FXDataTarget *new_FXDataTarget(VALUE value=Qnil,FXObject *tgt=0,FXSelector sel=0){
+      return new FXRbDataTarget(value,tgt,sel);
+      }
+SWIGINTERN VALUE FXDataTarget_getValue(FXDataTarget const *self){
+      FXASSERT(self->isMemberOf(FXMETACLASS(FXRbDataTarget)));
+      return dynamic_cast<const FXRbDataTarget*>(self)->getValue();
+      }
+SWIGINTERN void FXDataTarget_setValue(FXDataTarget *self,VALUE value){
+      FXASSERT(self->isMemberOf(FXMETACLASS(FXRbDataTarget)));
+      dynamic_cast<FXRbDataTarget*>(self)->setValue(value);
+      }
+SWIGINTERN VALUE FXDebugTarget_messageTypeName(){
+          VALUE messageTypeNames = rb_ary_new();
+          for (int i = 0; i < SEL_LAST; i++) {
+              rb_ary_push(messageTypeNames,
+                  to_ruby(FXDebugTarget::messageTypeName[i]));
+          }
+          return messageTypeNames;
+      }
+SWIGINTERN FXDebugTarget *new_FXDebugTarget(){
+      return new FXRbDebugTarget();
+      }
+SWIGINTERN FXDelegator *new_FXDelegator(FXObject *target=0){
+      return new FXRbDelegator(target);
+      }
+SWIGINTERN FXTranslator *new_FXTranslator(FXApp *a){ return new FXRbTranslator(a); }
+SWIGINTERN FXDict *new_FXDict(){
+      return new FXRbDict();
+      }
+SWIGINTERN bool FXDict_has_key(FXDict const *self,FXchar const *ky){
+      return (self->find(ky) != 0);
+    }
+
+static swig_type_info *FXDict_dynamic_cast(void **ptr) {
+    FXDict **ppDict = reinterpret_cast<FXDict **>(ptr);
+    FXFileDict *pFileDict=dynamic_cast<FXFileDict*>(*ppDict);
+    if(pFileDict){
+      *ptr=reinterpret_cast<void*>(pFileDict);
+      return SWIG_TypeQuery("FXFileDict *");
+      }
+    FXIconDict *pIconDict=dynamic_cast<FXIconDict*>(*ppDict);
+    if(pIconDict){
+      *ptr=reinterpret_cast<void*>(pIconDict);
+      return SWIG_TypeQuery("FXIconDict *");
+      }
+    FXSettings *pSettings=dynamic_cast<FXSettings*>(*ppDict);
+    if(pSettings){
+      *ptr=reinterpret_cast<void*>(pSettings);
+      return SWIG_TypeQuery("FXSettings *");
+      }
+    FXStringDict *pStringDict=dynamic_cast<FXStringDict*>(*ppDict);
+    if(pStringDict){
+      *ptr=reinterpret_cast<void*>(pStringDict);
+      return SWIG_TypeQuery("FXStringDict *");
+      }
+    return 0;
+}
+
+SWIGINTERN VALUE FXFileDict_defaultExecBinding(){
+      return to_ruby(FXFileDict::defaultExecBinding);
+      }
+SWIGINTERN VALUE FXFileDict_defaultDirBinding(){
+      return to_ruby(FXFileDict::defaultDirBinding);
+      }
+SWIGINTERN VALUE FXFileDict_defaultFileBinding(){
+      return to_ruby(FXFileDict::defaultFileBinding);
+      }
+SWIGINTERN FXFileDict *new_FXFileDict__SWIG_0(FXApp *a){
+      return new FXRbFileDict(a);
+      }
+SWIGINTERN FXFileDict *new_FXFileDict__SWIG_1(FXApp *a,FXSettings *db){
+      return new FXRbFileDict(a,db);
+      }
+SWIGINTERN VALUE FXIconDict_defaultIconPath(){
+      return to_ruby(FXIconDict::defaultIconPath);
+      }
+SWIGINTERN FXIconDict *new_FXIconDict(FXApp *app,FXString const &p=FXIconDict::defaultIconPath){
+      return new FXRbIconDict(app,p);
+      }
+SWIGINTERN FXStringDict *new_FXStringDict(){
+      return new FXRbStringDict();
+      }
+SWIGINTERN FXSettings *new_FXSettings(){
+      return new FXRbSettings();
+      }
+
+  #define SWIG_From_double   rb_float_new 
+
+
+static swig_type_info *FXSettings_dynamic_cast(void **ptr) {
+    FXSettings **ppSettings = reinterpret_cast<FXSettings **>(ptr);
+    FXRegistry *pRegistry=dynamic_cast<FXRegistry*>(*ppSettings);
+    if(pRegistry){
+      *ptr=reinterpret_cast<void*>(pRegistry);
+      return SWIG_TypeQuery("FXRegistry *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXRegistry *new_FXRegistry(FXString const &akey=FXString::null,FXString const &vkey=FXString::null){
+      return new FXRbRegistry(akey,vkey);
+      }
+SWIGINTERN FXDocument *new_FXDocument(){
+      return new FXRbDocument();
+      }
+SWIGINTERN FXRecentFiles *new_FXRecentFiles__SWIG_0(){ return new FXRbRecentFiles(); }
+SWIGINTERN FXRecentFiles *new_FXRecentFiles__SWIG_1(FXApp *a){ return new FXRbRecentFiles(a); }
+SWIGINTERN FXRecentFiles *new_FXRecentFiles__SWIG_2(FXApp *a,FXString const &gp,FXObject *tgt=0,FXSelector sel=0){
+      return new FXRbRecentFiles(a,gp,tgt,sel);
+      }
+SWIGINTERN bool FXId_created(FXId const *self){
+      return self->id() != 0;
+      }
+SWIGINTERN void FXId_setUserData(FXId *self,VALUE ptr){
+      self->setUserData(reinterpret_cast<void*>(ptr));
+      }
+SWIGINTERN VALUE FXId_getUserData(FXId const *self){
+      return self->getUserData() ? reinterpret_cast<VALUE>(self->getUserData()) : Qnil;
+      }
+
+static swig_type_info *FXId_dynamic_cast(void **ptr) {
+    FXId **ppId = reinterpret_cast<FXId **>(ptr);
+    FXCursor *pCursor=dynamic_cast<FXCursor*>(*ppId);
+    if(pCursor){
+      *ptr=reinterpret_cast<void*>(pCursor);
+      return SWIG_TypeQuery("FXCursor *");
+      }
+    FXDrawable *pDrawable=dynamic_cast<FXDrawable*>(*ppId);
+    if(pDrawable){
+      *ptr=reinterpret_cast<void*>(pDrawable);
+      return SWIG_TypeQuery("FXDrawable *");
+      }
+    FXFont *pFont=dynamic_cast<FXFont*>(*ppId);
+    if(pFont){
+      *ptr=reinterpret_cast<void*>(pFont);
+      return SWIG_TypeQuery("FXFont *");
+      }
+    FXGLContext *pGLContext=dynamic_cast<FXGLContext*>(*ppId);
+    if(pGLContext){
+      *ptr=reinterpret_cast<void*>(pGLContext);
+      return SWIG_TypeQuery("FXGLContext *");
+      }
+    FXVisual *pVisual=dynamic_cast<FXVisual*>(*ppId);
+    if(pVisual){
+      *ptr=reinterpret_cast<void*>(pVisual);
+      return SWIG_TypeQuery("FXVisual *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXCursor *new_FXCursor__SWIG_0(FXApp *a,FXStockCursor curid=CURSOR_ARROW){
+      return new FXRbCursor(a,curid);
+      }
+SWIGINTERN FXCursor *new_FXCursor__SWIG_1(FXApp *a,FXuchar const *src,FXuchar const *msk,FXint w=32,FXint h=32,FXint hx=0,FXint hy=0){
+      return new FXRbCursor(a,src,msk,w,h,hx,hy);
+      }
+SWIGINTERN FXCursor *new_FXCursor__SWIG_2(FXApp *a,FXColor const *pix,FXint w=32,FXint h=32,FXint hx=0,FXint hy=0){
+      return new FXRbCursor(a,pix,w,h,hx,hy);
+      }
+
+static swig_type_info *FXCursor_dynamic_cast(void **ptr) {
+    FXCursor **ppCursor = reinterpret_cast<FXCursor **>(ptr);
+    FXCURCursor *pCURCursor=dynamic_cast<FXCURCursor*>(*ppCursor);
+    if(pCURCursor){
+      *ptr=reinterpret_cast<void*>(pCURCursor);
+      return SWIG_TypeQuery("FXCURCursor *");
+      }
+    FXGIFCursor *pGIFCursor=dynamic_cast<FXGIFCursor*>(*ppCursor);
+    if(pGIFCursor){
+      *ptr=reinterpret_cast<void*>(pGIFCursor);
+      return SWIG_TypeQuery("FXGIFCursor *");
+      }
+    return 0;
+}
+
+SWIGINTERN VALUE FXCURCursor_fileExt(){
+      return to_ruby(FXCURCursor::fileExt);
+      }
+SWIGINTERN FXCURCursor *new_FXCURCursor(FXApp *a,void const *pix){
+      return new FXRbCURCursor(a,pix);
+      }
+SWIGINTERN VALUE FXGIFCursor_fileExt(){
+      return to_ruby(FXGIFCursor::fileExt);
+      }
+SWIGINTERN FXGIFCursor *new_FXGIFCursor(FXApp *a,void const *pix,FXint hx=-1,FXint hy=-1){
+      return new FXRbGIFCursor(a,pix,hx,hy);
+      }
+
+  /**
+   * Load an GIF (Graphics Interchange Format) file from a stream.
+   * Upon successful return, the pixel array and size are returned.
+   * If an error occurred, the pixel array is set to NULL.
+   */
+  VALUE fxloadGIF(FXStream& store){
+    FXColor* data;
+    FXint width;
+    FXint height;
+    if(fxloadGIF(store,data,width,height)){
+      VALUE ary=rb_ary_new();
+      rb_ary_push(ary,FXRbMakeColorArray(data,width,height));
+      FXFREE(&data);
+      rb_ary_push(ary,to_ruby(width));
+      rb_ary_push(ary,to_ruby(height));
+      return ary;
+      }
+    else{
+      return Qnil;
+      }
+    }
+
+SWIGINTERN FXDrawable *new_FXDrawable(FXApp *a,FXint w,FXint h){
+      return new FXRbDrawable(a,w,h);
+      }
+
+static swig_type_info *FXDrawable_dynamic_cast(void **ptr) {
+    FXDrawable **ppDrawable = reinterpret_cast<FXDrawable **>(ptr);
+    FXBitmap *pBitmap=dynamic_cast<FXBitmap*>(*ppDrawable);
+    if(pBitmap){
+      *ptr=reinterpret_cast<void*>(pBitmap);
+      return SWIG_TypeQuery("FXBitmap *");
+      }
+    FXImage *pImage=dynamic_cast<FXImage*>(*ppDrawable);
+    if(pImage){
+      *ptr=reinterpret_cast<void*>(pImage);
+      return SWIG_TypeQuery("FXImage *");
+      }
+    FXWindow *pWindow=dynamic_cast<FXWindow*>(*ppDrawable);
+    if(pWindow){
+      *ptr=reinterpret_cast<void*>(pWindow);
+      return SWIG_TypeQuery("FXWindow *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXVisual *new_FXVisual(FXApp *a,FXuint flgs,FXuint d=32){
+      return new FXRbVisual(a,flgs,d);
+      }
+
+static swig_type_info *FXVisual_dynamic_cast(void **ptr) {
+    FXVisual **ppVisual = reinterpret_cast<FXVisual **>(ptr);
+    FXGLVisual *pGLVisual=dynamic_cast<FXGLVisual*>(*ppVisual);
+    if(pGLVisual){
+      *ptr=reinterpret_cast<void*>(pGLVisual);
+      return SWIG_TypeQuery("FXGLVisual *");
+      }
+    return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsCharArray(VALUE obj, char *val, size_t size)
+{ 
+  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
+  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
+  if (SWIG_IsOK(res)) {
+    /* special case of single char conversion when we don't need space for NUL */
+    if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
+    if (csize <= size) {
+      if (val) {
+	if (csize) memcpy(val, cptr, csize*sizeof(char));
+	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
+      }
+      if (alloc == SWIG_NEWOBJ) {
+	delete[] cptr;
+	res = SWIG_DelNewMask(res);
+      }      
+      return res;
+    }
+    if (alloc == SWIG_NEWOBJ) delete[] cptr;
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN size_t
+SWIG_strnlen(const char* s, size_t maxlen)
+{
+  const char *p;
+  for (p = s; maxlen-- && *p; p++)
+    ;
+  return p - s;
+}
+
+SWIGINTERN FXFont *new_FXFont__SWIG_0(FXApp *a,FXString const &string){
+      return new FXRbFont(a,string);
+      }
+SWIGINTERN FXFont *new_FXFont__SWIG_1(FXApp *a,FXString const &face,FXuint sz,FXuint wt=FXFont::Normal,FXuint slant=FXFont::Straight,FXuint encoding=FONTENCODING_DEFAULT,FXuint setwidth=FXFont::NonExpanded,FXuint h=0){
+      return new FXRbFont(a,face,sz,wt,slant,encoding,setwidth,h);
+      }
+SWIGINTERN FXFont *new_FXFont__SWIG_2(FXApp *a,FXFontDesc const &fontdesc){
+      return new FXRbFont(a,fontdesc);
+      }
+SWIGINTERN FXFontDesc FXFont_getFontDesc(FXFont const *self){
+      FXFontDesc fontdesc;
+      self->getFontDesc(fontdesc);
+      return fontdesc;
+    }
+SWIGINTERN VALUE FXFont_listFonts(FXString const &face,FXuint wt=0,FXuint sl=0,FXuint sw=0,FXuint en=0,FXuint h=0){
+      FXFontDesc* fonts;
+      FXuint numfonts;
+      VALUE results = rb_ary_new();
+      if (FXFont::listFonts(fonts, numfonts, face, wt, sl, sw, en, h)) {
+        for (FXuint i = 0; i < numfonts; i++)
+          rb_ary_push(results, to_ruby(new FXFontDesc(fonts[i])));
+        FXFREE(&fonts);
+      }
+      return results;
+    }
+SWIGINTERN FXbool FXFont_hasChar(FXFont const *self,VALUE ch){
+      if(TYPE(ch)==T_STRING){
+        if(RSTRING_LEN(ch)==1){
+          return self->hasChar(*(StringValuePtr(ch))); // FIXME: hasChar() expects an FXwchar
+	  }
+	else{
+	  rb_raise(rb_eArgError,"expected a string of length one");
+	  }
+        }
+      else{
+        return self->hasChar(NUM2INT(ch)); // FIXME: hasChar() expects an FXwchar
+        }
+      }
+SWIGINTERN VALUE FXWindow_octetTypeName(){
+      return to_ruby(FXWindow::octetTypeName);
+    }
+SWIGINTERN VALUE FXWindow_deleteTypeName(){
+      return to_ruby(FXWindow::deleteTypeName);
+    }
+SWIGINTERN VALUE FXWindow_textTypeName(){
+      return to_ruby(FXWindow::textTypeName);
+    }
+SWIGINTERN VALUE FXWindow_colorTypeName(){
+      return to_ruby(FXWindow::colorTypeName);
+    }
+SWIGINTERN VALUE FXWindow_urilistTypeName(){
+      return to_ruby(FXWindow::urilistTypeName);
+    }
+SWIGINTERN VALUE FXWindow_utf8TypeName(){
+      return to_ruby(FXWindow::utf8TypeName);
+    }
+SWIGINTERN VALUE FXWindow_utf16TypeName(){
+      return to_ruby(FXWindow::utf16TypeName);
+    }
+SWIGINTERN FXWindow *new_FXWindow__SWIG_0(FXComposite *p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0){
+      return new FXRbWindow(p,opts,x,y,w,h);
+      }
+SWIGINTERN FXWindow *new_FXWindow__SWIG_1(FXApp *a,FXVisual *vis){
+      return new FXRbWindow(a,vis);
+      }
+SWIGINTERN FXWindow *new_FXWindow__SWIG_2(FXApp *a,FXWindow *own,FXuint opts,FXint x,FXint y,FXint w,FXint h){
+      return new FXRbWindow(a,own,opts,x,y,w,h);
+      }
+SWIGINTERN FXbool FXWindow_removeChild(FXWindow *self,FXWindow *child){
+      if(self->containsChild(child)){
+        delete child;
+        return 1;
+        }
+      else{
+        return 0;
+        }
+      }
+SWIGINTERN bool FXWindow_before(FXWindow const *self,FXWindow const *other){ return FXWindow::before(self, other); }
+SWIGINTERN bool FXWindow_after(FXWindow const *self,FXWindow const *other){ return FXWindow::after(self, other); }
+SWIGINTERN VALUE FXWindow_getCursorPosition(FXWindow const *self){
+      FXint x, y;
+      FXuint buttons;
+      self->getCursorPosition(x, y, buttons);
+      VALUE arr = rb_ary_new();
+      rb_ary_push(arr, INT2NUM(x));
+      rb_ary_push(arr, INT2NUM(y));
+      rb_ary_push(arr, UINT2NUM(buttons));
+      return arr;
+    }
+SWIGINTERN bool FXWindow_acquireSelection(FXWindow *self,VALUE typesArray){
+      Check_Type(typesArray,T_ARRAY);
+      FXDragType *types=0;
+      FXuint numtypes=RARRAY_LEN(typesArray);
+      if(numtypes>0){
+        types=new FXDragType[numtypes];
+        for(FXuint i=0;i<numtypes;i++){
+          types[i]=(FXDragType) NUM2UINT(rb_ary_entry(typesArray,i));
+          }
+      }
+      bool result=self->acquireSelection(types,numtypes);
+      delete [] types;
+      return result;
+      }
+SWIGINTERN bool FXWindow_acquireClipboard(FXWindow *self,VALUE typesArray){
+      Check_Type(typesArray,T_ARRAY);
+      FXDragType *types=0;
+      FXuint numtypes=RARRAY_LEN(typesArray);
+      if(numtypes>0){
+        types=new FXDragType[numtypes];
+        for(FXuint i=0;i<numtypes;i++){
+          types[i]=(FXDragType) NUM2UINT(rb_ary_entry(typesArray,i));
+          }
+      }
+      bool result=self->acquireClipboard(types,numtypes);
+      delete [] types;
+      return result;
+      }
+SWIGINTERN bool FXWindow_beginDrag(FXWindow *self,VALUE typesArray){
+      Check_Type(typesArray,T_ARRAY);
+      FXDragType *types=0;
+      FXuint numtypes=RARRAY_LEN(typesArray);
+      if(numtypes>0){
+        types=new FXDragType[numtypes];
+        for(FXuint i=0;i<numtypes;i++){
+          types[i]=(FXDragType) NUM2UINT(rb_ary_entry(typesArray,i));
+          }
+      }
+      bool result=self->beginDrag(types,numtypes);
+      delete [] types;
+      return result;
+      }
+SWIGINTERN VALUE FXWindow_inquireDNDTypes(FXWindow const *self,FXDNDOrigin origin){
+      FXDragType* types;
+      FXuint numtypes;
+      VALUE arr = rb_ary_new();
+      if (self->inquireDNDTypes(origin, types, numtypes)) {
+        for (FXuint i = 0; i < numtypes; i++)
+          rb_ary_push(arr, to_ruby(types[i]));
+        FXFREE(&types);
+      }
+      return arr;
+    }
+SWIGINTERN void FXWindow_setDNDData(FXWindow const *self,FXDNDOrigin origin,FXDragType type,VALUE str){
+      Check_Type(str, T_STRING);
+      FXuchar* data;
+      FXuint size = RSTRING_LEN(str);
+      if (FXMALLOC(&data, FXuchar, size)) {
+        memcpy((void *) data, (void *) RSTRING_PTR(str), size);
+        self->setDNDData(origin, type, data, size);
+      } else {
+        rb_raise(rb_eNoMemError, "couldn't copy drag-and-drop data");
+      }
+    }
+SWIGINTERN VALUE FXWindow_getDNDData(FXWindow const *self,FXDNDOrigin origin,FXDragType type){
+      FXuchar* data;
+      FXuint size;
+      VALUE result = Qnil;
+      if (self->getDNDData(origin, type, data, size)) {
+        result = rb_str_new((const FXchar *) data, size);
+        FXFREE(&data);
+      }
+      return result;
+    }
+SWIGINTERN VALUE FXWindow_translateCoordinatesFrom(FXWindow const *self,FXWindow const *fromwindow,FXint fromx,FXint fromy){
+      FXint tox, toy;
+      self->translateCoordinatesFrom(tox, toy, fromwindow, fromx, fromy);
+      VALUE result = rb_ary_new();
+      rb_ary_push(result, INT2NUM(tox));
+      rb_ary_push(result, INT2NUM(toy));
+      return result;
+    }
+SWIGINTERN VALUE FXWindow_translateCoordinatesTo(FXWindow const *self,FXWindow const *towindow,FXint fromx,FXint fromy){
+      FXint tox, toy;
+      self->translateCoordinatesTo(tox, toy, towindow, fromx, fromy);
+      VALUE result = rb_ary_new();
+      rb_ary_push(result, INT2NUM(tox));
+      rb_ary_push(result, INT2NUM(toy));
+      return result;
+    }
+
+static swig_type_info *FXWindow_dynamic_cast(void **ptr) {
+    FXWindow **ppWindow = reinterpret_cast<FXWindow **>(ptr);
+    FXCanvas *pCanvas=dynamic_cast<FXCanvas*>(*ppWindow);
+    if(pCanvas){
+      *ptr=reinterpret_cast<void*>(pCanvas);
+      return SWIG_TypeQuery("FXCanvas *");
+      }
+    FXComposite *pComposite=dynamic_cast<FXComposite*>(*ppWindow);
+    if(pComposite){
+      *ptr=reinterpret_cast<void*>(pComposite);
+      return SWIG_TypeQuery("FXComposite *");
+      }
+    FXDragCorner *pDragCorner=dynamic_cast<FXDragCorner*>(*ppWindow);
+    if(pDragCorner){
+      *ptr=reinterpret_cast<void*>(pDragCorner);
+      return SWIG_TypeQuery("FXDragCorner *");
+      }
+    FXFrame *pFrame=dynamic_cast<FXFrame*>(*ppWindow);
+    if(pFrame){
+      *ptr=reinterpret_cast<void*>(pFrame);
+      return SWIG_TypeQuery("FXFrame *");
+      }
+    FXMenuCaption *pMenuCaption=dynamic_cast<FXMenuCaption*>(*ppWindow);
+    if(pMenuCaption){
+      *ptr=reinterpret_cast<void*>(pMenuCaption);
+      return SWIG_TypeQuery("FXMenuCaption *");
+      }
+    FXMenuSeparator *pMenuSeparator=dynamic_cast<FXMenuSeparator*>(*ppWindow);
+    if(pMenuSeparator){
+      *ptr=reinterpret_cast<void*>(pMenuSeparator);
+      return SWIG_TypeQuery("FXMenuSeparator *");
+      }
+    FXScrollBar *pScrollBar=dynamic_cast<FXScrollBar*>(*ppWindow);
+    if(pScrollBar){
+      *ptr=reinterpret_cast<void*>(pScrollBar);
+      return SWIG_TypeQuery("FXScrollBar *");
+      }
+    FXScrollCorner *pScrollCorner=dynamic_cast<FXScrollCorner*>(*ppWindow);
+    if(pScrollCorner){
+      *ptr=reinterpret_cast<void*>(pScrollCorner);
+      return SWIG_TypeQuery("FXScrollCorner *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXFrame *new_FXFrame(FXComposite *p,FXuint opts=FRAME_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD){
+      return new FXRbFrame(p,opts,x,y,w,h,pl,pr,pt,pb);
+      }
+
+static swig_type_info *FXFrame_dynamic_cast(void **ptr) {
+    FXFrame **ppFrame = reinterpret_cast<FXFrame **>(ptr);
+    FX7Segment *p7Segment=dynamic_cast<FX7Segment*>(*ppFrame);
+    if(p7Segment){
+      *ptr=reinterpret_cast<void*>(p7Segment);
+      return SWIG_TypeQuery("FX7Segment *");
+      }
+    FXArrowButton *pArrowButton=dynamic_cast<FXArrowButton*>(*ppFrame);
+    if(pArrowButton){
+      *ptr=reinterpret_cast<void*>(pArrowButton);
+      return SWIG_TypeQuery("FXArrowButton *");
+      }
+    FXBitmapFrame *pBitmapFrame=dynamic_cast<FXBitmapFrame*>(*ppFrame);
+    if(pBitmapFrame){
+      *ptr=reinterpret_cast<void*>(pBitmapFrame);
+      return SWIG_TypeQuery("FXBitmapFrame *");
+      }
+    FXColorBar *pColorBar=dynamic_cast<FXColorBar*>(*ppFrame);
+    if(pColorBar){
+      *ptr=reinterpret_cast<void*>(pColorBar);
+      return SWIG_TypeQuery("FXColorBar *");
+      }
+    FXColorRing *pColorRing=dynamic_cast<FXColorRing*>(*ppFrame);
+    if(pColorRing){
+      *ptr=reinterpret_cast<void*>(pColorRing);
+      return SWIG_TypeQuery("FXColorRing *");
+      }
+    FXColorWell *pColorWell=dynamic_cast<FXColorWell*>(*ppFrame);
+    if(pColorWell){
+      *ptr=reinterpret_cast<void*>(pColorWell);
+      return SWIG_TypeQuery("FXColorWell *");
+      }
+    FXColorWheel *pColorWheel=dynamic_cast<FXColorWheel*>(*ppFrame);
+    if(pColorWheel){
+      *ptr=reinterpret_cast<void*>(pColorWheel);
+      return SWIG_TypeQuery("FXColorWheel *");
+      }
+    FXDial *pDial=dynamic_cast<FXDial*>(*ppFrame);
+    if(pDial){
+      *ptr=reinterpret_cast<void*>(pDial);
+      return SWIG_TypeQuery("FXDial *");
+      }
+    FXDockHandler *pDockHandler=dynamic_cast<FXDockHandler*>(*ppFrame);
+    if(pDockHandler){
+      *ptr=reinterpret_cast<void*>(pDockHandler);
+      return SWIG_TypeQuery("FXDockHandler *");
+      }
+    FXHeader *pHeader=dynamic_cast<FXHeader*>(*ppFrame);
+    if(pHeader){
+      *ptr=reinterpret_cast<void*>(pHeader);
+      return SWIG_TypeQuery("FXHeader *");
+      }
+    FXImageFrame *pImageFrame=dynamic_cast<FXImageFrame*>(*ppFrame);
+    if(pImageFrame){
+      *ptr=reinterpret_cast<void*>(pImageFrame);
+      return SWIG_TypeQuery("FXImageFrame *");
+      }
+    FXKnob *pKnob=dynamic_cast<FXKnob*>(*ppFrame);
+    if(pKnob){
+      *ptr=reinterpret_cast<void*>(pKnob);
+      return SWIG_TypeQuery("FXKnob *");
+      }
+    FXLabel *pLabel=dynamic_cast<FXLabel*>(*ppFrame);
+    if(pLabel){
+      *ptr=reinterpret_cast<void*>(pLabel);
+      return SWIG_TypeQuery("FXLabel *");
+      }
+    FXProgressBar *pProgressBar=dynamic_cast<FXProgressBar*>(*ppFrame);
+    if(pProgressBar){
+      *ptr=reinterpret_cast<void*>(pProgressBar);
+      return SWIG_TypeQuery("FXProgressBar *");
+      }
+    FXRealSlider *pRealSlider=dynamic_cast<FXRealSlider*>(*ppFrame);
+    if(pRealSlider){
+      *ptr=reinterpret_cast<void*>(pRealSlider);
+      return SWIG_TypeQuery("FXRealSlider *");
+      }
+    FXSeparator *pSeparator=dynamic_cast<FXSeparator*>(*ppFrame);
+    if(pSeparator){
+      *ptr=reinterpret_cast<void*>(pSeparator);
+      return SWIG_TypeQuery("FXSeparator *");
+      }
+    FXSlider *pSlider=dynamic_cast<FXSlider*>(*ppFrame);
+    if(pSlider){
+      *ptr=reinterpret_cast<void*>(pSlider);
+      return SWIG_TypeQuery("FXSlider *");
+      }
+    FXStatusLine *pStatusLine=dynamic_cast<FXStatusLine*>(*ppFrame);
+    if(pStatusLine){
+      *ptr=reinterpret_cast<void*>(pStatusLine);
+      return SWIG_TypeQuery("FXStatusLine *");
+      }
+    FXTextField *pTextField=dynamic_cast<FXTextField*>(*ppFrame);
+    if(pTextField){
+      *ptr=reinterpret_cast<void*>(pTextField);
+      return SWIG_TypeQuery("FXTextField *");
+      }
+    FXToolBarTab *pToolBarTab=dynamic_cast<FXToolBarTab*>(*ppFrame);
+    if(pToolBarTab){
+      *ptr=reinterpret_cast<void*>(pToolBarTab);
+      return SWIG_TypeQuery("FXToolBarTab *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXComposite *new_FXComposite(FXComposite *p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0){
+      return new FXRbComposite(p,opts,x,y,w,h);
+      }
+
+static swig_type_info *FXComposite_dynamic_cast(void **ptr) {
+    FXComposite **ppComposite = reinterpret_cast<FXComposite **>(ptr);
+    FX4Splitter *p4Splitter=dynamic_cast<FX4Splitter*>(*ppComposite);
+    if(p4Splitter){
+      *ptr=reinterpret_cast<void*>(p4Splitter);
+      return SWIG_TypeQuery("FX4Splitter *");
+      }
+    FXMDIChild *pMDIChild=dynamic_cast<FXMDIChild*>(*ppComposite);
+    if(pMDIChild){
+      *ptr=reinterpret_cast<void*>(pMDIChild);
+      return SWIG_TypeQuery("FXMDIChild *");
+      }
+    FXPacker *pPacker=dynamic_cast<FXPacker*>(*ppComposite);
+    if(pPacker){
+      *ptr=reinterpret_cast<void*>(pPacker);
+      return SWIG_TypeQuery("FXPacker *");
+      }
+    FXRootWindow *pRootWindow=dynamic_cast<FXRootWindow*>(*ppComposite);
+    if(pRootWindow){
+      *ptr=reinterpret_cast<void*>(pRootWindow);
+      return SWIG_TypeQuery("FXRootWindow *");
+      }
+    FXScrollArea *pScrollArea=dynamic_cast<FXScrollArea*>(*ppComposite);
+    if(pScrollArea){
+      *ptr=reinterpret_cast<void*>(pScrollArea);
+      return SWIG_TypeQuery("FXScrollArea *");
+      }
+    FXShell *pShell=dynamic_cast<FXShell*>(*ppComposite);
+    if(pShell){
+      *ptr=reinterpret_cast<void*>(pShell);
+      return SWIG_TypeQuery("FXShell *");
+      }
+    FXSplitter *pSplitter=dynamic_cast<FXSplitter*>(*ppComposite);
+    if(pSplitter){
+      *ptr=reinterpret_cast<void*>(pSplitter);
+      return SWIG_TypeQuery("FXSplitter *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXRootWindow *new_FXRootWindow(FXApp *a,FXVisual *vis){
+      return new FXRbRootWindow(a,vis);
+      }
+SWIGINTERN FXShell *new_FXShell__SWIG_0(FXApp *a,FXuint opts,FXint x,FXint y,FXint w,FXint h){
+      return new FXRbShell(a,opts,x,y,w,h);
+      }
+SWIGINTERN FXShell *new_FXShell__SWIG_1(FXWindow *own,FXuint opts,FXint x,FXint y,FXint w,FXint h){
+      return new FXRbShell(own,opts,x,y,w,h);
+      }
+
+static swig_type_info *FXShell_dynamic_cast(void **ptr) {
+    FXShell **ppShell = reinterpret_cast<FXShell **>(ptr);
+    FXPopup *pPopup=dynamic_cast<FXPopup*>(*ppShell);
+    if(pPopup){
+      *ptr=reinterpret_cast<void*>(pPopup);
+      return SWIG_TypeQuery("FXPopup *");
+      }
+    FXToolTip *pToolTip=dynamic_cast<FXToolTip*>(*ppShell);
+    if(pToolTip){
+      *ptr=reinterpret_cast<void*>(pToolTip);
+      return SWIG_TypeQuery("FXToolTip *");
+      }
+    FXTopWindow *pTopWindow=dynamic_cast<FXTopWindow*>(*ppShell);
+    if(pTopWindow){
+      *ptr=reinterpret_cast<void*>(pTopWindow);
+      return SWIG_TypeQuery("FXTopWindow *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXPopup *new_FXPopup(FXWindow *owner,FXuint opts=POPUP_VERTICAL|FRAME_RAISED|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0){
+      return new FXRbPopup(owner,opts,x,y,w,h);
+      }
+
+static swig_type_info *FXPopup_dynamic_cast(void **ptr) {
+    FXPopup **ppPopup = reinterpret_cast<FXPopup **>(ptr);
+    FXMenuPane *pMenuPane=dynamic_cast<FXMenuPane*>(*ppPopup);
+    if(pMenuPane){
+      *ptr=reinterpret_cast<void*>(pMenuPane);
+      return SWIG_TypeQuery("FXMenuPane *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXTopWindow *new_FXTopWindow__SWIG_0(FXApp *a,FXString const &name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs){
+      return new FXRbTopWindow(a,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
+      }
+SWIGINTERN FXTopWindow *new_FXTopWindow__SWIG_1(FXWindow *owner,FXString const &name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs){
+      return new FXRbTopWindow(owner,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
+      }
+SWIGINTERN VALUE FXTopWindow_getWMBorders(FXTopWindow *self){
+      FXint left,right,top,bottom;
+      if(self->getWMBorders(left,right,top,bottom)){
+        return rb_ary_new3(4,INT2NUM(left),INT2NUM(right),INT2NUM(top),INT2NUM(bottom));
+        }
+      else{
+        return Qnil; // FIXME
+	}
+      }
+
+static swig_type_info *FXTopWindow_dynamic_cast(void **ptr) {
+    FXTopWindow **ppTopWindow = reinterpret_cast<FXTopWindow **>(ptr);
+    FXDialogBox *pDialogBox=dynamic_cast<FXDialogBox*>(*ppTopWindow);
+    if(pDialogBox){
+      *ptr=reinterpret_cast<void*>(pDialogBox);
+      return SWIG_TypeQuery("FXDialogBox *");
+      }
+    FXMainWindow *pMainWindow=dynamic_cast<FXMainWindow*>(*ppTopWindow);
+    if(pMainWindow){
+      *ptr=reinterpret_cast<void*>(pMainWindow);
+      return SWIG_TypeQuery("FXMainWindow *");
+      }
+    FXSplashWindow *pSplashWindow=dynamic_cast<FXSplashWindow*>(*ppTopWindow);
+    if(pSplashWindow){
+      *ptr=reinterpret_cast<void*>(pSplashWindow);
+      return SWIG_TypeQuery("FXSplashWindow *");
+      }
+    FXToolBarShell *pToolBarShell=dynamic_cast<FXToolBarShell*>(*ppTopWindow);
+    if(pToolBarShell){
+      *ptr=reinterpret_cast<void*>(pToolBarShell);
+      return SWIG_TypeQuery("FXToolBarShell *");
+      }
+    return 0;
+}
+
+SWIGINTERN FXMainWindow *new_FXMainWindow(FXApp *APP,FXString const &name,FXIcon *ic=0,FXIcon *mi=0,FXuint opts=DECOR_ALL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0,FXint hs=0,FXint vs=0){
+      return new FXRbMainWindow(APP,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
+      }
+SWIGINTERN FXSplashWindow *new_FXSplashWindow__SWIG_0(FXApp *a,FXIcon *ic,FXuint opts=SPLASH_SIMPLE,FXuint ms=5000){
+      /* Icon will be free`d by Rubys GC. */
+      opts &= ~SPLASH_OWNS_ICON;
+      return new FXRbSplashWindow(a,ic,opts,ms);
+      }
+SWIGINTERN FXSplashWindow *new_FXSplashWindow__SWIG_1(FXWindow *own,FXIcon *ic,FXuint opts=SPLASH_SIMPLE,FXuint ms=5000){
+      /* Icon will be free`d by Rubys GC. */
+      opts &= ~SPLASH_OWNS_ICON;
+      return new FXRbSplashWindow(own,ic,opts,ms);
+      }
+SWIGINTERN VALUE
+_wrap_setIgnoreExceptions(int argc, VALUE *argv, VALUE self) {
+  VALUE arg1 = (VALUE) 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = argv[0];
+  setIgnoreExceptions(arg1);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_MKUINT(int argc, VALUE *argv, VALUE self) {
+  FXushort arg1 ;
+  FXushort arg2 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  arg2 = NUM2UINT(argv[1]);
+  result = (FXuint)_MKUINT(arg1,arg2);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSEL(int argc, VALUE *argv, VALUE self) {
+  FXushort arg1 ;
+  FXushort arg2 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  arg2 = NUM2UINT(argv[1]);
+  result = (FXuint)_FXSEL(arg1,arg2);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSELTYPE(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXushort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXushort)_FXSELTYPE(arg1);
+  vresult = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSELID(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXushort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXushort)_FXSELID(arg1);
+  vresult = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRGB(int argc, VALUE *argv, VALUE self) {
+  FXuchar arg1 ;
+  FXuchar arg2 ;
+  FXuchar arg3 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  arg2 = NUM2UINT(argv[1]);
+  arg3 = NUM2UINT(argv[2]);
+  result = (FXuint)_FXRGB(arg1,arg2,arg3);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRGBA(int argc, VALUE *argv, VALUE self) {
+  FXuchar arg1 ;
+  FXuchar arg2 ;
+  FXuchar arg3 ;
+  FXuchar arg4 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  arg2 = NUM2UINT(argv[1]);
+  arg3 = NUM2UINT(argv[2]);
+  arg4 = NUM2UINT(argv[3]);
+  result = (FXuint)_FXRGBA(arg1,arg2,arg3,arg4);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXREDVAL(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXuchar result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXuchar)_FXREDVAL(arg1);
+  vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXGREENVAL(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXuchar result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXuchar)_FXGREENVAL(arg1);
+  vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXBLUEVAL(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXuchar result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXuchar)_FXBLUEVAL(arg1);
+  vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXALPHAVAL(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXuchar result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = (FXuchar)_FXALPHAVAL(arg1);
+  vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRGBACOMPVAL(int argc, VALUE *argv, VALUE self) {
+  FXuint arg1 ;
+  FXuchar arg2 ;
+  FXuchar result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  arg2 = NUM2UINT(argv[1]);
+  result = (FXuchar)_FXRGBACOMPVAL(arg1,arg2);
+  vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxsleep(int argc, VALUE *argv, VALUE self) {
+  unsigned int arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","fxsleep", 1, argv[0] ));
+  } 
+  arg1 = static_cast< unsigned int >(val1);
+  fxsleep(arg1);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxfilematch(int argc, VALUE *argv, VALUE self) {
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  FXuint arg3 = (FXuint) (FILEMATCH_NOESCAPE|FILEMATCH_FILE_NAME) ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","fxfilematch", 1, argv[0] ));
+  }
+  arg1 = reinterpret_cast< char * >(buf1);
+  res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","fxfilematch", 2, argv[1] ));
+  }
+  arg2 = reinterpret_cast< char * >(buf2);
+  if (argc > 2) {
+    arg3 = NUM2UINT(argv[2]);
+  }
+  result = (FXint)fxfilematch((char const *)arg1,(char const *)arg2,arg3);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return vresult;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_makeHiliteColor(int argc, VALUE *argv, VALUE self) {
+  FXColor arg1 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = to_FXColor(argv[0]);
+  result = (FXColor)makeHiliteColor(arg1);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_makeShadowColor(int argc, VALUE *argv, VALUE self) {
+  FXColor arg1 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = to_FXColor(argv[0]);
+  result = (FXColor)makeShadowColor(arg1);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxcolorfromname(int argc, VALUE *argv, VALUE self) {
+  FXchar *arg1 = (FXchar *) 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NIL_P(argv[0]) ? 0 : StringValuePtr(argv[0]);
+  result = (FXColor)fxcolorfromname((char const *)arg1);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxnamefromcolor(int argc, VALUE *argv, VALUE self) {
+  FXColor arg1 ;
+  FXchar *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = to_FXColor(argv[0]);
+  result = (FXchar *)fxnamefromcolor(arg1);
+  vresult = SWIG_FromCharPtr((const char *)result);
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxrgb_to_hsv(int argc, VALUE *argv, VALUE self) {
+  FXfloat arg1 ;
+  FXfloat arg2 ;
+  FXfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  VALUE result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_float(argv[0], &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "FXfloat","fxrgb_to_hsv", 1, argv[0] ));
+  } 
+  arg1 = static_cast< FXfloat >(val1);
+  ecode2 = SWIG_AsVal_float(argv[1], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","fxrgb_to_hsv", 2, argv[1] ));
+  } 
+  arg2 = static_cast< FXfloat >(val2);
+  ecode3 = SWIG_AsVal_float(argv[2], &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","fxrgb_to_hsv", 3, argv[2] ));
+  } 
+  arg3 = static_cast< FXfloat >(val3);
+  result = (VALUE)fxrgb_to_hsv(arg1,arg2,arg3);
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxhsv_to_rgb(int argc, VALUE *argv, VALUE self) {
+  FXfloat arg1 ;
+  FXfloat arg2 ;
+  FXfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  VALUE result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_float(argv[0], &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "FXfloat","fxhsv_to_rgb", 1, argv[0] ));
+  } 
+  arg1 = static_cast< FXfloat >(val1);
+  ecode2 = SWIG_AsVal_float(argv[1], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","fxhsv_to_rgb", 2, argv[1] ));
+  } 
+  arg2 = static_cast< FXfloat >(val2);
+  ecode3 = SWIG_AsVal_float(argv[2], &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","fxhsv_to_rgb", 3, argv[2] ));
+  } 
+  arg3 = static_cast< FXfloat >(val3);
+  result = (VALUE)fxhsv_to_rgb(arg1,arg2,arg3);
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxisconsole(int argc, VALUE *argv, VALUE self) {
+  FXchar *arg1 = (FXchar *) 0 ;
+  FXbool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NIL_P(argv[0]) ? 0 : StringValuePtr(argv[0]);
+  result = (FXbool)fxisconsole((char const *)arg1);
+  vresult = result ? Qtrue : Qfalse;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxversion(int argc, VALUE *argv, VALUE self) {
+  VALUE result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  result = (VALUE)_fxversion();
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxTraceLevel_get(VALUE self) {
+  VALUE _val;
+  
+  _val = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(fxTraceLevel));
+  return _val;
+}
+
+
+SWIGINTERN VALUE
+_wrap_fxTraceLevel_set(VALUE self, VALUE _val) {
+  {
+    unsigned int val;
+    int res = SWIG_AsVal_unsigned_SS_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""fxTraceLevel""' of type '""unsigned int""'");
+    }
+    fxTraceLevel = static_cast< unsigned int >(val);
+  }
+  return _val;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXStream;
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXStream_allocate(VALUE self)
+#else
+_wrap_FXStream_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXStream);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXStream(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXStream *result = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  if (argc > 0) {
+    res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject const *","FXStream", 1, argv[0] )); 
+    }
+    arg1 = reinterpret_cast< FXObject * >(argp1);
+  }
+  {
+    result = (FXStream *)new_FXStream((FXObject const *)arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_open(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  FXStreamDirection arg2 ;
+  FXuval arg3 = (FXuval) 8192 ;
+  FXuchar *arg4 = (FXuchar *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned long val3 ;
+  int ecode3 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","open", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  ecode2 = SWIG_AsVal_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXStreamDirection","open", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXStreamDirection >(val2);
+  if (argc > 1) {
+    ecode3 = SWIG_AsVal_unsigned_SS_long(argv[1], &val3);
+    if (!SWIG_IsOK(ecode3)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXuval","open", 3, argv[1] ));
+    } 
+    arg3 = static_cast< FXuval >(val3);
+  }
+  if (argc > 2) {
+    arg4 = NIL_P(argv[2]) ? 0 : reinterpret_cast<FXuchar*>(StringValuePtr(argv[2]));
+  }
+  result = (bool)(arg1)->open(arg2,arg3,arg4);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_getSpace(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuval result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","getSpace", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (FXuval)((FXStream const *)arg1)->getSpace();
+  vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_setSpace(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  FXuval arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","setSpace", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXuval","setSpace", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXuval >(val2);
+  (arg1)->setSpace(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_status(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXStreamStatus result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","status", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (FXStreamStatus)((FXStream const *)arg1)->status();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_eofq___(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","eof", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (bool)((FXStream const *)arg1)->eof();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_setError(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  FXStreamStatus arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","setError", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  ecode2 = SWIG_AsVal_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXStreamStatus","setError", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXStreamStatus >(val2);
+  (arg1)->setError(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_direction(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXStreamDirection result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","direction", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (FXStreamDirection)((FXStream const *)arg1)->direction();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_container(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXObject *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","container", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (FXObject *)((FXStream const *)arg1)->container();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXObject, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_getPosition(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXlong result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","position", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = ((FXStream const *)arg1)->position();
+  vresult = LONG2NUM(result);
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_swapBytes__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  bool arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","swapBytes", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  ecode2 = SWIG_AsVal_bool(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","swapBytes", 2, argv[0] ));
+  } 
+  arg2 = static_cast< bool >(val2);
+  (arg1)->swapBytes(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_swapBytes__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","swapBytes", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (bool)((FXStream const *)arg1)->swapBytes();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXStream_swapBytes(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[3];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 3) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXStream, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_FXStream_swapBytes__SWIG_1(nargs, args, self);
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXStream, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_bool(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        return _wrap_FXStream_swapBytes__SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 3, "FXStream.swapBytes", 
+    "    void FXStream.swapBytes(bool s)\n"
+    "    bool FXStream.swapBytes()\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_setBigEndian(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  bool arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","setBigEndian", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  ecode2 = SWIG_AsVal_bool(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","setBigEndian", 2, argv[0] ));
+  } 
+  arg2 = static_cast< bool >(val2);
+  (arg1)->setBigEndian(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_isBigEndian(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream const *","isBigEndian", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (bool)((FXStream const *)arg1)->isBigEndian();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_close(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","close", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (bool)FXStream_close(arg1);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_flush(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","flush", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  result = (bool)FXStream_flush(arg1);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXStream_setPosition(int argc, VALUE *argv, VALUE self) {
+  FXStream *arg1 = (FXStream *) 0 ;
+  FXlong arg2 ;
+  FXWhence arg3 = (FXWhence) FXFromStart ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXStream *","position", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXStream * >(argp1);
+  arg2 = static_cast<FXlong>(NUM2LONG(argv[0]));
+  if (argc > 1) {
+    ecode3 = SWIG_AsVal_int(argv[1], &val3);
+    if (!SWIG_IsOK(ecode3)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXWhence","position", 3, argv[1] ));
+    } 
+    arg3 = static_cast< FXWhence >(val3);
+  }
+  result = (bool)FXStream_position(arg1,arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXFileStream;
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXFileStream_allocate(VALUE self)
+#else
+_wrap_FXFileStream_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXFileStream);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXFileStream(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXFileStream *result = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  if (argc > 0) {
+    res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject const *","FXFileStream", 1, argv[0] )); 
+    }
+    arg1 = reinterpret_cast< FXObject * >(argp1);
+  }
+  {
+    result = (FXFileStream *)new_FXFileStream((FXObject const *)arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXFileStream_open(int argc, VALUE *argv, VALUE self) {
+  FXFileStream *arg1 = (FXFileStream *) 0 ;
+  FXString *arg2 = 0 ;
+  FXStreamDirection arg3 ;
+  FXuval arg4 = (FXuval) 8192 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  SwigValueWrapper< FXString > p2 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  unsigned long val4 ;
+  int ecode4 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXFileStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXFileStream *","open", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXFileStream * >(argp1);
+  p2 = to_FXString(argv[0]); arg2 = &p2;
+  ecode3 = SWIG_AsVal_int(argv[1], &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXStreamDirection","open", 3, argv[1] ));
+  } 
+  arg3 = static_cast< FXStreamDirection >(val3);
+  if (argc > 2) {
+    ecode4 = SWIG_AsVal_unsigned_SS_long(argv[2], &val4);
+    if (!SWIG_IsOK(ecode4)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "FXuval","open", 4, argv[2] ));
+    } 
+    arg4 = static_cast< FXuval >(val4);
+  }
+  result = (bool)(arg1)->open((FXString const &)*arg2,arg3,arg4);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXFileStream_getPosition(int argc, VALUE *argv, VALUE self) {
+  FXFileStream *arg1 = (FXFileStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXlong result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXFileStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXFileStream const *","position", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXFileStream * >(argp1);
+  result = ((FXFileStream const *)arg1)->position();
+  vresult = LONG2NUM(result);
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXFileStream_close(int argc, VALUE *argv, VALUE self) {
+  FXFileStream *arg1 = (FXFileStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXFileStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXFileStream *","close", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXFileStream * >(argp1);
+  result = (bool)FXFileStream_close(arg1);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXFileStream_flush(int argc, VALUE *argv, VALUE self) {
+  FXFileStream *arg1 = (FXFileStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXFileStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXFileStream *","flush", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXFileStream * >(argp1);
+  result = (bool)FXFileStream_flush(arg1);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXFileStream_setPosition(int argc, VALUE *argv, VALUE self) {
+  FXFileStream *arg1 = (FXFileStream *) 0 ;
+  FXlong arg2 ;
+  FXWhence arg3 = (FXWhence) FXFromStart ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXFileStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXFileStream *","position", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXFileStream * >(argp1);
+  arg2 = static_cast<FXlong>(NUM2LONG(argv[0]));
+  if (argc > 1) {
+    ecode3 = SWIG_AsVal_int(argv[1], &val3);
+    if (!SWIG_IsOK(ecode3)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXWhence","position", 3, argv[1] ));
+    } 
+    arg3 = static_cast< FXWhence >(val3);
+  }
+  result = (bool)FXFileStream_position(arg1,arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXMemoryStream;
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXMemoryStream_allocate(VALUE self)
+#else
+_wrap_FXMemoryStream_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXMemoryStream);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXMemoryStream(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXMemoryStream *result = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  if (argc > 0) {
+    res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject const *","FXMemoryStream", 1, argv[0] )); 
+    }
+    arg1 = reinterpret_cast< FXObject * >(argp1);
+  }
+  {
+    result = (FXMemoryStream *)new_FXMemoryStream((FXObject const *)arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXMemoryStream_open(int argc, VALUE *argv, VALUE self) {
+  FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
+  FXStreamDirection arg2 ;
+  VALUE arg3 = (VALUE) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryStream *","open", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXMemoryStream * >(argp1);
+  ecode2 = SWIG_AsVal_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXStreamDirection","open", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXStreamDirection >(val2);
+  arg3 = argv[1];
+  result = (bool)FXMemoryStream_open(arg1,arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXMemoryStream_takeBuffer(int argc, VALUE *argv, VALUE self) {
+  FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  VALUE result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryStream *","takeBuffer", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXMemoryStream * >(argp1);
+  result = (VALUE)FXMemoryStream_takeBuffer(arg1);
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXMemoryStream_giveBuffer(int argc, VALUE *argv, VALUE self) {
+  FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
+  VALUE arg2 = (VALUE) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryStream *","giveBuffer", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXMemoryStream * >(argp1);
+  arg2 = argv[0];
+  FXMemoryStream_giveBuffer(arg1,arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXMemoryStream_getPosition(int argc, VALUE *argv, VALUE self) {
+  FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXlong result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryStream, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryStream const *","position", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXMemoryStream * >(argp1);
+  result = ((FXMemoryStream const *)arg1)->position();
+  vresult = LONG2NUM(result);
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXSize;
+
+SWIGINTERN VALUE
+_wrap_FXSize_w_set(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","w", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->w = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_w_get(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","w", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  result = (FXshort) ((arg1)->w);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_h_set(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","h", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->h = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_h_get(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","h", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  result = (FXshort) ((arg1)->h);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXSize__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXSize *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  {
+    result = (FXSize *)new FXSize();
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXSize__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const &","FXSize", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","FXSize", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  {
+    result = (FXSize *)new FXSize((FXSize const &)*arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXSize_allocate(VALUE self)
+#else
+_wrap_FXSize_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXSize);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXSize__SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXshort arg1 ;
+  FXshort arg2 ;
+  FXSize *result = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  arg1 = NUM2INT(argv[0]);
+  arg2 = NUM2INT(argv[1]);
+  {
+    result = (FXSize *)new FXSize(arg1,arg2);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_new_FXSize(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[2];
+  int ii;
+  
+  argc = nargs;
+  if (argc > 2) SWIG_fail;
+  for (ii = 0; (ii < argc); ++ii) {
+    argv[ii] = args[ii];
+  }
+  if (argc == 0) {
+    return _wrap_new_FXSize__SWIG_0(nargs, args, self);
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_new_FXSize__SWIG_1(nargs, args, self);
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    {
+      _v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
+    }
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_new_FXSize__SWIG_2(nargs, args, self);
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 2, "FXSize.new", 
+    "    FXSize.new()\n"
+    "    FXSize.new(FXSize const &s)\n"
+    "    FXSize.new(FXshort ww, FXshort hh)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXSize.empty?
+
+  call-seq:
+    empty? -> bool
+
+Check if FXSize is empty.
+*/
+SWIGINTERN VALUE
+_wrap_FXSize_emptyq___(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","empty", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  result = (bool)((FXSize const *)arg1)->empty();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXSize.==
+
+  call-seq:
+    ==(s) -> bool
+
+Equality comparison operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXSize___eq__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","operator ==", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","operator ==", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","operator ==", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  result = (bool)FXSize_operator_Se__Se_((FXSize const *)arg1,(FXSize const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXSize.-@
+
+  call-seq:
+    -@ -> FXSize
+
+Negation operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXSize___neg__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  result = (arg1)->operator -();
+  vresult = SWIG_NewPointerObj((new FXSize(static_cast< const FXSize& >(result))), SWIGTYPE_p_FXSize, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_growN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = (FXSize *) &(arg1)->grow(arg2);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_growN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXSize *) &(arg1)->grow(arg2,arg3);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_growN_____SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  FXshort arg4 ;
+  FXshort arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  arg4 = NUM2INT(argv[2]);
+  arg5 = NUM2INT(argv[3]);
+  result = (FXSize *) &(arg1)->grow(arg2,arg3,arg4,arg5);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXSize_growN___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[6];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 6) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_FXSize_growN_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXSize_growN_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  if (argc == 5) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _v = (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) ? 1 : 0;
+            }
+            if (_v) {
+              return _wrap_FXSize_growN_____SWIG_2(nargs, args, self);
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 6, "FXSize.grow!", 
+    "    FXSize FXSize.grow!(FXshort margin)\n"
+    "    FXSize FXSize.grow!(FXshort hormargin, FXshort vermargin)\n"
+    "    FXSize & FXSize.grow!(FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_shrinkN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = (FXSize *) &(arg1)->shrink(arg2);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_shrinkN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXSize *) &(arg1)->shrink(arg2,arg3);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize_shrinkN_____SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  FXshort arg4 ;
+  FXshort arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  arg4 = NUM2INT(argv[2]);
+  arg5 = NUM2INT(argv[3]);
+  result = (FXSize *) &(arg1)->shrink(arg2,arg3,arg4,arg5);
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXSize, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXSize_shrinkN___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[6];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 6) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_FXSize_shrinkN_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXSize_shrinkN_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  if (argc == 5) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _v = (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) ? 1 : 0;
+            }
+            if (_v) {
+              return _wrap_FXSize_shrinkN_____SWIG_2(nargs, args, self);
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 6, "FXSize.shrink!", 
+    "    FXSize FXSize.shrink!(FXshort margin)\n"
+    "    FXSize FXSize.shrink!(FXshort hormargin, FXshort vermargin)\n"
+    "    FXSize & FXSize.shrink!(FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXSize.+
+
+  call-seq:
+    +(s) -> FXSize
+
+Add operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXSize___add__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXSize result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","operator +", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","operator +", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","operator +", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  result = FXSize_operator_Sa_((FXSize const *)arg1,(FXSize const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXSize(static_cast< const FXSize& >(result))), SWIGTYPE_p_FXSize, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXSize.-
+
+  call-seq:
+    -(s) -> FXSize
+
+Substraction operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXSize___sub__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXSize result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","operator -", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","operator -", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  result = FXSize_operator_Ss_((FXSize const *)arg1,(FXSize const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXSize(static_cast< const FXSize& >(result))), SWIGTYPE_p_FXSize, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize___mul__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","operator *", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = FXSize_operator_Sm_((FXSize const *)arg1,arg2);
+  vresult = SWIG_NewPointerObj((new FXSize(static_cast< const FXSize& >(result))), SWIGTYPE_p_FXSize, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXSize___div__(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = (FXSize *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXSize result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXSize, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const *","operator /", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = FXSize_operator_Sd_((FXSize const *)arg1,arg2);
+  vresult = SWIG_NewPointerObj((new FXSize(static_cast< const FXSize& >(result))), SWIGTYPE_p_FXSize, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXPoint;
+
+SWIGINTERN VALUE
+_wrap_FXPoint_x_set(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint_x_get(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  result = (FXshort) ((arg1)->x);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint_y_set(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint_y_get(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  result = (FXshort) ((arg1)->y);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXPoint__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXSize *arg1 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  FXPoint *result = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXSize const &","FXPoint", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","FXPoint", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXSize * >(argp1);
+  {
+    result = (FXPoint *)new FXPoint((FXSize const &)*arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXPoint__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  FXPoint *result = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const &","FXPoint", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","FXPoint", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  {
+    result = (FXPoint *)new FXPoint((FXPoint const &)*arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXPoint_allocate(VALUE self)
+#else
+_wrap_FXPoint_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXPoint);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXPoint__SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXshort arg1 = (FXshort) 0 ;
+  FXshort arg2 = (FXshort) 0 ;
+  FXPoint *result = 0 ;
+  
+  if ((argc < 0) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  if (argc > 0) {
+    arg1 = NUM2INT(argv[0]);
+  }
+  if (argc > 1) {
+    arg2 = NUM2INT(argv[1]);
+  }
+  {
+    result = (FXPoint *)new FXPoint(arg1,arg2);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_new_FXPoint(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[2];
+  int ii;
+  
+  argc = nargs;
+  if (argc > 2) SWIG_fail;
+  for (ii = 0; (ii < argc); ++ii) {
+    argv[ii] = args[ii];
+  }
+  if ((argc >= 0) && (argc <= 2)) {
+    int _v;
+    if (argc <= 0) {
+      return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
+    }
+    {
+      _v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
+    }
+    if (_v) {
+      if (argc <= 1) {
+        return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
+      }
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_new_FXPoint__SWIG_2(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_new_FXPoint__SWIG_1(nargs, args, self);
+    }
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXSize, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_new_FXPoint__SWIG_0(nargs, args, self);
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 2, "FXPoint.new", 
+    "    FXPoint.new(FXSize const &s)\n"
+    "    FXPoint.new(FXPoint const &p)\n"
+    "    FXPoint.new(FXshort xx, FXshort yy)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXPoint.==
+
+  call-seq:
+    ==(p) -> bool
+
+Equality comparison operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXPoint___eq__(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator ==", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","operator ==", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","operator ==", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  result = (bool)FXPoint_operator_Se__Se_((FXPoint const *)arg1,(FXPoint const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXPoint.-@
+
+  call-seq:
+    -@ -> FXPoint
+
+Negation operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXPoint___neg__(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  result = (arg1)->operator -();
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXPoint.+
+
+  call-seq:
+    +(p) -> FXPoint
+    +(s) -> FXPoint
+
+Add operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXPoint___add____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator +", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","operator +", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","operator +", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  result = FXPoint_operator_Sa___SWIG_0((FXPoint const *)arg1,(FXPoint const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint___add____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator +", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","operator +", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","operator +", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  result = FXPoint_operator_Sa___SWIG_1((FXPoint const *)arg1,(FXSize const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXPoint___add__(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[3];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 3) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXPoint___add____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXSize, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXPoint___add____SWIG_1(nargs, args, self);
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 3, "__add__", 
+    "    FXPoint __add__(FXPoint const &p)\n"
+    "    FXPoint __add__(FXSize const &s)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXPoint.-
+
+  call-seq:
+    -(p) -> FXPoint
+    -(s) -> FXPoint
+
+Substraction operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXPoint___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","operator -", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","operator -", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  result = FXPoint_operator_Ss___SWIG_0((FXPoint const *)arg1,(FXPoint const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","operator -", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","operator -", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  result = FXPoint_operator_Ss___SWIG_1((FXPoint const *)arg1,(FXSize const &)*arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXPoint___sub__(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[3];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 3) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXPoint___sub____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXSize, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXPoint___sub____SWIG_1(nargs, args, self);
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 3, "__sub__", 
+    "    FXPoint __sub__(FXPoint const &p)\n"
+    "    FXPoint __sub__(FXSize const &s)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint___mul__(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator *", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = FXPoint_operator_Sm_((FXPoint const *)arg1,arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXPoint___div__(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXPoint, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const *","operator /", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = FXPoint_operator_Sd_((FXPoint const *)arg1,arg2);
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXRectangle;
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_x_set(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_x_get(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = (FXshort) ((arg1)->x);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_y_set(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_y_get(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = (FXshort) ((arg1)->y);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_w_set(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","w", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->w = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_w_get(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","w", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = (FXshort) ((arg1)->w);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_h_set(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","h", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->h = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_h_get(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXshort result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","h", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = (FXshort) ((arg1)->h);
+  vresult = SWIG_From_short(static_cast< short >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRectangle__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  {
+    result = (FXRectangle *)new FXRectangle();
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRectangle__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXshort arg1 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  FXshort arg4 ;
+  FXRectangle *result = 0 ;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  arg1 = NUM2INT(argv[0]);
+  arg2 = NUM2INT(argv[1]);
+  arg3 = NUM2INT(argv[2]);
+  arg4 = NUM2INT(argv[3]);
+  {
+    result = (FXRectangle *)new FXRectangle(arg1,arg2,arg3,arg4);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRectangle__SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = 0 ;
+  FXSize *arg2 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRectangle *result = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const &","FXRectangle", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","FXRectangle", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_FXSize,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXSize const &","FXRectangle", 2, argv[1] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXSize const &","FXRectangle", 2, argv[1])); 
+  }
+  arg2 = reinterpret_cast< FXSize * >(argp2);
+  {
+    result = (FXRectangle *)new FXRectangle((FXPoint const &)*arg1,(FXSize const &)*arg2);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXRectangle_allocate(VALUE self)
+#else
+_wrap_FXRectangle_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXRectangle);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRectangle__SWIG_3(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRectangle *result = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXPoint const &","FXRectangle", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","FXRectangle", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXPoint * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","FXRectangle", 2, argv[1] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","FXRectangle", 2, argv[1])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  {
+    result = (FXRectangle *)new FXRectangle((FXPoint const &)*arg1,(FXPoint const &)*arg2);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_new_FXRectangle(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[4];
+  int ii;
+  
+  argc = nargs;
+  if (argc > 4) SWIG_fail;
+  for (ii = 0; (ii < argc); ++ii) {
+    argv[ii] = args[ii];
+  }
+  if (argc == 0) {
+    return _wrap_new_FXRectangle__SWIG_0(nargs, args, self);
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXSize, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_new_FXRectangle__SWIG_2(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXPoint, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_new_FXRectangle__SWIG_3(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 4) {
+    int _v;
+    {
+      _v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
+    }
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            return _wrap_new_FXRectangle__SWIG_1(nargs, args, self);
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 4, "FXRectangle.new", 
+    "    FXRectangle.new()\n"
+    "    FXRectangle.new(FXshort xx, FXshort yy, FXshort ww, FXshort hh)\n"
+    "    FXRectangle.new(FXPoint const &p, FXSize const &s)\n"
+    "    FXRectangle.new(FXPoint const &topleft, FXPoint const &bottomright)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRectangle.==
+
+  call-seq:
+    ==(p) -> bool
+
+Equality comparison operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRectangle___eq__(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXRectangle *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","operator ==", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle const &","operator ==", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","operator ==", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  result = (bool)FXRectangle_operator_Se__Se_((FXRectangle const *)arg1,(FXRectangle const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_containsq_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","contains", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","contains", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","contains", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  result = (bool)((FXRectangle const *)arg1)->contains((FXPoint const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_containsq_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","contains", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (bool)((FXRectangle const *)arg1)->contains(arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_containsq_____SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXRectangle *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","contains", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle const &","contains", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","contains", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  result = (bool)((FXRectangle const *)arg1)->contains((FXRectangle const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXRectangle_containsq___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[4];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 4) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXRectangle_containsq_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXRectangle, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXRectangle_containsq_____SWIG_2(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXRectangle_containsq_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 4, "FXRectangle.contains?", 
+    "    bool FXRectangle.contains?(FXPoint const &p)\n"
+    "    bool FXRectangle.contains?(FXshort xx, FXshort yy)\n"
+    "    bool FXRectangle.contains?(FXRectangle const &r)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_overlapsq___(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXRectangle *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","overlap", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle const &","overlap", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","overlap", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  result = (bool)FXRectangle_overlap((FXRectangle const *)arg1,(FXRectangle const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_moveN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXPoint *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","move", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXPoint,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXPoint const &","move", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXPoint const &","move", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXPoint * >(argp2);
+  result = (FXRectangle *) &(arg1)->move((FXPoint const &)*arg2);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_moveN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","move", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXRectangle *) &(arg1)->move(arg2,arg3);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXRectangle_moveN___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[4];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 4) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXPoint, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_FXRectangle_moveN_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXRectangle_moveN_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 4, "FXRectangle.move!", 
+    "    FXRectangle FXRectangle.move!(FXPoint const &p)\n"
+    "    FXRectangle & FXRectangle.move!(FXshort dx, FXshort dy)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_growN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = (FXRectangle *) &(arg1)->grow(arg2);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_growN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXRectangle *) &(arg1)->grow(arg2,arg3);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_growN_____SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  FXshort arg4 ;
+  FXshort arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","grow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  arg4 = NUM2INT(argv[2]);
+  arg5 = NUM2INT(argv[3]);
+  result = (FXRectangle *) &(arg1)->grow(arg2,arg3,arg4,arg5);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXRectangle_growN___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[6];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 6) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_FXRectangle_growN_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXRectangle_growN_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  if (argc == 5) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _v = (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) ? 1 : 0;
+            }
+            if (_v) {
+              return _wrap_FXRectangle_growN_____SWIG_2(nargs, args, self);
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 6, "FXRectangle.grow!", 
+    "    FXRectangle FXRectangle.grow!(FXshort margin)\n"
+    "    FXRectangle FXRectangle.grow!(FXshort hormargin, FXshort vermargin)\n"
+    "    FXRectangle & FXRectangle.grow!(FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_shrinkN_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  result = (FXRectangle *) &(arg1)->shrink(arg2);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_shrinkN_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXRectangle *) &(arg1)->shrink(arg2,arg3);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_shrinkN_____SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXshort arg2 ;
+  FXshort arg3 ;
+  FXshort arg4 ;
+  FXshort arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle *","shrink", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  arg4 = NUM2INT(argv[2]);
+  arg5 = NUM2INT(argv[3]);
+  result = (FXRectangle *) &(arg1)->shrink(arg2,arg3,arg4,arg5);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXRectangle_shrinkN___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[6];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 6) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_FXRectangle_shrinkN_____SWIG_0(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXRectangle_shrinkN_____SWIG_1(nargs, args, self);
+        }
+      }
+    }
+  }
+  if (argc == 5) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _v = (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) ? 1 : 0;
+            }
+            if (_v) {
+              return _wrap_FXRectangle_shrinkN_____SWIG_2(nargs, args, self);
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 6, "FXRectangle.shrink!", 
+    "    FXRectangle FXRectangle.shrink!(FXshort margin)\n"
+    "    FXRectangle FXRectangle.shrink!(FXshort hormargin, FXshort vermargin)\n"
+    "    FXRectangle & FXRectangle.shrink!(FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_tl(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","tl", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = ((FXRectangle const *)arg1)->tl();
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_tr(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","tr", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = ((FXRectangle const *)arg1)->tr();
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_bl(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","bl", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = ((FXRectangle const *)arg1)->bl();
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle_br(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPoint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","br", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  result = ((FXRectangle const *)arg1)->br();
+  vresult = SWIG_NewPointerObj((new FXPoint(static_cast< const FXPoint& >(result))), SWIGTYPE_p_FXPoint, SWIG_POINTER_OWN |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRectangle.+
+
+  call-seq:
+    +(p) -> FXRectangle
+
+Add operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRectangle___add__(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXRectangle *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRectangle result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","operator +", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle const &","operator +", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","operator +", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  result = FXRectangle_operator_Sa_((FXRectangle const *)arg1,(FXRectangle const &)*arg2);
+  {
+    FXRectangle* resultptr = new FXRectangle(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRectangle *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRectangle___mul__(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = (FXRectangle *) 0 ;
+  FXRectangle *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRectangle result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const *","operator *", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle const &","operator *", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","operator *", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  result = FXRectangle_operator_Sm_((FXRectangle const *)arg1,(FXRectangle const &)*arg2);
+  {
+    FXRectangle* resultptr = new FXRectangle(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRectangle *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXRegion;
+
+SWIGINTERN VALUE
+_wrap_new_FXRegion__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRegion *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  {
+    result = (FXRegion *)new FXRegion();
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRegion__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  FXRegion *result = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const &","FXRegion", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","FXRegion", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  {
+    result = (FXRegion *)new FXRegion((FXRegion const &)*arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRegion__SWIG_2(int argc, VALUE *argv, VALUE self) {
+  FXRectangle *arg1 = 0 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  FXRegion *result = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_FXRectangle,  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRectangle const &","FXRegion", 1, argv[0] )); 
+  }
+  if (!argp1) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRectangle const &","FXRegion", 1, argv[0])); 
+  }
+  arg1 = reinterpret_cast< FXRectangle * >(argp1);
+  {
+    result = (FXRegion *)new FXRegion((FXRectangle const &)*arg1);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRegion__SWIG_3(int argc, VALUE *argv, VALUE self) {
+  FXint arg1 ;
+  FXint arg2 ;
+  FXint arg3 ;
+  FXint arg4 ;
+  FXRegion *result = 0 ;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  arg1 = NUM2INT(argv[0]);
+  arg2 = NUM2INT(argv[1]);
+  arg3 = NUM2INT(argv[2]);
+  arg4 = NUM2INT(argv[3]);
+  {
+    result = (FXRegion *)new FXRegion(arg1,arg2,arg3,arg4);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXRegion_allocate(VALUE self)
+#else
+_wrap_FXRegion_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXRegion);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXRegion__SWIG_4(int argc, VALUE *argv, VALUE self) {
+  FXPoint *arg1 = (FXPoint *) 0 ;
+  FXuint arg2 ;
+  bool arg3 = (bool) 0 ;
+  bool val3 ;
+  int ecode3 = 0 ;
+  FXRegion *result = 0 ;
+  
+  if ((argc < 1) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  {
+    Check_Type(argv[0], T_ARRAY);
+    arg1 = new FXPoint[RARRAY_LEN(argv[0])];
+    arg2 = static_cast<FXuint>( RARRAY_LEN(argv[0]) );
+    for (FXuint i = 0; i < arg2; i++) {
+      FXPoint *pPoint;
+      Data_Get_Struct(rb_ary_entry(argv[0], i), FXPoint, pPoint);
+      arg1[i] = *pPoint;
+    }
+  }
+  if (argc > 1) {
+    ecode3 = SWIG_AsVal_bool(argv[1], &val3);
+    if (!SWIG_IsOK(ecode3)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","FXRegion", 3, argv[1] ));
+    } 
+    arg3 = static_cast< bool >(val3);
+  }
+  {
+    result = (FXRegion *)new FXRegion((FXPoint const *)arg1,arg2,arg3);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  {
+    delete [] arg1;
+  }
+  return self;
+fail:
+  {
+    delete [] arg1;
+  }
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_new_FXRegion(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[4];
+  int ii;
+  
+  argc = nargs;
+  if (argc > 4) SWIG_fail;
+  for (ii = 0; (ii < argc); ++ii) {
+    argv[ii] = args[ii];
+  }
+  if (argc == 0) {
+    return _wrap_new_FXRegion__SWIG_0(nargs, args, self);
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRegion, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_new_FXRegion__SWIG_1(nargs, args, self);
+    }
+  }
+  if (argc == 1) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRectangle, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      return _wrap_new_FXRegion__SWIG_2(nargs, args, self);
+    }
+  }
+  if ((argc >= 1) && (argc <= 2)) {
+    int _v;
+    {
+      _v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
+    }
+    if (_v) {
+      if (argc <= 1) {
+        return _wrap_new_FXRegion__SWIG_4(nargs, args, self);
+      }
+      {
+        int res = SWIG_AsVal_bool(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        return _wrap_new_FXRegion__SWIG_4(nargs, args, self);
+      }
+    }
+  }
+  if (argc == 4) {
+    int _v;
+    {
+      _v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
+    }
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            return _wrap_new_FXRegion__SWIG_3(nargs, args, self);
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 4, "FXRegion.new", 
+    "    FXRegion.new()\n"
+    "    FXRegion.new(FXRegion const &r)\n"
+    "    FXRegion.new(FXRectangle const &rect)\n"
+    "    FXRegion.new(FXint x, FXint y, FXint w, FXint h)\n"
+    "    FXRegion.new(FXPoint const *points, FXuint npoints, bool winding)\n");
+  
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRegion.empty?
+
+  call-seq:
+    empty? -> bool
+
+Check if FXRegion is empty.
+*/
+SWIGINTERN VALUE
+_wrap_FXRegion_emptyq___(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","empty", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  result = (bool)((FXRegion const *)arg1)->empty();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion_containsq_____SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXint arg2 ;
+  FXint arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","contains", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (bool)((FXRegion const *)arg1)->contains(arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion_containsq_____SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXint arg2 ;
+  FXint arg3 ;
+  FXint arg4 ;
+  FXint arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","contains", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  arg4 = NUM2INT(argv[2]);
+  arg5 = NUM2INT(argv[3]);
+  result = (bool)((FXRegion const *)arg1)->contains(arg2,arg3,arg4,arg5);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXRegion_containsq___(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[6];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 6) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRegion, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXRegion_containsq_____SWIG_0(nargs, args, self);
+        }
+      }
+    }
+  }
+  if (argc == 5) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXRegion, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          {
+            _v = (TYPE(argv[3]) == T_FIXNUM || TYPE(argv[3]) == T_BIGNUM) ? 1 : 0;
+          }
+          if (_v) {
+            {
+              _v = (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) ? 1 : 0;
+            }
+            if (_v) {
+              return _wrap_FXRegion_containsq_____SWIG_1(nargs, args, self);
+            }
+          }
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 6, "FXRegion.contains?", 
+    "    bool FXRegion.contains?(FXint x, FXint y)\n"
+    "    bool FXRegion.contains?(FXint x, FXint y, FXint w, FXint h)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion_bounds(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","bounds", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  result = ((FXRegion const *)arg1)->bounds();
+  {
+    FXRectangle* resultptr = new FXRectangle(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRectangle *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion_offsetN___(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXint arg2 ;
+  FXint arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRegion *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion *","offset", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  result = (FXRegion *) &(arg1)->offset(arg2,arg3);
+  vresult = FXRbGetRubyObj(result, "FXRegion *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRegion.+
+
+  call-seq:
+    +(other) -> FXRegion
+
+Add operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRegion___add__(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXRegion *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRegion result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","operator +", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRegion const &","operator +", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","operator +", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRegion * >(argp2);
+  result = FXRegion_operator_Sa_((FXRegion const *)arg1,(FXRegion const &)*arg2);
+  {
+    FXRegion* resultptr = new FXRegion(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRegion *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion___mul__(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXRegion *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRegion result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","operator *", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRegion const &","operator *", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","operator *", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRegion * >(argp2);
+  result = FXRegion_operator_Sm_((FXRegion const *)arg1,(FXRegion const &)*arg2);
+  {
+    FXRegion* resultptr = new FXRegion(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRegion *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRegion.-
+
+  call-seq:
+    -(other) -> FXRegion
+
+Substraction operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRegion___sub__(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXRegion *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRegion result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","operator -", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRegion const &","operator -", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","operator -", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRegion * >(argp2);
+  result = FXRegion_operator_Ss_((FXRegion const *)arg1,(FXRegion const &)*arg2);
+  {
+    FXRegion* resultptr = new FXRegion(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRegion *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRegion.^
+
+  call-seq:
+    ^(other) -> FXRegion
+
+XOR operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRegion___xor__(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXRegion *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  FXRegion result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","operator ^", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRegion const &","operator ^", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","operator ^", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRegion * >(argp2);
+  result = FXRegion_operator_Sx_((FXRegion const *)arg1,(FXRegion const &)*arg2);
+  {
+    FXRegion* resultptr = new FXRegion(result);
+    vresult = FXRbGetRubyObj(resultptr, "FXRegion *");
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+
+/*
+  Document-method: Core::FXRegion.==
+
+  call-seq:
+    ==(other) -> bool
+
+Equality comparison operator.
+*/
+SWIGINTERN VALUE
+_wrap_FXRegion___eq__(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  FXRegion *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion const *","operator ==", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXRegion,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRegion const &","operator ==", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXRegion const &","operator ==", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXRegion * >(argp2);
+  result = (bool)FXRegion_operator_Se__Se_((FXRegion const *)arg1,(FXRegion const &)*arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXRegion_reset(int argc, VALUE *argv, VALUE self) {
+  FXRegion *arg1 = (FXRegion *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXRegion, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXRegion *","reset", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXRegion * >(argp1);
+  (arg1)->reset();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXObject;
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXObject_allocate(VALUE self)
+#else
+_wrap_FXObject_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXObject);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXObject(int argc, VALUE *argv, VALUE self) {
+  FXObject *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  {
+    result = (FXObject *)new_FXObject();
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXObject_handle(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject *","handle", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXObject * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","handle", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = FXRbGetExpectedData(self, arg3, argv[2]);
+  result = (long)(arg1)->handle(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXObject_tryHandle(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res4 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject *","tryHandle", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXObject * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","tryHandle", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  res4 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg4), 0, 0);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "void *","tryHandle", 4, argv[2] )); 
+  }
+  result = (long)(arg1)->tryHandle(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXObject_save(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  FXStream *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject const *","save", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXObject * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","save", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","save", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  FXObject_save((FXObject const *)arg1,*arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXObject_load(int argc, VALUE *argv, VALUE self) {
+  FXObject *arg1 = (FXObject *) 0 ;
+  FXStream *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXObject *","load", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXObject * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","load", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","load", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  FXObject_load(arg1,*arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXAccelTable;
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_onKeyPress(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable *","onKeyPress", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","onKeyPress", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = to_FXEvent(argv[2]);
+  result = (long)(arg1)->onKeyPress(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_onKeyRelease(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable *","onKeyRelease", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","onKeyRelease", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = to_FXEvent(argv[2]);
+  result = (long)(arg1)->onKeyRelease(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXAccelTable_allocate(VALUE self)
+#else
+_wrap_FXAccelTable_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXAccelTable);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXAccelTable(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  {
+    result = (FXAccelTable *)new_FXAccelTable();
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_addAccel(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXHotKey arg2 ;
+  FXObject *arg3 = (FXObject *) 0 ;
+  FXSelector arg4 = (FXSelector) 0 ;
+  FXSelector arg5 = (FXSelector) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  
+  if ((argc < 1) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable *","addAccel", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  if (argc > 1) {
+    res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_FXObject, 0 |  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "FXObject *","addAccel", 3, argv[1] )); 
+    }
+    arg3 = reinterpret_cast< FXObject * >(argp3);
+  }
+  if (argc > 2) {
+    arg4 = NUM2UINT(argv[2]);
+  }
+  if (argc > 3) {
+    arg5 = NUM2UINT(argv[3]);
+  }
+  (arg1)->addAccel(arg2,arg3,arg4,arg5);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_removeAccel(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXHotKey arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable *","removeAccel", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->removeAccel(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_hasAccel(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXHotKey arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable const *","hasAccel", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  result = (bool)((FXAccelTable const *)arg1)->hasAccel(arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_targetOfAccel(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXHotKey arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXObject *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable const *","targetOfAccel", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  result = (FXObject *)((FXAccelTable const *)arg1)->targetOfAccel(arg2);
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXObject, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_save(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXStream *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable const *","save", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","save", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","save", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  FXAccelTable_save((FXAccelTable const *)arg1,*arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXAccelTable_load(int argc, VALUE *argv, VALUE self) {
+  FXAccelTable *arg1 = (FXAccelTable *) 0 ;
+  FXStream *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXAccelTable, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXAccelTable *","load", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXAccelTable * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","load", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","load", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  FXAccelTable_load(arg1,*arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_parseAccel(int argc, VALUE *argv, VALUE self) {
+  FXString *arg1 = 0 ;
+  SwigValueWrapper< FXString > p1 ;
+  FXHotKey result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  p1 = to_FXString(argv[0]); arg1 = &p1;
+  result = (FXHotKey)parseAccel((FXString const &)*arg1);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_unparseAccel(int argc, VALUE *argv, VALUE self) {
+  FXHotKey arg1 ;
+  FXString result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  arg1 = NUM2UINT(argv[0]);
+  result = unparseAccel(arg1);
+  vresult = to_ruby((&result)->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_parseHotKey(int argc, VALUE *argv, VALUE self) {
+  FXString *arg1 = 0 ;
+  SwigValueWrapper< FXString > p1 ;
+  FXHotKey result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  p1 = to_FXString(argv[0]); arg1 = &p1;
+  result = (FXHotKey)parseHotKey((FXString const &)*arg1);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_findHotKey(int argc, VALUE *argv, VALUE self) {
+  FXString *arg1 = 0 ;
+  SwigValueWrapper< FXString > p1 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  p1 = to_FXString(argv[0]); arg1 = &p1;
+  result = (FXint)findHotKey((FXString const &)*arg1);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_stripHotKey(int argc, VALUE *argv, VALUE self) {
+  FXString *arg1 = 0 ;
+  SwigValueWrapper< FXString > p1 ;
+  FXString result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  p1 = to_FXString(argv[0]); arg1 = &p1;
+  result = stripHotKey((FXString const &)*arg1);
+  vresult = to_ruby((&result)->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXEvent;
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXEvent_allocate(VALUE self)
+#else
+_wrap_FXEvent_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXEvent);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXEvent(int argc, VALUE *argv, VALUE self) {
+  FXEvent *result = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  result = (FXEvent *)new FXEvent();
+  DATA_PTR(self) = result;
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_type_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","type", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  if (arg1) (arg1)->type = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_type_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","type", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXuint) ((arg1)->type);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_time_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","time", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  if (arg1) (arg1)->time = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_time_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","time", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXuint) ((arg1)->time);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_win_x_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","win_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->win_x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_win_x_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","win_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->win_x);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_win_y_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","win_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->win_y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_win_y_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","win_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->win_y);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_root_x_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","root_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->root_x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_root_x_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","root_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->root_x);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_root_y_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","root_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->root_y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_root_y_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","root_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->root_y);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_state_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","state", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->state = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_state_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","state", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->state);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_code_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","code", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->code = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_code_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","code", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->code);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_text_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXString arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","text", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = to_FXString(argv[0]);
+  if (arg1) (arg1)->text = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_text_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXString result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","text", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result =  ((arg1)->text);
+  vresult = to_ruby((&result)->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_last_x_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","last_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->last_x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_last_x_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","last_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->last_x);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_last_y_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","last_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->last_y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_last_y_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","last_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->last_y);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_x_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->click_x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_x_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->click_x);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_y_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->click_y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_y_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->click_y);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rootclick_x_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rootclick_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->rootclick_x = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rootclick_x_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rootclick_x", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->rootclick_x);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rootclick_y_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rootclick_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->rootclick_y = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rootclick_y_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rootclick_y", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->rootclick_y);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_time_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_time", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  if (arg1) (arg1)->click_time = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_time_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_time", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXuint) ((arg1)->click_time);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_button_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_button", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  if (arg1) (arg1)->click_button = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_button_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_button", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXuint) ((arg1)->click_button);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_count_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_count", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  if (arg1) (arg1)->click_count = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_click_count_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","click_count", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXint) ((arg1)->click_count);
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_moved_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXbool arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","moved", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = to_FXbool(argv[0]);
+  if (arg1) (arg1)->moved = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_moved_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXbool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","moved", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXbool) ((arg1)->moved);
+  vresult = result ? Qtrue : Qfalse;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rect_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXRectangle *arg2 = (FXRectangle *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rect", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXRectangle, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRectangle *","rect", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXRectangle * >(argp2);
+  if (arg1) (arg1)->rect = *arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_rect_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRectangle *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","rect", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXRectangle *)& ((arg1)->rect);
+  vresult = FXRbGetRubyObj(result, "FXRectangle *");
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_synthetic_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXbool arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","synthetic", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  arg2 = to_FXbool(argv[0]);
+  if (arg1) (arg1)->synthetic = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_synthetic_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXbool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","synthetic", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXbool) ((arg1)->synthetic);
+  vresult = result ? Qtrue : Qfalse;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_target_set(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  FXDragType arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","target", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXDragType","target", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXDragType >(val2);
+  if (arg1) (arg1)->target = arg2;
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXEvent_target_get(int argc, VALUE *argv, VALUE self) {
+  FXEvent *arg1 = (FXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXDragType result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXEvent *","target", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXEvent * >(argp1);
+  result = (FXDragType) ((arg1)->target);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+static swig_class SwigClassFXChore;
+
+static swig_class SwigClassFXTimer;
+
+static swig_class SwigClassFXApp;
+
+SWIGINTERN VALUE
+_wrap_FXApp_onCmdQuit(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","onCmdQuit", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","onCmdQuit", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = 0;
+  result = (long)(arg1)->onCmdQuit(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_onCmdDump(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","onCmdDump", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","onCmdDump", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = 0;
+  result = (long)(arg1)->onCmdDump(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_onCmdHover(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  long result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 3) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","onCmdHover", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","onCmdHover", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  arg4 = 0;
+  result = (long)(arg1)->onCmdHover(arg2,arg3,arg4);
+  vresult = SWIG_From_long(static_cast< long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_copyright(int argc, VALUE *argv, VALUE self) {
+  VALUE result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  result = (VALUE)FXApp_copyright();
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_FXApp_allocate(VALUE self)
+#else
+_wrap_FXApp_allocate(int argc, VALUE *argv, VALUE self)
+#endif
+{
+  VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXApp);
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+  rb_obj_call_init(vresult, argc, argv);
+#endif
+  return vresult;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_FXApp(int argc, VALUE *argv, VALUE self) {
+  FXchar *arg1 = (FXchar *) "Application" ;
+  FXchar *arg2 = (FXchar *) "FoxDefault" ;
+  FXApp *result = 0 ;
+  
+  if ((argc < 0) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  if (argc > 0) {
+    arg1 = NIL_P(argv[0]) ? 0 : StringValuePtr(argv[0]);
+  }
+  if (argc > 1) {
+    arg2 = NIL_P(argv[1]) ? 0 : StringValuePtr(argv[1]);
+  }
+  {
+    result = (FXApp *)new_FXApp((char const *)arg1,(char const *)arg2);
+    DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
+    if(rb_block_given_p()){
+      rb_yield(self);
+    }
+  }
+  return self;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getAppName(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXString *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getAppName", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXString *) &((FXApp const *)arg1)->getAppName();
+  vresult = to_ruby(result->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getVendorName(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXString *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getVendorName", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXString *) &((FXApp const *)arg1)->getVendorName();
+  vresult = to_ruby(result->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_openDisplay(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXchar *arg2 = (FXchar *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","openDisplay", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  if (argc > 0) {
+    arg2 = NIL_P(argv[0]) ? 0 : StringValuePtr(argv[0]);
+  }
+  result = (bool)(arg1)->openDisplay((FXchar const *)arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_closeDisplay(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","closeDisplay", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (bool)(arg1)->closeDisplay();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDisplay(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuval result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDisplay", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuval)FXApp_getDisplay((FXApp const *)arg1);
+  vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_isInitialized(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","isInitialized", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (bool)((FXApp const *)arg1)->isInitialized();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getArgc(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getArgc", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXint)((FXApp const *)arg1)->getArgc();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getArgv(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXchar **result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getArgv", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXchar **)((FXApp const *)arg1)->getArgv();
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_hasInputMethodq___(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","hasInputMethod", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (bool)((FXApp const *)arg1)->hasInputMethod();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDefaultVisual(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXVisual *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDefaultVisual", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXVisual *)((FXApp const *)arg1)->getDefaultVisual();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXVisual, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setDefaultVisual(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXVisual *arg2 = (FXVisual *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setDefaultVisual", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXVisual, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVisual *","setDefaultVisual", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXVisual * >(argp2);
+  FXApp_setDefaultVisual(arg1,arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getMonoVisual(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXVisual *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getMonoVisual", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXVisual *)((FXApp const *)arg1)->getMonoVisual();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXVisual, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getRootWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRootWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getRootWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXRootWindow *)((FXApp const *)arg1)->getRootWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXRootWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setRootWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXRootWindow *arg2 = (FXRootWindow *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setRootWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXRootWindow, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXRootWindow *","setRootWindow", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXRootWindow * >(argp2);
+  (arg1)->setRootWindow(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_focusWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getFocusWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXWindow *)((FXApp const *)arg1)->getFocusWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getCursorWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getCursorWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXWindow *)((FXApp const *)arg1)->getCursorWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_activeWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getActiveWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXWindow *)((FXApp const *)arg1)->getActiveWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getPopupWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXPopup *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getPopupWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXPopup *)((FXApp const *)arg1)->getPopupWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXPopup, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_findWindowWithId(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXID arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","findWindowWithId", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = int_to_fxid(argv[0]);
+  result = (FXWindow *)((FXApp const *)arg1)->findWindowWithId(arg2);
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_findWindowAt(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 ;
+  FXint arg3 ;
+  FXID arg4 = (FXID) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","findWindowAt", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  arg3 = NUM2INT(argv[1]);
+  if (argc > 2) {
+    arg4 = int_to_fxid(argv[2]);
+  }
+  result = (FXWindow *)((FXApp const *)arg1)->findWindowAt(arg2,arg3,arg4);
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_addTimeout(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  FXuint arg4 = (FXuint) 1000 ;
+  void *arg5 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res5 ;
+  
+  if ((argc < 2) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","addTimeout", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","addTimeout", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  if (argc > 2) {
+    arg4 = NUM2UINT(argv[2]);
+  }
+  if (argc > 3) {
+    res5 = SWIG_ConvertPtr(argv[3],SWIG_as_voidptrptr(&arg5), 0, 0);
+    if (!SWIG_IsOK(res5)) {
+      SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "void *","addTimeout", 5, argv[3] )); 
+    }
+  }
+  (arg1)->addTimeout(arg2,arg3,arg4,arg5);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_removeTimeout(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","removeTimeout", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","removeTimeout", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  (arg1)->removeTimeout(arg2,arg3);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_hasTimeoutq___(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","hasTimeout", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","hasTimeout", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  result = (bool)((FXApp const *)arg1)->hasTimeout(arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_remainingTimeout(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","remainingTimeout", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","remainingTimeout", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  result = (FXuint)(arg1)->remainingTimeout(arg2,arg3);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_handleTimeouts(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","handleTimeouts", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->handleTimeouts();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_addChore(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *arg4 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res4 ;
+  
+  if ((argc < 2) || (argc > 3)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","addChore", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","addChore", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  if (argc > 2) {
+    res4 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg4), 0, 0);
+    if (!SWIG_IsOK(res4)) {
+      SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "void *","addChore", 4, argv[2] )); 
+    }
+  }
+  (arg1)->addChore(arg2,arg3,arg4);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_removeChore(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","removeChore", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","removeChore", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  (arg1)->removeChore(arg2,arg3);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_hasChoreq___(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXObject *arg2 = (FXObject *) 0 ;
+  FXSelector arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","hasChore", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXObject *","hasChore", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXObject * >(argp2);
+  arg3 = NUM2UINT(argv[1]);
+  result = (bool)((FXApp const *)arg1)->hasChore(arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_addSignal(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  VALUE arg2 = (VALUE) 0 ;
+  FXObject *arg3 = (FXObject *) 0 ;
+  FXSelector arg4 ;
+  FXbool arg5 = (FXbool) 0 ;
+  FXuint arg6 = (FXuint) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  
+  if ((argc < 3) || (argc > 5)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","addSignal", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = argv[0];
+  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "FXObject *","addSignal", 3, argv[1] )); 
+  }
+  arg3 = reinterpret_cast< FXObject * >(argp3);
+  arg4 = NUM2UINT(argv[2]);
+  if (argc > 3) {
+    arg5 = to_FXbool(argv[3]);
+  }
+  if (argc > 4) {
+    arg6 = NUM2UINT(argv[4]);
+  }
+  FXApp_addSignal(arg1,arg2,arg3,arg4,arg5,arg6);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_removeSignal(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  VALUE arg2 = (VALUE) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","removeSignal", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = argv[0];
+  FXApp_removeSignal(arg1,arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_addInput(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  VALUE arg2 = (VALUE) 0 ;
+  FXuint arg3 ;
+  FXObject *arg4 = (FXObject *) 0 ;
+  FXSelector arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","addInput", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = argv[0];
+  arg3 = NUM2UINT(argv[1]);
+  res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_FXObject, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "FXObject *","addInput", 4, argv[2] )); 
+  }
+  arg4 = reinterpret_cast< FXObject * >(argp4);
+  arg5 = NUM2UINT(argv[3]);
+  result = (bool)FXApp_addInput(arg1,arg2,arg3,arg4,arg5);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_removeInput(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  VALUE arg2 = (VALUE) 0 ;
+  FXuint arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","removeInput", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = argv[0];
+  arg3 = NUM2UINT(argv[1]);
+  result = (bool)FXApp_removeInput(arg1,arg2,arg3);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getKeyState(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getKeyState", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  result = (bool)((FXApp const *)arg1)->getKeyState(arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_peekEvent(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","peekEvent", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (bool)(arg1)->peekEvent();
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_isModal(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXWindow *arg2 = (FXWindow *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  bool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","isModal", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXWindow, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXWindow *","isModal", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXWindow * >(argp2);
+  result = (bool)((FXApp const *)arg1)->isModal(arg2);
+  vresult = SWIG_From_bool(static_cast< bool >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getModalWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getModalWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXWindow *)((FXApp const *)arg1)->getModalWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getModality(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXModality result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getModality", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXModality)((FXApp const *)arg1)->getModality();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_stop(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 = (FXint) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","stop", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  if (argc > 0) {
+    arg2 = NUM2INT(argv[0]);
+  }
+  (arg1)->stop(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_stopModal__SWIG_0(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXWindow *arg2 = (FXWindow *) 0 ;
+  FXint arg3 = (FXint) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","stopModal", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXWindow, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXWindow *","stopModal", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXWindow * >(argp2);
+  if (argc > 1) {
+    arg3 = NUM2INT(argv[1]);
+  }
+  (arg1)->stopModal(arg2,arg3);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_stopModal__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 = (FXint) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","stopModal", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  if (argc > 0) {
+    arg2 = NUM2INT(argv[0]);
+  }
+  (arg1)->stopModal(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE _wrap_FXApp_stopModal(int nargs, VALUE *args, VALUE self) {
+  int argc;
+  VALUE argv[4];
+  int ii;
+  
+  argc = nargs + 1;
+  argv[0] = self;
+  if (argc > 4) SWIG_fail;
+  for (ii = 1; (ii < argc); ++ii) {
+    argv[ii] = args[ii-1];
+  }
+  if ((argc >= 1) && (argc <= 2)) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXApp, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      if (argc <= 1) {
+        return _wrap_FXApp_stopModal__SWIG_1(nargs, args, self);
+      }
+      {
+        _v = (TYPE(argv[1]) == T_FIXNUM || TYPE(argv[1]) == T_BIGNUM) ? 1 : 0;
+      }
+      if (_v) {
+        return _wrap_FXApp_stopModal__SWIG_1(nargs, args, self);
+      }
+    }
+  }
+  if ((argc >= 2) && (argc <= 3)) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXApp, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      void *vptr = 0;
+      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXWindow, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        if (argc <= 2) {
+          return _wrap_FXApp_stopModal__SWIG_0(nargs, args, self);
+        }
+        {
+          _v = (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) ? 1 : 0;
+        }
+        if (_v) {
+          return _wrap_FXApp_stopModal__SWIG_0(nargs, args, self);
+        }
+      }
+    }
+  }
+  
+fail:
+  Ruby_Format_OverloadedError( argc, 4, "FXApp.stopModal", 
+    "    void FXApp.stopModal(FXWindow *window, FXint value)\n"
+    "    void FXApp.stopModal(FXint value)\n");
+  
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_forceRefresh(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","forceRefresh", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->forceRefresh();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_refresh(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","refresh", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->refresh();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_flush(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  bool arg2 = (bool) false ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  bool val2 ;
+  int ecode2 = 0 ;
+  
+  if ((argc < 0) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","flush", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  if (argc > 0) {
+    ecode2 = SWIG_AsVal_bool(argv[0], &val2);
+    if (!SWIG_IsOK(ecode2)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","flush", 2, argv[0] ));
+    } 
+    arg2 = static_cast< bool >(val2);
+  }
+  (arg1)->flush(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_repaint(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","repaint", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->repaint();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_reg(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXRegistry *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","reg", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXRegistry *) &(arg1)->reg();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXRegistry, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_registerDragType(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXString *arg2 = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  SwigValueWrapper< FXString > p2 ;
+  FXDragType result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","registerDragType", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  p2 = to_FXString(argv[0]); arg2 = &p2;
+  result = (FXDragType)((FXApp const *)arg1)->registerDragType((FXString const &)*arg2);
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDragTypeName(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXDragType arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  FXString result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDragTypeName", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXDragType","getDragTypeName", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXDragType >(val2);
+  result = ((FXApp const *)arg1)->getDragTypeName(arg2);
+  vresult = to_ruby((&result)->text());
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDragWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDragWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXWindow *)((FXApp const *)arg1)->getDragWindow();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_beep(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","beep", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->beep();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_instance(int argc, VALUE *argv, VALUE self) {
+  FXApp *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  result = (FXApp *)FXApp::instance();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXApp, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setNormalFont(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXFont *arg2 = (FXFont *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setNormalFont", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXFont, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXFont *","setNormalFont", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXFont * >(argp2);
+  FXApp_setNormalFont(arg1,arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getNormalFont(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXFont *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getNormalFont", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXFont *)((FXApp const *)arg1)->getNormalFont();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXFont, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_beginWaitCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","beginWaitCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->beginWaitCursor();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_endWaitCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","endWaitCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  (arg1)->endWaitCursor();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setWaitCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXCursor *arg2 = (FXCursor *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setWaitCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXCursor, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXCursor *","setWaitCursor", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXCursor * >(argp2);
+  FXApp_setWaitCursor(arg1,arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getWaitCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXCursor *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getWaitCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXCursor *)((FXApp const *)arg1)->getWaitCursor();
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXCursor, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDefaultCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXDefaultCursor arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  FXCursor *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDefaultCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  ecode2 = SWIG_AsVal_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXDefaultCursor","getDefaultCursor", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXDefaultCursor >(val2);
+  result = (FXCursor *)((FXApp const *)arg1)->getDefaultCursor(arg2);
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXCursor, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setDefaultCursor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXDefaultCursor arg2 ;
+  FXCursor *arg3 = (FXCursor *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setDefaultCursor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  ecode2 = SWIG_AsVal_int(argv[0], &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXDefaultCursor","setDefaultCursor", 2, argv[0] ));
+  } 
+  arg2 = static_cast< FXDefaultCursor >(val2);
+  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_FXCursor, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "FXCursor *","setDefaultCursor", 3, argv[1] )); 
+  }
+  arg3 = reinterpret_cast< FXCursor * >(argp3);
+  FXApp_setDefaultCursor(arg1,arg2,arg3);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_writeWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXStream *arg2 = 0 ;
+  FXWindow *arg3 = (FXWindow *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  FXbool result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 2) || (argc > 2)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","writeWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","writeWindow", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","writeWindow", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_FXWindow, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "FXWindow *","writeWindow", 3, argv[1] )); 
+  }
+  arg3 = reinterpret_cast< FXWindow * >(argp3);
+  result = (FXbool)(arg1)->writeWindow(*arg2,arg3);
+  vresult = result ? Qtrue : Qfalse;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_readWindow(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXStream *arg2 = 0 ;
+  FXWindow **arg3 = 0 ;
+  FXWindow *arg4 = (FXWindow *) 0 ;
+  FXWindow *arg5 = (FXWindow *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
+  FXWindow *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 4) || (argc > 4)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","readWindow", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","readWindow", 2, argv[0] )); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","readWindow", 2, argv[0])); 
+  }
+  arg2 = reinterpret_cast< FXStream * >(argp2);
+  res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_p_FXWindow,  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "FXWindow *&","readWindow", 3, argv[1] )); 
+  }
+  if (!argp3) {
+    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXWindow *&","readWindow", 3, argv[1])); 
+  }
+  arg3 = reinterpret_cast< FXWindow ** >(argp3);
+  res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_FXWindow, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "FXWindow *","readWindow", 4, argv[2] )); 
+  }
+  arg4 = reinterpret_cast< FXWindow * >(argp4);
+  res5 = SWIG_ConvertPtr(argv[3], &argp5,SWIGTYPE_p_FXWindow, 0 |  0 );
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "FXWindow *","readWindow", 5, argv[3] )); 
+  }
+  arg5 = reinterpret_cast< FXWindow * >(argp5);
+  {
+    if (!arg5) {
+      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
+    }
+  }
+  result = (FXWindow *)FXApp_readWindow(arg1,*arg2,*arg3,arg4,arg5);
+  {
+    swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXWindow, (void **) &result);
+    vresult = FXRbGetRubyObj(result, ty);
+  }
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_mutex(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXMutex *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","mutex", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXMutex *) &(arg1)->mutex();
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXMutex, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setTranslator(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXTranslator *arg2 = (FXTranslator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setTranslator", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXTranslator, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXTranslator *","setTranslator", 2, argv[0] )); 
+  }
+  arg2 = reinterpret_cast< FXTranslator * >(argp2);
+  (arg1)->setTranslator(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getTranslator(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXTranslator *result = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getTranslator", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXTranslator *)((FXApp const *)arg1)->getTranslator();
+  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXTranslator, 0 |  0 );
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getTypingSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getTypingSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getTypingSpeed();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getClickSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getClickSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getClickSpeed();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getScrollSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getScrollSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getScrollSpeed();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getScrollDelay(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getScrollDelay", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getScrollDelay();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getBlinkSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getBlinkSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getBlinkSpeed();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getAnimSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getAnimSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getAnimSpeed();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getMenuPause(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getMenuPause", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getMenuPause();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getTooltipPause(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getTooltipPause", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getTooltipPause();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getTooltipTime(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXuint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getTooltipTime", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXuint)((FXApp const *)arg1)->getTooltipTime();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getDragDelta(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getDragDelta", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXint)((FXApp const *)arg1)->getDragDelta();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getWheelLines(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getWheelLines", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXint)((FXApp const *)arg1)->getWheelLines();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_scrollBarSize(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXint result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getScrollBarSize", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXint)((FXApp const *)arg1)->getScrollBarSize();
+  vresult = SWIG_From_int(static_cast< int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setTypingSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setTypingSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setTypingSpeed(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setClickSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setClickSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setClickSpeed(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setScrollSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setScrollSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setScrollSpeed(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setScrollDelay(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setScrollDelay", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setScrollDelay(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setBlinkSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setBlinkSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setBlinkSpeed(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setAnimSpeed(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setAnimSpeed", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setAnimSpeed(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setMenuPause(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setMenuPause", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setMenuPause(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setTooltipPause(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setTooltipPause", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setTooltipPause(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setTooltipTime(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXuint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setTooltipTime", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2UINT(argv[0]);
+  (arg1)->setTooltipTime(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setDragDelta(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setDragDelta", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  (arg1)->setDragDelta(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_setWheelLines(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setWheelLines", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  (arg1)->setWheelLines(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_scrollBarSizee___(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  FXint arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  
+  if ((argc < 1) || (argc > 1)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp *","setScrollBarSize", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  arg2 = NUM2INT(argv[0]);
+  (arg1)->setScrollBarSize(arg2);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getBorderColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getBorderColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getBorderColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getBaseColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getBaseColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getBaseColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getHiliteColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getHiliteColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getHiliteColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getShadowColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getShadowColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getShadowColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getBackColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getBackColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getBackColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getForeColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getForeColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getForeColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getSelforeColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getSelforeColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)((FXApp const *)arg1)->getSelforeColor();
+  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_FXApp_getSelbackColor(int argc, VALUE *argv, VALUE self) {
+  FXApp *arg1 = (FXApp *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  FXColor result;
+  VALUE vresult = Qnil;
+  
+  if ((argc < 0) || (argc > 0)) {
+    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+  }
+  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXApp, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXApp const *","getSelbackColor", 1, self )); 
+  }
+  arg1 = reinterpret_cast< FXApp * >(argp1);
+  result = (FXColor)(