[DRE-commits] [ruby-gnome2] 02/31: New upstream version 3.0.0

Daisuke Higuchi dai at moszumanska.debian.org
Mon Oct 10 13:40:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

dai pushed a commit to branch exp/debian
in repository ruby-gnome2.

commit 9a8532517ee029a7f7457be2e07917233f3949c4
Author: HIGUCHI Daisuke (VDR dai) <dai at debian.org>
Date:   Sun Oct 9 21:56:09 2016 +0900

    New upstream version 3.0.0
---
 .dir-locals.el                                     |    7 +
 .gitignore                                         |   37 +
 .travis.yml                                        |   25 +
 COPYING.GFDL                                       |  451 +++
 Gemfile                                            |   27 +
 Gemfile.local.sample                               |   18 +
 NEWS                                               |  184 ++
 README.md                                          |   25 +-
 Rakefile                                           |   29 +-
 atk/Rakefile                                       |    2 +-
 build/README.md                                    |   12 +
 build/Vagrantfile                                  |   30 +
 build/build-win32.sh                               |    6 +
 build/build-win64.sh                               |    9 +
 build/build-windows.sh                             |  135 +
 clutter-gstreamer/Rakefile                         |    4 +-
 clutter-gstreamer/lib/clutter-gst.rb               |   14 +-
 clutter-gstreamer/test/run-test.rb                 |   12 +-
 .../test/test-clutter-gst-video-sink.rb            |   25 +
 clutter-gstreamer/test/test-clutter-gst.rb         |   26 -
 clutter-gtk/Rakefile                               |    8 +-
 clutter-gtk/lib/clutter-gtk.rb                     |   17 +-
 .../patches/0001-Use-no-undefined-ld-flag.patch    |   40 -
 ...01-actor-fix-clutter-win32.h-include-path.patch |   28 -
 clutter-gtk/test/run-test.rb                       |   14 +-
 clutter/Rakefile                                   |   10 +-
 clutter/lib/clutter.rb                             |   21 +-
 clutter/lib/clutter/version.rb                     |   28 +
 .../json-glib-1.0.2-add-missing-config-h.diff      |   21 -
 clutter/test/run-test.rb                           |   14 +-
 clutter/test/test-clutter-version.rb               |   47 +
 extconf.rb                                         |    5 +-
 gdk3-no-gi/COPYING.LIB                             |  502 ++++
 gdk3-no-gi/README.md                               |   25 +
 gdk3-no-gi/Rakefile                                |   57 +
 gdk3-no-gi/ext/gdk3-no-gi/depend                   |   11 +
 gdk3-no-gi/ext/gdk3-no-gi/extconf.rb               |  117 +
 gdk3-no-gi/ext/gdk3-no-gi/gdk3.def                 |   12 +
 gdk3-no-gi/ext/gdk3-no-gi/init.c                   |   35 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdk.c                  |  491 ++++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdk3.h                 |   73 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdk3conversions.h      |  121 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdk3private.h          |   85 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkatom.c              |  122 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkcairo.c             |   91 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkcolor.c             |  137 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkconst.c             |   33 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkcursor.c            |   92 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevice.c            |  253 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevicemanager.c     |   39 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplay.c           |  434 +++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplaymanager.c    |   55 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkdragcontext.c       |  191 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkevent.c             | 1173 ++++++++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkgeometry.c          |  253 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeymap.c            |  151 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeyval.c            |  108 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkpango.c             |  197 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkpangorenderer.c     |  144 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkpixbuf.c            |   65 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c          |  305 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkrectangle.c         |  140 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgb.c               |  199 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgba.c              |  142 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkscreen.c            |  443 +++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkselection.c         |  146 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkthreads.c           |   77 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdktimecoord.c         |  133 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkvisual.c            |  251 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindow.c            | 1069 +++++++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindowattr.c        |  191 ++
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11.c               |  102 +
 gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11x11window.c      |   66 +
 gdk3-no-gi/extconf.rb                              |   49 +
 gdk3-no-gi/lib/gdk3.rb                             |    3 +
 gdk3-no-gi/lib/gdk3/base.rb                        |   59 +
 gdk3-no-gi/lib/gdk3/deprecated.rb                  |  165 ++
 gdk3-no-gi/patches/gdk+-3.10.6-remove-def-use.diff |  106 +
 {gdk3 => gdk3-no-gi}/test/gdk-test-utils.rb        |    0
 gdk3-no-gi/test/run-test.rb                        |   50 +
 gdk3-no-gi/test/test-gdk-color.rb                  |   24 +
 gdk3-no-gi/test/test-gdk-event.rb                  |  704 +++++
 gdk3-no-gi/test/test-gdk-geometry.rb               |   24 +
 gdk3-no-gi/test/test-gdk-pixbuf.rb                 |   51 +
 gdk3-no-gi/test/test-gdk-rectangle.rb              |   24 +
 gdk3-no-gi/test/test-gdk-rgba.rb                   |   24 +
 gdk3-no-gi/test/test-gdk-window-attr.rb            |   32 +
 gdk3/Rakefile                                      |   21 +-
 gdk3/lib/gdk3.rb                                   |    3 +
 gdk3/lib/gdk3/cursor.rb                            |   31 +
 gdk3/lib/gdk3/deprecated.rb                        |   52 +-
 gdk3/lib/gdk3/loader.rb                            |   48 +-
 gdk3/lib/gdk3/rectangle.rb                         |   18 +-
 gdk3/lib/gdk3/rgba.rb                              |   31 +-
 gdk3/lib/gdk3/screen.rb                            |   40 +
 gdk3/patches/gtk+-3.16.6-add-missing-exeext.diff   |   24 +
 gdk3/test/fixture/ruby-gnome2-logo.png             |  Bin 0 -> 7200 bytes
 gdk3/test/gdk-test-utils.rb                        |   13 +
 gdk3/test/test-gdk-atom.rb                         |   24 +
 gdk3/test/test-gdk-cursor.rb                       |   44 +
 gdk3/test/test-gdk-event-mask.rb                   |   21 +
 gdk3/test/test-gdk-keyval.rb                       |   12 +-
 gdk3/test/test-gdk-rectangle.rb                    |   21 +-
 gdk3/test/test-gdk-rgba.rb                         |   65 +
 gdk3/test/test-gdk-selection.rb                    |   29 +
 gdk_pixbuf2/Rakefile                               |   16 +
 gio2/Makefile                                      |   20 -
 gio2/Makefile.lib                                  |  226 --
 gio2/ext/gio2/Makefile                             |  244 --
 gio2/ext/gio2/rb-gio2-application.c                |   54 +
 gio2/ext/gio2/rb-gio2.c                            |   49 +-
 gio2/ext/gio2/rb-gio2.h                            |    3 +-
 gio2/ext/gio2/ruby-gio2.pc                         |    3 -
 gio2/lib/gio2.rb                                   |    3 +-
 gio2/lib/gio2/action-map.rb                        |   57 +
 gio2/lib/gio2/action.rb                            |   30 +
 gio2/lib/gio2/loader.rb                            |   10 +-
 gio2/lib/gio2/simple-action.rb                     |   27 +
 gio2/test/fixture/resource/ruby-gio2.gresource     |  Bin 7440 -> 0 bytes
 gio2/test/run-test.rb                              |    6 +-
 gio2/test/test-action-map.rb                       |   51 +
 gio2/test/test-file-monitor.rb                     |   10 +-
 gio2/test/test-mount.rb                            |   23 +
 gio2/test/test-simple-action.rb                    |   44 +
 glib2/Makefile                                     |   20 -
 glib2/Makefile.lib                                 |  242 --
 glib2/README                                       |   40 -
 glib2/README.md                                    |   42 +
 glib2/Rakefile                                     |   61 +-
 glib2/ext/glib2/Makefile                           |  256 --
 glib2/ext/glib2/extconf.rb                         |    2 +-
 glib2/ext/glib2/glib-enum-types.c                  | 1233 --------
 glib2/ext/glib2/glib-enum-types.h                  |  154 -
 glib2/ext/glib2/glib2.def                          |    8 +
 glib2/ext/glib2/rbglib-variant-type.c              |  296 ++
 glib2/ext/glib2/rbglib-variant.c                   |  132 +
 glib2/ext/glib2/rbglib.c                           |   17 +-
 glib2/ext/glib2/rbglib.h                           |   25 +-
 glib2/ext/glib2/rbglib2conversions.h               |    7 +-
 glib2/ext/glib2/rbglib_fileutils.c                 |    6 +-
 glib2/ext/glib2/rbglib_maincontext.c               |   40 +-
 glib2/ext/glib2/rbgobj_binding.c                   |   48 +
 glib2/ext/glib2/rbgobj_boxed.c                     |    8 +-
 glib2/ext/glib2/rbgobj_enums.c                     |   67 +-
 glib2/ext/glib2/rbgobj_flags.c                     |  184 +-
 glib2/ext/glib2/rbgobj_object.c                    |  168 +-
 glib2/ext/glib2/rbgobj_type.c                      |    2 +-
 glib2/ext/glib2/rbgobj_typeinstance.c              |   10 +-
 glib2/ext/glib2/rbgobj_value.c                     |   32 +-
 glib2/ext/glib2/rbgobject.c                        |    2 +
 glib2/ext/glib2/rbgobject.h                        |    6 +-
 glib2/ext/glib2/rbgprivate.h                       |    7 +-
 glib2/ext/glib2/rbgutil.c                          |   44 +-
 glib2/ext/glib2/rbgutil.h                          |    4 +-
 glib2/ext/glib2/rbgutil_list.c                     |   98 +-
 glib2/ext/glib2/rbgutil_list.h                     |   11 +-
 glib2/ext/glib2/ruby-glib2.pc                      |    3 -
 glib2/lib/glib2/deprecatable.rb                    |   25 +-
 glib2/lib/gnome2/rake/native-binary-build-task.rb  |    2 +-
 glib2/lib/gnome2/rake/windows-binary-build-task.rb |   27 +-
 glib2/lib/mkmf-gnome2.rb                           |   21 +-
 ...guile-2.0.11-remove-needless-mkstemp-check.diff |   12 +
 glib2/test/test-binding.rb                         |   97 +
 glib2/test/test-variant-type.rb                    |  357 +++
 glib2/test/test_enum.rb                            |   13 +-
 glib2/test/test_file_utils.rb                      |   38 +-
 glib2/test/test_source.rb                          |   11 +
 glib2/test/test_value.rb                           |    5 +
 gobject-introspection/Makefile                     |   20 -
 gobject-introspection/Makefile.lib                 |  232 --
 gobject-introspection/Rakefile                     |    6 +-
 .../ext/gobject-introspection/Makefile             |  248 --
 .../ext/gobject-introspection/extconf.rb           |    2 +-
 .../gobject-introspection-enum-types.c             |  230 --
 .../gobject-introspection-enum-types.h             |   42 -
 .../ext/gobject-introspection/rb-gi-argument.c     | 2983 +++++++++++++++-----
 .../gobject-introspection/rb-gi-constant-info.c    |    2 +-
 .../gobject-introspection/rb-gi-constructor-info.c |    4 +-
 .../ext/gobject-introspection/rb-gi-conversions.h  |   76 +-
 .../ext/gobject-introspection/rb-gi-field-info.c   |   38 +-
 .../gobject-introspection/rb-gi-function-info.c    |  161 +-
 .../ext/gobject-introspection/rb-gi-loader.c       |   34 +-
 .../ext/gobject-introspection/rb-gi-method-info.c  |    9 +-
 .../ext/gobject-introspection/rb-gi-private.h      |    3 +-
 .../ext/gobject-introspection/rb-gi-repository.c   |   58 +-
 .../ext/gobject-introspection/rbgiversion.h        |   24 -
 .../ruby-gobject-introspection.pc                  |    3 -
 gobject-introspection/lib/gobject-introspection.rb |    1 +
 .../lib/gobject-introspection/arg-info.rb          |   27 +
 .../lib/gobject-introspection/callable-info.rb     |    4 +-
 .../lib/gobject-introspection/loader.rb            |  191 +-
 gstreamer/Rakefile                                 |   61 +-
 gstreamer/ext/gstreamer/extconf.rb                 |    2 +-
 gstreamer/lib/gst.rb                               |   20 +-
 gstreamer/lib/gst/base-loader.rb                   |    7 +-
 gstreamer/lib/gst/controller-loader.rb             |    7 +-
 .../patches/gst-plugins-bad-1.5.2-use-only-I.diff  |   12 +
 .../gst-plugins-bad-1.5.2-use-portable-cast.diff   |   12 +
 ...5.2-use-portable-64bit-data-print-modifier.diff |   12 +
 .../gst-plugins-base-1.5.2-use-portable-cast.diff  |   21 +
 gstreamer/sample/gst-inspect.rb                    |    2 +-
 gstreamer/test/run-test.rb                         |    8 +
 gtk2/Rakefile                                      |   21 +-
 gtk2/test/test_gtk_builder.rb                      |    1 -
 gtk3-no-gi/COPYING.LIB                             |  502 ++++
 {gtk3 => gtk3-no-gi}/README.md                     |    0
 {gtk3 => gtk3-no-gi}/Rakefile                      |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/conversions.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/depend               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/extconf.rb           |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/gtk3.def             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/init.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-about-dialog.c |    0
 .../ext/gtk3/rbgtk-accel-group-entry.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accel-group.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accel-key.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accel-label.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accel-map.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accelerator.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-accessible.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-action-bar.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-action-group.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-action.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-activatable.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-adjustment.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-alignment.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-allocation.c   |    0
 .../ext/gtk3/rbgtk-app-chooser-button.c            |    0
 .../ext/gtk3/rbgtk-app-chooser-dialog.c            |    0
 .../ext/gtk3/rbgtk-app-chooser-widget.c            |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-app-chooser.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-application.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-arrow.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-aspect-frame.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-assistant.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-bin.c          |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-binding-set.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-border.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-box.c          |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-buildable.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-builder.c      |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-button-box.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-button.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-calendar.c     |    0
 .../ext/gtk3/rbgtk-cell-editable.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-cell-layout.c  |    0
 .../ext/gtk3/rbgtk-cell-renderer-accel.c           |    0
 .../ext/gtk3/rbgtk-cell-renderer-combo.c           |    0
 .../ext/gtk3/rbgtk-cell-renderer-pixbuf.c          |    0
 .../ext/gtk3/rbgtk-cell-renderer-progress.c        |    0
 .../ext/gtk3/rbgtk-cell-renderer-spin.c            |    0
 .../ext/gtk3/rbgtk-cell-renderer-spinner.c         |    0
 .../ext/gtk3/rbgtk-cell-renderer-text.c            |    0
 .../ext/gtk3/rbgtk-cell-renderer-toggle.c          |    0
 .../ext/gtk3/rbgtk-cell-renderer.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-cell-view.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-check-button.c |    0
 .../ext/gtk3/rbgtk-check-menu-item.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-clip-board.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-color-button.c |    0
 .../ext/gtk3/rbgtk-color-selection-dialog.c        |    0
 .../ext/gtk3/rbgtk-color-selection.c               |    0
 .../ext/gtk3/rbgtk-combo-box-text.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-combo-box.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-const.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-container.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-css-provider.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-dialog.c       |    0
 .../ext/gtk3/rbgtk-drag-gdk-drag-context.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-drag.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-drawing-area.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-editable.c     |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-entry-buffer.c |    0
 .../ext/gtk3/rbgtk-entry-completion.c              |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-entry.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-event-box.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-expander.c     |    0
 .../ext/gtk3/rbgtk-file-chooser-button.c           |    0
 .../ext/gtk3/rbgtk-file-chooser-dialog.c           |    0
 .../ext/gtk3/rbgtk-file-chooser-widget.c           |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-file-chooser.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-file-filter.c  |    0
 .../ext/gtk3/rbgtk-file-system-error.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-fixed.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-font-button.c  |    0
 .../ext/gtk3/rbgtk-font-chooser-dialog.c           |    0
 .../ext/gtk3/rbgtk-font-chooser-widget.c           |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-font-chooser.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-frame.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-gdk-event.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-grid.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-handle-box.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-header-bar.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-hsv.c          |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-factory.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-info.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-set.c     |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-size.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-source.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-theme.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-icon-view.c    |    0
 .../ext/gtk3/rbgtk-im-multicontext.c               |    0
 .../ext/gtk3/rbgtk-image-menu-item.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-image.c        |    0
 .../ext/gtk3/rbgtk-imcon-text-simple.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-imcon-text.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-infobar.c      |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-invisible.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-label.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-layout.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-level-bar.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-link-button.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-list-store.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-lock-button.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-menu-button.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-menu-item.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-menu-shell.c   |    0
 .../ext/gtk3/rbgtk-menu-tool-button.c              |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-menu.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-menubar.c      |    0
 .../ext/gtk3/rbgtk-message-dialog.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-misc.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-notebook.c     |    0
 .../ext/gtk3/rbgtk-numerable-icon.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-orientable.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-overlay.c      |    0
 .../ext/gtk3/rbgtk-page-setup-unix-dialog.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-page-setup.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-paned.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-paper-size.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-plug.c         |    0
 .../ext/gtk3/rbgtk-print-context.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-print-job.c    |    0
 .../ext/gtk3/rbgtk-print-operation-preview.c       |    0
 .../ext/gtk3/rbgtk-print-operation.c               |    0
 .../ext/gtk3/rbgtk-print-settings.c                |    0
 .../ext/gtk3/rbgtk-print-unix-dialog.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-printer.c      |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-progress-bar.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-radio-action.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-radio-button.c |    0
 .../ext/gtk3/rbgtk-radio-menu-item.c               |    0
 .../ext/gtk3/rbgtk-radio-tool-button.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-range.c        |    0
 .../ext/gtk3/rbgtk-recent-action.c                 |    0
 .../ext/gtk3/rbgtk-recent-chooser-dialog.c         |    0
 .../ext/gtk3/rbgtk-recent-chooser-menu.c           |    0
 .../ext/gtk3/rbgtk-recent-chooser-widget.c         |    0
 .../ext/gtk3/rbgtk-recent-chooser.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-recent-data.c  |    0
 .../ext/gtk3/rbgtk-recent-filter-info.c            |    0
 .../ext/gtk3/rbgtk-recent-filter.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-recent-info.c  |    0
 .../ext/gtk3/rbgtk-recent-manager.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-revealer.c     |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-scale-button.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-scale.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-scrollable.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-scrollbar.c    |    0
 .../ext/gtk3/rbgtk-scrolled-window.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-search-bar.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-search-entry.c |    0
 .../ext/gtk3/rbgtk-selection-data.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-selection.c    |    0
 .../ext/gtk3/rbgtk-separator-menu-item.c           |    0
 .../ext/gtk3/rbgtk-separator-tool-item.c           |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-separator.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-settings.c     |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-size-group.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-socket.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-spin-button.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-spinner.c      |    0
 .../ext/gtk3/rbgtk-stack-switcher.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-stack.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-status-bar.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-status-icon.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-stock.c        |    0
 .../ext/gtk3/rbgtk-style-context-gdk-screen.c      |    0
 .../ext/gtk3/rbgtk-style-context.c                 |    0
 .../ext/gtk3/rbgtk-style-properties.c              |    0
 .../ext/gtk3/rbgtk-style-provider.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-switch.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-table.c        |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-target-list.c  |    0
 .../ext/gtk3/rbgtk-tearoff-menu-item.c             |    0
 .../ext/gtk3/rbgtk-text-appearance.c               |    0
 .../ext/gtk3/rbgtk-text-attributes.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-text-buffer.c  |    0
 .../ext/gtk3/rbgtk-text-child-anchor.c             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-text-iter.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-text-mark.c    |    0
 .../ext/gtk3/rbgtk-text-tag-table.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-text-tag.c     |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-text-view.c    |    0
 .../ext/gtk3/rbgtk-theming-engine.c                |    0
 .../ext/gtk3/rbgtk-toggle-action.c                 |    0
 .../ext/gtk3/rbgtk-toggle-button.c                 |    0
 .../ext/gtk3/rbgtk-toggle-tool-button.c            |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tool-button.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tool-item.c    |    0
 .../ext/gtk3/rbgtk-tool-itemgroup.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tool-shell.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-toolbar.c      |    0
 .../ext/gtk3/rbgtk-tooltip-gdk-display.c           |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tooltip.c      |    0
 .../ext/gtk3/rbgtk-tree-dragdest.c                 |    0
 .../ext/gtk3/rbgtk-tree-dragsource.c               |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tree-iter.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tree-model.c   |    0
 .../ext/gtk3/rbgtk-tree-modelfilter.c              |    0
 .../ext/gtk3/rbgtk-tree-modelsort.c                |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tree-path.c    |    0
 .../ext/gtk3/rbgtk-tree-rowreference.c             |    0
 .../ext/gtk3/rbgtk-tree-selection.c                |    0
 .../ext/gtk3/rbgtk-tree-sortable.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tree-store.c   |    0
 .../ext/gtk3/rbgtk-tree-view-column.c              |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-tree-view.c    |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-ui-manager.c   |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-viewport.c     |    0
 .../ext/gtk3/rbgtk-volume-button.c                 |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-widget-path.c  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-widget.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-window-group.c |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk-window.c       |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk.c              |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk3.h             |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk3conversions.h  |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk3private.h      |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk3util.c         |    0
 {gtk3 => gtk3-no-gi}/ext/gtk3/rbgtk3util.h         |    0
 {gtk3 => gtk3-no-gi}/extconf.rb                    |    0
 {gtk3 => gtk3-no-gi}/lib/gtk3.rb                   |    0
 {gtk3 => gtk3-no-gi}/lib/gtk3/base.rb              |    0
 {gtk3 => gtk3-no-gi}/lib/gtk3/deprecated.rb        |    0
 gtk3-no-gi/sample/gtk-demo/README                  |    7 +
 gtk3-no-gi/sample/gtk-demo/alphatest.png           |  Bin 0 -> 26529 bytes
 gtk3-no-gi/sample/gtk-demo/apple-red.png           |  Bin 0 -> 3545 bytes
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/appwindow.rb  |    0
 gtk3-no-gi/sample/gtk-demo/background.jpg          |  Bin 0 -> 22219 bytes
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/builder.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/button_box.rb |    0
 gtk3-no-gi/sample/gtk-demo/cairo-arc-negative.rb   |   41 +
 gtk3-no-gi/sample/gtk-demo/cairo-arc.rb            |   41 +
 gtk3-no-gi/sample/gtk-demo/cairo-clip-image.rb     |   51 +
 gtk3-no-gi/sample/gtk-demo/cairo-clip-rectangle.rb |   35 +
 gtk3-no-gi/sample/gtk-demo/cairo-clip.rb           |   35 +
 .../sample/gtk-demo/cairo-curve-rectangle.rb       |   76 +
 gtk3-no-gi/sample/gtk-demo/cairo-curve-to.rb       |   43 +
 gtk3-no-gi/sample/gtk-demo/cairo-dash.rb           |   39 +
 .../sample/gtk-demo/cairo-fill-and-stroke.rb       |   32 +
 .../sample/gtk-demo/cairo-fill-and-stroke2.rb      |   38 +
 gtk3-no-gi/sample/gtk-demo/cairo-gradient.rb       |   35 +
 gtk3-no-gi/sample/gtk-demo/cairo-image-pattern.rb  |   39 +
 gtk3-no-gi/sample/gtk-demo/cairo-image.rb          |   49 +
 gtk3-no-gi/sample/gtk-demo/cairo-line-cap.rb       |   53 +
 gtk3-no-gi/sample/gtk-demo/cairo-line-join.rb      |   41 +
 gtk3-no-gi/sample/gtk-demo/cairo-long-lines.rb     |   41 +
 gtk3-no-gi/sample/gtk-demo/cairo-operator.rb       |   83 +
 gtk3-no-gi/sample/gtk-demo/cairo-path.rb           |   28 +
 gtk3-no-gi/sample/gtk-demo/cairo-pattern-fill.rb   |   88 +
 gtk3-no-gi/sample/gtk-demo/cairo-self-intersect.rb |   32 +
 .../sample/gtk-demo/cairo-text-align-center.rb     |   45 +
 gtk3-no-gi/sample/gtk-demo/cairo-text-extents.rb   |   46 +
 gtk3-no-gi/sample/gtk-demo/cairo-text.rb           |   43 +
 gtk3-no-gi/sample/gtk-demo/changedisplay.rb        |  407 +++
 gtk3-no-gi/sample/gtk-demo/clipboard.rb            |   67 +
 gtk3-no-gi/sample/gtk-demo/colorsel.rb             |   82 +
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/common.rb     |    0
 gtk3-no-gi/sample/gtk-demo/css_accordion.css       |   53 +
 .../sample/gtk-demo/css_accordion.rb               |    0
 gtk3-no-gi/sample/gtk-demo/demo.ui                 |  258 ++
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/dialog.rb     |    0
 gtk3-no-gi/sample/gtk-demo/drawingarea.rb          |  205 ++
 gtk3-no-gi/sample/gtk-demo/editable_cells.rb       |  173 ++
 .../sample/gtk-demo/entry_completion.rb            |    0
 gtk3-no-gi/sample/gtk-demo/expander.rb             |   42 +
 gtk3-no-gi/sample/gtk-demo/floppybuddy.gif         |  Bin 0 -> 5216 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-applets.png       |  Bin 0 -> 3090 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-calendar.png      |  Bin 0 -> 2755 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-foot.png          |  Bin 0 -> 2916 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-fs-directory.png  |  Bin 0 -> 2044 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-fs-regular.png    |  Bin 0 -> 1795 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-gimp.png          |  Bin 0 -> 3410 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-gmush.png         |  Bin 0 -> 3244 bytes
 gtk3-no-gi/sample/gtk-demo/gnome-gsame.png         |  Bin 0 -> 4263 bytes
 gtk3-no-gi/sample/gtk-demo/gnu-keys.png            |  Bin 0 -> 3852 bytes
 gtk3-no-gi/sample/gtk-demo/gtk-logo-rgb.gif        |  Bin 0 -> 6427 bytes
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/hypertext.rb  |    0
 gtk3-no-gi/sample/gtk-demo/iconview.rb             |  110 +
 gtk3-no-gi/sample/gtk-demo/images.rb               |  197 ++
 gtk3-no-gi/sample/gtk-demo/infobar.rb              |   78 +
 gtk3-no-gi/sample/gtk-demo/item_factory.rb         |   94 +
 gtk3-no-gi/sample/gtk-demo/links.rb                |   53 +
 gtk3-no-gi/sample/gtk-demo/list_store.rb           |  138 +
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/main.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/menus.rb      |    0
 gtk3-no-gi/sample/gtk-demo/panes.rb                |  156 +
 gtk3-no-gi/sample/gtk-demo/pixbufs.rb              |  167 ++
 gtk3-no-gi/sample/gtk-demo/printing.rb             |  128 +
 gtk3-no-gi/sample/gtk-demo/reset.css               |   69 +
 gtk3-no-gi/sample/gtk-demo/rotated_text.rb         |   72 +
 gtk3-no-gi/sample/gtk-demo/ruby-gnome2-logo.png    |  Bin 0 -> 7200 bytes
 {gtk3 => gtk3-no-gi}/sample/gtk-demo/sizegroup.rb  |    0
 gtk3-no-gi/sample/gtk-demo/spinner.rb              |   59 +
 gtk3-no-gi/sample/gtk-demo/stock_browser.rb        |  233 ++
 gtk3-no-gi/sample/gtk-demo/textview.rb             |  436 +++
 gtk3-no-gi/sample/gtk-demo/theming.ui              |  319 +++
 .../sample/gtk-demo/theming_style_classes.rb       |   48 +
 gtk3-no-gi/sample/gtk-demo/tree_store.rb           |  270 ++
 {gtk3 => gtk3-no-gi}/sample/misc/aboutdialog.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/aboutdialog2.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/misc/alpha-demo.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/assistant.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/misc/bindings.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/button.rb         |    0
 {gtk3 => gtk3-no-gi}/sample/misc/button2.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/misc/buttonbox.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/misc/cairo-pong.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/calendar.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/checkbutton.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/colorselection.rb |    0
 {gtk3 => gtk3-no-gi}/sample/misc/combo_check.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/combobox.rb       |    0
 .../sample/misc/composited-windows.rb              |    0
 {gtk3 => gtk3-no-gi}/sample/misc/cursor.rb         |    0
 {gtk3 => gtk3-no-gi}/sample/misc/dialog.rb         |    0
 {gtk3 => gtk3-no-gi}/sample/misc/dialog2.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/misc/dnd.rb            |    0
 {gtk3 => gtk3-no-gi}/sample/misc/dndtreeview.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/drag-move.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/misc/drawing.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/misc/entry.rb          |    0
 .../sample/misc/entrycompletion.rb                 |    0
 {gtk3 => gtk3-no-gi}/sample/misc/expander.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/filechooser.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/frame.rb          |    0
 {gtk3 => gtk3-no-gi}/sample/misc/gdkscreen.rb      |    0
 gtk3-no-gi/sample/misc/gnome-logo-icon.png         |  Bin 0 -> 3090 bytes
 {gtk3 => gtk3-no-gi}/sample/misc/helloworld.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/iconview.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/image.rb          |    0
 {gtk3 => gtk3-no-gi}/sample/misc/itemfactory.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/itemfactory2.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/misc/keyboard_grab.rb  |    0
 {gtk3 => gtk3-no-gi}/sample/misc/label.rb          |    0
 {gtk3 => gtk3-no-gi}/sample/misc/linkbutton.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/listview.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/menu.rb           |    0
 {gtk3 => gtk3-no-gi}/sample/misc/misc_button.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/mouse-gesture.rb  |    0
 {gtk3 => gtk3-no-gi}/sample/misc/pangorenderer.rb  |    0
 {gtk3 => gtk3-no-gi}/sample/misc/pointer_grab.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/misc/print.rb          |    0
 {gtk3 => gtk3-no-gi}/sample/misc/properties.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/radiobutton.rb    |    0
 .../sample/misc/recentchooserdialog.rb             |    0
 {gtk3 => gtk3-no-gi}/sample/misc/rgtk+cairo.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/scalebutton.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/settings.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/statusicon.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/stock.rb          |    0
 {gtk3 => gtk3-no-gi}/sample/misc/style_property.rb |    0
 {gtk3 => gtk3-no-gi}/sample/misc/style_property.rc |    0
 {gtk3 => gtk3-no-gi}/sample/misc/t-gtkplug.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/misc/t-gtksocket.rb    |    0
 .../testgtk => gtk3-no-gi/sample/misc}/test.xpm    |    0
 .../sample/misc/textbuffer_serialize.rb            |    0
 {gtk3 => gtk3-no-gi}/sample/misc/threads.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/misc/to_drawable.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/togglebutton.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/misc/toolbar.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/misc/tooltips.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/tree_combo.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/tree_progress.rb  |    0
 .../sample/misc/treemodelfilter.rb                 |    0
 {gtk3 => gtk3-no-gi}/sample/misc/treeview.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/misc/uimanager.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/misc/uimanager2.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/misc/uimanager2.xml    |    0
 {gtk3 => gtk3-no-gi}/sample/misc/window.rb         |    0
 {gtk3 => gtk3-no-gi}/sample/misc/xbm_cursor.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/3DRings.xpm    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/FilesQueue.xpm |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/Modeller.xpm   |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/README         |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/button.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/buttonbox.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/check-n.xpm    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/check-y.xpm    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/checkbutton.rb |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/circles.xbm    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/colorselect.rb |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/dialog.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/entry.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/filesel.rb     |    0
 .../sample/testgtk/fontselection.rb                |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/labels.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/layout.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/marble.xpm     |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/menu.rb        |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/notebook.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/pixmap.rb      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/progressbar.rb |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/radiobutton.rb |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/range.rb       |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/reparent.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/sample.rb      |    0
 .../sample/testgtk/savedposition.rb                |    0
 .../sample/testgtk/scrolledwindow.rb               |    0
 .../sample/testgtk/shapedwindow.rb                 |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/spinbutton.rb  |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/statusbar.rb   |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/test.xpm       |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/testgtk.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/testgtkrc      |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/testgtkrc2     |    0
 .../sample/testgtk/togglebutton.rb                 |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/toolbar.rb     |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/tooltips.rb    |    0
 {gtk3 => gtk3-no-gi}/sample/testgtk/wmhints.rb     |    0
 {gtk3 => gtk3-no-gi}/test/gtk-test-utils.rb        |    0
 {gtk3 => gtk3-no-gi}/test/run-test.rb              |    0
 {gtk3 => gtk3-no-gi}/test/test_gc.rb               |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk.rb              |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_about_dialog.rb |    0
 .../test/test_gtk_accel_group_entry.rb             |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_accel_key.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_accessible.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_action_group.rb |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_allocation.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_border.rb       |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_buildable.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_builder.rb      |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_container.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_css_provider.rb |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_entry.rb        |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_header_bar.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_icon_theme.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_icon_view.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_image.rb        |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_level_bar.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_list_store.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_menu_button.rb  |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_menu_item.rb    |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_recent_data.rb  |    0
 .../test/test_gtk_recent_filter_info.rb            |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_revealer.rb     |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_search_bar.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_search_entry.rb |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_stack.rb        |    0
 .../test/test_gtk_stack_switcher.rb                |    0
 .../test/test_gtk_style_context.rb                 |    0
 .../test/test_gtk_style_properties.rb              |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_tree_path.rb    |    0
 .../test/test_gtk_tree_selection.rb                |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_unix_print.rb   |    0
 {gtk3 => gtk3-no-gi}/test/test_gtk_widget.rb       |    0
 gtk3/README.md                                     |    7 +-
 gtk3/Rakefile                                      |    1 +
 gtk3/TODO                                          |    2 +
 gtk3/ext/gtk3/depend                               |    5 -
 gtk3/ext/gtk3/extconf.rb                           |   96 +-
 gtk3/ext/gtk3/rb-gtk3-container.c                  |  159 ++
 gtk3/ext/gtk3/rb-gtk3-private.h                    |   32 +
 gtk3/ext/gtk3/rb-gtk3-widget.c                     |   71 +
 gtk3/ext/gtk3/rb-gtk3.c                            |  407 +++
 gtk3/ext/gtk3/rb-gtk3.h                            |   30 +
 gtk3/extconf.rb                                    |   34 +-
 gtk3/lib/gtk3.rb                                   |   79 +-
 gtk3/lib/gtk3/about-dialog.rb                      |   34 +
 gtk3/lib/gtk3/action-group.rb                      |  131 +
 gtk3/lib/gtk3/action.rb                            |   27 +
 gtk3/lib/gtk3/binding-set.rb                       |   31 +
 gtk3/lib/gtk3/border.rb                            |   28 +
 gtk3/lib/gtk3/box.rb                               |   40 +
 gtk3/lib/gtk3/builder.rb                           |   91 +
 gtk3/lib/gtk3/button.rb                            |   53 +
 gtk3/lib/gtk3/calendar.rb                          |   24 +
 gtk3/lib/gtk3/cell-layout.rb                       |   31 +
 gtk3/lib/gtk3/clipboard.rb                         |   25 +
 gtk3/lib/gtk3/color-chooser-dialog.rb              |   27 +
 gtk3/lib/gtk3/combo-box-text.rb                    |   30 +
 gtk3/lib/gtk3/combo-box.rb                         |   55 +
 gtk3/lib/gtk3/container.rb                         |   51 +
 gtk3/lib/gtk3/css-provider.rb                      |   38 +
 gtk3/lib/gtk3/deprecated.rb                        |  292 +-
 gtk3/lib/gtk3/dialog.rb                            |   65 +
 gtk3/lib/gtk3/file-chooser-dialog.rb               |   36 +
 gtk3/lib/gtk3/font-chooser-dialog.rb               |   27 +
 gtk3/lib/gtk3/gdk-drag-context.rb                  |   29 +
 gtk3/lib/gtk3/gesture-multi-press.rb               |   31 +
 gtk3/lib/gtk3/icon-theme.rb                        |   28 +
 gtk3/lib/gtk3/icon-view.rb                         |   45 +
 gtk3/lib/gtk3/image.rb                             |  113 +
 gtk3/lib/gtk3/label.rb                             |   54 +
 gtk3/lib/gtk3/level-bar.rb                         |   32 +
 gtk3/lib/gtk3/list-store.rb                        |   81 +
 gtk3/lib/gtk3/loader.rb                            |  403 +++
 gtk3/lib/gtk3/menu-item.rb                         |   33 +
 gtk3/lib/gtk3/message-dialog.rb                    |   49 +
 gtk3/lib/gtk3/paned.rb                             |   37 +
 gtk3/lib/gtk3/radio-action.rb                      |   28 +
 gtk3/lib/gtk3/radio-button.rb                      |   49 +
 gtk3/lib/gtk3/recent-chooser-dialog.rb             |   38 +
 gtk3/lib/gtk3/scale-button.rb                      |   35 +
 gtk3/lib/gtk3/scrolled-window.rb                   |   24 +
 gtk3/lib/gtk3/search-bar.rb                        |   27 +
 gtk3/lib/gtk3/selection-data.rb                    |   42 +
 gtk3/lib/gtk3/spin-button.rb                       |   34 +
 gtk3/lib/gtk3/stack.rb                             |   54 +
 gtk3/lib/gtk3/stock.rb                             |   70 +
 gtk3/lib/gtk3/style-context.rb                     |   26 +
 gtk3/lib/gtk3/style-properties.rb                  |   29 +
 gtk3/lib/gtk3/target-entry.rb                      |   27 +
 gtk3/lib/gtk3/target-list.rb                       |   31 +
 gtk3/lib/gtk3/text-buffer.rb                       |  165 ++
 gtk3/lib/gtk3/text-iter.rb                         |   39 +
 gtk3/lib/gtk3/text-tag-table.rb                    |   31 +
 gtk3/lib/gtk3/toggle-action.rb                     |   27 +
 gtk3/lib/gtk3/toggle-button.rb                     |   35 +
 gtk3/lib/gtk3/tool-button.rb                       |   36 +
 gtk3/lib/gtk3/tree-iter.rb                         |   52 +
 gtk3/lib/gtk3/tree-model-filter.rb                 |   45 +
 gtk3/lib/gtk3/tree-model.rb                        |   51 +
 gtk3/lib/gtk3/tree-path.rb                         |   29 +
 gtk3/lib/gtk3/tree-selection.rb                    |   30 +
 gtk3/lib/gtk3/tree-store.rb                        |   59 +
 gtk3/lib/gtk3/tree-view-column.rb                  |   35 +
 gtk3/lib/gtk3/tree-view.rb                         |   41 +
 gtk3/lib/gtk3/ui-manager.rb                        |   35 +
 gtk3/lib/gtk3/version.rb                           |   28 +
 gtk3/lib/gtk3/widget.rb                            |  127 +
 gtk3/lib/gtk3/window.rb                            |   29 +
 gtk3/sample/gtk-demo/TODO                          |   69 +
 gtk3/sample/gtk-demo/application.ui                |  107 +
 gtk3/sample/gtk-demo/builder.rb                    |    4 +-
 gtk3/sample/gtk-demo/button-box.rb                 |   82 +
 gtk3/sample/gtk-demo/common.rb                     |    2 +-
 gtk3/sample/gtk-demo/css_accordion.rb              |   10 +-
 gtk3/sample/gtk-demo/css_basics.css                |   22 +
 gtk3/sample/gtk-demo/css_basics.rb                 |  103 +
 gtk3/sample/gtk-demo/dialog.rb                     |    6 +-
 gtk3/sample/gtk-demo/entry_completion.rb           |    2 +-
 gtk3/sample/gtk-demo/hypertext.rb                  |    2 +-
 gtk3/sample/gtk-demo/main.rb                       |  156 +-
 gtk3/sample/gtk-demo/menus.rb                      |    8 +-
 gtk3/sample/gtk-demo/menus.ui                      |  107 +
 gtk3/sample/gtk-demo/sizegroup.rb                  |    2 +-
 gtk3/sample/misc/aboutdialog.rb                    |   28 +-
 gtk3/sample/misc/aboutdialog2.rb                   |   20 +-
 gtk3/sample/misc/alpha-demo.rb                     |   33 +-
 gtk3/sample/misc/application.rb                    |   31 +
 gtk3/sample/misc/assistant.rb                      |    8 +-
 gtk3/sample/misc/bindings.rb                       |  114 +-
 gtk3/sample/misc/builder-from-resource.rb          |   53 +
 gtk3/sample/misc/builder.rb                        |   29 +
 gtk3/sample/misc/builder.ui                        |   46 +
 gtk3/sample/misc/button.rb                         |   37 +-
 gtk3/sample/misc/button2.rb                        |   10 +-
 gtk3/sample/misc/buttonbox.rb                      |    6 +-
 gtk3/sample/misc/cairo-cursor.rb                   |   37 +
 gtk3/sample/misc/cairo-pong.rb                     |   34 +-
 gtk3/sample/misc/calendar.rb                       |   36 +-
 gtk3/sample/misc/checkbutton.rb                    |    7 +-
 gtk3/sample/misc/colorselection.rb                 |   19 +-
 gtk3/sample/misc/combo-check.rb                    |   77 +
 gtk3/sample/misc/combobox-from-cellrender.rb       |   48 +
 gtk3/sample/misc/combobox.rb                       |   20 +-
 gtk3/sample/misc/cursor.rb                         |   10 +-
 gtk3/sample/misc/dialog.rb                         |    7 +-
 gtk3/sample/misc/dialog2.rb                        |   11 +-
 gtk3/sample/misc/dnd.rb                            |   50 +-
 gtk3/sample/misc/dndtreeview.rb                    |   34 +-
 gtk3/sample/misc/drag-move.rb                      |    9 +-
 gtk3/sample/misc/drawing.rb                        |  160 +-
 gtk3/sample/misc/entry.rb                          |    6 +-
 gtk3/sample/misc/entrycompletion.rb                |   10 +-
 gtk3/sample/misc/eventbox.rb                       |   58 +
 gtk3/sample/misc/expander.rb                       |   11 +-
 gtk3/sample/misc/filechooser.rb                    |   12 +-
 gtk3/sample/misc/flowbox.rb                        |   86 +
 gtk3/sample/misc/frame.rb                          |   22 +-
 gtk3/sample/misc/gdkscreen.rb                      |    6 +-
 gtk3/sample/misc/gtkglarea1.rb                     |  114 +
 gtk3/sample/misc/gtkglarea2.rb                     |  194 ++
 gtk3/sample/misc/helloworld.rb                     |    7 +-
 gtk3/sample/misc/iconview.rb                       |   18 +-
 gtk3/sample/misc/image.rb                          |   13 +-
 gtk3/sample/misc/keyboard-grab.rb                  |   34 +
 gtk3/sample/misc/label.rb                          |   21 +-
 gtk3/sample/misc/linkbutton.rb                     |   13 +-
 gtk3/sample/misc/list-store-usage.rb               |   96 +
 gtk3/sample/misc/listview.rb                       |   20 +-
 gtk3/sample/misc/menu.rb                           |   70 +-
 gtk3/sample/misc/misc-button.rb                    |   50 +
 gtk3/sample/misc/mouse-gesture.rb                  |   77 +-
 gtk3/sample/misc/pango-layout.rb                   |  100 +
 gtk3/sample/misc/pointer-grab.rb                   |   36 +
 gtk3/sample/misc/print.rb                          |  403 +--
 gtk3/sample/misc/properties.rb                     |   30 +-
 gtk3/sample/misc/radiobutton.rb                    |   38 +-
 gtk3/sample/misc/recentchooserdialog.rb            |   18 +-
 gtk3/sample/misc/rgtk+cairo.rb                     |   53 +-
 gtk3/sample/misc/scalebutton.rb                    |   26 +-
 gtk3/sample/misc/simple_window.gresource.xml       |    6 +
 gtk3/sample/misc/simple_window.ui                  |   16 +
 gtk3/sample/misc/statusicon.rb                     |   25 +-
 gtk3/sample/misc/stock.rb                          |   25 +-
 gtk3/sample/misc/style-property.rb                 |   76 +
 gtk3/sample/misc/t-gtkplug.rb                      |   25 +-
 gtk3/sample/misc/t-gtksocket.rb                    |   37 +-
 gtk3/sample/misc/template-from-resource.rb         |   59 +
 gtk3/sample/misc/template.gresource.xml            |    6 +
 gtk3/sample/misc/template.ui                       |   16 +
 gtk3/sample/misc/textbuffer-serialize.rb           |  133 +
 gtk3/sample/misc/threads.rb                        |   67 +-
 gtk3/sample/misc/to-drawable.rb                    |   34 +
 gtk3/sample/misc/togglebutton.rb                   |   14 +-
 gtk3/sample/misc/toolbar.rb                        |   69 +-
 gtk3/sample/misc/tooltips.rb                       |  199 +-
 gtk3/sample/misc/tree-combo.rb                     |   73 +
 gtk3/sample/misc/tree-progress.rb                  |   56 +
 gtk3/sample/misc/treemodelfilter.rb                |   23 +-
 gtk3/sample/misc/treeview.rb                       |   38 +-
 gtk3/sample/misc/window.rb                         |    6 +-
 gtk3/sample/misc/xbm-cursor.rb                     |   86 +
 gtk3/sample/tutorial/README.md                     |  338 +++
 gtk3/sample/tutorial/builder.ui                    |   66 +
 gtk3/sample/tutorial/example-0.rb                  |   32 +
 gtk3/sample/tutorial/example-1.rb                  |   47 +
 gtk3/sample/tutorial/example-2.rb                  |   68 +
 gtk3/sample/tutorial/example-4.rb                  |   41 +
 gtk3/sample/tutorial/exampleapp.desktop            |    6 +
 gtk3/sample/tutorial/exampleapp.png                |  Bin 0 -> 4117 bytes
 gtk3/sample/tutorial/exampleapp1/exampleapp.rb     |   57 +
 .../tutorial/exampleapp2/exampleapp.gresource.xml  |    6 +
 gtk3/sample/tutorial/exampleapp2/exampleapp.rb     |   87 +
 gtk3/sample/tutorial/exampleapp2/window.ui         |   32 +
 .../tutorial/exampleapp3/exampleapp.gresource.xml  |    6 +
 gtk3/sample/tutorial/exampleapp3/exampleapp.rb     |  106 +
 gtk3/sample/tutorial/exampleapp3/window.ui         |   32 +
 gtk3/sample/tutorial/exampleapp4/app-menu.ui       |   18 +
 .../tutorial/exampleapp4/exampleapp.gresource.xml  |    7 +
 gtk3/sample/tutorial/exampleapp4/exampleapp.rb     |  124 +
 gtk3/sample/tutorial/exampleapp4/window.ui         |   32 +
 gtk3/sample/tutorial/exampleapp5/app-menu.ui       |   18 +
 .../tutorial/exampleapp5/exampleapp.gresource.xml  |    7 +
 gtk3/sample/tutorial/exampleapp5/exampleapp.rb     |  135 +
 .../exampleapp5/org.gtk.exampleapp.gschema.xml     |   20 +
 gtk3/sample/tutorial/exampleapp5/window.ui         |   32 +
 gtk3/sample/tutorial/exampleapp6/app-menu.ui       |   18 +
 .../tutorial/exampleapp6/exampleapp.gresource.xml  |    8 +
 gtk3/sample/tutorial/exampleapp6/exampleapp.rb     |  168 ++
 .../exampleapp6/org.gtk.exampleapp.gschema.xml     |   20 +
 gtk3/sample/tutorial/exampleapp6/prefs.ui          |   70 +
 gtk3/sample/tutorial/exampleapp6/window.ui         |   32 +
 gtk3/sample/tutorial/exampleapp7/app-menu.ui       |   18 +
 .../tutorial/exampleapp7/exampleapp.gresource.xml  |    8 +
 gtk3/sample/tutorial/exampleapp7/exampleapp.rb     |  200 ++
 .../exampleapp7/org.gtk.exampleapp.gschema.xml     |   20 +
 gtk3/sample/tutorial/exampleapp7/prefs.ui          |   70 +
 gtk3/sample/tutorial/exampleapp7/window.ui         |   63 +
 gtk3/sample/tutorial/exampleapp8/app-menu.ui       |   18 +
 .../tutorial/exampleapp8/exampleapp.gresource.xml  |    9 +
 gtk3/sample/tutorial/exampleapp8/exampleapp.rb     |  247 ++
 gtk3/sample/tutorial/exampleapp8/gears-menu.ui     |   12 +
 .../exampleapp8/org.gtk.exampleapp.gschema.xml     |   25 +
 gtk3/sample/tutorial/exampleapp8/prefs.ui          |   70 +
 gtk3/sample/tutorial/exampleapp8/window.ui         |  100 +
 gtk3/test/fixture/Rakefile                         |   32 +
 gtk3/test/fixture/gnome-logo-icon.png              |  Bin 0 -> 3090 bytes
 gtk3/test/fixture/image.gresource                  |  Bin 0 -> 3338 bytes
 gtk3/test/fixture/image.gresource.xml              |    6 +
 gtk3/test/fixture/simple_window.gresource.xml      |    6 +
 gtk3/test/fixture/simple_window.ui                 |   16 +
 gtk3/test/gtk-test-utils.rb                        |   50 +-
 gtk3/test/run-test.rb                              |   10 +-
 gtk3/test/{test_gc.rb => test-gc.rb}               |    0
 gtk3/test/test-gdk-display.rb                      |   25 +
 gtk3/test/test-gdk-event.rb                        |   24 +
 gtk3/test/test-gdk-screen.rb                       |   42 +
 ...tk_about_dialog.rb => test-gtk-about-dialog.rb} |    0
 gtk3/test/test-gtk-accel-group.rb                  |   23 +
 ...test_gtk_accel_key.rb => test-gtk-accel-key.rb} |    0
 ...st_gtk_accessible.rb => test-gtk-accessible.rb} |    0
 gtk3/test/test-gtk-action-bar.rb                   |   43 +
 gtk3/test/test-gtk-action-group.rb                 |   48 +
 gtk3/test/test-gtk-action.rb                       |   41 +
 gtk3/test/test-gtk-assistant.rb                    |   44 +
 .../{test_gtk_border.rb => test-gtk-border.rb}     |    0
 gtk3/test/test-gtk-box.rb                          |   28 +
 gtk3/test/test-gtk-buildable.rb                    |   56 +
 gtk3/test/test-gtk-builder.rb                      |  200 ++
 gtk3/test/test-gtk-button.rb                       |   54 +
 gtk3/test/test-gtk-cell-layout.rb                  |   35 +
 gtk3/test/test-gtk-color-chooser-dialog.rb         |   41 +
 gtk3/test/test-gtk-combo-box-text.rb               |   34 +
 gtk3/test/test-gtk-combo-box.rb                    |   97 +
 gtk3/test/test-gtk-container.rb                    |  171 ++
 gtk3/test/test-gtk-css-provider.rb                 |  101 +
 gtk3/test/test-gtk-dialog.rb                       |   74 +
 gtk3/test/{test_gtk_entry.rb => test-gtk-entry.rb} |    0
 gtk3/test/test-gtk-event-controller.rb             |   35 +
 gtk3/test/test-gtk-file-chooser-dialog.rb          |   52 +
 gtk3/test/test-gtk-flow-box.rb                     |   64 +
 gtk3/test/test-gtk-font-chooser-dialog.rb          |   41 +
 gtk3/test/test-gtk-gesture-multi-press.rb          |   31 +
 gtk3/test/test-gtk-gesture-pan.rb                  |   32 +
 gtk3/test/test-gtk-gesture-single.rb               |   40 +
 gtk3/test/test-gtk-gesture.rb                      |   29 +
 gtk3/test/test-gtk-header-bar.rb                   |   80 +
 ...st_gtk_icon_theme.rb => test-gtk-icon-theme.rb} |    0
 gtk3/test/test-gtk-icon-view.rb                    |   62 +
 gtk3/test/test-gtk-image.rb                        |   52 +
 gtk3/test/test-gtk-label.rb                        |   39 +
 gtk3/test/test-gtk-level-bar.rb                    |   94 +
 gtk3/test/test-gtk-list-store.rb                   |  204 ++
 ..._gtk_menu_button.rb => test-gtk-menu-button.rb} |    0
 ...test_gtk_menu_item.rb => test-gtk-menu-item.rb} |    0
 gtk3/test/test-gtk-message-dialog.rb               |   62 +
 gtk3/test/test-gtk-paned.rb                        |  109 +
 gtk3/test/test-gtk-places-sidebar.rb               |   68 +
 gtk3/test/test-gtk-radio-action.rb                 |   45 +
 gtk3/test/test-gtk-radio-button.rb                 |   82 +
 gtk3/test/test-gtk-recent-chooser-dialog.rb        |   53 +
 ..._gtk_recent_data.rb => test-gtk-recent-data.rb} |    0
 gtk3/test/test-gtk-recent-filter-info.rb           |   26 +
 gtk3/test/test-gtk-recent-info.rb                  |   37 +
 .../{test_gtk_revealer.rb => test-gtk-revealer.rb} |    0
 gtk3/test/test-gtk-scale-button.rb                 |   56 +
 gtk3/test/test-gtk-search-bar.rb                   |   55 +
 ...tk_search_entry.rb => test-gtk-search-entry.rb} |    0
 gtk3/test/test-gtk-spin-button.rb                  |   45 +
 ...tack_switcher.rb => test-gtk-stack-switcher.rb} |    0
 gtk3/test/test-gtk-stack.rb                        |  122 +
 gtk3/test/test-gtk-stock.rb                        |   26 +
 ..._style_context.rb => test-gtk-style-context.rb} |    0
 ..._properties.rb => test-gtk-style-properties.rb} |    0
 gtk3/test/test-gtk-style-provider.rb               |   25 +
 gtk3/test/test-gtk-switch.rb                       |   34 +
 gtk3/test/test-gtk-target-entry.rb                 |   37 +
 gtk3/test/test-gtk-text-buffer.rb                  |  151 +
 gtk3/test/test-gtk-text-tag-table.rb               |   34 +
 gtk3/test/test-gtk-toggle-action.rb                |   41 +
 gtk3/test/test-gtk-toggle-button.rb                |   39 +
 gtk3/test/test-gtk-tool-button.rb                  |   53 +
 gtk3/test/test-gtk-tree-iter.rb                    |   53 +
 gtk3/test/test-gtk-tree-model-filter.rb            |   55 +
 gtk3/test/test-gtk-tree-path.rb                    |   42 +
 gtk3/test/test-gtk-tree-selection.rb               |   61 +
 gtk3/test/test-gtk-tree-view-column.rb             |   71 +
 gtk3/test/test-gtk-tree-view.rb                    |  105 +
 gtk3/test/test-gtk-version.rb                      |   47 +
 gtk3/test/test-gtk-widget.rb                       |  148 +
 gtk3/test/{test_gtk.rb => test-gtk.rb}             |    0
 gtksourceview3-no-gi/COPYING.LIB                   |  502 ++++
 gtksourceview3-no-gi/README.md                     |   24 +
 {gtksourceview3 => gtksourceview3-no-gi}/Rakefile  |    0
 .../ext/gtksourceview3/depend                      |    0
 .../ext/gtksourceview3/extconf.rb                  |    0
 .../ext/gtksourceview3/gtksourceview3.def          |    0
 .../ext/gtksourceview3/rbgtksource.c               |    0
 .../ext/gtksourceview3/rbgtksourcebuffer.c         |    0
 .../ext/gtksourceview3/rbgtksourcegutter.c         |    0
 .../ext/gtksourceview3/rbgtksourcegutterrenderer.c |    0
 .../rbgtksourcegutterrendererpixbuf.c              |    0
 .../gtksourceview3/rbgtksourcegutterrenderertext.c |    0
 .../ext/gtksourceview3/rbgtksourcelanguage.c       |    0
 .../gtksourceview3/rbgtksourcelanguagemanager.c    |    0
 .../ext/gtksourceview3/rbgtksourcemark.c           |    0
 .../ext/gtksourceview3/rbgtksourcemarkattributes.c |    0
 .../gtksourceview3/rbgtksourceprintcompositor.c    |    0
 .../ext/gtksourceview3/rbgtksourcestyle.c          |    0
 .../ext/gtksourceview3/rbgtksourcestylescheme.c    |    0
 .../gtksourceview3/rbgtksourcestyleschememanager.c |    0
 .../ext/gtksourceview3/rbgtksourceundomanager.c    |    0
 .../ext/gtksourceview3/rbgtksourceview.c           |    0
 .../gtksourceview3/rbgtksourceview3conversions.h   |    0
 .../ext/gtksourceview3/rbgtksourceview3private.h   |    0
 .../extconf.rb                                     |    0
 .../lib/gtksourceview3.rb                          |    0
 .../lib/gtksourceview3/deprecated.rb               |   47 +
 .../sample/sourcelanguagemanager.rb                |    0
 .../sample/test.rb                                 |    0
 .../test/run-test.rb                               |    0
 .../test/test_mark_attributes.rb                   |    0
 .../test/test_source_gutter_renderer.rb            |    0
 .../test/test_source_language_manager.rb           |    0
 .../test/test_source_view.rb                       |    0
 gtksourceview3/Rakefile                            |    7 +-
 gtksourceview3/lib/gtksourceview3.rb               |   59 +-
 gtksourceview3/lib/gtksourceview3/loader.rb        |   46 +
 .../lib/gtksourceview3/mark-attributes.rb          |   29 +
 gtksourceview3/test/run-test.rb                    |    2 +
 gtksourceview3/test/test-mark-attributes.rb        |   26 +
 ..._renderer.rb => test-source-gutter-renderer.rb} |    0
 .../test/test-source-language-manager.rb           |   46 +
 gtksourceview3/test/test-source-view.rb            |   57 +
 gvlc/COPYING.LIB                                   |  502 ++++
 gvlc/README                                        |   36 +
 gvlc/Rakefile                                      |   15 +
 gvlc/ext/gvlc/depend                               |    6 +
 gvlc/ext/gvlc/enums.c                              |  289 ++
 gvlc/ext/gvlc/extconf.rb                           |   62 +
 gvlc/ext/gvlc/init.c                               |   31 +
 gvlc/ext/gvlc/rbvlc.c                              |  138 +
 gvlc/ext/gvlc/rbvlcaudiooutput.c                   |   93 +
 gvlc/ext/gvlc/rbvlcconversions.h                   |   75 +
 gvlc/ext/gvlc/rbvlccore.c                          |  311 ++
 gvlc/ext/gvlc/rbvlcevent.c                         |   76 +
 gvlc/ext/gvlc/rbvlceventtype.c                     |   49 +
 gvlc/ext/gvlc/rbvlcmedia.c                         |  413 +++
 gvlc/ext/gvlc/rbvlcmediadiscoverer.c               |  136 +
 gvlc/ext/gvlc/rbvlcmedialibrary.c                  |   86 +
 gvlc/ext/gvlc/rbvlcmedialist.c                     |  341 +++
 gvlc/ext/gvlc/rbvlcmedialistplayer.c               |  334 +++
 gvlc/ext/gvlc/rbvlcmediaplayer.c                   | 1558 ++++++++++
 gvlc/ext/gvlc/rbvlcmediastats.c                    |  243 ++
 gvlc/ext/gvlc/rbvlcmediatrackinfo.c                |  181 ++
 gvlc/ext/gvlc/rbvlcmoduledescription.c             |  119 +
 gvlc/ext/gvlc/rbvlcprivate.h                       |  117 +
 gvlc/ext/gvlc/rbvlctrackdescription.c              |   90 +
 gvlc/ext/gvlc/utils.c                              |  157 ++
 gvlc/extconf.rb                                    |   49 +
 gvlc/lib/gvlc.rb                                   |    2 +
 gvlc/sample/info.rb                                |   32 +
 gvlc/sample/multi.rb                               |   41 +
 gvlc/sample/playlist.glade                         |  270 ++
 gvlc/sample/playlist.rb                            |  180 ++
 gvlc/sample/simple.rb                              |   33 +
 pango/Rakefile                                     |   22 +-
 pango/ext/pango/depend                             |    1 -
 pango/ext/pango/extconf.rb                         |    2 -
 pango/ext/pango/rbpango.c                          |   50 +-
 pango/ext/pango/rbpango.h                          |    1 -
 pango/ext/pango/rbpangoattribute.c                 |    4 +-
 pango/ext/pango/rbpangocairo.c                     |    8 +-
 pango/ext/pango/rbpangocontext.c                   |    4 +-
 pango/ext/pango/rbpangofontdescription.c           |    4 +-
 pango/ext/pango/rbpangogravity.c                   |    4 +-
 pango/ext/pango/rbpangolanguage.c                  |    8 +
 pango/ext/pango/rbpangolayout.c                    |   19 +-
 pango/ext/pango/rbpangomatrix.c                    |    4 +-
 pango/ext/pango/rbpangoscript.c                    |    6 +-
 pango/test/test-language.rb                        |    5 +
 pango/test/test-layout.rb                          |    8 +-
 poppler/Rakefile                                   |   22 +-
 release.rd                                         |  303 ++
 rsvg2/Rakefile                                     |    4 +-
 rsvg2/ext/rsvg2/extconf.rb                         |    2 +-
 rsvg2/ext/rsvg2/rbrsvg.c                           |   17 +-
 rsvg2/ext/rsvg2/rbrsvghandle.c                     |  241 +-
 rsvg2/ext/rsvg2/rsvg2.h                            |   32 +-
 rsvg2/lib/rsvg2.rb                                 |   37 +-
 rsvg2/sample/svg-viewer.rb                         |    4 +-
 rsvg2/test/rsvg2-test-utils.rb                     |   11 +
 rsvg2/test/test-handle.rb                          |    4 +
 run-test.rb                                        |   16 +-
 travis-before-script.sh                            |   36 +
 vte3-no-gi/COPYING.LIB                             |  502 ++++
 {vte3 => vte3-no-gi}/README.md                     |    0
 {vte3 => vte3-no-gi}/Rakefile                      |    0
 {vte3 => vte3-no-gi}/ext/vte3/depend               |    0
 {vte3 => vte3-no-gi}/ext/vte3/extconf.rb           |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvte.c              |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvte3conversions.h  |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvte3private.h      |    0
 .../ext/vte3/rbvtecharattributes.c                 |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvtepty.c           |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvtereaper.c        |    0
 {vte3 => vte3-no-gi}/ext/vte3/rbvteterminal.c      |    0
 .../ext/vte3/rbvteterminalaccessible.c             |    0
 {vte3 => vte3-no-gi}/extconf.rb                    |    0
 {vte3 => vte3-no-gi}/lib/vte3.rb                   |    0
 {vte3 => vte3-no-gi}/lib/vte3/deprecated.rb        |    0
 .../patches/ncurses-5.9-add-missing-exe.diff       |    0
 .../patches/ncurses-5.9-support-mingw32.diff       |    0
 {vte3 => vte3-no-gi}/sample/multiterm.rb           |    0
 {vte3 => vte3-no-gi}/sample/terminal.rb            |    0
 vte3/README.md                                     |    2 +-
 vte3/Rakefile                                      |   78 +-
 vte3/lib/vte3.rb                                   |   56 +-
 vte3/lib/vte3/deprecated.rb                        |   44 +-
 vte3/lib/vte3/loader.rb                            |   47 +
 vte3/lib/vte3/pty.rb                               |   29 +
 vte3/lib/vte3/terminal.rb                          |   73 +
 vte3/test/run-test.rb                              |   63 +
 vte3/test/test-pty.rb                              |   47 +
 vte3/test/test-terminal-properties.rb              |  122 +
 vte3/test/test-terminal-signals.rb                 |   48 +
 vte3/test/test-terminal.rb                         |   44 +
 vte3/test/vte3-test-utils.rb                       |   27 +
 webkit-gtk/lib/webkit-gtk.rb                       |    9 +-
 webkit-gtk2/lib/webkit-gtk2.rb                     |   23 +-
 webkit-gtk2/test/run-test.rb                       |    9 +
 webkit2-gtk/COPYING.LIB                            |  502 ++++
 webkit2-gtk/README.md                              |   24 +
 webkit2-gtk/Rakefile                               |  123 +
 webkit2-gtk/lib/webkit2-gtk.rb                     |   87 +
 webkit2-gtk/lib/webkit2-gtk/version.rb             |   33 +
 .../patches/libxslt-1.1.28-add-mkdir-fallback.diff |   11 +
 webkit2-gtk/sample/browser.rb                      |   30 +
 webkit2-gtk/test/run-test.rb                       |   72 +
 webkit2-gtk/test/test-webkit2-gtk-webview.rb       |   61 +
 webkit2-gtk/test/webkit2-gtk-test-utils.rb         |   28 +
 1106 files changed, 45195 insertions(+), 6302 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..aa9e84c
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,7 @@
+((c-mode . ((c-file-style . "ruby")
+            (indent-tabs-mode . nil)
+            (show-trailing-whitespace . t)))
+ (ruby-mode . ((show-trailing-whitespace . t)))
+ (sh-mode .  ((indent-tabs-mode . nil)
+              (sh-indentation   . 2)
+              (sh-basic-offset  . 2))))
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d60936c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,37 @@
+*.a
+*.bundle
+*.o
+*.so
+*.swp
+.emacs.desktop
+.emacs.desktop.lock
+Makefile
+Makefile.lib
+*.pc
+.rbx/
+/atk/ext/atk/rbatkversion.h
+/glib2/ext/glib2/glib-enum-types.c
+/glib2/ext/glib2/glib-enum-types.h
+/gio2/test/fixture/resource/ruby-gio2.gresource
+/gtk2/ext/gtk2/rbgdkkeysyms.h
+/gdk3/ext/gdk3/rbgdkkeysyms.h
+/gtk3/test/fixture/simple_window.gresource
+/gtksourceview2/ext/gtksourceview2/rbgtksourceview2version.h
+/gtksourceview3/ext/gtksourceview3/rbgtksourceview3version.h
+/goocanvas/ext/goocanvas/rbgoo_canvasversion.h
+/poppler/test/tmp/
+/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.c
+/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.h
+/gobject-introspection/ext/gobject-introspection/rbgiversion.h
+mkmf.log
+*/tmp/
+*/vendor/
+*/pkg/
+.gdb_history
+/dist/
+/misc/release.rb
+/*.tar.gz
+/tmp/
+/Gemfile.lock
+/Gemfile.local
+/build/.vagrant/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..3b6b898
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,25 @@
+env:
+  global:
+    - DISPLAY=":99.0"
+notifications:
+  email:
+    recipients:
+      - ruby-gnome2-cvs at lists.sourceforge.net
+rvm:
+  - 2.0.0
+  - 2.1
+  - 2.2
+  - ruby-head
+matrix:
+  # allow_failures:
+  #   - rvm: 2.1
+  fast_finish: true
+before_script:
+  - ./travis-before-script.sh
+  - sh -e /etc/init.d/xvfb start
+script:
+  - bundle exec ruby extconf.rb
+  - bundle exec make -j3 > /dev/null
+  - bundle exec ruby run-test.rb
+after_script:
+  - sh -e /ext/init.d/xvfb stop
diff --git a/COPYING.GFDL b/COPYING.GFDL
new file mode 100644
index 0000000..2f7e03c
--- /dev/null
+++ b/COPYING.GFDL
@@ -0,0 +1,451 @@
+
+                GNU Free Documentation License
+                 Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+     <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense.  It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does.  But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book.  We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License.  Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein.  The "Document", below,
+refers to any such manual or work.  Any member of the public is a
+licensee, and is addressed as "you".  You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject.  (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.)  The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.  If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant.  The Document may contain zero
+Invariant Sections.  If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.  A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters.  A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text.  A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification.  Examples of
+transparent image formats include PNG, XCF and JPG.  Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page.  For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language.  (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document.  These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License.  You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute.  However, you may accept
+compensation in exchange for copies.  If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover.  Both covers must also clearly and legibly identify
+you as the publisher of these copies.  The front cover must present
+the full title with all words of the title equally prominent and
+visible.  You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it.  In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+   from that of the Document, and from those of previous versions
+   (which should, if there were any, be listed in the History section
+   of the Document).  You may use the same title as a previous version
+   if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+   responsible for authorship of the modifications in the Modified
+   Version, together with at least five of the principal authors of the
+   Document (all of its principal authors, if it has fewer than five),
+   unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+   Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+   adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+   giving the public permission to use the Modified Version under the
+   terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+   and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+   to it an item stating at least the title, year, new authors, and
+   publisher of the Modified Version as given on the Title Page.  If
+   there is no section Entitled "History" in the Document, create one
+   stating the title, year, authors, and publisher of the Document as
+   given on its Title Page, then add an item describing the Modified
+   Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+   public access to a Transparent copy of the Document, and likewise
+   the network locations given in the Document for previous versions
+   it was based on.  These may be placed in the "History" section.
+   You may omit a network location for a work that was published at
+   least four years before the Document itself, or if the original
+   publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+   Preserve the Title of the section, and preserve in the section all
+   the substance and tone of each of the contributor acknowledgements
+   and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+   unaltered in their text and in their titles.  Section numbers
+   or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements".  Such a section
+   may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+   or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant.  To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version.  Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity.  If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy.  If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications".  You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections.  You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers.  In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns.  See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation.  If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.  If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works.  A
+public wiki that anybody can edit is an example of such a server.  A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 
+license published by Creative Commons Corporation, a not-for-profit 
+corporation with a principal place of business in San Francisco, 
+California, as well as future copyleft versions of that license 
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in 
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this 
+License, and if all works that were first published under this License 
+somewhere other than this MMC, and subsequently incorporated in whole or 
+in part into the MMC, (1) had no cover texts or invariant sections, and 
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+    Copyright (c)  YEAR  YOUR NAME.
+    Permission is granted to copy, distribute and/or modify this document
+    under the terms of the GNU Free Documentation License, Version 1.3
+    or any later version published by the Free Software Foundation;
+    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+    A copy of the license is included in the section entitled "GNU
+    Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+    with the Invariant Sections being LIST THEIR TITLES, with the
+    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..d61b49e
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,27 @@
+# Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+source "https://rubygems.org/"
+
+gem "rake"
+gem "pkg-config"
+gem "cairo"
+gem "test-unit-notify"
+
+local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
+if File.exists?(local_gemfile)
+  instance_eval File.read(local_gemfile)
+end
diff --git a/Gemfile.local.sample b/Gemfile.local.sample
new file mode 100644
index 0000000..9f2fee4
--- /dev/null
+++ b/Gemfile.local.sample
@@ -0,0 +1,18 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+gem "rake-compiler"
+gem "mechanize"
diff --git a/NEWS b/NEWS
index d82734b..4658d80 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,190 @@
 
 = NEWS
 
+== Ruby-GNOME2 3.0.0: 2015-09-10
+
+It is a GTK+ 3.16 support release.
+
+To GTK+ 3.16 support, many people helped us. Especially, cedlemo did
+great works. Very thanks all!!!
+
+=== Changes
+
+==== All
+
+  * Improvements
+    * Added install instruction for GitHub master branch.
+      [GitHub#425][Patch by Hiroyuki Sato]
+
+==== Ruby/GLib2
+
+  * Improvements
+    * Added new APIs:
+      * (({RVAL2GOBJGLIST}))
+      * (({RVAL2GOBJGSLIST}))
+      * (({rbg_rval2glist}))
+      * (({rbg_rval2gslist}))
+      * (({RVAL2CSTR_PTR}))
+      * (({rbg_name_to_nick}))
+      * (({rbgobj_class_init_func}))
+      * (({rbgobj_register_type}))
+    * Changed (({RVAL2CSTR})) to return (({NULL})) terminated string.
+      If you want to get raw string that may not be terminated by (({NULL})),
+      use (({RVAL2CSTR_PTR})).
+    * Supported (({Symbol})) as flag value.
+    * Added (({windows_platform?}))
+    * Supported (({GLib::Value.new})) without value.
+    * Supported array of flag value as (({GLib::Flags.new})) input.
+    * Supported name, nick and (({GLib::Enum})) as
+      (({GLib::Enum.new})) input.
+    * Migrated to Markdown for README markup.
+      [GitHub#484][Patch by prpr_man]
+    * Supported (({GVariantType})).
+    * Supported (({GVariant})).
+    * Supported (({GBinding})).
+      [GitHub#524][Reported by cedlemo]
+
+  * Fixes
+    * Fixed a bug that (({GLib.format_size})) doesn't work 32bit over
+      integer value.
+      [GitHub#413][Reported by eumario]
+
+==== Ruby/GObjectIntrospection
+
+  * Improvements
+    * Supported non GObject struct as return value.
+      [GitHub#286][Reported by Christopher L. Ramsey]
+    * Supported (({list_XXX})) method name.
+    * Supported freeing (({GList<GObjet *>})).
+    * Supported array of struct as input argument.
+    * Supported auto native package install on CentOS 7.
+    * Supported (({can_XXX?})) predicate.
+    * Supported the number of array as input argument.
+      [Suggested by John Cupitt]
+    * Supported array of (({GValue})) as input argument.
+    * Supported array as return value.
+    * Supported (({GClosure})) as input argument.
+    * Supported (({GSList<GObject *>})) as input argument.
+    * Supported (({GSList<GObject *>})) as output argument.
+      [GitHub#324][Reported by cedlemo]
+    * Supported union as input argument.
+    * Supported array of (({guint8})) as input argument.
+    * Supported array of (({gint32})) as input argument.
+    * Supported class methods defined in (({XXXClass})).
+    * Supported (({GList<GBoxed *>})) as output argument.
+      [GitHub#389][Reported by eumario]
+    * Supported (({GList<GInterface *>})) as return value.
+      [GitHub#501][Reported by Christopher L. Ramsey]
+    * Supported (({GVariant})) as return value.
+      [GitHub#502][Reported by kitone]
+
+  * Fixes
+    * Fixed a bug that (({GList<GObjet *>})) return type method always
+      returns nil.
+    * Fixed a bug that not predicate is treated as predicate.
+    * Fixed a bug that (({self})) is different.
+
+==== Ruby/GIO2
+
+  * Improvements
+    * Supported (({GAsyncReadyCallback})).
+      [GitHub#302][Reported by Christopher L. Ramsey]
+    * Added (({ActionMap#add_actions})).
+
+==== Ruby/Pango
+
+  * Improvements
+    * Added (({Pango::Language#sample_string})).
+
+==== Ruby/GDK3
+
+  * Improvements
+    * Added backward compatibility APIs.
+      [GitHub#284][Reported by Christopher L. Ramsey]
+    * Added constants in (({Gdk::Selection})).
+      [GitHub#254][Patch by Masafumi Yokoyama]
+    * Added missing deprecations.
+      [GitHub#291][Reported by Michel Boaventura]
+    * Added (({RGBA.parse})).
+      [GitHub#295][Reported by carlosjhr64]
+    * Supported (({Gdk::Rectangle})).
+      [GitHub#319][Reported by cedlemo]
+    * Supported (({Gdk::Screen#get_setting})).
+      [GitHub#376][Reported by cedlemo]
+    * Added (({Gdk::Screen#get_monitor})).
+
+  * Fixes
+    * Fixed a bug that (({GDK_KEY_XXX})) raises an error.
+      [ruby-gnome2-devel-en][Reported by Detlef Reichl]
+
+==== Ruby/GTK3
+
+  * Improvements
+    * Migrated to GObject Introspection based bindings from hand
+      writing bindings. Now, all the latest API in GTK+ are supported.
+      [Hiroshi Hatake][Detlef Reichl][cedlemo][John Cupitt]
+      [Masafumi Yokoyama][eumario][PeterWAWood][Daiki Ueno]
+    * Updated samples. [Patch by cedlemo]
+
+==== Ruby/GtkSourceView3
+
+  * Improvements
+    * Migrated to GObject Introspection based bindings from hand
+      writing bindings. Now, all the latest API in GtkSourceView are
+      supported.
+
+==== Ruby/VTE3
+
+  * Improvements
+    * Migrated to GObject Introspection based bindings from hand
+      writing bindings. Now, all the latest API in VTE are supported.
+      [cedlemo]
+
+==== Ruby/GStreamer
+
+  * Fixes
+    * Fixed native package name on CentOS and Fedora.
+    * Fixed shebang.
+      [GitHub#507][Patch by Dmitry Marakasov]
+
+==== Ruby/RSVG2
+
+  * Improvements
+    * Added (({:file_name})), (({:data})) and (({:flags})) option to
+      (({RSVG::Handle.new})).
+    * Updated a sample.
+      [GitHub#518][Patch by Robert A. Heiler].
+
+  * Fixes
+    * Fixed a memory leak of (({RSVG::Handle.new_from_data})) and
+      (({RSVG::Handle.new_from_file})).
+      [GitHub#318][Reported by Kagetsuki]
+
+==== Ruby/Clutter
+
+  * Improvements
+    * Added (({Clutter::Version.or_later?})).
+
+==== Ruby/WebKit2GTK
+
+  * Improvements
+    * Added.
+
+=== Thanks
+
+  * Hiroshi Hatake
+  * Christopher L. Ramsey
+  * Masafumi Yokoyama
+  * cedlemo
+  * Detlef Reichl
+  * Kagetsuki
+  * eumario
+  * PeterWAWood
+  * Hiroyuki Sato
+  * Daiki Ueno
+  * prpr_mann
+  * Dmitry Marakasov
+
 == Ruby-GNOME2 2.2.5: 2015-04-24
 
 It is a GLib 2.44 support release.
diff --git a/README.md b/README.md
index b09edbd..39fdf5c 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 ## Ruby-GNOME2 -- Ruby bindings for GNOME-2.x
 
 This is a set of bindings for the GNOME-2.x and GNOME-3.x libraries to
-use from Ruby 1.9.x, 2.0.0 and 2.1.
+use from Ruby 2.0.0, 2.1 and 2.2.
 
 ## Release packages
 
@@ -113,6 +113,15 @@ current dependencies are:
 * Ruby/GStreamer
   * depends on Ruby/GLib.
 
+### Install from GitHub master branch
+
+You can also install this gem from GitHub master branch.
+
+    % git clone https://github.com/ruby-gnome2/ruby-gnome2.git
+    % cd ruby-gnome2
+    % gem install rake rake-compiler mechanize pkg-config cairo
+    % rake gem:install
+
 ### Experimental
 
 * ...
@@ -130,12 +139,24 @@ or on the ruby-gnome2-devel-en / ruby-gnome2-devel-ja mailing list
 
 ## Copying
 
-Copyright (c) 2002-2014 Ruby-GNOME2 Project Team
+Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
 
 This program is free software.
 You can distribute/modify this program under the terms of
 the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
 
+### Exceptions
+
+Some GTK+ 3 examples are licensed under GNU Free Documentation License
+1.3 or any later version later; with no Invariant Sections, no
+Front-Cover Texts, and no Back-Cover Texts.
+
+Because they are based on scripts in
+[PyGObject-Tutorial](https://github.com/sebp/PyGObject-Tutorial).
+[PyGObject-Tutorial is licensed under GFDL 1.3](https://github.com/sebp/PyGObject-Tutorial/blob/master/COPYING).
+
+See gtk3/examples/ directory for details.
+
 ## Project Website
 
 [http://ruby-gnome2.sourceforge.jp/](http://ruby-gnome2.sourceforge.jp/)
diff --git a/Rakefile b/Rakefile
index 7f2703d..5d25540 100644
--- a/Rakefile
+++ b/Rakefile
@@ -106,13 +106,25 @@ task :build => ["Makefile"] do
 end
 
 namespace :windows do
-  desc "build all packages for Windows"
-  task :build do
-    cd("build") do
-      sh("vagrant", "destroy", "--force")
-      sh("vagrant", "up")
+  architectures = ["32", "64"]
+  build_tasks = []
+
+  namespace :build do
+    architectures.each do |architecture|
+      desc "build all packages for Windows #{architecture}"
+      task_name = "win#{architecture}"
+      build_tasks << task_name
+      task task_name do
+        cd("build") do
+          sh("vagrant", "destroy", "--force", task_name)
+          sh("vagrant", "up", task_name)
+        end
+      end
     end
   end
+
+  desc "build all packages for Windows"
+  task :build => build_tasks
 end
 
 desc "clean all packages"
@@ -161,6 +173,7 @@ gnome2_packages = gtk2_packages + gtk3_packages + [
   "clutter-gstreamer",
   "webkit-gtk",
   "webkit-gtk2",
+  "webkit2-gtk",
 ]
 gnome2_packages = gnome2_packages.uniq
 
@@ -183,7 +196,7 @@ namespace :dist do
     package(gnome2_base_name, base_files + gnome2_packages)
   end
 
-  ruby_versions = ["1.9.3-p545", "2.0.0-p451", "2.1.1"]
+  ruby_versions = ["2.0.0-p645", "2.1.6", "2.2.2"]
   namespace :test do
     ruby_base_url = "ftp://ftp.ruby-lang.org/pub/ruby"
     ruby_versions.each do |ruby_version|
@@ -355,7 +368,7 @@ namespace :gem do
   desc "install all gems"
   task :install do
     gnome2_packages.each do |package|
-      ruby("-S", "gem", "install", "--user-install",
+      ruby("-S", "gem", "install", "--local", "--user-install",
            *Dir.glob(File.join(package, "pkg", "*-#{version}.gem")))
     end
   end
@@ -374,6 +387,7 @@ namespace :gem do
       "vte3",
       "webkit-gtk",
       "webkit-gtk2",
+      "webkit2-gtk",
     ]
     windows_gnome2_packages = gnome2_packages - windows_unsupported_packages
 
@@ -433,6 +447,7 @@ namespace :gem do
     task :clean do
       windows_gnome2_packages.each do |package|
         rm_rf(File.join(package, "tmp"))
+        rm_rf(File.join(package, "vendor"))
       end
     end
 
diff --git a/atk/Rakefile b/atk/Rakefile
index 3e46d97..d775e90 100644
--- a/atk/Rakefile
+++ b/atk/Rakefile
@@ -15,7 +15,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "atk",
       :download_site => :gnome,
       :label => "atk",
-      :version => "2.14.0",
+      :version => "2.16.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/build/README.md b/build/README.md
new file mode 100644
index 0000000..bf481a4
--- /dev/null
+++ b/build/README.md
@@ -0,0 +1,12 @@
+# Ruby-GNOME2 gem build system for Windows gems
+
+## How to use
+
+    % git clone git at github.com:ruby-gnome2/ruby-gnome2.git
+    % git clone git at github.com:ruby-gnome2/pkg-config.git
+    % git clone git at github.com:rcairo/rcairo.git
+    % cd ruby-gnome2/build
+    % vagrant destroy --force
+    % vagrant up
+
+You can find gems for Windows in ruby-gnome2/build/pkg/.
diff --git a/build/Vagrantfile b/build/Vagrantfile
new file mode 100644
index 0000000..84483b6
--- /dev/null
+++ b/build/Vagrantfile
@@ -0,0 +1,30 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+  targets = [
+    "win32",
+    "win64",
+  ]
+
+  targets.each do |target|
+    config.vm.define(target) do |node|
+      node.vm.box = "ubuntu-15.04-x86_64"
+      node.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-15.04_chef-provisionerless.box"
+
+      node.vm.synced_folder("../", "/ruby-gnome2")
+      node.vm.synced_folder("../../pkg-config", "/pkg-config")
+      node.vm.synced_folder("../../rcairo", "/rcairo")
+
+      node.vm.provision(:shell,
+                        :privileged => false,
+                        :path => "build-#{target}.sh")
+      config.vm.provider("virtualbox") do |virtual_box|
+        virtual_box.cpus = (ENV["N_CPUS"] || 1).to_i
+      end
+    end
+  end
+end
diff --git a/build/build-win32.sh b/build/build-win32.sh
new file mode 100755
index 0000000..88be20b
--- /dev/null
+++ b/build/build-win32.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+export BUILD_HOST="i686-w64-mingw32"
+export DIRECTORY_SUFFIX="win32"
+
+/vagrant/build-windows.sh
diff --git a/build/build-win64.sh b/build/build-win64.sh
new file mode 100755
index 0000000..3a265f5
--- /dev/null
+++ b/build/build-win64.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export BUILD_HOST="x86_64-w64-mingw32"
+export DIRECTORY_SUFFIX="win64"
+
+export RCAIRO_WINDOWS_64=yes
+export RUBY_GNOME2_BUILD_ARCHITECTURE=x64
+
+/vagrant/build-windows.sh
diff --git a/build/build-windows.sh b/build/build-windows.sh
new file mode 100755
index 0000000..470751b
--- /dev/null
+++ b/build/build-windows.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+export LANG=C
+export DEBIAN_FRONTEND=noninteractive
+
+ruby_versions="2.0.0-p647 2.1.7 2.2.3"
+export RUBY_CC_VERSION="2.0.0:2.1.7:2.2.3"
+
+N_CPUS=$(grep '^processor' /proc/cpuinfo | wc -l)
+export MAKE_N_JOBS=${N_CPUS}
+
+export RUBYLIB="$(pwd)/pkg-config/lib"
+
+run()
+{
+  "$@"
+  if [ $? -ne 0 ]; then
+    echo "Failed $@"
+    exit 1
+  fi
+}
+
+run sudo sed -i'' -e 's,http://us,http://jp,g' /etc/apt/sources.list
+run sudo apt-get update
+
+echo ttf-mscorefonts-installer \
+     msttcorefonts/accepted-mscorefonts-eula \
+     select true | \
+  run sudo debconf-set-selections
+
+run \
+  sudo apt-get install -y -V \
+  git \
+  ruby \
+  ruby-dev \
+  build-essential \
+  pkg-config \
+  autoconf \
+  libtool \
+  gettext \
+  intltool \
+  gtk-doc-tools \
+  libffi-dev \
+  libglib2.0-dev \
+  libgdk-pixbuf2.0-dev \
+  gobject-introspection \
+  libgtk2.0-bin \
+  flex \
+  bison \
+  gperf \
+  libxml2-utils \
+  python-dev \
+  wine1.6 \
+  mingw-w64 \
+  cmake
+
+run git clone file:///pkg-config/.git
+run git clone file:///rcairo/.git rcairo.${DIRECTORY_SUFFIX}
+run git clone file:///ruby-gnome2/.git ruby-gnome2.${DIRECTORY_SUFFIX}
+
+run sudo gem install --no-document \
+    rake \
+    bundler \
+    pkg-config \
+    rake-compiler \
+    mechanize \
+    packnga
+
+if [ ! -d ~/.wine/ ]; then
+  run wineboot
+  until [ -f ~/.wine/system.reg ]; do
+    sleep 1
+  done
+  wine_home="z:/home/vagrant"
+  wine_rcairo="${wine_home}/rcairo.${DIRECTORY_SUFFIX}"
+  wine_ruby_gnome2="${wine_home}/ruby-gnome2.${DIRECTORY_SUFFIX}"
+  bin_dir="vendor/local/bin"
+  path=$(
+    (
+      echo -n "${wine_rcairo}/${bin_dir};";
+      echo -n "${wine_ruby_gnome2}/glib2/${bin_dir};";
+      echo -n "${wine_ruby_gnome2}/gdk_pixbuf2/${bin_dir};"
+      echo -n "${wine_ruby_gnome2}/pango/${bin_dir};";
+      echo -n "${wine_ruby_gnome2}/atk/${bin_dir};";
+      echo -n "${wine_ruby_gnome2}/gtk2/${bin_dir};";
+      echo -n "${wine_ruby_gnome2}/gdk3/${bin_dir};";
+    ) | \
+      sed -e 's,/,\\\\\\\\,g')
+  run sed -i'' -r \
+      -e "s,^(\"PATH\"=str\\(2\\):\"),\\1${path},g" \
+      ~/.wine/system.reg
+fi
+
+run wget https://www.opengl.org/registry/api/GL/glext.h
+run sudo install glext.h /usr/share/mingw-w64/include/GL/
+run rm -f glext.h
+
+if ! grep -q GL/glext /usr/share/mingw-w64/include/GL/gl.h; then
+  cat <<EOF > /tmp/insert.txt
+
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+typedef char GLchar;
+#include <GL/glext.h>
+
+EOF
+  run sudo sed -i'' -e '/typedef void GLvoid;/ r /tmp/insert.txt' \
+      /usr/share/mingw-w64/include/GL/gl.h
+  run rm -f /tmp/insert.txt
+fi
+
+sudo chown -R "${USER}:${USER}" /var/lib/gems
+
+for ruby_version in ${ruby_versions}; do
+  run rake-compiler cross-ruby HOST="${BUILD_HOST}" VERSION="${ruby_version}"
+done
+
+run cd ~/rcairo.${DIRECTORY_SUFFIX}
+run rake windows:gcc:dll:bundle windows:zlib:build
+
+run cd ~/ruby-gnome2.${DIRECTORY_SUFFIX}/glib2
+run rake native:build windows:build
+
+run cd ~/ruby-gnome2.${DIRECTORY_SUFFIX}/gobject-introspection
+run rake native:build
+
+run cd ~/rcairo.${DIRECTORY_SUFFIX}
+run rake windows:build
+run rake cross compile native
+
+run cd ~/ruby-gnome2.${DIRECTORY_SUFFIX}
+run rake gem:windows:build
+
+run mkdir -p /vagrant/pkg
+run cp */pkg/*.gem /vagrant/pkg/
diff --git a/clutter-gstreamer/Rakefile b/clutter-gstreamer/Rakefile
index 9ec9f6c..13baad2 100644
--- a/clutter-gstreamer/Rakefile
+++ b/clutter-gstreamer/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -47,7 +47,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "clutter-gst",
       :download_site => :gnome,
       :label => "Clutter-GStreamer",
-      :version => "3.0.0",
+      :version => "3.0.10",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/clutter-gstreamer/lib/clutter-gst.rb b/clutter-gstreamer/lib/clutter-gst.rb
index ec32546..34fad8f 100644
--- a/clutter-gstreamer/lib/clutter-gst.rb
+++ b/clutter-gstreamer/lib/clutter-gst.rb
@@ -47,11 +47,13 @@ module ClutterGst
       Gst.init if Gst.respond_to?(:init)
       Clutter.init if Clutter.respond_to?(:init)
       loader = Loader.new(self, argv)
-      loader.load("ClutterGst")
+      loader.load
     end
   end
 
   class Loader < GObjectIntrospection::Loader
+    NAMESPACE = "ClutterGst"
+
     class InitError < StandardError
     end
 
@@ -60,6 +62,10 @@ module ClutterGst
       @init_arguments = init_arguments
     end
 
+    def load
+      super(NAMESPACE)
+    end
+
     private
     def pre_load(repository, namespace)
       init = repository.find(namespace, "init")
@@ -75,5 +81,11 @@ module ClutterGst
 
     def post_load(repository, namespace)
     end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
   end
 end
diff --git a/clutter-gstreamer/test/run-test.rb b/clutter-gstreamer/test/run-test.rb
index e8dea03..dcf9c9a 100755
--- a/clutter-gstreamer/test/run-test.rb
+++ b/clutter-gstreamer/test/run-test.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -47,8 +47,6 @@ end
 $LOAD_PATH.unshift(File.join(glib_base, "test"))
 require "glib-test-init"
 
-$VERBOSE = false # TODO: remove me
-
 $LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
 require "gobject-introspection-test-utils"
 
@@ -60,4 +58,12 @@ require "clutter-gstreamer-test-utils"
 
 require "clutter-gst"
 
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(ClutterGst::Loader::NAMESPACE)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
 exit Test::Unit::AutoRunner.run(true)
diff --git a/clutter-gstreamer/test/test-clutter-gst-video-sink.rb b/clutter-gstreamer/test/test-clutter-gst-video-sink.rb
new file mode 100644
index 0000000..9f4ab24
--- /dev/null
+++ b/clutter-gstreamer/test/test-clutter-gst-video-sink.rb
@@ -0,0 +1,25 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class ClutterGstVideoSinkTest < Test::Unit::TestCase
+  include ClutterGStreamerTestUtils
+
+  def test_texture
+    texture = Clutter::Texture.new
+    sink = ClutterGst::VideoSink.new(texture)
+    assert_equal(texture, sink.texture)
+  end
+end
diff --git a/clutter-gstreamer/test/test-clutter-gst.rb b/clutter-gstreamer/test/test-clutter-gst.rb
deleted file mode 100644
index e546d88..0000000
--- a/clutter-gstreamer/test/test-clutter-gst.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-class ClutterGstTest < Test::Unit::TestCase
-  include ClutterGStreamerTestUtils
-
-  def test_init
-    omit_on_travis_ci
-    assert_nothing_raised do
-      ClutterGst.init
-    end
-  end
-end
diff --git a/clutter-gtk/Rakefile b/clutter-gtk/Rakefile
index 02c0674..4d80fe2 100644
--- a/clutter-gtk/Rakefile
+++ b/clutter-gtk/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -47,17 +47,15 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "clutter-gtk",
       :download_site => :gnome,
       :label => "Clutter-GTK",
-      :version => "1.6.0",
+      :version => "1.6.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--enable-introspection",
         ],
         :patches => [
-          "0001-actor-fix-clutter-win32.h-include-path.patch",
-          "0001-Use-no-undefined-ld-flag.patch",
         ],
-        :need_autoreconf => true,
+        # :need_autoreconf => true,
         :built_file => "bin/libclutter-gtk-1.0-0.dll",
       },
     }
diff --git a/clutter-gtk/lib/clutter-gtk.rb b/clutter-gtk/lib/clutter-gtk.rb
index 3910210..a8b3e58 100644
--- a/clutter-gtk/lib/clutter-gtk.rb
+++ b/clutter-gtk/lib/clutter-gtk.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -43,8 +43,9 @@ module ClutterGtk
         remove_method(:init)
         remove_method(:const_missing)
       end
+      Gtk.init if Gtk.respond_to?(:init)
       loader = Loader.new(self, argv)
-      loader.load("GtkClutter")
+      loader.load
       Clutter.init(argv) if Clutter.respond_to?(:init)
     end
   end
@@ -53,11 +54,17 @@ module ClutterGtk
     class InitError < StandardError
     end
 
+    NAMESPACE = "GtkClutter"
+
     def initialize(base_module, init_arguments)
       super(base_module)
       @init_arguments = init_arguments
     end
 
+    def load
+      super(NAMESPACE)
+    end
+
     private
     def pre_load(repository, namespace)
       init = repository.find(namespace, "init")
@@ -73,5 +80,11 @@ module ClutterGtk
 
     def post_load(repository, namespace)
     end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
   end
 end
diff --git a/clutter-gtk/patches/0001-Use-no-undefined-ld-flag.patch b/clutter-gtk/patches/0001-Use-no-undefined-ld-flag.patch
deleted file mode 100644
index ec8856a..0000000
--- a/clutter-gtk/patches/0001-Use-no-undefined-ld-flag.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c42a07c632ef64d34e57723b5effd643ea0a7c86 Mon Sep 17 00:00:00 2001
-From: Kouhei Sutou <kou at clear-code.com>
-Date: Mon, 29 Apr 2013 18:08:59 +0900
-Subject: [PATCH] Use -no-undefined ld flag
-
-It fixes DLL generation by cross compile.
----
- clutter-gtk/Makefile.am |    2 +-
- configure.ac            |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/clutter-gtk/Makefile.am b/clutter-gtk/Makefile.am
-index 9a35919..3963ac0 100644
---- a/clutter-gtk/Makefile.am
-+++ b/clutter-gtk/Makefile.am
-@@ -47,7 +47,7 @@ source_h_private = \
- libclutter_gtk_ at CLUTTER_GTK_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_private)
- libclutter_gtk_ at CLUTTER_GTK_API_VERSION@_la_LIBADD  = $(CLUTTER_GTK_DEPS_LIBS) $(LIBM)
- libclutter_gtk_ at CLUTTER_GTK_API_VERSION@_la_LDFLAGS = \
--	$(CLUTTER_LT_LDFLAGS) \
-+	$(CLUTTER_GTK_LT_LDFLAGS) \
- 	-export-symbols-regex "^gtk_clutter.*"
- 
- cluttergtkheadersdir = $(includedir)/clutter-gtk- at CLUTTER_GTK_API_VERSION@/clutter-gtk
-diff --git a/configure.ac b/configure.ac
-index 7d381e2..8db163b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -56,7 +56,7 @@ AC_MSG_CHECKING([if building for some Win32 platform])
- AS_CASE([$host],
-         [*-*-mingw*|*-*-cygwin*],
-         [
--          CLUTTER_LT_LDFLAGS="$CLUTTER_GTK_LT_LDFLAGS -no-undefined"
-+          CLUTTER_GTK_LT_LDFLAGS="$CLUTTER_GTK_LT_LDFLAGS -no-undefined"
-           platform_win32=yes
-         ],
- 
--- 
-1.7.10.4
-
diff --git a/clutter-gtk/patches/0001-actor-fix-clutter-win32.h-include-path.patch b/clutter-gtk/patches/0001-actor-fix-clutter-win32.h-include-path.patch
deleted file mode 100644
index 61d0722..0000000
--- a/clutter-gtk/patches/0001-actor-fix-clutter-win32.h-include-path.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b692fd86471c8b3c5e0e92007b7b2d5cfd058af7 Mon Sep 17 00:00:00 2001
-From: Kouhei Sutou <kou at clear-code.com>
-Date: Sat, 13 Apr 2013 19:19:36 +0900
-Subject: [PATCH] actor: fix clutter-win32.h include path
-
-It is installed under "clutter/win32/" directory. Other include paths
-were fixed in 9da7dd191dae7d1cc626ea22998145ebc2bb0722 but it was not
-fixed.
----
- clutter-gtk/gtk-clutter-actor.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/clutter-gtk/gtk-clutter-actor.c b/clutter-gtk/gtk-clutter-actor.c
-index f95caed..67d9cdd 100644
---- a/clutter-gtk/gtk-clutter-actor.c
-+++ b/clutter-gtk/gtk-clutter-actor.c
-@@ -59,7 +59,7 @@
- #endif
- 
- #ifdef CLUTTER_WINDOWING_WIN32
--#include <clutter/clutter-win32.h>
-+#include <clutter/win32/clutter-win32.h>
- #endif
- #ifdef GDK_WINDOWING_WIN32
- #include <gdk/gdkwin32.h>
--- 
-1.7.10.4
-
diff --git a/clutter-gtk/test/run-test.rb b/clutter-gtk/test/run-test.rb
index c3001e6..743774d 100755
--- a/clutter-gtk/test/run-test.rb
+++ b/clutter-gtk/test/run-test.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright (C) 2012-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,6 +27,7 @@ pango_base = File.join(ruby_gnome2_base, "pango")
 gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
 cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
 gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
+gio_base = File.join(ruby_gnome2_base, "gio2")
 clutter_base = File.join(ruby_gnome2_base, "clutter")
 gdk3_base = File.join(ruby_gnome2_base, "gdk3")
 gtk3_base = File.join(ruby_gnome2_base, "gtk3")
@@ -39,6 +40,7 @@ modules = [
   [gdk_pixbuf_base, "gdk_pixbuf2"],
   [cairo_gobject_base, "cairo-gobject"],
   [gobject_introspection_base, "gobject-introspection"],
+  [gio_base, "gio2"],
   [clutter_base, "clutter"],
   [gdk3_base, "gdk3"],
   [gtk3_base, "gtk3"],
@@ -55,8 +57,6 @@ end
 $LOAD_PATH.unshift(File.join(glib_base, "test"))
 require "glib-test-init"
 
-$VERBOSE = false # TODO: remove me
-
 $LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
 require "gobject-introspection-test-utils"
 
@@ -68,6 +68,14 @@ require "clutter-gtk-test-utils"
 
 require "clutter-gtk"
 
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(ClutterGtk::Loader::NAMESPACE)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
 # exclude sample/test-*
 clutter_gtk_test_base = File.join(clutter_gtk_base, "test")
 exit Test::Unit::AutoRunner.run(true, clutter_gtk_test_base)
diff --git a/clutter/Rakefile b/clutter/Rakefile
index 58785dc..3791c69 100644
--- a/clutter/Rakefile
+++ b/clutter/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -82,7 +82,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "cogl",
       :download_site => :gnome,
       :label => "Cogl",
-      :version => "1.18.2",
+      :version => "1.20.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
@@ -96,14 +96,14 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "json-glib",
       :download_site => :gnome,
       :label => "JSON-GLib",
-      :version => "1.0.2",
+      :version => "1.0.4",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--enable-introspection",
         ],
         :patches => [
-          "json-glib-1.0.2-add-missing-config-h.diff",
+          # "json-glib-1.0.2-add-missing-config-h.diff",
         ],
         :need_autoreconf => true,
         :built_file => "bin/libjson-glib-1.0-0.dll",
@@ -113,7 +113,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "clutter",
       :download_site => :gnome,
       :label => "Clutter",
-      :version => "1.20.0",
+      :version => "1.22.4",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/clutter/lib/clutter.rb b/clutter/lib/clutter.rb
index d882754..8df36f7 100644
--- a/clutter/lib/clutter.rb
+++ b/clutter/lib/clutter.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -50,7 +50,7 @@ module Clutter
         remove_method(:const_missing)
       end
       loader = Loader.new(self, argv)
-      loader.load("Clutter")
+      loader.load
       require "clutter/actor"
       require "clutter/actor-iter"
       require "clutter/animatable"
@@ -63,6 +63,7 @@ module Clutter
       require "clutter/text"
       require "clutter/text-buffer"
       require "clutter/threads"
+      require "clutter/version"
     end
   end
 
@@ -70,6 +71,8 @@ module Clutter
     class InitError < StandardError
     end
 
+    NAMESPACE = "Clutter"
+
     def initialize(base_module, init_arguments)
       super(base_module)
       @init_arguments = init_arguments
@@ -78,6 +81,10 @@ module Clutter
       @event_infos = []
     end
 
+    def load
+      super(NAMESPACE)
+    end
+
     private
     def pre_load(repository, namespace)
       init = repository.find(namespace, "init")
@@ -95,6 +102,8 @@ module Clutter
       @base_module.const_set("Threads", @threads_module)
       @feature_module = Module.new
       @base_module.const_set("Feature", @feature_module)
+      @version_module = Module.new
+      @base_module.const_set("Version", @version_module)
     end
 
     def post_load(repository, namespace)
@@ -106,6 +115,12 @@ module Clutter
       load_events
     end
 
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+
     def load_events
       @event_infos.each do |event_info|
         define_struct(event_info, :parent => Event)
@@ -161,6 +176,8 @@ module Clutter
       when /\AKEY_/
         @key_constants[info.name] = true
         @keys_module.const_set(info.name, info.value)
+      when /_VERSION\z/
+        @version_module.const_set($PREMATCH, info.value)
       else
         @other_constant_infos << info
       end
diff --git a/clutter/lib/clutter/version.rb b/clutter/lib/clutter/version.rb
new file mode 100644
index 0000000..eae3a5d
--- /dev/null
+++ b/clutter/lib/clutter/version.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Clutter
+  module Version
+    STRING = [MAJOR, MINOR, MICRO].join(".")
+
+    class << self
+      def or_later?(major, minor, micro=nil)
+        micro ||= 0
+        Clutter.check_version?(major, minor, micro)
+      end
+    end
+  end
+end
diff --git a/clutter/patches/json-glib-1.0.2-add-missing-config-h.diff b/clutter/patches/json-glib-1.0.2-add-missing-config-h.diff
deleted file mode 100644
index e5aa502..0000000
--- a/clutter/patches/json-glib-1.0.2-add-missing-config-h.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 415c75677544df6aa4929c851f44a412ea39b7b4
-Author: Emmanuele Bassi <ebassi at gnome.org>
-Date:   Fri Jul 25 09:10:52 2014 +0100
-
-    Include "config.h" in the enum types template
-    
-    Expands the symbol annotation correctly.
----
- json-glib/json-enum-types.c.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/json-glib/json-enum-types.c.in b/json-glib/json-enum-types.c.in
-index 8b82049..0e09075 100644
---- a/json-glib/json-enum-types.c.in
-+++ b/json-glib/json-enum-types.c.in
-@@ -1,4 +1,5 @@
- /*** BEGIN file-header ***/
-+#include "config.h"
- #include "json-enum-types.h"
- /*** END file-header ***/
- 
diff --git a/clutter/test/run-test.rb b/clutter/test/run-test.rb
index ba01dfd..c0f2694 100755
--- a/clutter/test/run-test.rb
+++ b/clutter/test/run-test.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright (C) 2012-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -44,8 +44,6 @@ end
 $LOAD_PATH.unshift(File.join(glib_base, "test"))
 require "glib-test-init"
 
-$VERBOSE = false # TODO: remove me
-
 $LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
 require "gobject-introspection-test-utils"
 
@@ -54,6 +52,14 @@ require "clutter-test-utils"
 
 require "clutter"
 
-Clutter.init([])
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(Clutter::Loader::NAMESPACE)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
+Clutter.init
 
 exit Test::Unit::AutoRunner.run(true, clutter_base)
diff --git a/clutter/test/test-clutter-version.rb b/clutter/test/test-clutter-version.rb
new file mode 100644
index 0000000..068e0c9
--- /dev/null
+++ b/clutter/test/test-clutter-version.rb
@@ -0,0 +1,47 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestClutterVersion < Test::Unit::TestCase
+  include ClutterTestUtils
+
+  test "STRING" do
+    major = Clutter::Version::MAJOR
+    minor = Clutter::Version::MINOR
+    micro = Clutter::Version::MICRO
+    assert_equal([major, minor, micro].join("."),
+                 Clutter::Version::STRING)
+  end
+
+  sub_test_case("#or_later?") do
+    test "same" do
+      assert_true(Clutter::Version.or_later?(Clutter::Version::MAJOR,
+                                             Clutter::Version::MINOR,
+                                             Clutter::Version::MICRO))
+    end
+
+    test "later" do
+      assert_true(Clutter::Version.or_later?(Clutter::Version::MAJOR,
+                                             Clutter::Version::MINOR - 1,
+                                             Clutter::Version::MICRO))
+    end
+
+    test "earlier" do
+      assert_false(Clutter::Version.or_later?(Clutter::Version::MAJOR,
+                                              Clutter::Version::MINOR + 1,
+                                              Clutter::Version::MICRO))
+    end
+  end
+end
diff --git a/extconf.rb b/extconf.rb
index 119c7ad..dda9490 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -24,7 +24,10 @@ priorlibs = [
 ]
 
 unsupported_libraries = [
-  "gdk3-no-gi"
+  "gdk3-no-gi",
+  "gtk3-no-gi",
+  "gtksourceview3-no-gi",
+  "vte3-no-gi",
 ]
 
 #
diff --git a/gdk3-no-gi/COPYING.LIB b/gdk3-no-gi/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/gdk3-no-gi/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/gdk3-no-gi/README.md b/gdk3-no-gi/README.md
new file mode 100644
index 0000000..dd0cca7
--- /dev/null
+++ b/gdk3-no-gi/README.md
@@ -0,0 +1,25 @@
+# Ruby/GDK3
+
+Ruby/GDK3 is a Ruby binding of GDK 3.
+
+## Requirements
+
+* Ruby/GLib2, Ruby/ATK, Ruby/Pango and Ruby/GdkPixbuf2 in
+  [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
+* [rcairo](https://github.com/rcairo/rcairo)
+* [GTK+](http://cairographics.org/) 3.4.2 or later
+
+## Install
+
+    gem install gdk3
+
+## License
+
+Copyright (c) 2002-2013 Ruby-GNOME2 Project Team
+
+This program is free software. You can distribute/modify this program
+under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+
+## Project Website
+
+http://ruby-gnome2.sourceforge.jp/
diff --git a/gdk3-no-gi/Rakefile b/gdk3-no-gi/Rakefile
new file mode 100644
index 0000000..06e0a96
--- /dev/null
+++ b/gdk3-no-gi/Rakefile
@@ -0,0 +1,57 @@
+# -*- ruby -*-
+
+$LOAD_PATH.unshift("./../glib2/lib")
+require "gnome2/rake/package-task"
+
+package_task = GNOME2::Rake::PackageTask.new do |package|
+  package.summary = "Ruby/GDK3 is a Ruby binding of GDK-3.x."
+  package.description = "Ruby/GDK3 is a Ruby binding of GDK-3.x."
+  package.dependency.gem.runtime = ["pango", "gdk_pixbuf2"]
+  package.windows.packages = []
+  package.windows.dependencies = []
+  package.windows.build_dependencies = [
+    "glib2",
+    "atk",
+    "pango",
+    "gdk_pixbuf2",
+    "gobject-introspection",
+  ]
+  package.windows.gobject_introspection_dependencies = [
+    "atk",
+    "pango",
+    "gdk_pixbuf2",
+  ]
+  package.external_packages = [
+    {
+      :name => "gtk+",
+      :download_site => :gnome,
+      :label => "GTK+",
+      :version => "3.10.7",
+      :compression_method => "xz",
+      :windows => {
+        :configure_args => [
+          "--enable-introspection",
+          "--with-included-immodules",
+        ],
+        :patches => [
+          "gdk+-3.10.6-remove-def-use.diff",
+        ],
+        :need_autoreconf => true,
+        :build_concurrently => false,
+        :built_file => "bin/libgdk-3-0.dll",
+      },
+    },
+    {
+      :name => "hicolor-icon-theme",
+      :download_base_url => "http://icon-theme.freedesktop.org/releases",
+      :label => "gtk-hi-color-icon-theme",
+      :version => "0.13",
+      :windows => {
+        :configure_args => [],
+        :build_concurrently => false,
+        :built_file => "share/icons/hicolor/index.theme",
+      }
+    },
+  ]
+end
+package_task.define
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/depend b/gdk3-no-gi/ext/gdk3-no-gi/depend
new file mode 100644
index 0000000..5bff803
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/depend
@@ -0,0 +1,11 @@
+install-so: install-headers
+install-headers:
+	$(INSTALL_DATA) $(srcdir)/rbgdk3.h $(RUBYARCHDIR)
+	$(INSTALL_DATA) $(srcdir)/rbgdk3conversions.h $(RUBYARCHDIR)
+
+install: install-pc
+install-pc:
+	if test -n "$(pkgconfigdir)"; then			\
+	  $(MAKEDIRS) $(pkgconfigdir);				\
+	  $(INSTALL_DATA) ruby-gdk3.pc $(pkgconfigdir);		\
+	fi
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/extconf.rb b/gdk3-no-gi/ext/gdk3-no-gi/extconf.rb
new file mode 100644
index 0000000..f7933c6
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/extconf.rb
@@ -0,0 +1,117 @@
+=begin
+extconf.rb for Ruby/GDK extention library
+=end
+
+require 'pathname'
+
+source_dir = Pathname(__FILE__).dirname
+base_dir = source_dir.parent.parent.expand_path
+top_dir = base_dir.parent.expand_path
+top_build_dir = Pathname(".").parent.parent.parent.expand_path
+
+mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
+version_suffix = ""
+unless mkmf_gnome2_dir.exist?
+  if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
+    version_suffix = $1
+    mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
+  end
+end
+
+$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
+
+module_name = "gdk3"
+package_id = "gdk-3.0"
+
+begin
+  require 'mkmf-gnome2'
+rescue LoadError
+  require 'rubygems'
+  gem 'glib2'
+  require 'mkmf-gnome2'
+end
+
+have_func("rb_errinfo")
+
+["glib2", "pango", "gdk_pixbuf2"].each do |package|
+  directory = "#{package}#{version_suffix}"
+  build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
+  add_depend_package(package, "#{directory}/ext/#{package}",
+                     top_dir.to_s,
+                     :top_build_dir => top_build_dir.to_s,
+                     :target_build_dir => build_dir)
+end
+
+unless check_cairo(:top_dir => top_dir)
+  exit(false)
+end
+
+setup_windows(module_name, base_dir)
+
+unless required_pkg_config_package(package_id,
+                                   :debian => "libgtk-3-dev",
+                                   :fedora => "gtk3-devel",
+                                   :homebrew => "gtk+3",
+                                   :macports => "gtk3")
+  exit(false)
+end
+
+have_header("st.h")
+have_header("ruby/st.h")
+
+STDOUT.print("checking for target... ")
+STDOUT.flush
+target = PKGConfig.variable(package_id, "target")
+$defs << "-DRUBY_GDK3_TARGET=\\\"#{target}\\\""
+STDOUT.print(target, "\n")
+
+gdk_include_path = nil
+include_paths = $CFLAGS.gsub(/-D\w+/, '').split(/-I/) + ['/usr/include']
+include_paths.each do |path|
+  path.strip!
+
+  if FileTest.exist?("#{path}/gdk/gdkkeysyms.h")
+    gdk_include_path = Pathname("#{path}/gdk")
+    break
+  end
+end
+raise "can't find gdkkeysyms.h" if gdk_include_path.nil?
+
+xlib_header = "X11/Xlib.h"
+if target == "x11" and have_header('X11/Xlib.h') and have_library("X11")
+  have_func("XReadBitmapFileData", xlib_header)
+  have_func("XGetErrorText", xlib_header)
+end
+
+create_pkg_config_file("Ruby/GDK3", package_id, ruby_gnome2_version)
+
+rbgdkkeysyms_h_path = Pathname("rbgdkkeysyms.h")
+gdkkeysyms_h_paths = []
+gdkkeysyms_h_paths << gdk_include_path + "gdkkeysyms.h"
+gdkkeysyms_h_paths << gdk_include_path + "gdkkeysyms-compat.h"
+rbgdkkeysyms_h_path.open("w") do |rbgdkkeysyms_h|
+  gdkkeysyms_h_paths.each do |path|
+    next unless path.exist?
+    path.each_line do |line|
+      if /^#define\s+(GDK_KEY_\w+)\s+\d+/ =~ line
+        define_line = "rb_define_const(mGdkKeyval, \"#{$1}\", INT2FIX(#{$1}));"
+        rbgdkkeysyms_h.puts(define_line)
+      end
+    end
+  end
+end
+
+add_distcleanfile("rbgdkkeysyms.h")
+
+ensure_objs
+
+$defs << "-DRUBY_GDK3_COMPILATION"
+create_makefile(module_name)
+
+pkg_config_dir = with_config("pkg-config-dir")
+if pkg_config_dir.is_a?(String)
+  File.open("Makefile", "ab") do |makefile|
+    makefile.puts
+    makefile.puts("pkgconfigdir=#{pkg_config_dir}")
+  end
+end
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/gdk3.def b/gdk3-no-gi/ext/gdk3-no-gi/gdk3.def
new file mode 100644
index 0000000..7f219a4
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/gdk3.def
@@ -0,0 +1,12 @@
+EXPORTS
+    Init_gdk3
+    rbgdk_rval2gdkpoints
+    rbgdk_rval2gdkatoms
+    rbgdk_rval2gdkpixbufglist
+    gdk_atom_get_type
+    gdk_geometry_get_type
+    gdk_windowattr_get_type
+    get_gdkatom
+    rbgdk_gdkevent2rval
+    rbgdk_rval2gdkevent
+
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/init.c b/gdk3-no-gi/ext/gdk3-no-gi/init.c
new file mode 100644
index 0000000..6e20c07
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/init.c
@@ -0,0 +1,35 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2006 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2001 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+#include "gmodule.h"
+
+extern void Init_gdk3(void);
+
+void
+Init_gdk3(void)
+{
+    Init_gdk();
+    Init_gdkx11();
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdk.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk.c
new file mode 100644
index 0000000..2a829f6
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk.c
@@ -0,0 +1,491 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE mGdk
+
+ID id_call;
+
+/* We don't need them.
+void        gdk_init                        (gint *argc,
+                                             gchar ***argv);
+gboolean    gdk_init_check                  (gint *argc,
+                                             gchar ***argv);
+void        gdk_parse_args                  (gint *argc,
+                                             gchar ***argv);
+*/
+
+struct rbgdk_rval2gdkpoints_args {
+    VALUE ary;
+    long n;
+    GdkPoint *result;
+};
+
+static VALUE
+rbgdk_rval2gdkpoints_body(VALUE value)
+{
+    long i;
+    struct rbgdk_rval2gdkpoints_args *args = (struct rbgdk_rval2gdkpoints_args *)value;
+
+    for (i = 0; i < args->n; i++) {
+        VALUE points = rb_ary_to_ary(RARRAY_PTR(args->ary)[i]);
+
+        if (RARRAY_LEN(points) != 2)
+            rb_raise(rb_eArgError, "point %ld should be array of size 2", i);
+
+        args->result[i].x = NUM2INT(RARRAY_PTR(points)[0]);
+        args->result[i].y = NUM2INT(RARRAY_PTR(points)[1]);
+    }
+
+    return Qnil;
+}
+
+static G_GNUC_NORETURN VALUE
+rbgdk_rval2gdkpoints_rescue(VALUE value)
+{
+    g_free(((struct rbgdk_rval2gdkpoints_args *)value)->result);
+
+    rb_exc_raise(rb_errinfo());
+}
+
+GdkPoint *
+rbgdk_rval2gdkpoints(VALUE value, long *n)
+{
+    struct rbgdk_rval2gdkpoints_args args;
+
+    args.ary = rb_ary_to_ary(value);
+    args.n = RARRAY_LEN(args.ary);
+    args.result = g_new(GdkPoint, args.n + 1);
+
+    rb_rescue(rbgdk_rval2gdkpoints_body, (VALUE)&args,
+              rbgdk_rval2gdkpoints_rescue, (VALUE)&args);
+
+    *n = args.n;
+
+    return args.result;
+}
+
+struct rbgdk_rval2gdkatoms_args {
+    VALUE ary;
+    long n;
+    GdkAtom *result;
+};
+
+static VALUE
+rbgdk_rval2gdkatoms_body(VALUE value)
+{
+    long i;
+    struct rbgdk_rval2gdkatoms_args *args = (struct rbgdk_rval2gdkatoms_args *)value;
+
+    for (i = 0; i < args->n; i++)
+        args->result[i] = RVAL2ATOM(RARRAY_PTR(args->ary)[i]);
+
+    return Qnil;
+}
+
+static G_GNUC_NORETURN VALUE
+rbgdk_rval2gdkatoms_rescue(VALUE value)
+{
+    g_free(((struct rbgdk_rval2gdkatoms_args *)value)->result);
+
+    rb_exc_raise(rb_errinfo());
+}
+
+GdkAtom *
+rbgdk_rval2gdkatoms(VALUE value, long *n)
+{
+    struct rbgdk_rval2gdkatoms_args args;
+
+    args.ary = rb_ary_to_ary(value);
+    args.n = RARRAY_LEN(args.ary);
+    args.result = g_new(GdkAtom, args.n + 1);
+
+    rb_rescue(rbgdk_rval2gdkatoms_body, (VALUE)&args,
+              rbgdk_rval2gdkatoms_rescue, (VALUE)&args);
+
+    *n = args.n;
+
+    return args.result;
+}
+
+struct rval2gdkpixbufglist_args {
+    VALUE ary;
+    long n;
+    GList *result;
+};
+
+static VALUE
+rbgdk_rval2gdkpixbufglist_body(VALUE value)
+{
+    long i;
+    struct rval2gdkpixbufglist_args *args = (struct rval2gdkpixbufglist_args *)value;
+
+    for (i = 0; i < args->n; i++)
+        args->result = g_list_append(args->result, RVAL2GDKPIXBUF(RARRAY_PTR(args->ary)[i]));
+
+    return Qnil;
+}
+
+static G_GNUC_NORETURN VALUE
+rbgdk_rval2gdkpixbufglist_rescue(VALUE value)
+{
+    g_list_free(((struct rval2gdkpixbufglist_args *)value)->result);
+
+    rb_exc_raise(rb_errinfo());
+}
+
+GList *
+rbgdk_rval2gdkpixbufglist(VALUE value)
+{
+    struct rval2gdkpixbufglist_args args;
+
+    args.ary = rb_ary_to_ary(value);
+    args.n = RARRAY_LEN(args.ary);
+    args.result = NULL;
+
+    rb_rescue(rbgdk_rval2gdkpixbufglist_body, (VALUE)&args,
+              rbgdk_rval2gdkpixbufglist_rescue, (VALUE)&args);
+
+    return args.result;
+}
+
+static VALUE
+rg_s_display_arg_name(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(gdk_get_display_arg_name());
+}
+
+/* deprecated
+static VALUE
+rg_s_set_locale(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(gdk_set_locale());
+}
+*/
+
+/* deprecated
+static VALUE
+rg_s_set_sm_client_id(VALUE self, VALUE id)
+{
+    gdk_set_sm_client_id(RVAL2CSTR_ACCEPT_NIL(id));
+    return self;
+}
+*/
+
+static VALUE
+rg_s_notify_startup_complete(int argc, VALUE *argv, VALUE self)
+{
+    VALUE startup_id;
+
+    rb_scan_args(argc, argv, "01", &startup_id);
+
+    if (NIL_P(startup_id)) {
+        gdk_notify_startup_complete();
+    } else {
+        gdk_notify_startup_complete_with_id(RVAL2CSTR(startup_id));
+    }
+    return self;
+}
+
+static VALUE
+rg_s_program_class(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(gdk_get_program_class());
+}
+
+static VALUE
+rg_s_set_program_class(VALUE self, VALUE program_class)
+{
+    gdk_set_program_class(RVAL2CSTR(program_class));
+    return self;
+}
+
+static VALUE
+rg_s_display(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(gdk_get_display());
+}
+
+#ifdef HAVE_X11_XLIB_H
+#ifdef HAVE_XGETERRORTEXT
+#include <X11/Xlib.h>
+#include <errno.h>
+
+static VALUE rb_x_error;
+static VALUE rb_x_io_error;
+
+static int
+rbgdk_x_error(Display *display, XErrorEvent *error)
+{
+     gchar buf[64];
+
+     XGetErrorText(display, error->error_code, buf, 63);
+
+     rb_funcall((VALUE)rb_x_error, id_call, 4, INT2NUM(error->serial),
+                INT2NUM(error->error_code), INT2NUM(error->request_code),
+                INT2NUM(error->minor_code));
+     return 0;
+}
+
+static int
+rbgdk_x_io_error(Display *display)
+{
+    int errno_saved = errno;
+    const gchar* disp;
+    const gchar* error;
+
+    disp = display ? DisplayString(display) : gdk_get_display_arg_name();
+    if (! disp)
+        disp = "(none)";
+
+    error = g_strerror(errno_saved);
+
+    rb_funcall((VALUE)rb_x_io_error, id_call, 3, CSTR2RVAL(disp),
+               INT2NUM(errno), CSTR2RVAL(error));
+    return 0;
+}
+#endif
+#endif
+
+static VALUE
+rg_s_set_x_error_handler(VALUE self)
+{
+#ifdef HAVE_XGETERRORTEXT
+    rb_x_error = rb_block_proc();
+    G_RELATIVE(self, rb_x_error);
+    XSetErrorHandler(rbgdk_x_error);
+#else
+    rb_warn("Not supported on this environment.");
+#endif
+    return self;
+}
+
+static VALUE
+rg_s_set_x_io_error_handler(VALUE self)
+{
+#ifdef HAVE_XGETERRORTEXT
+    rb_x_io_error = rb_block_proc();
+    G_RELATIVE(self, rb_x_io_error);
+    XSetIOErrorHandler(rbgdk_x_io_error);
+#else
+    rb_warn("Not supported on this environment.");
+#endif
+    return self;
+}
+
+static VALUE
+rg_s_flush(VALUE self)
+{
+    gdk_flush();
+    return self;
+}
+
+static VALUE
+rg_s_screen_width(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_screen_width());
+}
+
+static VALUE
+rg_s_screen_width_mm(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_screen_width_mm());
+}
+
+static VALUE
+rg_s_screen_height(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_screen_height());
+}
+
+static VALUE
+rg_s_screen_height_mm(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_screen_height_mm());
+}
+
+static VALUE
+rg_s_set_double_click_time(VALUE self, VALUE msec)
+{
+    gdk_set_double_click_time(NUM2UINT(msec));
+    return self;
+}
+
+static VALUE
+rg_s_beep(VALUE self)
+{
+    gdk_beep();
+    return self;
+}
+
+static VALUE
+rg_s_error_trap_push(VALUE self)
+{
+    gdk_error_trap_push();
+    return self;
+}
+
+static VALUE
+rg_s_error_trap_pop(VALUE self)
+{
+    gdk_error_trap_pop();
+    return self;
+}
+
+static VALUE
+rg_s_windowing_x11_p(G_GNUC_UNUSED VALUE self)
+{
+#ifdef GDK_WINDOWING_X11
+    return Qtrue;
+#else
+    return Qfalse;
+#endif
+}
+
+static VALUE
+rg_s_windowing_win32_p(G_GNUC_UNUSED VALUE self)
+{
+#ifdef GDK_WINDOWING_WIN32
+    return Qtrue;
+#else
+    return Qfalse;
+#endif
+}
+
+static VALUE
+rg_s_windowing_fb_p(G_GNUC_UNUSED VALUE self)
+{
+#ifdef GDK_WINDOWING_FB
+    return Qtrue;
+#else
+    return Qfalse;
+#endif
+}
+
+static VALUE
+rg_s_windowing_quartz_p(G_GNUC_UNUSED VALUE self)
+{
+#ifdef GDK_WINDOWING_QUARTZ
+    return Qtrue;
+#else
+    return Qfalse;
+#endif
+}
+
+static VALUE
+rg_s_windowing_directfb_p(G_GNUC_UNUSED VALUE self)
+{
+#ifdef GDK_WINDOWING_DIRECTFB
+    return Qtrue;
+#else
+    return Qfalse;
+#endif
+}
+
+static VALUE
+rg_s_target(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(RUBY_GDK3_TARGET);
+}
+
+static VALUE
+rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
+{
+    return Qtrue;
+}
+
+void
+Init_gdk(void)
+{
+    id_call = rb_intern("call");
+
+    VALUE RG_TARGET_NAMESPACE = rb_define_module("Gdk");
+
+    RG_DEF_SMETHOD(display_arg_name, 0);
+/* deprecated
+    RG_DEF_SMETHOD(set_locale, 0);
+    RG_DEF_SMETHOD(set_sm_client_id, 1);
+*/
+    RG_DEF_SMETHOD(notify_startup_complete, -1);
+    RG_DEF_SMETHOD(program_class, 0);
+    RG_DEF_SMETHOD(set_program_class, 1);
+    RG_DEF_SMETHOD(display, 0);
+
+    RG_DEF_SMETHOD(set_x_error_handler, 0);
+    RG_DEF_SMETHOD(set_x_io_error_handler, 0);
+    RG_DEF_SMETHOD(screen_width, 0);
+    RG_DEF_SMETHOD(screen_width_mm, 0);
+    RG_DEF_SMETHOD(screen_height, 0);
+    RG_DEF_SMETHOD(screen_height_mm, 0);
+    RG_DEF_SMETHOD(beep, 0);
+    RG_DEF_SMETHOD(flush, 0);
+    RG_DEF_SMETHOD(set_double_click_time, 1);
+    RG_DEF_SMETHOD(error_trap_push, 0);
+    RG_DEF_SMETHOD(error_trap_pop, 0);
+    RG_DEF_SMETHOD_P(windowing_x11, 0);
+    RG_DEF_SMETHOD_P(windowing_win32, 0);
+    RG_DEF_SMETHOD_P(windowing_fb, 0);
+    RG_DEF_SMETHOD_P(windowing_quartz, 0);
+    RG_DEF_SMETHOD_P(windowing_directfb, 0);
+
+    RG_DEF_SMETHOD(target, 0);
+
+    RG_DEF_SMETHOD_P(cairo_available, 0);
+
+    G_DEF_CLASS(GDK_TYPE_GRAB_STATUS, "GrabStatus", RG_TARGET_NAMESPACE);
+
+    Init_gdk_atom(RG_TARGET_NAMESPACE);
+    Init_gdk_cairo();
+    Init_gdk_color(RG_TARGET_NAMESPACE);
+    Init_gdk_const(RG_TARGET_NAMESPACE);
+    Init_gdk_cursor(RG_TARGET_NAMESPACE);
+    Init_gdk_device(RG_TARGET_NAMESPACE);
+    Init_gdk_device_manager(RG_TARGET_NAMESPACE);
+    Init_gdk_display(RG_TARGET_NAMESPACE);
+    Init_gdk_display_manager(RG_TARGET_NAMESPACE);
+    Init_gdk_dragcontext(RG_TARGET_NAMESPACE);
+    Init_gdk_event(RG_TARGET_NAMESPACE);
+    Init_gdk_geometry(RG_TARGET_NAMESPACE);
+    Init_gdk_keymap(RG_TARGET_NAMESPACE);
+    Init_gdk_keyval(RG_TARGET_NAMESPACE);
+    Init_gdk_pango(RG_TARGET_NAMESPACE);
+/* deprecated
+    Init_gdk_pangorenderer(RG_TARGET_NAMESPACE);
+*/
+    Init_gdk_pixbuf(RG_TARGET_NAMESPACE);
+    Init_gdk_property(RG_TARGET_NAMESPACE);
+    Init_gdk_rectangle(RG_TARGET_NAMESPACE);
+/* deprecated
+    Init_gdk_rgb(RG_TARGET_NAMESPACE);
+*/
+    Init_gdk_rgba(RG_TARGET_NAMESPACE);
+    Init_gdk_screen(RG_TARGET_NAMESPACE);
+    Init_gdk_selection(RG_TARGET_NAMESPACE);
+    Init_gdk_threads(RG_TARGET_NAMESPACE);
+    Init_gdk_timecoord(RG_TARGET_NAMESPACE);
+    Init_gdk_visual(RG_TARGET_NAMESPACE);
+    Init_gdk_window(RG_TARGET_NAMESPACE);
+    Init_gdk_windowattr(RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3.h b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3.h
new file mode 100644
index 0000000..97cff28
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3.h
@@ -0,0 +1,73 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2008  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef __RBGDK3_H__
+#define __RBGDK3_H__
+
+#include <gdk/gdk.h>
+#ifdef GDK_WINDOWING_X11
+#  include <gdk/gdkx.h>
+#endif
+#ifdef GDK_WINDOWING_WIN32
+#  include <gdk/gdkwin32.h>
+#endif
+
+#include "rbgdk3conversions.h"
+
+#define RBGDK_MAJOR_VERSION RBGLIB_MAJOR_VERSION
+#define RBGDK_MINOR_VERSION RBGLIB_MINOR_VERSION
+#define RBGDK_MICRO_VERSION RBGLIB_MICRO_VERSION
+
+#define RVAL2GDKPOINTS(value, n) rbgdk_rval2gdkpoints(value, n)
+#define RVAL2GDKATOMS(value, n) rbgdk_rval2gdkatoms(value, n)
+
+#define RVAL2GDKPIXBUFGLIST(value) rbgdk_rval2gdkpixbufglist(value)
+
+/* for backword compatibility. TODO: remove me. */
+#define GEV2RVAL(ev) GDKEVENT2RVAL(ev)
+#define RVAL2GEV(ev) RVAL2GDKEVENT(ev)
+
+#define RVAL2ATOM(atom) (get_gdkatom(atom))
+
+#define GDK_TYPE_GEOMETRY (gdk_geometry_get_type())
+#define GDK_TYPE_ATOM (gdk_atom_get_type())
+#define GDK_TYPE_WINDOW_ATTR (gdk_windowattr_get_type())
+#define GDK_TYPE_TIME_COORD (gdk_timecoord_get_type())
+
+typedef struct {
+    GdkAtom atom;
+} GdkAtomData;
+
+GdkPoint *rbgdk_rval2gdkpoints(VALUE value, long *n);
+GdkAtom *rbgdk_rval2gdkatoms(VALUE value, long *n);
+
+GList *rbgdk_rval2gdkpixbufglist(VALUE value);
+
+extern GType gdk_windowattr_get_type(void);
+extern GType gdk_atom_get_type(void);
+extern GType gdk_geometry_get_type(void);
+extern GType gdk_timecoord_get_type(void);
+
+extern GdkAtom get_gdkatom(VALUE atom);
+extern VALUE rbgdk_gdkevent2rval(GdkEvent *event);
+extern GdkEvent *rbgdk_rval2gdkevent(VALUE event);
+
+#endif /* __RBGDK3_H__ */
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3conversions.h b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3conversions.h
new file mode 100644
index 0000000..fb0d020
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3conversions.h
@@ -0,0 +1,121 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2008  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef __RBGDK3CONVERSIONS_H__
+#define __RBGDK3CONVERSIONS_H__
+
+#define RVAL2GDKDEVICE(o)                  (GDK_DEVICE(RVAL2GOBJ(o)))
+#define RVAL2GDKDISPLAY(o)                 (GDK_DISPLAY(RVAL2GOBJ(o)))
+#define RVAL2GDKDISPLAYMANAGER(o)          (GDK_DISPLAY_MANAGER(RVAL2GOBJ(o)))
+#define RVAL2GDKDEVICEMANAGER(o)           (GDK_DEVICE_MANAGER(RVAL2GOBJ(o)))
+#define RVAL2GDKDISPLAYOBJECT(o)           (GDK_DISPLAY_OBJECT(RVAL2GOBJ(o)))
+#define RVAL2GDKDRAGCONTEXT(o)             (GDK_DRAG_CONTEXT(RVAL2GOBJ(o)))
+#define RVAL2GDKDRAWABLE(o)                (GDK_DRAWABLE(RVAL2GOBJ(o)))
+#define RVAL2GDKKEYMAP(o)                  (GDK_KEYMAP(RVAL2GOBJ(o)))
+#define RVAL2GDKPANGORENDERER(o)           (GDK_PANGO_RENDERER(RVAL2GOBJ(o)))
+#define RVAL2GDKPIXBUF(o)                  (GDK_PIXBUF(RVAL2GOBJ(o)))
+#define RVAL2GDKSCREEN(o)                  (GDK_SCREEN(RVAL2GOBJ(o)))
+#define RVAL2GDKVISUAL(o)                  (GDK_VISUAL(RVAL2GOBJ(o)))
+#define RVAL2GDKWINDOW(o)                  (GDK_WINDOW(RVAL2GOBJ(o)))
+#define RVAL2GDKX11WINDOW(o)               (GDK_X11_WINDOW(RVAL2GOBJ(o)))
+
+#define RVAL2GDKATOM(o)                    ((GdkAtomData*)RVAL2BOXED(o, GDK_TYPE_ATOM))
+#define GDKATOM2RVAL(o)                    (BOXED2RVAL(o, GDK_TYPE_ATOM))
+#define RVAL2GDKCOLOR(o)                   ((GdkColor*)RVAL2BOXED(o, GDK_TYPE_COLOR))
+#define GDKCOLOR2RVAL(o)                   (BOXED2RVAL(o, GDK_TYPE_COLOR))
+#define RVAL2GDKCURSOR(o)                  ((GdkCursor*)RVAL2BOXED(o, GDK_TYPE_CURSOR))
+#define GDKCURSOR2RVAL(o)                  (BOXED2RVAL(o, GDK_TYPE_CURSOR))
+#define RVAL2GDKEVENT(o)                   (rbgdk_rval2gdkevent(o))
+#define GDKEVENT2RVAL(o)                   (rbgdk_gdkevent2rval(o))
+#define RVAL2GDKGEOMETRY(o)                ((GdkGeometry*)RVAL2BOXED(o, GDK_TYPE_GEOMETRY))
+#define GDKGEOMETRY2RVAL(o)                (BOXED2RVAL(o, GDK_TYPE_GEOMETRY))
+#define RVAL2GDKRECTANGLE(o)               ((GdkRectangle*)RVAL2BOXED(o, GDK_TYPE_RECTANGLE))
+#define GDKRECTANGLE2RVAL(o)               (BOXED2RVAL(o, GDK_TYPE_RECTANGLE))
+#define RVAL2GDKRGBA(o)                    ((GdkRGBA*)RVAL2BOXED(o, GDK_TYPE_RGBA))
+#define GDKRGBA2RVAL(o)                    (BOXED2RVAL(o, GDK_TYPE_RGBA))
+#define RVAL2GDKTIMECOORD(o)               ((GdkTimeCoord*)RVAL2BOXED(o, GDK_TYPE_TIME_COORD))
+#define GDKTIMECOORD2RVAL(o)               (BOXED2RVAL(o, GDK_TYPE_TIME_COORD))
+#define RVAL2GDKWINDOWATTR(o)              ((GdkWindowAttr*)RVAL2BOXED(o, GDK_TYPE_WINDOW_ATTR))
+#define GDKWINDOWATTR2RVAL(o)              (BOXED2RVAL(o, GDK_TYPE_WINDOW_ATTR))
+
+#define RVAL2GDKEVENTKEY(o)                ((GdkEventKey*)RVAL2GDKEVENT(o))
+
+#define RVAL2GDKAXISUSE(o)                 (RVAL2GENUM(o, GDK_TYPE_AXIS_USE))
+#define GDKAXISUSE2RVAL(o)                 (GENUM2RVAL(o, GDK_TYPE_AXIS_USE))
+#define RVAL2GDKBYTEORDER(o)               (RVAL2GENUM(o, GDK_TYPE_BYTE_ORDER))
+#define GDKBYTEORDER2RVAL(o)               (GENUM2RVAL(o, GDK_TYPE_BYTE_ORDER))
+#define RVAL2GDKCURSORTYPE(o)              (RVAL2GENUM(o, GDK_TYPE_CURSOR_TYPE))
+#define GDKCURSORTYPE2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_CURSOR_TYPE))
+#define RVAL2GDKDRAGPROTOCOL(o)            (RVAL2GENUM(o, GDK_TYPE_DRAG_PROTOCOL))
+#define GDKDRAGPROTOCOL2RVAL(o)            (GENUM2RVAL(o, GDK_TYPE_DRAG_PROTOCOL))
+#define RVAL2GDKEVENTTYPE(o)               (RVAL2GENUM(o, GDK_TYPE_EVENT_TYPE))
+#define GDKEVENTTYPE2RVAL(o)               (GENUM2RVAL(o, GDK_TYPE_EVENT_TYPE))
+#define RVAL2GDKFILTERRETURN(o)            (RVAL2GENUM(o, GDK_TYPE_FILTER_RETURN))
+#define GDKFILTERRETURN2RVAL(o)            (GENUM2RVAL(o, GDK_TYPE_FILTER_RETURN))
+#define RVAL2GDKGRABSTATUS(o)              (RVAL2GENUM(o, GDK_TYPE_GRAB_STATUS))
+#define GDKGRABSTATUS2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_GRAB_STATUS))
+#define RVAL2GDKGRAVITY(o)                 (RVAL2GENUM(o, GDK_TYPE_GRAVITY))
+#define GDKGRAVITY2RVAL(o)                 (GENUM2RVAL(o, GDK_TYPE_GRAVITY))
+#define RVAL2GDKINPUTMODE(o)               (RVAL2GENUM(o, GDK_TYPE_INPUT_MODE))
+#define GDKINPUTMODE2RVAL(o)               (GENUM2RVAL(o, GDK_TYPE_INPUT_MODE))
+#define RVAL2GDKINPUTSOURCE(o)             (RVAL2GENUM(o, GDK_TYPE_INPUT_SOURCE))
+#define GDKINPUTSOURCE2RVAL(o)             (GENUM2RVAL(o, GDK_TYPE_INPUT_SOURCE))
+#define RVAL2GDKGRABOWNERSHIP(o)           (RVAL2GENUM(o, GDK_TYPE_GRAB_OWNERSHIP))
+#define GDKGRABOWNERSHIP2RVAL(o)           (GENUM2RVAL(o, GDK_TYPE_GRAB_OWNERSHIP))
+#define RVAL2GDKPROPMODE(o)                (RVAL2GENUM(o, GDK_TYPE_PROP_MODE))
+#define GDKPROPMODE2RVAL(o)                (GENUM2RVAL(o, GDK_TYPE_PROP_MODE))
+#define RVAL2GDKRGBDITHER(o)               (RVAL2GENUM(o, GDK_TYPE_RGB_DITHER))
+#define GDKRGBDITHER2RVAL(o)               (GENUM2RVAL(o, GDK_TYPE_RGB_DITHER))
+#define RVAL2GDKVISUALTYPE(o)              (RVAL2GENUM(o, GDK_TYPE_VISUAL_TYPE))
+#define GDKVISUALTYPE2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_VISUAL_TYPE))
+#define RVAL2GDKWINDOWEDGE(o)              (RVAL2GENUM(o, GDK_TYPE_WINDOW_EDGE))
+#define GDKWINDOWEDGE2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_WINDOW_EDGE))
+#define RVAL2GDKWINDOWSTATE(o)             (RVAL2GENUM(o, GDK_TYPE_WINDOW_STATE))
+#define GDKWINDOWSTATE2RVAL(o)             (GENUM2RVAL(o, GDK_TYPE_WINDOW_STATE))
+#define RVAL2GDKWINDOWTYPE(o)              (RVAL2GENUM(o, GDK_TYPE_WINDOW_TYPE))
+#define GDKWINDOWTYPE2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_WINDOW_TYPE))
+#define RVAL2GDKWINDOWHINT(o)              (RVAL2GENUM(o, GDK_TYPE_WINDOW_TYPE_HINT))
+#define GDKWINDOWHINT2RVAL(o)              (GENUM2RVAL(o, GDK_TYPE_WINDOW_TYPE_HINT))
+#define RVAL2GDKWINDOWWINDOWCLASS(o)       (RVAL2GENUM(o, GDK_TYPE_WINDOW_WINDOW_CLASS))
+#define GDKWINDOWWINDOWCLASS2RVAL(o)       (GENUM2RVAL(o, GDK_TYPE_WINDOW_WINDOW_CLASS))
+
+#define RVAL2GDKDRAGACTION(o)              (RVAL2GFLAGS(o, GDK_TYPE_DRAG_ACTION))
+#define GDKDRAGACTION2RVAL(o)              (GFLAGS2RVAL(o, GDK_TYPE_DRAG_ACTION))
+#define RVAL2GDKEVENTMASK(o)               (RVAL2GFLAGS(o, GDK_TYPE_EVENT_MASK))
+#define GDKEVENTMASK2RVAL(o)               (GFLAGS2RVAL(o, GDK_TYPE_EVENT_MASK))
+#define RVAL2GDKMODIFIERTYPE(o)            (RVAL2GFLAGS(o, GDK_TYPE_MODIFIER_TYPE))
+#define GDKMODIFIERTYPE2RVAL(o)            (GFLAGS2RVAL(o, GDK_TYPE_MODIFIER_TYPE))
+#define RVAL2GDKWINDOWHINTS(o)             (RVAL2GFLAGS(o, GDK_TYPE_WINDOW_HINTS))
+#define GDKWINDOWHINTS2RVAL(o)             (GFLAGS2RVAL(o, GDK_TYPE_WINDOW_HINTS))
+#define RVAL2GDKWMDECORATION(o)            (RVAL2GFLAGS(o, GDK_TYPE_WM_DECORATION))
+#define GDKWMDECORATION2RVAL(o)            (GFLAGS2RVAL(o, GDK_TYPE_WM_DECORATION))
+#define RVAL2GDKWMFUNCTION(o)              (RVAL2GFLAGS(o, GDK_TYPE_WM_FUNCTION))
+#define GDKWMFUNCTION2RVAL(o)              (GFLAGS2RVAL(o, GDK_TYPE_WM_FUNCTION))
+#define RVAL2GDKDRAGACTION(o)              (RVAL2GFLAGS(o, GDK_TYPE_DRAG_ACTION))
+#define GDKDRAGACTION2RVAL(o)              (GFLAGS2RVAL(o, GDK_TYPE_DRAG_ACTION))
+#define RVAL2GDKMODIFIERTYPE(o)            (RVAL2GFLAGS(o, GDK_TYPE_MODIFIER_TYPE))
+#define GDKMODIFIERTYPE2RVAL(o)            (GFLAGS2RVAL(o, GDK_TYPE_MODIFIER_TYPE))
+#define RVAL2GDKWINDOWATTRIBUTESTYPE(o)    (RVAL2GFLAGS(o, GDK_TYPE_WINDOW_ATTRIBUTES_TYPE))
+#define GDKWINDOWATTRIBUTESTYPE2RVAL(o)    (GFLAGS2RVAL(o, GDK_TYPE_WINDOW_ATTRIBUTES_TYPE))
+#define RVAL2GDKWINDOWHINTS(o)             (RVAL2GFLAGS(o, GDK_TYPE_WINDOW_HINTS))
+#define GDKWINDOWHINTS2RVAL(o)             (GFLAGS2RVAL(o, GDK_TYPE_WINDOW_HINTS))
+
+#endif /* __RBGDK3CONVERSIONS_H__ */
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3private.h b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3private.h
new file mode 100644
index 0000000..36e57fd
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdk3private.h
@@ -0,0 +1,85 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef __RBGDK3PRIVATE_H__
+#define __RBGDK3PRIVATE_H__
+
+#ifdef HAVE_RUBY_ST_H
+#  include <ruby/st.h>
+#else
+#  include <st.h>
+#endif
+
+#include <rb_cairo.h>
+#include <rbgobject.h>
+#include <rbpango.h>
+#include "rbgdk3.h"
+
+#ifndef HAVE_RB_ERRINFO
+#  define rb_errinfo() (ruby_errinfo)
+#endif
+
+#ifndef G_VALUE_INIT
+#  define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
+extern ID id_call;
+
+G_GNUC_INTERNAL void Init_gdk(void);
+G_GNUC_INTERNAL void Init_gdk_atom(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_cairo(void);
+G_GNUC_INTERNAL void Init_gdk_color(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_const(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_cursor(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_device(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_device_manager(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_display(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_display_manager(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_dragcontext(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_event(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_geometry(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_keymap(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_keyval(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_pango(VALUE mGdk);
+/* deprecated
+G_GNUC_INTERNAL void Init_gdk_pangorenderer(VALUE mGdk);
+*/
+G_GNUC_INTERNAL void Init_gdk_pixbuf(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_property(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_rectangle(VALUE mGdk);
+/* deprecated
+G_GNUC_INTERNAL void Init_gdk_rgb(VALUE mGdk);
+*/
+G_GNUC_INTERNAL void Init_gdk_rgba(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_screen(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_selection(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_threads(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_timecoord(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_visual(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_window(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdk_windowattr(VALUE mGdk);
+G_GNUC_INTERNAL void Init_gdkx11(void);
+G_GNUC_INTERNAL void Init_gdkx11_x11window(VALUE mGdkX11);
+
+#endif /* __RBGDK3PRIVATE_H__ */
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkatom.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkatom.c
new file mode 100644
index 0000000..5716b8e
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkatom.c
@@ -0,0 +1,122 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cAtom
+#define _SELF(a) ((RVAL2GDKATOM(a))->atom)
+
+/*****************************************/
+static GdkAtomData *
+gdk_atom_copy(const GdkAtom atom)
+{
+    GdkAtomData* data;
+    data = g_new(GdkAtomData, 1);
+    data->atom = atom;
+    return data;
+}
+
+GType
+gdk_atom_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static ("GdkAtomData",
+                                                 (GBoxedCopyFunc)gdk_atom_copy,
+                                                 (GBoxedFreeFunc)g_free);
+    return our_type;
+}
+
+GdkAtom
+get_gdkatom(VALUE atom)
+{
+    if (TYPE(atom) == T_STRING)
+        return gdk_atom_intern(RVAL2CSTR(atom), FALSE);
+    return (RVAL2GDKATOM(atom))->atom;
+}
+/*****************************************/
+
+static VALUE
+rg_s_intern(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE name;
+    VALUE exist;
+
+    rb_scan_args(argc, argv, "11", &name, &exist);
+
+    return GDKATOM2RVAL(gdk_atom_intern(RVAL2CSTR(name), RVAL2CBOOL(exist)));
+}
+
+/* We don't need them.
+GdkAtom gdk_atom_intern_static_string(const gchar *atom_name);
+ */
+
+static VALUE
+rg_initialize(VALUE self, VALUE num)
+{
+    guint atom = FIX2INT(num);
+    if (atom == 0){
+        /* This is a trick for passing 0(NULL) */
+        G_INITIALIZE(self, GUINT_TO_POINTER(1));
+        _SELF(self) = GUINT_TO_POINTER(GDK_NONE);
+    } else {
+        G_INITIALIZE(self, GUINT_TO_POINTER(atom));
+    }
+
+    return Qnil;
+}
+
+static VALUE
+rg_name(VALUE self)
+{
+    return CSTR2RVAL_FREE(gdk_atom_name(_SELF(self)));
+}
+
+static VALUE
+rg_to_i(VALUE self)
+{
+    return UINT2NUM(GPOINTER_TO_UINT(_SELF(self)));
+}
+
+static VALUE
+rg_operator_equal(VALUE self, VALUE other)
+{
+    return CBOOL2RVAL(_SELF(self) == _SELF(other));
+}
+
+void
+Init_gdk_atom(VALUE mGdk)
+{
+    VALUE none;
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_ATOM, "Atom", mGdk);
+
+    RG_DEF_SMETHOD(intern, -1);
+
+    RG_DEF_METHOD(initialize, 1);
+    RG_DEF_METHOD(name, 0);
+    RG_DEF_METHOD(to_i, 0);
+    RG_DEF_METHOD_OPERATOR("==", equal, 1);
+
+    /* This is a trick to define GDK_NONE as a BOXED object */
+    none = GDKATOM2RVAL((gpointer)1);
+    rb_define_const(RG_TARGET_NAMESPACE, "NONE", none);
+    _SELF(none) = GDK_NONE;
+}           
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcairo.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcairo.c
new file mode 100644
index 0000000..270480f
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcairo.c
@@ -0,0 +1,91 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2005  Kouhei Sutou
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#include <gdk/gdk.h>
+#include <rb_cairo.h>
+
+#define RG_TARGET_NAMESPACE rb_cCairo_Context
+#define _SELF(self) RVAL2CRCONTEXT(self)
+
+static VALUE
+rg_set_source_gdk_color(VALUE self, VALUE color)
+{
+    gdk_cairo_set_source_color(_SELF(self), RVAL2GDKCOLOR(color));
+    rb_cairo_check_status(cairo_status(_SELF(self)));
+    return self;
+}
+
+static VALUE
+rg_set_source_pixbuf(int argc, VALUE *argv, VALUE self)
+{
+    VALUE pixbuf, pixbuf_x, pixbuf_y;
+
+    rb_scan_args(argc, argv, "12", &pixbuf, &pixbuf_x, &pixbuf_y);
+
+    gdk_cairo_set_source_pixbuf(_SELF(self),
+                                RVAL2GDKPIXBUF(pixbuf),
+                                NIL_P(pixbuf_x) ? 0 : NUM2DBL(pixbuf_x),
+                                NIL_P(pixbuf_y) ? 0 : NUM2DBL(pixbuf_y));
+    rb_cairo_check_status(cairo_status(_SELF(self)));
+    return self;
+}
+
+/* deprecated
+static VALUE
+rg_set_source_pixmap(VALUE self, VALUE pixmap, VALUE pixmap_x, VALUE pixmap_y)
+{
+    gdk_cairo_set_source_pixmap(_SELF(self), RVAL2GDKPIXMAP(pixmap),
+                                NUM2DBL(pixmap_x), NUM2DBL(pixmap_y));
+    rb_cairo_check_status(cairo_status(_SELF(self)));
+    return self;
+}
+*/
+
+static VALUE
+rg_gdk_rectangle(VALUE self, VALUE rectangle)
+{
+    gdk_cairo_rectangle(_SELF(self),
+                        RVAL2GDKRECTANGLE(rectangle));
+    rb_cairo_check_status(cairo_status(_SELF(self)));
+    return self;
+}
+
+static VALUE
+rg_gdk_region(VALUE self, VALUE region)
+{
+    gdk_cairo_region(_SELF(self), RVAL2CRREGION(region));
+    rb_cairo_check_status(cairo_status(_SELF(self)));
+    return self;
+}
+
+void
+Init_gdk_cairo(void)
+{
+    RG_DEF_METHOD(set_source_gdk_color, 1);
+    RG_DEF_METHOD(set_source_pixbuf, -1);
+/* deprecated
+    RG_DEF_METHOD(set_source_pixmap, 3);
+*/
+    RG_DEF_METHOD(gdk_rectangle, 1);
+    RG_DEF_METHOD(gdk_region, 1);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcolor.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcolor.c
new file mode 100644
index 0000000..0196904
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcolor.c
@@ -0,0 +1,137 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cColor
+#define _SELF(c) (RVAL2GDKCOLOR(c))
+
+static VALUE
+rg_initialize(VALUE self, VALUE red, VALUE green, VALUE blue)
+{
+    GdkColor color;
+    color.pixel = 0;
+    color.red = NUM2INT(red);
+    color.green = NUM2INT(green);
+    color.blue = NUM2INT(blue);
+
+    G_INITIALIZE(self, g_boxed_copy(GDK_TYPE_COLOR, &color));
+
+    return Qnil;
+}
+
+static VALUE
+rg_s_parse(G_GNUC_UNUSED VALUE self, VALUE name)
+{
+    GdkColor c;
+    if (! gdk_color_parse(RVAL2CSTR(name), &c)) {
+        rb_raise(rb_eArgError, "can't parse color name `%s'", RVAL2CSTR(name));
+    }
+    return GDKCOLOR2RVAL(&c);
+}
+
+static VALUE
+rg_pixel(VALUE self)
+{
+    return INT2NUM(_SELF(self)->pixel);
+}
+
+static VALUE
+rg_red(VALUE self)
+{
+
+    return INT2FIX(_SELF(self)->red);
+}
+
+static VALUE
+rg_set_red(VALUE self, VALUE red)
+{
+    _SELF(self)->red = NUM2INT(red);
+    return self;
+}
+
+static VALUE
+rg_green(VALUE self)
+{
+    return INT2FIX(_SELF(self)->green);
+}
+
+static VALUE
+rg_set_green(VALUE self, VALUE green)
+{
+    _SELF(self)->green = NUM2INT(green);
+    return self;
+}
+
+static VALUE
+rg_blue(VALUE self)
+{
+    return INT2FIX(_SELF(self)->blue);
+}
+
+static VALUE
+rg_set_blue(VALUE self, VALUE blue)
+{
+    _SELF(self)->blue = NUM2INT(blue);
+    return self;
+}
+
+static VALUE
+rg_to_a(VALUE self)
+{
+    GdkColor *c = _SELF(self);
+    return rb_ary_new3(3, INT2FIX(c->red), 
+                       INT2FIX(c->green), INT2FIX(c->blue));
+}
+
+static VALUE
+rg_operator_gdkcolor_equal(VALUE self, VALUE other)
+{
+    return CBOOL2RVAL(gdk_color_equal(_SELF(self), _SELF(other)));
+}
+
+static VALUE
+rg_to_s(VALUE self)
+{
+    return CSTR2RVAL_FREE(gdk_color_to_string(_SELF(self)));
+}
+
+void
+Init_gdk_color(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_COLOR, "Color", mGdk);
+
+    RG_DEF_SMETHOD(parse, 1);
+    RG_DEF_METHOD(initialize, 3);
+    RG_DEF_METHOD(pixel, 0);
+    RG_DEF_METHOD(red, 0);
+    RG_DEF_METHOD(set_red, 1);
+    RG_DEF_METHOD(green, 0);
+    RG_DEF_METHOD(set_green, 1);
+    RG_DEF_METHOD(blue, 0);
+    RG_DEF_METHOD(set_blue, 1);
+    RG_DEF_METHOD(to_a, 0);
+    RG_DEF_METHOD_OPERATOR("==", gdkcolor_equal, 1);
+    RG_DEF_METHOD(to_s, 0);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkconst.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkconst.c
new file mode 100644
index 0000000..8abfe03
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkconst.c
@@ -0,0 +1,33 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+void
+Init_gdk_const(VALUE mGdk)
+{
+    G_DEF_CLASS(GDK_TYPE_STATUS, "Status", mGdk);
+}
+
+
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcursor.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcursor.c
new file mode 100644
index 0000000..1433c41
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkcursor.c
@@ -0,0 +1,92 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2001-2004 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cCursor
+
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    GdkCursor* cursor = NULL;
+
+    if (argc == 1){
+        VALUE type;
+        rb_scan_args(argc, argv, "10", &type);
+        cursor = gdk_cursor_new(RVAL2GDKCURSORTYPE(type));
+    } else if (argc == 2) {
+        VALUE display, type_or_name;
+        rb_scan_args(argc, argv, "20", &display, &type_or_name);
+        if (TYPE(type_or_name) == T_STRING)
+            cursor = gdk_cursor_new_from_name(RVAL2GDKDISPLAYOBJECT(display),
+                                              RVAL2CSTR(type_or_name));
+        else
+            cursor = gdk_cursor_new_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                RVAL2GDKCURSORTYPE(type_or_name));
+    } else if (argc == 4) {
+        VALUE display, pixbuf, x, y;
+        rb_scan_args(argc, argv, "40", &display, &pixbuf, &x, &y);
+        cursor = gdk_cursor_new_from_pixbuf(RVAL2GDKDISPLAYOBJECT(display),
+                                            RVAL2GDKPIXBUF(pixbuf),
+                                            NUM2INT(x), NUM2INT(y));
+/* deprecated
+    } else if (argc == 6) {
+        VALUE pixmap, mask, fg, bg, x, y;
+        rb_scan_args(argc, argv, "60", &pixmap, &mask, &fg, &bg, &x, &y);
+        cursor = gdk_cursor_new_from_pixmap(RVAL2GDKPIXMAP(pixmap),
+                                            NIL_P(mask)?NULL:RVAL2GDKPIXMAP(mask),
+                                            RVAL2GDKCOLOR(fg),
+                                            RVAL2GDKCOLOR(bg),
+                                            NUM2INT(x), NUM2INT(y));
+*/
+    }
+    G_INITIALIZE(self, cursor);
+
+    return Qnil;
+}
+
+/* TODO
+static VALUE
+rg_cursor_type(VALUE self)
+{
+    return GDKCURSORTYPE2RVAL((RVAL2GDKCURSOR(self))->type);
+}
+*/
+
+static VALUE
+rg_image(VALUE self)
+{
+    return GOBJ2RVAL(gdk_cursor_get_image(RVAL2GDKCURSOR(self)));
+}
+
+void
+Init_gdk_cursor(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_CURSOR, "Cursor", mGdk);
+
+    RG_DEF_METHOD(initialize, -1);
+/* TODO
+    RG_DEF_METHOD(cursor_type, 0);
+*/
+    RG_DEF_METHOD(image, 0);
+
+    G_DEF_CLASS(GDK_TYPE_CURSOR_TYPE, "Type", RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevice.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevice.c
new file mode 100644
index 0000000..c39b72c
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevice.c
@@ -0,0 +1,253 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003-2006 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cDevice
+#define _SELF(self) (RVAL2GDKDEVICE(self))
+
+/* deprecated
+static VALUE
+rg_s_list(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJGLIST2RVAL(gdk_devices_list());
+}
+
+static VALUE
+rg_s_set_extension_events(G_GNUC_UNUSED VALUE self, VALUE window, VALUE mask, VALUE mode)
+{
+    gdk_input_set_extension_events(RVAL2GDKWINDOW(window),
+                                   NUM2INT(mask), FIX2INT(mode));
+    return Qnil;
+}
+
+static VALUE
+rg_s_core_pointer(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_device_get_core_pointer());
+}
+
+static VALUE
+rg_set_source(VALUE self, VALUE source)
+{
+    gdk_device_set_source(_SELF(self), RVAL2GDKINPUTSOURCE(source));
+    return self;
+}
+*/
+
+static VALUE
+rg_set_mode(VALUE self, VALUE mode)
+{
+    return CBOOL2RVAL(gdk_device_set_mode(_SELF(self), RVAL2GDKINPUTMODE(mode)));
+}
+
+static VALUE
+rg_set_key(VALUE self, VALUE index, VALUE keyval, VALUE modifiers)
+{
+    gdk_device_set_key(_SELF(self), NUM2UINT(index), NUM2UINT(keyval),
+                       RVAL2GDKMODIFIERTYPE(modifiers));
+    return self;
+}
+
+static VALUE
+rg_set_axis_use(VALUE self, VALUE index, VALUE use)
+{
+    gdk_device_set_axis_use(_SELF(self), NUM2UINT(index),
+                            RVAL2GDKAXISUSE(use));
+    return self;
+}
+
+static VALUE
+rg_get_state(VALUE self, VALUE window)
+{
+    gdouble axes[2];
+    GdkModifierType mask;
+
+    gdk_device_get_state(_SELF(self), RVAL2GDKWINDOW(window),
+                         axes, &mask);
+    return rb_ary_new3(3, rb_float_new(axes[0]), rb_float_new(axes[1]),
+                       GDKMODIFIERTYPE2RVAL(mask));
+}
+
+static VALUE
+rg_get_history(VALUE self, VALUE window, VALUE start, VALUE stop)
+{
+    gboolean ret;
+    GdkTimeCoord** events;
+    gint i, n_events;
+    VALUE ary = Qnil;
+    ret = gdk_device_get_history(_SELF(self),
+                                 RVAL2GDKWINDOW(window),
+                                 NUM2UINT(start), NUM2UINT(stop),
+                                 &events, &n_events);
+    if (ret){
+        ary = rb_ary_new();
+        for (i = 0; i < n_events; i++){
+            rb_ary_push(ary, GDKTIMECOORD2RVAL(events));
+        }
+        gdk_device_free_history(events, n_events);
+    }
+    return ary;
+}
+
+static VALUE
+rg_get_axis(VALUE self, VALUE rbaxes, VALUE rbuse)
+{
+    GdkDevice *device = _SELF(self);
+    GdkAxisUse use = RVAL2GDKAXISUSE(rbuse);
+    long n;
+    gdouble *axes = RVAL2GDOUBLES(rbaxes, n);
+    gint device_n_axes = gdk_device_get_n_axes(device);
+    gdouble value;
+    gboolean found;
+
+    if (n != device_n_axes)
+        rb_raise(rb_eArgError,
+                 "unexpected number of axes: %ld != %d",
+                 n, device_n_axes);
+
+    found = gdk_device_get_axis(device, axes, use, &value);
+
+    g_free(axes);
+
+    return found ? DBL2NUM(value) : Qnil;
+}
+
+static VALUE
+rg_mode(VALUE self)
+{
+    return GDKINPUTMODE2RVAL(gdk_device_get_mode(_SELF(self)));
+}
+
+static VALUE
+rg_get_window_at_position(G_GNUC_UNUSED VALUE self)
+{
+    gint x, y;
+    GdkWindow *win = gdk_device_get_window_at_position(_SELF(self), &x ,&y);
+    return rb_ary_new3(3, GOBJ2RVAL(win), INT2FIX(x), INT2FIX(y));
+}
+
+static VALUE
+rg_ungrab(int argc, VALUE *argv, VALUE self)
+{
+    VALUE rb_time;
+    guint32 time = GDK_CURRENT_TIME;
+
+    rb_scan_args(argc, argv, "01", &rb_time);
+    if (!NIL_P(rb_time)) {
+        time = NUM2UINT(GDK_CURRENT_TIME);
+    }
+    gdk_device_ungrab(_SELF(self), time);
+    return self;
+}
+
+static VALUE
+rg_get_position(VALUE self)
+{
+    GdkScreen *screen;
+    gint x, y;
+    gdk_device_get_position(_SELF(self), &screen, &x, &y);
+    return rb_ary_new3(3, GOBJ2RVAL(screen), INT2NUM(x), INT2NUM(y));
+}
+
+static VALUE
+rg_warp(VALUE self, VALUE screen, VALUE x, VALUE y)
+{
+    gdk_device_warp(_SELF(self), RVAL2GDKSCREEN(screen), NUM2INT(x), NUM2INT(y));
+    return self;
+}
+
+static VALUE
+rg_grab(VALUE self, VALUE win, VALUE grab_ownership, VALUE owner_events, VALUE event_mask, VALUE cursor, VALUE time)
+{
+    return GDKGRABSTATUS2RVAL(gdk_device_grab(_SELF(self),
+                                              RVAL2GDKWINDOW(win),
+                                              RVAL2GDKGRABOWNERSHIP(grab_ownership),
+                                              RVAL2CBOOL(owner_events),
+                                              RVAL2GDKEVENTMASK(event_mask),
+                                              RVAL2GDKCURSOR(cursor),
+                                              NUM2INT(time)));
+}
+
+/* deprecated
+static VALUE
+rg_axes(VALUE self)
+{
+    gint i;
+    VALUE ary = rb_ary_new();
+    GdkDeviceAxis* axes = _SELF(self)->axes;
+
+    for (i = 0; i < _SELF(self)->num_axes; i++){
+        rb_ary_push(ary, rb_ary_new3(3, GDKAXISUSE2RVAL(axes[i].use),
+                                     rb_float_new(axes[i].min), rb_float_new(axes[i].max)));
+    }
+    return ary;
+}
+
+static VALUE
+rg_keys(VALUE self)
+{
+    gint i;
+    VALUE ary = rb_ary_new();
+    GdkDeviceKey* keys = _SELF(self)->keys;
+
+    for (i = 0; i < _SELF(self)->num_keys; i++){
+        rb_ary_push(ary, rb_ary_new3(2, UINT2NUM(keys[i].keyval),
+                                     GDKMODIFIERTYPE2RVAL(keys[i].modifiers)));
+    }
+    return ary;
+}
+*/
+
+void
+Init_gdk_device(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DEVICE, "Device", mGdk);
+
+/* deprecated
+    RG_DEF_SMETHOD(list, 0);
+    RG_DEF_SMETHOD(set_extension_events, 3);
+    RG_DEF_SMETHOD(core_pointer, 0);
+
+    RG_DEF_METHOD(set_source, 1);
+*/
+    RG_DEF_METHOD(set_mode, 1);
+    RG_DEF_METHOD(set_key, 3);
+    RG_DEF_METHOD(set_axis_use, 2);
+    RG_DEF_METHOD(get_state, 1);
+    RG_DEF_METHOD(get_history, 3);
+    RG_DEF_METHOD(get_axis, 2);
+    RG_DEF_METHOD(mode, 0);
+    RG_DEF_METHOD(get_window_at_position, 0);
+    RG_DEF_METHOD(ungrab, -1);
+    RG_DEF_METHOD(get_position, 0);
+    RG_DEF_METHOD(warp, 3);
+    RG_DEF_METHOD(grab, 6);
+
+/* deprecated
+    RG_DEF_METHOD(axes, 0);
+    RG_DEF_METHOD(keys, 0);
+*/
+
+    G_DEF_CLASS(GDK_TYPE_INPUT_SOURCE, "InputSource", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_INPUT_MODE, "InputMode", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_AXIS_USE, "AxisUse", RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevicemanager.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevicemanager.c
new file mode 100644
index 0000000..479e5b7
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdevicemanager.c
@@ -0,0 +1,39 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cDeviceManager
+#define _SELF(obj) RVAL2GDKDEVICEMANAGER(obj)
+
+static VALUE
+rg_devices(VALUE self)
+{
+    return GOBJGLIST2RVAL_FREE(gdk_device_manager_list_devices(_SELF(self), GDK_TYPE_DEVICE),
+                               g_list_free, NULL);
+}
+
+void
+Init_gdk_device_manager(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DEVICE_MANAGER, "DeviceManager", mGdk);
+
+    RG_DEF_METHOD(devices, 0);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplay.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplay.c
new file mode 100644
index 0000000..5055c59
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplay.c
@@ -0,0 +1,434 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2005 Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cDisplay
+#define _SELF(i) RVAL2GDKDISPLAYOBJECT(i)
+
+static VALUE
+rg_close(VALUE self)
+{
+    gdk_display_close(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_s_open(G_GNUC_UNUSED VALUE self, VALUE display_name)
+{
+    GdkDisplay* gdisplay = gdk_display_open(RVAL2CSTR(display_name));
+    if (! gdisplay) {
+        rb_raise(rb_eRuntimeError, "The display `%s' could not be opened.",
+                 RVAL2CSTR(display_name));
+    } else {
+        VALUE display;
+        g_object_ref(gdisplay);
+        display = GOBJ2RVAL(gdisplay);
+
+        if (rb_block_given_p()) {
+            rb_ensure(rb_yield, display, rg_close, display);
+            return Qnil;
+        } else {
+            return display;
+        }
+    }
+}
+
+static VALUE
+rg_s_default(G_GNUC_UNUSED VALUE self)
+{
+    GdkDisplay* gdisplay = gdk_display_get_default();
+     if (! gdisplay)
+        rb_raise(rb_eRuntimeError, "No default display is found.");
+
+    return GOBJ2RVAL(gdisplay);
+}
+
+static VALUE
+rg_name(VALUE self)
+{
+    return CSTR2RVAL(gdk_display_get_name(_SELF(self)));
+}
+
+static VALUE
+rg_n_screens(VALUE self)
+{
+    return INT2NUM(gdk_display_get_n_screens(_SELF(self)));
+}
+
+static VALUE
+rg_get_screen(VALUE self, VALUE num)
+{
+    return GOBJ2RVAL(gdk_display_get_screen(_SELF(self), NUM2INT(num)));
+}
+
+static VALUE
+rg_default_screen(VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_get_default_screen(_SELF(self)));
+}
+
+static VALUE
+rg_device_manager(VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_get_device_manager(_SELF(self)));
+}
+
+static VALUE
+rg_device_is_grabbed_p(VALUE self, VALUE device)
+{
+    return CBOOL2RVAL(gdk_display_device_is_grabbed(_SELF(self), RVAL2GDKDEVICE(device)));
+}
+
+static VALUE
+rg_beep(VALUE self)
+{
+    gdk_display_beep(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_sync(VALUE self)
+{
+    gdk_display_sync(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_flush(VALUE self)
+{
+    gdk_display_flush(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_event(VALUE self)
+{
+    return GEV2RVAL(gdk_display_get_event(_SELF(self)));
+}
+
+static VALUE
+rg_peek_event(VALUE self)
+{
+    return GEV2RVAL(gdk_display_peek_event(_SELF(self)));
+}
+
+static VALUE
+rg_put_event(VALUE self, VALUE event)
+{
+    gdk_display_put_event(_SELF(self), RVAL2GEV(event));
+    return self;
+}
+
+/* Don't implement this.
+static GdkFilterReturn
+filter_func(GdkXEvent xevent, GdkEvent event, gpointer func)
+{
+    return GENUM2RVAL(rb_funcall((VALUE)func, id_call, 2,
+                                 ????, GEV2RVAL(event)),
+                      GDK_TYPE_FILTER_RETURN);
+}
+
+static VALUE
+gdkdisplay_add_client_message_filter(VALUE self, VALUE message_type)
+{
+    VALUE func = RB_BLOCK_PROC();
+    G_RELATIVE(self, func);
+    gdk_display_add_client_message_filter(_SELF(self), RVAL2ATOM(message_type),
+                                          filter_func, func);
+    return self;
+}
+*/
+
+static VALUE
+rg_set_double_click_time(VALUE self, VALUE msec)
+{
+    gdk_display_set_double_click_time(_SELF(self), NUM2UINT(msec));
+    return self;
+}
+
+static VALUE
+rg_closed_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_is_closed(_SELF(self)));
+}
+
+static VALUE
+rg_set_double_click_distance(VALUE self, VALUE distance)
+{
+    gdk_display_set_double_click_distance(_SELF(self), NUM2UINT(distance));
+    return self;
+}
+
+/* Don't implement this.
+GdkDisplayPointerHooks* gdk_display_set_pointer_hooks
+                                            (GdkDisplay *display,
+                                             const GdkDisplayPointerHooks *new_hooks);
+ */
+
+static VALUE
+rg_supports_cursor_color_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_cursor_color(_SELF(self)));
+}
+
+static VALUE
+rg_supports_cursor_alpha_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_cursor_alpha(_SELF(self)));
+}
+
+static VALUE
+rg_default_cursor_size(VALUE self)
+{
+    return UINT2NUM(gdk_display_get_default_cursor_size(_SELF(self)));
+}
+
+static VALUE
+rg_maximal_cursor_size(VALUE self)
+{
+    guint width, height;
+    gdk_display_get_maximal_cursor_size(_SELF(self), &width, &height);
+    return rb_assoc_new(UINT2NUM(width), UINT2NUM(height));
+}
+
+static VALUE
+rg_default_group(VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_get_default_group(_SELF(self)));
+}
+
+static VALUE
+rg_supports_selection_notification_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_selection_notification(_SELF(self)));
+}
+
+static VALUE
+rg_request_selection_notification_p(VALUE self, VALUE selection)
+{
+    return CBOOL2RVAL(gdk_display_request_selection_notification(_SELF(self),
+                                                                 RVAL2ATOM(selection)));
+}
+
+static VALUE
+rg_supports_clipboard_persistence_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_clipboard_persistence(_SELF(self)));
+}
+
+static VALUE
+rg_store_clipboard(VALUE self, VALUE rbclipboard_window, VALUE rbtime_, VALUE rbtargets)
+{
+    GdkDisplay *display = _SELF(self);
+    GdkWindow *clipboard_window = RVAL2GDKWINDOW(rbclipboard_window);
+    guint32 time_ = NUM2UINT(rbtime_);
+    long n;
+    GdkAtom *targets = RVAL2GDKATOMS(rbtargets, &n);
+
+    gdk_display_store_clipboard(display, clipboard_window, time_, targets, n);
+
+    g_free(targets);
+
+    return self;
+}
+
+/* deprecated
+static VALUE
+rg_core_pointer(VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_get_core_pointer(_SELF(self)));
+}
+*/
+
+#ifdef GDK_WINDOWING_X11
+static VALUE
+rg_grab(VALUE self)
+{
+    gdk_x11_display_grab(_SELF(self));
+    return self;
+}
+static VALUE
+rg_ungrab(VALUE self)
+{
+    gdk_x11_display_ungrab(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_register_standard_event_type(VALUE self, VALUE event_base, VALUE n_events)
+{
+    gdk_x11_register_standard_event_type(_SELF(self),
+                                         NUM2INT(event_base), NUM2INT(n_events));
+    return self;
+}
+
+static VALUE
+rg_user_time(VALUE self)
+{
+    return UINT2NUM(gdk_x11_display_get_user_time(_SELF(self)));
+}
+
+static VALUE
+rg_set_cursor_theme(VALUE self, VALUE theme, VALUE size)
+{
+    gdk_x11_display_set_cursor_theme(_SELF(self), RVAL2CSTR(theme), NUM2INT(size));
+    return self;
+}
+
+/*
+*** need gdk_x11_display_broadcast_startup_messagev() ***
+
+typedef struct _StartupMessageParameterData {
+    gchar **parameters;
+    guint i;
+} StartupMessageParameterData;
+
+static int
+collect_parameter(VALUE key, VALUE value, VALUE data)
+{
+    StartupMessageParameterData *parameter_data;
+    parameter_data = (StartupMessageParameterData *)data;
+
+    parameter_data->parameters[parameter_data->i] = RVAL2CSTR(key);
+    parameter_data->i++;
+    parameter_data->parameters[parameter_data->i] = RVAL2CSTR(value);
+    parameter_data->i++;
+
+    return ST_CONTINUE;
+}
+
+static VALUE
+rg_broadcast_startup_message(int argc, VALUE *argv, VALUE self)
+{
+    VALUE rb_message_type, rb_parameters;
+    char *message_type;
+    guint n_parameters;
+    gchar **parameters;
+
+    rb_scan_args(argc, argv, "11", &rb_message_type, &rb_parameters);
+
+    message_type = RVAL2CSTR(rb_message_type);
+    if (NIL_P(rb_parameters)) {
+    n_parameters = 0;
+    parameters = NULL;
+    }
+    else {
+    StartupMessageParameterData data;
+
+    Check_Type(rb_parameters, T_HASH);
+    n_parameters = NUM2UINT(rb_funcall(rb_parameters, rb_intern("size"), 0));
+    parameters = ALLOCA_N(gchar *, n_parameters * 2);
+    data.i = 0;
+    data.parameters = parameters;
+    rb_hash_foreach(rb_parameters, collect_parameter, (VALUE)&data);
+    }
+
+    gdk_x11_display_broadcast_startup_messagev(_SELF(self),
+                           message_type,
+                           n_parameters,
+                           parameters);
+
+    return self;
+}
+*/
+
+static VALUE
+rg_startup_notification_id(VALUE self)
+{
+    return CSTR2RVAL(gdk_x11_display_get_startup_notification_id(_SELF(self)));
+}
+#endif
+
+static VALUE
+rg_supports_shapes_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_shapes(_SELF(self)));
+}
+
+static VALUE
+rg_supports_input_shapes_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_input_shapes(_SELF(self)));
+}
+
+static VALUE
+rg_supports_composite_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_display_supports_composite(_SELF(self)));
+}
+
+void
+Init_gdk_display(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DISPLAY, "Display", mGdk);
+
+    RG_DEF_SMETHOD(open, 1);
+    RG_DEF_SMETHOD(default, 0);
+    RG_DEF_METHOD(name, 0);
+    RG_DEF_METHOD(n_screens, 0);
+    RG_DEF_METHOD(get_screen, 1);
+    RG_DEF_ALIAS("[]", "get_screen");
+    RG_DEF_METHOD(default_screen, 0);
+    RG_DEF_METHOD(device_manager, 0);
+
+    RG_DEF_METHOD_P(device_is_grabbed, 1);
+
+    RG_DEF_METHOD(beep, 0);
+    RG_DEF_METHOD(sync, 0);
+    RG_DEF_METHOD(flush, 0);
+    RG_DEF_METHOD(close, 0);
+
+    RG_DEF_METHOD(event, 0);
+    RG_DEF_METHOD(peek_event, 0);
+    RG_DEF_METHOD(put_event, 1);
+    RG_DEF_METHOD(set_double_click_time, 1);
+    RG_DEF_METHOD_P(closed, 0);
+    RG_DEF_METHOD(set_double_click_distance, 1);
+    RG_DEF_METHOD_P(supports_cursor_color, 0);
+    RG_DEF_METHOD_P(supports_cursor_alpha, 0);
+    RG_DEF_METHOD(default_cursor_size, 0);
+    RG_DEF_METHOD(maximal_cursor_size, 0);
+    RG_DEF_METHOD(default_group, 0);
+    RG_DEF_METHOD_P(supports_selection_notification, 0);
+    RG_DEF_METHOD_P(request_selection_notification, 1);
+    RG_DEF_METHOD_P(supports_clipboard_persistence, 0);
+    RG_DEF_METHOD(store_clipboard, 3);
+/* deprecated
+    RG_DEF_METHOD(core_pointer, 0);
+*/
+#ifdef GDK_WINDOWING_X11
+    RG_DEF_METHOD(grab, 0);
+    RG_DEF_METHOD(ungrab, 0);
+    RG_DEF_METHOD(register_standard_event_type, 2);
+    RG_DEF_METHOD(user_time, 0);
+    RG_DEF_METHOD(set_cursor_theme, 2);
+/*
+    RG_DEF_METHOD(broadcast_startup_message, -1);
+*/
+    RG_DEF_METHOD(startup_notification_id, 0);
+    G_DEF_CLASS3("GdkDisplayX11", "DisplayX11", mGdk);
+#endif
+
+    RG_DEF_METHOD_P(supports_shapes, 0);
+    RG_DEF_METHOD_P(supports_input_shapes, 0);
+    RG_DEF_METHOD_P(supports_composite, 0);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplaymanager.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplaymanager.c
new file mode 100644
index 0000000..c7e30bf
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdisplaymanager.c
@@ -0,0 +1,55 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2006 Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cDisplayManager
+#define _SELF(obj) RVAL2GDKDISPLAYMANAGER(obj)
+
+static VALUE
+rg_s_get(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_manager_get());
+}
+
+static VALUE
+rg_displays(VALUE self)
+{
+    return GOBJGSLIST2RVAL_FREE(gdk_display_manager_list_displays(_SELF(self)),
+                                g_slist_free, NULL);
+}
+
+/* Move to Gdk::Display.
+static VALUE
+gdkdisplaymanager_get_core_pointer(VALUE self)
+{
+    return GOBJ2RVAL(gdk_display_get_core_pointer(_SELF(self)));
+}
+*/
+
+void 
+Init_gdk_display_manager(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DISPLAY_MANAGER, "DisplayManager", mGdk);
+
+    RG_DEF_SMETHOD(get, 0);
+    RG_DEF_METHOD(displays, 0);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdragcontext.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdragcontext.c
new file mode 100644
index 0000000..9727288
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkdragcontext.c
@@ -0,0 +1,191 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cDragContext
+#define _SELF(self) (RVAL2GDKDRAGCONTEXT(self))
+
+static VALUE
+rg_protocol(VALUE self)
+{
+    return GDKDRAGPROTOCOL2RVAL(gdk_drag_context_get_protocol(_SELF(self)));
+}
+
+static VALUE
+rg_source_window(VALUE self)
+{
+    return GOBJ2RVAL(gdk_drag_context_get_source_window(_SELF(self)));
+}
+
+static VALUE
+rg_dest_window(VALUE self)
+{
+    return GOBJ2RVAL(gdk_drag_context_get_dest_window(_SELF(self)));
+}
+
+static VALUE
+rg_targets(VALUE self)
+{
+    GList *list, *cur;
+    VALUE ary = rb_ary_new();
+
+    list = gdk_drag_context_list_targets(_SELF(self));
+    for (cur = list; cur != NULL; cur = cur->next) {
+        rb_ary_push(ary, GDKATOM2RVAL((GdkAtom)cur->data));
+    }
+    return ary;
+}
+
+static VALUE
+rg_actions(VALUE self)
+{
+    return GDKDRAGACTION2RVAL(gdk_drag_context_get_actions(_SELF(self)));
+}
+
+static VALUE
+rg_suggested_action(VALUE self)
+{
+    return GDKDRAGACTION2RVAL(gdk_drag_context_get_suggested_action(_SELF(self)));
+}
+
+static VALUE
+rg_selected_action(VALUE self)
+{
+    return GDKDRAGACTION2RVAL(gdk_drag_context_get_selected_action(_SELF(self)));
+}
+
+static VALUE
+rg_selection(VALUE self)
+{
+    return GDKATOM2RVAL(gdk_drag_get_selection(_SELF(self)));
+}
+
+static VALUE
+rg_drag_abort(VALUE self, VALUE time)
+{
+    gdk_drag_abort(_SELF(self), NUM2UINT(time));
+    return self;
+}
+
+static VALUE
+rg_drop_reply(VALUE self, VALUE ok, VALUE time)
+{
+    gdk_drop_reply(_SELF(self), RVAL2CBOOL(ok), NUM2UINT(time));
+    return self;
+}
+
+static VALUE
+rg_drag_drop(VALUE self, VALUE time)
+{
+    gdk_drag_drop(_SELF(self), NUM2UINT(time));
+    return self;
+}
+
+static VALUE
+rg_find_window(int argc, VALUE *argv, VALUE self)
+{
+    VALUE drag_window, x_root, y_root;
+    GdkWindow *dest_window;
+    GdkDragProtocol prot;
+
+    if (argc == 3) {
+/* deprecated
+        rb_scan_args(argc, argv, "30", &drag_window, &x_root, &y_root);
+        gdk_drag_find_window(_SELF(self),
+                             RVAL2GDKWINDOW(drag_window), 
+                             NUM2INT(x_root), NUM2INT(y_root),
+                             &dest_window, &prot);
+*/
+    } else {
+        VALUE screen;
+        rb_scan_args(argc, argv, "40", &drag_window, &screen, &x_root, &y_root);
+        gdk_drag_find_window_for_screen(_SELF(self),
+                                        RVAL2GDKWINDOW(drag_window), 
+                                        RVAL2GDKSCREEN(screen),
+                                        NUM2INT(x_root), NUM2INT(y_root),
+                                        &dest_window, &prot);
+    }
+
+    return rb_ary_new3(2, GOBJ2RVAL(dest_window), 
+                       GDKDRAGPROTOCOL2RVAL(prot));
+}
+
+static VALUE
+rg_drag_motion(VALUE self, VALUE dest_window, VALUE protocol, VALUE x_root, VALUE y_root, VALUE suggested_action, VALUE possible_actions, VALUE time)
+{
+    gboolean ret = gdk_drag_motion(_SELF(self), 
+                                   RVAL2GDKWINDOW(dest_window), 
+                                   RVAL2GDKDRAGPROTOCOL(protocol), 
+                                   NUM2INT(x_root), NUM2INT(y_root), 
+                                   RVAL2GDKDRAGACTION(suggested_action), 
+                                   RVAL2GDKDRAGACTION(possible_actions), 
+                                   NUM2UINT(time));
+    return CBOOL2RVAL(ret);
+}
+
+static VALUE
+rg_drop_finish(VALUE self, VALUE success, VALUE time)
+{
+    gdk_drop_finish(_SELF(self), RVAL2CBOOL(success), NUM2UINT(time));
+    return self;
+}
+
+static VALUE
+rg_drag_status(VALUE self, VALUE action, VALUE time)
+{
+    gdk_drag_status(_SELF(self), 
+                    RVAL2GDKDRAGACTION(action), NUM2UINT(time));
+    return self;
+}
+
+static VALUE
+rg_drag_drop_succeeded_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_drag_drop_succeeded(_SELF(self)));
+}
+
+void
+Init_gdk_dragcontext(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_DRAG_CONTEXT, "DragContext", mGdk);
+
+    RG_DEF_METHOD(protocol, 0);
+    RG_DEF_METHOD(source_window, 0);
+    RG_DEF_METHOD(dest_window, 0);
+    RG_DEF_METHOD(targets, 0);
+    RG_DEF_METHOD(actions, 0);
+    RG_DEF_METHOD(suggested_action, 0);
+    RG_DEF_METHOD(selected_action, 0);
+
+    RG_DEF_METHOD(selection, 0);
+    RG_DEF_METHOD(drag_abort, 1);
+    RG_DEF_METHOD(drop_reply, 2);
+    RG_DEF_METHOD(drag_drop, 1);
+    RG_DEF_METHOD(find_window, 4);
+    RG_DEF_METHOD(drag_motion, 7);
+    RG_DEF_METHOD(drop_finish, 2);
+    RG_DEF_METHOD(drag_status, 2);
+    RG_DEF_METHOD_P(drag_drop_succeeded, 0);
+
+    G_DEF_CLASS(GDK_TYPE_DRAG_PROTOCOL, "Protocol", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_DRAG_ACTION, "Action", RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkevent.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkevent.c
new file mode 100644
index 0000000..b44977a
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkevent.c
@@ -0,0 +1,1173 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2002-2014 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+static VALUE rb_cGdkEvent;
+static VALUE rb_cGdkEventAny;
+static VALUE rb_cGdkEventExpose;
+static VALUE rb_cGdkEventVisibility;
+static VALUE rb_cGdkEventMotion;
+static VALUE rb_cGdkEventButton;
+static VALUE rb_cGdkEventTouch;
+static VALUE rb_cGdkEventScroll;
+static VALUE rb_cGdkEventKey;
+static VALUE rb_cGdkEventCrossing;
+static VALUE rb_cGdkEventFocus;
+static VALUE rb_cGdkEventConfigure;
+static VALUE rb_cGdkEventProperty;
+static VALUE rb_cGdkEventSelection;
+static VALUE rb_cGdkEventOwnerChange;
+static VALUE rb_cGdkEventProximity;
+static VALUE rb_cGdkEventDND;
+static VALUE rb_cGdkEventWindowState;
+static VALUE rb_cGdkEventSetting;
+static VALUE rb_cGdkEventGrabBroken;
+
+#define DEFINE_EVENT_TYPE(type_lower_case, type_upper_case)             \
+static GType                                                            \
+rb_gdk_event_ ## type_lower_case ## _get_type(void)                     \
+{                                                                       \
+    static GType type = 0;                                              \
+    if (type == 0) {                                                    \
+        type = g_boxed_type_register_static("GdkEvent" # type_upper_case, \
+                                            (GBoxedCopyFunc)gdk_event_copy, \
+                                            (GBoxedFreeFunc)gdk_event_free); \
+    }                                                                   \
+    return type;                                                        \
+}
+
+DEFINE_EVENT_TYPE(any, Any)
+DEFINE_EVENT_TYPE(expose, Expose)
+DEFINE_EVENT_TYPE(visibility, Visibility)
+DEFINE_EVENT_TYPE(motion, Motion)
+DEFINE_EVENT_TYPE(button, Button)
+DEFINE_EVENT_TYPE(touch, Touch)
+DEFINE_EVENT_TYPE(scroll, Scroll)
+DEFINE_EVENT_TYPE(key, Key)
+DEFINE_EVENT_TYPE(crossing, Crossing)
+DEFINE_EVENT_TYPE(focus, Focus)
+DEFINE_EVENT_TYPE(configure, Configure)
+DEFINE_EVENT_TYPE(property, Property)
+DEFINE_EVENT_TYPE(selection, Selection)
+DEFINE_EVENT_TYPE(owner_change, OwnerChange)
+DEFINE_EVENT_TYPE(proximity, Proximity)
+DEFINE_EVENT_TYPE(dnd, DND)
+DEFINE_EVENT_TYPE(window_state, WindowState)
+DEFINE_EVENT_TYPE(setting, Setting)
+DEFINE_EVENT_TYPE(grab_broken, GrabBroken)
+
+#define GDK_TYPE_EVENT_ANY          (rb_gdk_event_any_get_type())
+#define GDK_TYPE_EVENT_EXPOSE       (rb_gdk_event_expose_get_type())
+#define GDK_TYPE_EVENT_VISIBILITY   (rb_gdk_event_visibility_get_type())
+#define GDK_TYPE_EVENT_MOTION       (rb_gdk_event_motion_get_type())
+#define GDK_TYPE_EVENT_BUTTON       (rb_gdk_event_button_get_type())
+#define GDK_TYPE_EVENT_TOUCH        (rb_gdk_event_touch_get_type())
+#define GDK_TYPE_EVENT_SCROLL       (rb_gdk_event_scroll_get_type())
+#define GDK_TYPE_EVENT_KEY          (rb_gdk_event_key_get_type())
+#define GDK_TYPE_EVENT_CROSSING     (rb_gdk_event_crossing_get_type())
+#define GDK_TYPE_EVENT_FOCUS        (rb_gdk_event_focus_get_type())
+#define GDK_TYPE_EVENT_CONFIGURE    (rb_gdk_event_configure_get_type())
+#define GDK_TYPE_EVENT_PROPERTY     (rb_gdk_event_property_get_type())
+#define GDK_TYPE_EVENT_SELECTION    (rb_gdk_event_selection_get_type())
+#define GDK_TYPE_EVENT_OWNER_CHANGE (rb_gdk_event_owner_change_get_type())
+#define GDK_TYPE_EVENT_PROXIMITY    (rb_gdk_event_proximity_get_type())
+#define GDK_TYPE_EVENT_DND          (rb_gdk_event_dnd_get_type())
+#define GDK_TYPE_EVENT_WINDOW_STATE (rb_gdk_event_window_state_get_type())
+#define GDK_TYPE_EVENT_SETTING      (rb_gdk_event_setting_get_type())
+#define GDK_TYPE_EVENT_GRAB_BROKEN  (rb_gdk_event_grab_broken_get_type())
+
+/***********************************************/
+
+static GType
+rb_gdk_event_type_to_gtype(GdkEventType event_type)
+{
+    GType gtype = GDK_TYPE_EVENT_ANY;
+
+    switch (event_type) {
+      case GDK_NOTHING:
+      case GDK_DELETE:
+      case GDK_DESTROY:
+        break;
+      case GDK_EXPOSE:
+        gtype = GDK_TYPE_EVENT_EXPOSE;
+        break;
+      case GDK_MOTION_NOTIFY:
+        gtype = GDK_TYPE_EVENT_MOTION;
+        break;
+      case GDK_BUTTON_PRESS:
+      case GDK_2BUTTON_PRESS:
+      case GDK_3BUTTON_PRESS:
+      case GDK_BUTTON_RELEASE:
+        gtype = GDK_TYPE_EVENT_BUTTON;
+        break;
+      case GDK_KEY_PRESS:
+      case GDK_KEY_RELEASE:
+        gtype = GDK_TYPE_EVENT_KEY;
+        break;
+      case GDK_ENTER_NOTIFY:
+      case GDK_LEAVE_NOTIFY:
+        gtype = GDK_TYPE_EVENT_CROSSING;
+        break;
+      case GDK_FOCUS_CHANGE:
+        gtype = GDK_TYPE_EVENT_FOCUS;
+        break;
+      case GDK_CONFIGURE:
+        gtype = GDK_TYPE_EVENT_CONFIGURE;
+        break;
+      case GDK_MAP:
+      case GDK_UNMAP:
+        break;
+      case GDK_PROPERTY_NOTIFY:
+        gtype = GDK_TYPE_EVENT_PROPERTY;
+        break;
+      case GDK_SELECTION_CLEAR:
+      case GDK_SELECTION_REQUEST:
+      case GDK_SELECTION_NOTIFY:
+        gtype = GDK_TYPE_EVENT_SELECTION;
+        break;
+      case GDK_PROXIMITY_IN:
+      case GDK_PROXIMITY_OUT:
+        gtype = GDK_TYPE_EVENT_PROXIMITY;
+        break;
+      case GDK_DRAG_ENTER:
+      case GDK_DRAG_LEAVE:
+      case GDK_DRAG_MOTION:
+      case GDK_DRAG_STATUS:
+      case GDK_DROP_START:
+      case GDK_DROP_FINISHED:
+        gtype = GDK_TYPE_EVENT_DND;
+        break;
+      case GDK_CLIENT_EVENT:
+        break;
+      case GDK_VISIBILITY_NOTIFY:
+        gtype = GDK_TYPE_EVENT_VISIBILITY;
+        break;
+      case GDK_SCROLL:
+        gtype = GDK_TYPE_EVENT_SCROLL;
+        break;
+      case GDK_WINDOW_STATE:
+        gtype = GDK_TYPE_EVENT_WINDOW_STATE;
+        break;
+      case GDK_SETTING:
+        gtype = GDK_TYPE_EVENT_SETTING;
+        break;
+      case GDK_OWNER_CHANGE:
+        gtype = GDK_TYPE_EVENT_OWNER_CHANGE;
+        break;
+      case GDK_GRAB_BROKEN:
+        gtype = GDK_TYPE_EVENT_GRAB_BROKEN;
+        break;
+      case GDK_DAMAGE:
+        gtype = GDK_TYPE_EVENT_EXPOSE;
+        break;
+      case GDK_TOUCH_BEGIN:
+      case GDK_TOUCH_UPDATE:
+      case GDK_TOUCH_END:
+      case GDK_TOUCH_CANCEL:
+        gtype = GDK_TYPE_EVENT_TOUCH;
+        break;
+      case GDK_EVENT_LAST:
+        break;
+      default:
+        break;
+    }
+
+    return gtype;
+}
+
+static VALUE
+rb_gdk_event_type_to_class(GdkEventType event_type)
+{
+    VALUE klass = Qnil;
+
+    switch (event_type) {
+      case GDK_NOTHING:
+      case GDK_DELETE:
+      case GDK_DESTROY:
+        break;
+      case GDK_EXPOSE:
+        klass = rb_cGdkEventExpose;
+        break;
+      case GDK_MOTION_NOTIFY:
+        klass = rb_cGdkEventMotion;
+        break;
+      case GDK_BUTTON_PRESS:
+      case GDK_2BUTTON_PRESS:
+      case GDK_3BUTTON_PRESS:
+      case GDK_BUTTON_RELEASE:
+        klass = rb_cGdkEventButton;
+        break;
+      case GDK_KEY_PRESS:
+      case GDK_KEY_RELEASE:
+        klass = rb_cGdkEventKey;
+        break;
+      case GDK_ENTER_NOTIFY:
+      case GDK_LEAVE_NOTIFY:
+        klass = rb_cGdkEventCrossing;
+        break;
+      case GDK_FOCUS_CHANGE:
+        klass = rb_cGdkEventFocus;
+        break;
+      case GDK_CONFIGURE:
+        klass = rb_cGdkEventConfigure;
+        break;
+      case GDK_MAP:
+      case GDK_UNMAP:
+        break;
+      case GDK_PROPERTY_NOTIFY:
+        klass = rb_cGdkEventProperty;
+        break;
+      case GDK_SELECTION_CLEAR:
+      case GDK_SELECTION_REQUEST:
+      case GDK_SELECTION_NOTIFY:
+        klass = rb_cGdkEventSelection;
+        break;
+      case GDK_PROXIMITY_IN:
+      case GDK_PROXIMITY_OUT:
+        klass = rb_cGdkEventProximity;
+        break;
+      case GDK_DRAG_ENTER:
+      case GDK_DRAG_LEAVE:
+      case GDK_DRAG_MOTION:
+      case GDK_DRAG_STATUS:
+      case GDK_DROP_START:
+      case GDK_DROP_FINISHED:
+        klass = rb_cGdkEventDND;
+        break;
+      case GDK_CLIENT_EVENT:
+        break;
+      case GDK_VISIBILITY_NOTIFY:
+        klass = rb_cGdkEventVisibility;
+        break;
+      case GDK_SCROLL:
+        klass = rb_cGdkEventScroll;
+        break;
+      case GDK_WINDOW_STATE:
+        klass = rb_cGdkEventWindowState;
+        break;
+      case GDK_SETTING:
+        klass = rb_cGdkEventSetting;
+        break;
+      case GDK_OWNER_CHANGE:
+        klass = rb_cGdkEventOwnerChange;
+        break;
+      case GDK_GRAB_BROKEN:
+        klass = rb_cGdkEventGrabBroken;
+        break;
+      case GDK_DAMAGE:
+        klass = rb_cGdkEventExpose;
+        break;
+      case GDK_TOUCH_BEGIN:
+      case GDK_TOUCH_UPDATE:
+      case GDK_TOUCH_END:
+      case GDK_TOUCH_CANCEL:
+        klass = rb_cGdkEventTouch;
+        break;
+      case GDK_EVENT_LAST:
+        break;
+      default:
+        break;
+    }
+
+    if (NIL_P(klass)) {
+        klass = rb_cGdkEventAny;
+    }
+
+    return klass;
+}
+
+static GType
+rb_gdk_event_to_gtype(VALUE event)
+{
+    VALUE klass;
+    GType type = GDK_TYPE_EVENT;
+
+    klass = rb_obj_class(event);
+    if (klass == rb_cGdkEvent) {
+        type = GDK_TYPE_EVENT;
+    } else if (klass == rb_cGdkEventAny) {
+        type = GDK_TYPE_EVENT_ANY;
+    } else if (klass == rb_cGdkEventExpose) {
+        type = GDK_TYPE_EVENT_EXPOSE;
+    } else if (klass == rb_cGdkEventVisibility) {
+        type = GDK_TYPE_EVENT_VISIBILITY;
+    } else if (klass == rb_cGdkEventMotion) {
+        type = GDK_TYPE_EVENT_MOTION;
+    } else if (klass == rb_cGdkEventButton) {
+        type = GDK_TYPE_EVENT_BUTTON;
+    } else if (klass == rb_cGdkEventScroll) {
+        type = GDK_TYPE_EVENT_SCROLL;
+    } else if (klass == rb_cGdkEventKey) {
+        type = GDK_TYPE_EVENT_KEY;
+    } else if (klass == rb_cGdkEventCrossing) {
+        type = GDK_TYPE_EVENT_CROSSING;
+    } else if (klass == rb_cGdkEventFocus) {
+        type = GDK_TYPE_EVENT_FOCUS;
+    } else if (klass == rb_cGdkEventConfigure) {
+        type = GDK_TYPE_EVENT_CONFIGURE;
+    } else if (klass == rb_cGdkEventProperty) {
+        type = GDK_TYPE_EVENT_PROPERTY;
+    } else if (klass == rb_cGdkEventSelection) {
+        type = GDK_TYPE_EVENT_SELECTION;
+    } else if (klass == rb_cGdkEventOwnerChange) {
+        type = GDK_TYPE_EVENT_OWNER_CHANGE;
+    } else if (klass == rb_cGdkEventProximity) {
+        type = GDK_TYPE_EVENT_PROXIMITY;
+    } else if (klass == rb_cGdkEventDND) {
+        type = GDK_TYPE_EVENT_DND;
+    } else if (klass == rb_cGdkEventWindowState) {
+        type = GDK_TYPE_EVENT_WINDOW_STATE;
+    } else if (klass == rb_cGdkEventSetting) {
+        type = GDK_TYPE_EVENT_SETTING;
+    } else if (klass == rb_cGdkEventGrabBroken) {
+        type = GDK_TYPE_EVENT_GRAB_BROKEN;
+    } else if (klass == rb_cGdkEventTouch) {
+        type = GDK_TYPE_EVENT_TOUCH;
+    } else {
+        rb_raise(rb_eArgError, "Not event object: %s", RBG_INSPECT(event));
+    }
+
+    return type;
+}
+
+VALUE
+rbgdk_gdkevent2rval(GdkEvent *event)
+{
+    return BOXED2RVAL(event, rb_gdk_event_type_to_gtype(event->any.type));
+}
+
+GdkEvent *
+rbgdk_rval2gdkevent(VALUE event)
+{
+    return RVAL2BOXED(event, rb_gdk_event_to_gtype(event));
+}
+
+/***********************************************/
+#define ATTR_STR(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return CSTR2RVAL(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = (gchar *)RVAL2CSTR(val);\
+    return self;\
+}
+
+#define ATTR_INT(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return INT2NUM(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = NUM2INT(val);\
+    return self;\
+}
+
+#define ATTR_UINT(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return UINT2NUM(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = NUM2UINT(val);\
+    return self;\
+}
+
+#define ATTR_GDKWINDOW(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return GOBJ2RVAL(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = RVAL2GDKWINDOW(val);\
+    return self;\
+}
+
+#define ATTR_FLOAT(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return rb_float_new(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = NUM2DBL(val);\
+    return self;\
+}
+
+#define ATTR_GOBJ(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return GOBJ2RVAL(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    GdkEvent *event;\
+    event = RVAL2GDKEVENT(self);\
+    if (event->type.name)\
+      g_object_unref(event->type.name);\
+    event->type.name = RVAL2GOBJ(val);\
+    if (event->type.name)\
+      g_object_ref(event->type.name);\
+    return self;\
+}
+
+#define ATTR_BOOL(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return CBOOL2RVAL(RVAL2GDKEVENT(self)->type.name);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = RVAL2CBOOL(val);\
+    return self;\
+}
+
+#define ATTR_ATOM(type, name)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    GdkAtom atom = RVAL2GDKEVENT(self)->type.name;\
+    return GDKATOM2RVAL(atom);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = RVAL2ATOM(val);\
+    return self;\
+}
+
+#define ATTR_FLAGS(type, name, gtype)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return GFLAGS2RVAL(RVAL2GDKEVENT(self)->type.name, gtype);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = RVAL2GFLAGS(val, gtype);\
+    return self;\
+}
+
+#define ATTR_ENUM(type, name, gtype)\
+static VALUE \
+gdkevent ## type ## _ ## name (VALUE self)\
+{\
+    return GENUM2RVAL(RVAL2GDKEVENT(self)->type.name, gtype);\
+}\
+static VALUE \
+gdkevent ## type ## _set_ ## name (VALUE self, VALUE val)\
+{\
+    RVAL2GDKEVENT(self)->type.name = RVAL2GENUM(val, gtype);\
+    return self;\
+}
+
+#define ATTR_AXES(type, gdkklass) \
+static VALUE \
+gdkevent ##type ## _axes(VALUE self)\
+{\
+    gdkklass type = RVAL2GDKEVENT(self)->type;\
+    return type.axes ? rb_ary_new3(2, \
+                       rb_float_new(type.axes[0]),\
+                       rb_float_new(type.axes[1])) : Qnil;\
+} \
+static VALUE \
+gdkevent ## type ## _set_axes(VALUE self, VALUE x, VALUE y)\
+{\
+    gdkklass val = RVAL2GDKEVENT(self)->type;\
+    val.axes[0] = NUM2DBL(x);\
+    val.axes[1] = NUM2DBL(y);\
+    return self;\
+}
+
+#define DEFINE_ACCESSOR(event, type, name) \
+    rbg_define_method(event, G_STRINGIFY(name), gdkevent ## type ## _## name, 0);\
+    rbg_define_method(event, G_STRINGIFY(set_ ## name), gdkevent ## type ## _set_## name, 1);
+
+
+/* initialize */
+#define GDKEVENT_INIT(type, default_gtype) \
+static VALUE \
+gdkevent ## type ## _initialize(int argc, VALUE *argv, VALUE self)\
+{\
+    VALUE type;\
+    GdkEventType gtype;\
+\
+    rb_scan_args(argc, argv, "01", &type);\
+    if (NIL_P(type)){\
+        gtype = default_gtype;\
+    } else {\
+        gtype = RVAL2GDKEVENTTYPE(type);\
+    }\
+\
+    G_INITIALIZE(self, gdk_event_new(gtype));\
+    return Qnil;\
+}
+
+#define DEFINE_INIT(event, type)                                         \
+  rbg_define_method(event, "initialize", gdkevent ## type ## _initialize, -1);
+
+/***********************************************/
+
+/* GdkEvent Singleton Methods */
+static VALUE
+gdkevent_s_events_pending(G_GNUC_UNUSED VALUE self)
+{
+    return CBOOL2RVAL(gdk_events_pending());
+}
+
+static VALUE
+gdkevent_s_peek(G_GNUC_UNUSED VALUE self)
+{
+    return GDKEVENT2RVAL(gdk_event_peek());
+}
+
+static VALUE
+gdkevent_s_get(G_GNUC_UNUSED VALUE self)
+{
+    return GDKEVENT2RVAL(gdk_event_get());
+}
+
+/* GdkEvent */
+static VALUE
+gdkevent_initialize(VALUE self, VALUE type)
+{
+    GdkEventType event_type;
+    VALUE klass;
+
+    event_type = RVAL2GDKEVENTTYPE(type);
+    klass = rb_gdk_event_type_to_class(event_type);
+    if (!RVAL2CBOOL(rb_obj_is_kind_of(self, klass))) {
+        rb_raise(rb_eArgError, "Wrong event type for this class.");
+    }
+
+    G_INITIALIZE(self, gdk_event_new(event_type));
+    return Qnil;
+}
+
+static VALUE
+gdkevent_type(VALUE self)
+{
+    return GDKEVENTTYPE2RVAL(RVAL2GDKEVENT(self)->type);
+}
+
+static VALUE
+gdkevent_put(VALUE self)
+{
+    gdk_event_put(RVAL2GDKEVENT(self));
+    return self;
+}
+
+/* We don't need this.
+gdk_event_get_time();
+gboolean    gdk_event_get_state             (GdkEvent *event,
+                                             GdkModifierType *state);
+*/
+
+static VALUE
+gdkevent_get_axis(VALUE self, VALUE axis_use)
+{
+    gdouble value;
+    gboolean ret = gdk_event_get_axis(RVAL2GDKEVENT(self), 
+                                      RVAL2GDKAXISUSE(axis_use), &value);
+    return ret ? rb_float_new(value) : Qnil;
+}
+
+static VALUE
+gdkevent_get_coords(VALUE self)
+{
+    gdouble x_win, y_win;
+    gboolean ret = gdk_event_get_coords(RVAL2GDKEVENT(self), &x_win, &y_win);
+
+    return ret ? rb_ary_new3(2, rb_float_new(x_win), rb_float_new(y_win)) : Qnil;
+}
+
+static VALUE
+gdkevent_get_root_coords(VALUE self)
+{
+    gdouble x_root, y_root;
+    gboolean ret = gdk_event_get_root_coords(RVAL2GDKEVENT(self), &x_root, &y_root);
+
+    return ret ? rb_ary_new3(2, rb_float_new(x_root), rb_float_new(y_root)) : Qnil;
+}
+
+static void
+handler_func(GdkEvent *event, gpointer func)
+{
+    rb_funcall((VALUE)func, id_call, 1, GDKEVENT2RVAL(event));
+}
+
+static VALUE
+gdkevent_s_handler_set(VALUE self)
+{
+    volatile VALUE func = rb_block_proc();
+    G_RELATIVE(self, func);
+
+    gdk_event_handler_set((GdkEventFunc)handler_func, (gpointer)func, NULL);
+    return self;
+}
+
+static VALUE
+gdkevent_s_get_show_events(G_GNUC_UNUSED VALUE self)
+{
+    return CBOOL2RVAL(gdk_get_show_events());
+}
+
+static VALUE
+gdkevent_s_set_show_events(VALUE self, VALUE show_events)
+{
+    gdk_set_show_events(RVAL2CBOOL(show_events));
+    return self;
+}
+
+static VALUE
+gdkevent_set_screen(VALUE self, VALUE screen)
+{
+    gdk_event_set_screen(RVAL2GDKEVENT(self), RVAL2GDKSCREEN(screen));
+    return self;
+}
+
+static VALUE
+gdkevent_screen(VALUE self)
+{
+    return GOBJ2RVAL(gdk_event_get_screen(RVAL2GDKEVENT(self)));
+}
+
+/*
+  type: String, Integer, Gdk::Color.
+ */
+static VALUE
+gdkevent_s_setting_get(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE name, type;
+    GType gtype;
+    GValue val = G_VALUE_INIT;
+    gboolean ret;
+    VALUE value;
+
+    rb_scan_args(argc, argv, "11", &name, &type);
+    if (NIL_P(type))
+        gtype = G_TYPE_STRING;
+    else
+        gtype = CLASS2GTYPE(type);
+
+    g_value_init(&val, gtype);
+    ret = gdk_setting_get(RVAL2CSTR(name), &val);
+
+    value = ret ? GVAL2RVAL(&val) : Qnil;
+    g_value_unset(&val);
+    return value;
+}
+
+/* GdkEventAny */
+ATTR_GOBJ(any, window);
+ATTR_BOOL(any, send_event);
+
+/* GdkEventKey */
+ATTR_UINT(key, time);
+ATTR_FLAGS(key, state, GDK_TYPE_MODIFIER_TYPE);
+ATTR_INT(key, keyval);
+ATTR_UINT(key, hardware_keycode);
+ATTR_UINT(key, group);
+
+/* GdkEventButton */
+ATTR_UINT(button, time);
+ATTR_FLOAT(button, x);
+ATTR_FLOAT(button, y);
+ATTR_AXES(button, GdkEventButton);
+ATTR_INT(button, button);
+ATTR_FLAGS(button, state, GDK_TYPE_MODIFIER_TYPE);
+ATTR_GOBJ(button, device);
+ATTR_FLOAT(button, x_root);
+ATTR_FLOAT(button, y_root);
+
+/* GdkEventTouch */
+ATTR_UINT(touch, time);
+ATTR_FLOAT(touch, x);
+ATTR_FLOAT(touch, y);
+ATTR_AXES(touch, GdkEventTouch);
+ATTR_FLAGS(touch, state, GDK_TYPE_MODIFIER_TYPE);
+ATTR_BOOL(touch, emulating_pointer);
+ATTR_GOBJ(touch, device);
+ATTR_FLOAT(touch, x_root);
+ATTR_FLOAT(touch, y_root);
+
+/* GdkEventScroll */
+ATTR_UINT(scroll, time);
+ATTR_FLOAT(scroll, x);
+ATTR_FLOAT(scroll, y);
+ATTR_FLAGS(scroll, state, GDK_TYPE_MODIFIER_TYPE);
+ATTR_ENUM(scroll, direction, GDK_TYPE_SCROLL_DIRECTION);
+ATTR_GOBJ(scroll, device);
+ATTR_FLOAT(scroll, x_root);
+ATTR_FLOAT(scroll, y_root);
+GDKEVENT_INIT(scroll, GDK_SCROLL);
+
+/* GdkEventMotion */
+ATTR_UINT(motion, time);
+ATTR_FLOAT(motion, x);
+ATTR_FLOAT(motion, y);
+ATTR_AXES(motion, GdkEventMotion);
+ATTR_FLOAT(motion, x_root);
+ATTR_FLOAT(motion, y_root);
+ATTR_FLAGS(motion, state, GDK_TYPE_MODIFIER_TYPE);
+ATTR_BOOL(motion, is_hint);
+ATTR_GOBJ(motion, device);
+GDKEVENT_INIT(motion, GDK_MOTION_NOTIFY);
+
+static VALUE
+gdkeventmotion_request_motions(VALUE self)
+{
+    gdk_event_request_motions(&(RVAL2GDKEVENT(self)->motion));
+    return self;
+}
+
+/* GdkEventExpose */
+static VALUE
+gdkeventexpose_area(VALUE self)
+{
+    return GDKRECTANGLE2RVAL(&RVAL2GDKEVENT(self)->expose.area);
+}
+
+static VALUE
+gdkeventexpose_set_area(VALUE self, VALUE rect)
+{
+    GdkRectangle* grect = RVAL2GDKRECTANGLE(rect);
+    GdkEventExpose *event = &(RVAL2GDKEVENT(self)->expose);
+    event->area.x = grect->x;
+    event->area.y = grect->y;
+    event->area.width = grect->width;
+    event->area.height = grect->height;
+    return self;
+}
+
+static VALUE
+gdkeventexpose_region(VALUE self)
+{
+    return CRREGION2RVAL(RVAL2GDKEVENT(self)->expose.region);
+}
+
+static VALUE
+gdkeventexpose_set_region(VALUE self, VALUE region)
+{
+    RVAL2GDKEVENT(self)->expose.region = RVAL2CRREGION(region);
+    return self;
+}
+
+ATTR_INT(expose, count);
+GDKEVENT_INIT(expose, GDK_EXPOSE);
+
+/* GdkEventVisibility */
+ATTR_ENUM(visibility, state, GDK_TYPE_VISIBILITY_STATE);
+GDKEVENT_INIT(visibility, GDK_VISIBILITY_NOTIFY);
+
+/* GdkEventCrossing */
+ATTR_GOBJ(crossing, subwindow);
+ATTR_UINT(crossing, time);
+ATTR_INT(crossing, x);
+ATTR_INT(crossing, y);
+ATTR_FLOAT(crossing, x_root);
+ATTR_FLOAT(crossing, y_root);
+ATTR_ENUM(crossing, mode, GDK_TYPE_CROSSING_MODE);
+ATTR_ENUM(crossing, detail, GDK_TYPE_NOTIFY_TYPE);
+ATTR_BOOL(crossing, focus);
+ATTR_FLAGS(crossing, state, GDK_TYPE_MODIFIER_TYPE);
+
+/* GdkEventFocus */
+ATTR_BOOL(focus_change, in);
+GDKEVENT_INIT(focus_change, GDK_FOCUS_CHANGE);
+
+/* GdkEventConfigure */
+ATTR_INT(configure, x);
+ATTR_INT(configure, y);
+ATTR_INT(configure, width);
+ATTR_INT(configure, height);
+GDKEVENT_INIT(configure, GDK_CONFIGURE);
+
+/* GdkEventProperty */
+ATTR_ATOM(property, atom);
+ATTR_UINT(property, time);
+ATTR_ENUM(property, state, GDK_TYPE_PROPERTY_STATE);
+GDKEVENT_INIT(property, GDK_PROPERTY_NOTIFY);
+
+/* GdkEventSelection */
+ATTR_ATOM(selection, selection);
+ATTR_ATOM(selection, target);
+ATTR_ATOM(selection, property);
+ATTR_GDKWINDOW(selection, requestor);
+ATTR_INT(selection, time);
+
+/* GdkEventDND */
+ATTR_GOBJ(dnd, context);
+ATTR_UINT(dnd, time);
+ATTR_INT(dnd, x_root);
+ATTR_INT(dnd, y_root);
+
+/* GdkEventProximity */
+ATTR_UINT(proximity, time);
+ATTR_GOBJ(proximity, device);
+
+/* GdkEventWindowState */
+ATTR_FLAGS(window_state, changed_mask, GDK_TYPE_WINDOW_STATE);
+ATTR_FLAGS(window_state, new_window_state, GDK_TYPE_WINDOW_STATE);
+GDKEVENT_INIT(window_state, GDK_WINDOW_STATE);
+
+/* GdkEventSetting */
+ATTR_ENUM(setting, action, GDK_TYPE_SETTING_ACTION);
+ATTR_STR(setting, name);
+GDKEVENT_INIT(setting, GDK_SETTING);
+
+/* GdkEventOwnerChange */
+ATTR_GDKWINDOW(owner_change, owner);
+ATTR_ENUM(owner_change, reason, GDK_TYPE_OWNER_CHANGE);
+ATTR_ATOM(owner_change, selection);
+ATTR_UINT(owner_change, time);
+ATTR_UINT(owner_change, selection_time);
+GDKEVENT_INIT(owner_change, GDK_OWNER_CHANGE);
+
+/* GdkEventGrabBroken */
+ATTR_BOOL(grab_broken, keyboard);
+ATTR_BOOL(grab_broken, implicit);
+ATTR_GOBJ(grab_broken, grab_window);
+GDKEVENT_INIT(grab_broken, GDK_GRAB_BROKEN);
+
+/* MISC */
+static VALUE
+gdkevent_g2r(const GValue *values)
+{
+    return GDKEVENT2RVAL(g_value_get_boxed(&values[0]));
+}
+
+void
+Init_gdk_event(VALUE mGdk)
+{
+    /* GdkEvent */
+    rb_cGdkEvent = G_DEF_CLASS(GDK_TYPE_EVENT, "Event", mGdk);
+    rbg_define_method(rb_cGdkEvent, "initialize", gdkevent_initialize, 1);
+    rbg_define_method(rb_cGdkEvent, "event_type", gdkevent_type, 0);
+
+    rbg_define_singleton_method(rb_cGdkEvent, "events_pending?", gdkevent_s_events_pending, 0);
+    rbg_define_singleton_method(rb_cGdkEvent, "peek", gdkevent_s_peek, 0);
+    rbg_define_singleton_method(rb_cGdkEvent, "get", gdkevent_s_get, 0);
+    rbg_define_method(rb_cGdkEvent, "put", gdkevent_put, 0);
+    rbg_define_method(rb_cGdkEvent, "get_axis", gdkevent_get_axis, 1);
+    rbg_define_method(rb_cGdkEvent, "coords", gdkevent_get_coords, 0);
+    rbg_define_method(rb_cGdkEvent, "root_coords", gdkevent_get_root_coords, 0);
+
+    rbg_define_singleton_method(rb_cGdkEvent, "handler_set", gdkevent_s_handler_set, 0);
+    rbg_define_singleton_method(rb_cGdkEvent, "show_events?", gdkevent_s_get_show_events, 0);
+    rbg_define_singleton_method(rb_cGdkEvent, "set_show_events", gdkevent_s_set_show_events, 1);
+    rbg_define_singleton_method(rb_cGdkEvent, "setting_get", gdkevent_s_setting_get, -1);
+    rbg_define_method(rb_cGdkEvent, "screen", gdkevent_screen, 0);
+    rbg_define_method(rb_cGdkEvent, "set_screen", gdkevent_set_screen, 1);
+
+    /* GdkEventAny's fields */
+    DEFINE_ACCESSOR(rb_cGdkEvent, any, window);
+    rbg_define_method(rb_cGdkEvent, "send_event?", gdkeventany_send_event, 0);
+    rbg_define_method(rb_cGdkEvent, "set_send_event", gdkeventany_set_send_event, 1);
+
+    /*
+     * GdkEvent's Constants
+     */
+    rb_define_const(rb_cGdkEvent, "CURRENT_TIME", INT2FIX(GDK_CURRENT_TIME));
+    rb_define_const(rb_cGdkEvent, "PROPAGATE", CBOOL2RVAL(GDK_EVENT_PROPAGATE));
+    rb_define_const(rb_cGdkEvent, "STOP", CBOOL2RVAL(GDK_EVENT_STOP));
+    rb_define_const(rb_cGdkEvent, "PRIORITY_EVENTS", INT2FIX(GDK_PRIORITY_EVENTS));
+    rb_define_const(rb_cGdkEvent, "PRIORITY_REDRAW", INT2FIX(GDK_PRIORITY_REDRAW));
+
+    /* GdkEventType */
+    /* XXX */
+    G_RENAME_CONSTANT("2BUTTON_PRESS","BUTTON2_PRESS");
+    G_RENAME_CONSTANT("3BUTTON_PRESS","BUTTON3_PRESS");
+    G_DEF_CLASS(GDK_TYPE_EVENT_TYPE, "Type", rb_cGdkEvent);
+    G_RENAME_CONSTANT("2BUTTON_PRESS","BUTTON2_PRESS");
+    G_RENAME_CONSTANT("3BUTTON_PRESS","BUTTON3_PRESS");
+    G_DEF_CONSTANTS(rb_cGdkEvent, GDK_TYPE_EVENT_TYPE, "GDK_");
+
+    /* GdkEventMask */
+    G_DEF_CLASS(GDK_TYPE_EVENT_MASK, "Mask", rb_cGdkEvent);
+    G_DEF_CONSTANTS(rb_cGdkEvent, GDK_TYPE_EVENT_MASK, "GDK_");
+
+    /* GdkEventAny */
+    rb_cGdkEventAny =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_ANY, "EventAny",
+                                mGdk, rb_cGdkEvent);
+
+    /* GdkEventExpose */
+    rb_cGdkEventExpose =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_EXPOSE, "EventExpose",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventExpose, expose, area);
+    DEFINE_ACCESSOR(rb_cGdkEventExpose, expose, region);
+    DEFINE_ACCESSOR(rb_cGdkEventExpose, expose, count);
+    DEFINE_INIT(rb_cGdkEventExpose, expose);
+
+    /* GdkEventVisibility */
+    rb_cGdkEventVisibility =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_VISIBILITY, "EventVisibility",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventVisibility, visibility, state);
+    DEFINE_INIT(rb_cGdkEventVisibility, visibility);
+
+    /* GdkVisibilityState */
+    G_DEF_CLASS(GDK_TYPE_VISIBILITY_STATE, "State", rb_cGdkEventVisibility);
+    G_DEF_CONSTANTS(rb_cGdkEventVisibility,
+                    GDK_TYPE_VISIBILITY_STATE, "GDK_VISIBILITY_");
+
+    /* GdkEventMotion */
+    rb_cGdkEventMotion =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_MOTION, "EventMotion",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, time);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, x);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, y);
+    rbg_define_method(rb_cGdkEventMotion, "axes", gdkeventmotion_axes, 0);
+    rbg_define_method(rb_cGdkEventMotion, "set_axes", gdkeventmotion_set_axes, 1);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, state);
+    rbg_define_method(rb_cGdkEventMotion, "hint?", gdkeventmotion_is_hint, 0);
+    rbg_define_method(rb_cGdkEventMotion, "set_hint", gdkeventmotion_set_is_hint, 1);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, device);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventMotion, motion, y_root);
+    DEFINE_INIT(rb_cGdkEventMotion, motion);
+    rbg_define_method(rb_cGdkEventMotion, "request", gdkeventmotion_request_motions, 0);
+
+    /* GdkEventButton */
+    rb_cGdkEventButton =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_BUTTON, "EventButton",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, time);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, x);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, y);
+    rbg_define_method(rb_cGdkEventButton, "axes", gdkeventbutton_axes, 0);
+    rbg_define_method(rb_cGdkEventButton, "set_axes", gdkeventbutton_set_axes, 2);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, state);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, button);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, device);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventButton, button, y_root);
+
+    /* GdkEventTouch */
+    rb_cGdkEventTouch =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_TOUCH, "EventTouch",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, time);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, x);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, y);
+    rbg_define_method(rb_cGdkEventTouch, "axes", gdkeventtouch_axes, 0);
+    rbg_define_method(rb_cGdkEventTouch, "set_axes", gdkeventtouch_set_axes, 2);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, state);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, emulating_pointer);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, device);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventTouch, touch, y_root);
+
+    /* GdkEventScroll */
+    rb_cGdkEventScroll =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_SCROLL, "EventScroll",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, time);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, x);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, y);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, state);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, direction);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, device);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventScroll, scroll, y_root);
+    DEFINE_INIT(rb_cGdkEventScroll, scroll);
+
+    /* GdkScrollDirection */
+    G_DEF_CLASS(GDK_TYPE_SCROLL_DIRECTION, "Direction", rb_cGdkEventScroll);
+    G_DEF_CONSTANTS(rb_cGdkEventScroll,
+                    GDK_TYPE_SCROLL_DIRECTION, "GDK_SCROLL_");
+
+    /* GdkEventKey */
+    rb_cGdkEventKey =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_KEY, "EventKey",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventKey, key, time);
+    DEFINE_ACCESSOR(rb_cGdkEventKey, key, state);
+    DEFINE_ACCESSOR(rb_cGdkEventKey, key, keyval);
+    DEFINE_ACCESSOR(rb_cGdkEventKey, key, hardware_keycode);
+    DEFINE_ACCESSOR(rb_cGdkEventKey, key, group);
+
+    /* GdkEventCrossing */
+    rb_cGdkEventCrossing =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_CROSSING, "EventCrossing",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, subwindow);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, time);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, x);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, y);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, y_root);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, mode);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, detail);
+    rbg_define_method(rb_cGdkEventCrossing, "focus?", gdkeventcrossing_focus, 0);
+    rbg_define_method(rb_cGdkEventCrossing, "set_focus", gdkeventcrossing_set_focus, 1);
+    DEFINE_ACCESSOR(rb_cGdkEventCrossing, crossing, state);
+
+    /* GdkCrossingMode */
+    G_DEF_CLASS(GDK_TYPE_CROSSING_MODE, "Mode", rb_cGdkEventCrossing);
+    G_DEF_CONSTANTS(rb_cGdkEventCrossing,
+                    GDK_TYPE_CROSSING_MODE, "GDK_CROSSING_");
+    /* GdkNotifyType */
+    G_DEF_CLASS(GDK_TYPE_NOTIFY_TYPE, "NotifyType", rb_cGdkEventScroll);
+    G_DEF_CONSTANTS(rb_cGdkEventScroll, GDK_TYPE_NOTIFY_TYPE, "GDK_");
+
+    /* GdkEventFocus */
+    rb_cGdkEventFocus =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_FOCUS, "EventFocus",
+                                mGdk, rb_cGdkEvent);
+    rbg_define_method(rb_cGdkEventFocus, "in?", gdkeventfocus_change_in, 0);
+    rbg_define_method(rb_cGdkEventFocus, "set_in",
+                     gdkeventfocus_change_set_in, 1);
+    DEFINE_INIT(rb_cGdkEventFocus, focus_change);
+
+    /* GdkEventConfigure */
+    rb_cGdkEventConfigure =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_CONFIGURE, "EventConfigure",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventConfigure, configure, x);
+    DEFINE_ACCESSOR(rb_cGdkEventConfigure, configure, y);
+    DEFINE_ACCESSOR(rb_cGdkEventConfigure, configure, width);
+    DEFINE_ACCESSOR(rb_cGdkEventConfigure, configure, height);
+    DEFINE_INIT(rb_cGdkEventConfigure, configure);
+
+    /* GdkEventProperty */
+    rb_cGdkEventProperty =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_PROPERTY, "EventProperty",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventProperty, property, atom);
+    DEFINE_ACCESSOR(rb_cGdkEventProperty, property, time);
+    DEFINE_ACCESSOR(rb_cGdkEventProperty, property, state);
+    DEFINE_INIT(rb_cGdkEventProperty, property);
+
+    /* GdkPropertyState */
+    G_DEF_CLASS(GDK_TYPE_PROPERTY_STATE, "State", rb_cGdkEventProperty);
+    G_DEF_CONSTANTS(rb_cGdkEventProperty, GDK_TYPE_PROPERTY_STATE, "GDK_");
+
+    /* GdkEventSelection */
+    rb_cGdkEventSelection =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_SELECTION, "EventSelection",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventSelection, selection, selection);
+    DEFINE_ACCESSOR(rb_cGdkEventSelection, selection, target);
+    DEFINE_ACCESSOR(rb_cGdkEventSelection, selection, property);
+    DEFINE_ACCESSOR(rb_cGdkEventSelection, selection, requestor);
+    DEFINE_ACCESSOR(rb_cGdkEventSelection, selection, time);
+
+    /* GdkEventOwnerChange */
+    rb_cGdkEventOwnerChange =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_OWNER_CHANGE, "EventOwnerChange",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventOwnerChange, owner_change, owner);
+    DEFINE_ACCESSOR(rb_cGdkEventOwnerChange, owner_change, reason);
+    DEFINE_ACCESSOR(rb_cGdkEventOwnerChange, owner_change, selection);
+    DEFINE_ACCESSOR(rb_cGdkEventOwnerChange, owner_change, time);
+    DEFINE_ACCESSOR(rb_cGdkEventOwnerChange, owner_change, selection_time);
+    DEFINE_INIT(rb_cGdkEventOwnerChange, owner_change);
+
+    /* GdkOwnerChange */
+    G_DEF_CLASS(GDK_TYPE_OWNER_CHANGE, "OwnerChange", rb_cGdkEventScroll);
+    G_DEF_CONSTANTS(rb_cGdkEventScroll,
+                    GDK_TYPE_OWNER_CHANGE, "GDK_OWNER_CHANGE_");
+
+    /* GdkEventProximity */
+    rb_cGdkEventProximity =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_PROXIMITY, "EventProximity",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventProximity, proximity, time);
+    DEFINE_ACCESSOR(rb_cGdkEventProximity, proximity, device);
+
+    /* GdkEventDND */
+    rb_cGdkEventDND =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_DND, "EventDND",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventDND, dnd, context);
+    DEFINE_ACCESSOR(rb_cGdkEventDND, dnd, time);
+    DEFINE_ACCESSOR(rb_cGdkEventDND, dnd, x_root);
+    DEFINE_ACCESSOR(rb_cGdkEventDND, dnd, y_root);
+
+    /* GdkEventWindowState */
+    rb_cGdkEventWindowState =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_WINDOW_STATE, "EventWindowState",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventWindowState, window_state, changed_mask);
+    DEFINE_ACCESSOR(rb_cGdkEventWindowState, window_state, new_window_state);
+    DEFINE_INIT(rb_cGdkEventWindowState, window_state);
+
+    /* GdkWindowState */
+    G_DEF_CLASS(GDK_TYPE_WINDOW_STATE, "WindowState", rb_cGdkEventScroll);
+    G_DEF_CONSTANTS(rb_cGdkEventWindowState,
+                    GDK_TYPE_WINDOW_STATE, "GDK_WINDOW_STATE_");
+
+    /* GdkEventSetting */
+    rb_cGdkEventSetting =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_SETTING, "EventSetting",
+                                mGdk, rb_cGdkEvent);
+    DEFINE_ACCESSOR(rb_cGdkEventSetting, setting, action);
+    DEFINE_ACCESSOR(rb_cGdkEventSetting, setting, name);
+    DEFINE_INIT(rb_cGdkEventSetting, setting);
+
+    /* GdkSettingAction */
+    G_DEF_CLASS(GDK_TYPE_SETTING_ACTION, "Action", rb_cGdkEventScroll);
+    G_DEF_CONSTANTS(rb_cGdkEventSetting,
+                    GDK_TYPE_SETTING_ACTION, "GDK_SETTING_");
+
+    /* GdkEventGrabBroken */
+    rb_cGdkEventGrabBroken =
+        G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_GRAB_BROKEN, "EventGrabBroken",
+                                mGdk, rb_cGdkEvent);
+    rbg_define_method(rb_cGdkEventGrabBroken,
+                     "keyboard?", gdkeventgrab_broken_keyboard, 0);
+    rbg_define_method(rb_cGdkEventGrabBroken,
+                     "set_keyboard", gdkeventgrab_broken_set_keyboard, 1);
+    rbg_define_method(rb_cGdkEventGrabBroken,
+                     "implicit?", gdkeventgrab_broken_implicit, 0);
+    rbg_define_method(rb_cGdkEventGrabBroken,
+                     "set_implicit", gdkeventgrab_broken_set_implicit, 1);
+    DEFINE_ACCESSOR(rb_cGdkEventGrabBroken, grab_broken, grab_window);
+    DEFINE_INIT(rb_cGdkEventGrabBroken, grab_broken);
+
+    rbgobj_register_g2r_func(GDK_TYPE_EVENT, &gdkevent_g2r);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkgeometry.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkgeometry.c
new file mode 100644
index 0000000..9c3e51f
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkgeometry.c
@@ -0,0 +1,253 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Masao Mutoh
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+/*****************************************/
+static GdkGeometry*
+geo_copy(const GdkGeometry* geo)
+{
+  GdkGeometry* new_geo;
+  g_return_val_if_fail (geo != NULL, NULL);
+  new_geo = g_new(GdkGeometry, 1);
+  *new_geo = *geo;
+  return new_geo;
+}
+
+GType
+gdk_geometry_get_type(void)
+{
+  static GType our_type = 0;
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("GdkGeometry",
+                    (GBoxedCopyFunc)geo_copy,
+                    (GBoxedFreeFunc)g_free);
+  return our_type;
+}
+/*****************************************/
+
+#define RG_TARGET_NAMESPACE cGeometry
+#define _SELF(g) (RVAL2GDKGEOMETRY(g))
+
+static VALUE
+rg_initialize(VALUE self)
+{
+    GdkGeometry geometry;
+    memset(&geometry, 0, sizeof(GdkGeometry));
+    G_INITIALIZE(self, g_boxed_copy(GDK_TYPE_GEOMETRY, &geometry));
+    return Qnil;
+}
+
+static VALUE
+rg_set(VALUE self, VALUE min_width, VALUE min_height, VALUE max_width, VALUE max_height, VALUE base_width, VALUE base_height, VALUE width_inc, VALUE height_inc, VALUE min_aspect, VALUE max_aspect, VALUE gravity)
+{
+    GdkGeometry *geo = _SELF(self);
+    geo->min_width = NUM2INT(min_width);
+    geo->min_height = NUM2INT(min_height);
+    geo->max_width = NUM2INT(max_width);
+    geo->max_height = NUM2INT(max_height);
+    geo->base_width = NUM2INT(base_width);
+    geo->base_height = NUM2INT(base_height);
+    geo->width_inc = NUM2INT(width_inc);
+    geo->height_inc = NUM2INT(height_inc);
+    geo->min_aspect = NUM2DBL(min_aspect);
+    geo->max_aspect = NUM2DBL(max_aspect);
+    geo->win_gravity = RVAL2GDKGRAVITY(gravity);
+
+    return self;
+}
+
+static VALUE
+rg_min_width(VALUE self)
+{
+    return INT2NUM(_SELF(self)->min_width);
+}
+
+static VALUE
+rg_min_height(VALUE self)
+{
+    return INT2NUM(_SELF(self)->min_height);
+}
+
+static VALUE
+rg_max_width(VALUE self)
+{
+    return INT2NUM(_SELF(self)->max_width);
+}
+
+static VALUE
+rg_max_height(VALUE self)
+{
+    return INT2NUM(_SELF(self)->max_height);
+}
+
+static VALUE
+rg_base_width(VALUE self)
+{
+    return INT2NUM(_SELF(self)->base_width);
+}
+
+static VALUE
+rg_base_height(VALUE self)
+{
+    return INT2NUM(_SELF(self)->base_height);
+}
+
+static VALUE
+rg_width_inc(VALUE self)
+{
+    return INT2NUM(_SELF(self)->width_inc);
+}
+
+static VALUE
+rg_height_inc(VALUE self)
+{
+    return INT2NUM(_SELF(self)->height_inc);
+}
+
+static VALUE
+rg_min_aspect(VALUE self)
+{
+    return rb_float_new(_SELF(self)->min_aspect);
+}
+
+static VALUE
+rg_max_aspect(VALUE self)
+{
+    return rb_float_new(_SELF(self)->max_aspect);
+}
+
+static VALUE
+rg_win_gravity(VALUE self)
+{
+    return GDKGRAVITY2RVAL(_SELF(self)->win_gravity);
+}
+
+static VALUE
+rg_set_min_width(VALUE self, VALUE min_width)
+{
+    _SELF(self)->min_width = NUM2INT(min_width);
+    return self;
+}
+
+static VALUE
+rg_set_min_height(VALUE self, VALUE min_height)
+{
+    _SELF(self)->min_height = NUM2INT(min_height);
+    return self;
+}
+
+static VALUE
+rg_set_max_width(VALUE self, VALUE max_width)
+{
+    _SELF(self)->max_width = NUM2INT(max_width);
+    return self;
+}
+
+static VALUE
+rg_set_max_height(VALUE self, VALUE max_height)
+{
+    _SELF(self)->max_height = NUM2INT(max_height);
+    return self;
+}
+
+static VALUE
+rg_set_base_width(VALUE self, VALUE base_width)
+{
+    _SELF(self)->base_width = NUM2INT(base_width);
+    return self;
+}
+
+static VALUE
+rg_set_base_height(VALUE self, VALUE base_height)
+{
+    _SELF(self)->base_height = NUM2INT(base_height);
+    return self;
+}
+
+static VALUE
+rg_set_width_inc(VALUE self, VALUE width_inc)
+{
+    _SELF(self)->width_inc = NUM2INT(width_inc);
+    return self;
+}
+
+static VALUE
+rg_set_height_inc(VALUE self, VALUE height_inc)
+{
+    _SELF(self)->height_inc = NUM2INT(height_inc);
+    return self;
+}
+
+static VALUE
+rg_set_min_aspect(VALUE self, VALUE min_aspect)
+{
+    _SELF(self)->min_aspect = NUM2DBL(min_aspect);
+    return self;
+}
+
+static VALUE
+rg_set_max_aspect(VALUE self, VALUE max_aspect)
+{
+    _SELF(self)->max_aspect = NUM2DBL(max_aspect);
+    return self;
+}
+
+static VALUE
+rg_set_win_gravity(VALUE self, VALUE gravity)
+{
+    _SELF(self)->win_gravity = RVAL2GDKGRAVITY(gravity);
+    return self;
+}
+
+void 
+Init_gdk_geometry(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_GEOMETRY, "Geometry", mGdk);
+
+    RG_DEF_METHOD(initialize, 0);
+    RG_DEF_METHOD(min_width, 0);
+    RG_DEF_METHOD(min_height, 0);
+    RG_DEF_METHOD(max_width, 0);
+    RG_DEF_METHOD(max_height, 0);
+    RG_DEF_METHOD(base_width, 0);
+    RG_DEF_METHOD(base_height, 0);
+    RG_DEF_METHOD(width_inc, 0);
+    RG_DEF_METHOD(height_inc, 0);
+    RG_DEF_METHOD(min_aspect, 0);
+    RG_DEF_METHOD(max_aspect, 0);
+    RG_DEF_METHOD(win_gravity, 0);
+    RG_DEF_METHOD(set, 11);
+    RG_DEF_METHOD(set_min_width, 1);
+    RG_DEF_METHOD(set_min_height, 1);
+    RG_DEF_METHOD(set_max_width, 1);
+    RG_DEF_METHOD(set_max_height, 1);
+    RG_DEF_METHOD(set_base_width, 1);
+    RG_DEF_METHOD(set_base_height, 1);
+    RG_DEF_METHOD(set_width_inc, 1);
+    RG_DEF_METHOD(set_height_inc, 1);
+    RG_DEF_METHOD(set_min_aspect, 1);
+    RG_DEF_METHOD(set_max_aspect, 1);
+    RG_DEF_METHOD(set_win_gravity, 1);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeymap.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeymap.c
new file mode 100644
index 0000000..4b698f3
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeymap.c
@@ -0,0 +1,151 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003,2004 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cKeymap
+#define _SELF(s) RVAL2GDKKEYMAP(s)
+
+static VALUE
+rg_s_default(G_GNUC_UNUSED VALUE self)
+{
+  return GOBJ2RVAL(gdk_keymap_get_default());
+}
+
+static VALUE
+rg_s_for_display(G_GNUC_UNUSED VALUE self, VALUE display)
+{
+  return GOBJ2RVAL(gdk_keymap_get_for_display(RVAL2GDKDISPLAYOBJECT(display)));
+}
+
+static VALUE
+rg_lookup_key(VALUE self, VALUE keycode, VALUE group, VALUE level)
+{
+  GdkKeymapKey key;
+
+  key.keycode = NUM2UINT(keycode);
+  key.group = NUM2INT(group);
+  key.level = NUM2INT(level);
+
+  return INT2NUM(gdk_keymap_lookup_key(_SELF(self), &key));
+}
+
+static VALUE
+rg_translate_keyboard_state(VALUE self, VALUE hardware_keycode, VALUE state, VALUE group)
+{
+  guint keyval;
+  gint effective_group, level;
+  GdkModifierType consumed_modifiers;
+  gboolean ret;
+
+  ret = gdk_keymap_translate_keyboard_state(_SELF(self),
+                                            NUM2UINT(hardware_keycode),
+                                            RVAL2GDKMODIFIERTYPE(state),
+                                            NUM2INT(group),
+                                            &keyval, &effective_group,
+                                            &level, &consumed_modifiers);
+  return ret ? rb_ary_new3(4, UINT2NUM(keyval), INT2NUM(effective_group),
+                           INT2NUM(level), 
+                           GDKMODIFIERTYPE2RVAL(consumed_modifiers)) : Qnil;
+}
+
+static VALUE
+rg_get_entries_for_keyval(VALUE self, VALUE keyval)
+{
+  GdkKeymapKey* keys;
+  gint n_keys;
+  gboolean ret;
+  ret = gdk_keymap_get_entries_for_keyval(_SELF(self),
+                                          NUM2UINT(keyval), &keys, &n_keys);
+
+  if (ret){
+    VALUE key;
+    VALUE ary = rb_ary_new();
+    gint i;
+    for (i = 0; i < n_keys; i++){
+      key = rb_ary_new3(3, UINT2NUM(keys[i].keycode), INT2NUM(keys[i].group), 
+                        INT2NUM(keys[i].level));
+      rb_ary_push(ary, key);
+    }
+    g_free(keys);
+    return ary;
+  } else {
+    return Qnil;
+  }
+}
+
+static VALUE
+rg_get_entries_for_keycode(VALUE self, VALUE hardware_keycode)
+{
+  GdkKeymapKey* keys;
+  guint* keyvals;
+  gint n_entries;
+  gboolean  ret = gdk_keymap_get_entries_for_keycode(_SELF(self),
+                                                     NUM2UINT(hardware_keycode),
+                                                     &keys, &keyvals, &n_entries);
+  if (ret){
+    VALUE key;
+    VALUE ary = rb_ary_new();
+    gint i;
+    for (i = 0; i < n_entries; i++){
+      key = rb_ary_new3(4, UINT2NUM(keys[i].keycode), INT2NUM(keys[i].group), 
+                        INT2NUM(keys[i].level), UINT2NUM(keyvals[i]));
+      rb_ary_push(ary, key);
+    }
+    g_free(keys);
+    g_free(keyvals);
+    return ary;
+  } else {
+    return Qnil;
+  }  
+}
+
+static VALUE
+rg_direction(VALUE self)
+{
+  return PANGODIRECTION2RVAL(gdk_keymap_get_direction(_SELF(self)));
+}
+
+static VALUE
+rg_have_bidi_layouts_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_keymap_have_bidi_layouts(_SELF(self)));
+}
+
+void 
+Init_gdk_keymap(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_KEYMAP, "Keymap", mGdk);
+
+    RG_DEF_SMETHOD(default, 0);
+    RG_DEF_SMETHOD(for_display, 0);
+    RG_DEF_METHOD(lookup_key, 3);
+    RG_DEF_METHOD(translate_keyboard_state, 3);
+    RG_DEF_METHOD(get_entries_for_keyval, 1);
+    RG_DEF_METHOD(get_entries_for_keycode, 1);
+    RG_DEF_METHOD(direction, 0);
+    RG_DEF_METHOD_P(have_bidi_layouts, 0);
+
+#ifdef GDK_WINDOWING_X11
+    G_DEF_CLASS3("GdkKeymapX11", "KeymapX11", mGdk);
+#endif
+
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeyval.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeyval.c
new file mode 100644
index 0000000..b68851a
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkkeyval.c
@@ -0,0 +1,108 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+#include <gdk/gdkkeysyms.h>
+
+#define RG_TARGET_NAMESPACE mGdkKeyval
+
+static VALUE
+rg_s_to_name(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    gchar* name = gdk_keyval_name(NUM2UINT(keyval));
+    return name ? CSTR2RVAL(name) : Qnil;
+}
+
+static VALUE
+rg_s_from_name(G_GNUC_UNUSED VALUE self, VALUE keyval_name)
+{
+    return UINT2NUM(gdk_keyval_from_name(RVAL2CSTR(keyval_name)));
+}
+
+static VALUE
+rg_s_upper_p(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    return CBOOL2RVAL(gdk_keyval_is_upper(NUM2UINT(keyval)));
+}
+
+static VALUE
+rg_s_lower_p(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    return CBOOL2RVAL(gdk_keyval_is_lower(NUM2UINT(keyval)));
+}
+
+static VALUE
+rg_s_convert_case(G_GNUC_UNUSED VALUE self, VALUE symbol)
+{
+    guint upper, lower;
+    gdk_keyval_convert_case(NUM2UINT(symbol), &lower, &upper);
+    return rb_ary_new3(2, UINT2NUM(lower), UINT2NUM(upper));
+}
+
+static VALUE
+rg_s_to_upper(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    return INT2NUM(gdk_keyval_to_upper(NUM2UINT(keyval)));
+}
+
+static VALUE
+rg_s_to_lower(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    return INT2NUM(gdk_keyval_to_lower(NUM2UINT(keyval)));
+}
+
+static VALUE
+rg_s_to_unicode(G_GNUC_UNUSED VALUE self, VALUE keyval)
+{
+    return UINT2NUM(gdk_keyval_to_unicode(NUM2UINT(keyval)));
+}
+
+static VALUE
+rg_s_from_unicode(G_GNUC_UNUSED VALUE self, VALUE wc)
+{
+    VALUE unicode;
+    if (TYPE(wc) == T_STRING) {
+        unicode = NUM2UINT(rb_funcall(wc, rb_intern("[]"), 1, INT2FIX(0)));
+    } else {
+        unicode = NUM2UINT(wc);
+    }
+    return UINT2NUM(gdk_unicode_to_keyval(unicode));
+}
+
+void
+Init_gdk_keyval(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Keyval");
+    RG_DEF_SMETHOD(to_name, 1);
+    RG_DEF_SMETHOD(from_name, 1);
+    RG_DEF_SMETHOD_P(upper, 1);
+    RG_DEF_SMETHOD_P(lower, 1);
+    RG_DEF_SMETHOD(convert_case, 1);
+    RG_DEF_SMETHOD(to_upper, 1);
+    RG_DEF_SMETHOD(to_lower, 1);
+    RG_DEF_SMETHOD(to_unicode, 1);
+    RG_DEF_SMETHOD(from_unicode, 1);
+
+#include "rbgdkkeysyms.h"
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpango.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpango.c
new file mode 100644
index 0000000..e2ffc35
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpango.c
@@ -0,0 +1,197 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003,2004 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+#include "rbpango.h"
+
+#define RG_TARGET_NAMESPACE mPango
+
+static VALUE
+rg_s_context(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE screen, ret;
+    rb_scan_args(argc, argv, "01", &screen);
+    if (NIL_P(screen)){
+        ret = GOBJ2RVAL(gdk_pango_context_get());
+    } else {
+        ret = GOBJ2RVAL(gdk_pango_context_get_for_screen(RVAL2GDKSCREEN(screen)));
+    }
+    return ret;
+}
+
+/* deprecated
+static VALUE
+gdkpango_context_set_colormap(VALUE self, VALUE colormap)
+{
+    gdk_pango_context_set_colormap(RVAL2PANGOCONTEXT(self),
+                                   RVAL2GDKCOLORMAP(colormap));
+    return self;
+}
+
+static VALUE
+gdkpango_attr_embossed_initialize(VALUE self, VALUE embossed)
+{
+    DATA_PTR(self) = gdk_pango_attr_embossed_new(RVAL2CBOOL(embossed));
+    return Qnil;
+}
+
+static VALUE
+gdkpango_attr_embossed_value(VALUE self)
+{
+    return CBOOL2RVAL(((GdkPangoAttrEmbossed*)RVAL2ATTR(self))->embossed);
+}
+*/
+
+/* deprecated
+static VALUE
+gdkpango_attr_stipple_initialize(VALUE self, VALUE stipple)
+{
+    DATA_PTR(self) = gdk_pango_attr_stipple_new(RVAL2GDKBITMAP(stipple));
+    return Qnil;
+}
+
+static VALUE
+gdkpango_attr_stipple_value(VALUE self)
+{
+    return GOBJ2RVAL(((GdkPangoAttrStipple*)RVAL2ATTR(self))->stipple);
+}
+*/
+
+static VALUE
+gdkpango_layout_get_clip_region(VALUE self, VALUE rbx_origin, VALUE rby_origin, VALUE rbindex_ranges)
+{
+    PangoLayout *layout = RVAL2PANGOLAYOUT(self);
+    gint x_origin = NUM2INT(rbx_origin);
+    gint y_origin = NUM2INT(rby_origin);
+    long n;
+    gint *index_ranges = RVAL2GINTS(rbindex_ranges, n);
+    cairo_region_t *result;
+
+    if (n % 2 != 0) {
+        g_free(index_ranges);
+
+        rb_raise(rb_eArgError,
+                 "an even number of byte indexes must be given");
+    }
+
+    result = gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n / 2);
+
+    g_free(index_ranges);
+
+    return CRREGION2RVAL(result);
+}
+
+static VALUE
+gdkpango_layout_line_get_clip_region(VALUE self, VALUE rbx_origin, VALUE rby_origin, VALUE rbindex_ranges)
+{
+    PangoLayoutLine *line = RVAL2PANGOLAYOUTLINE(self);
+    gint x_origin = NUM2INT(rbx_origin);
+    gint y_origin = NUM2INT(rby_origin);
+    long n;
+    gint *index_ranges = RVAL2GINTS(rbindex_ranges, n);
+    cairo_region_t *result;
+
+    if (n % 2 != 0) {
+        g_free(index_ranges);
+
+        rb_raise(rb_eArgError,
+                 "an even number of byte indexes must be given");
+    }
+
+    result = gdk_pango_layout_line_get_clip_region(line, x_origin, y_origin, index_ranges, n / 2);
+
+    g_free(index_ranges);
+
+    return CRREGION2RVAL(result);
+}
+
+/* deprecated
+static VALUE
+gdkpango_attr_emboss_color_initialize(VALUE self, VALUE color)
+{
+    DATA_PTR(self) = gdk_pango_attr_emboss_color_new(RVAL2GDKCOLOR(color));
+    return Qnil;
+}
+
+static VALUE
+gdkpango_attr_emboss_color_value(VALUE self)
+{
+    return PANGOCOLOR2RVAL(&(((GdkPangoAttrEmbossColor *)RVAL2ATTR(self))->color));
+}
+*/
+
+void
+Init_gdk_pango(VALUE mGdk)
+{
+/* deprecated
+    VALUE klass;
+    PangoAttribute* tmpattr;
+    GdkColor color;
+*/
+
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Pango");
+/* deprecated
+    VALUE context = GTYPE2CLASS(PANGO_TYPE_CONTEXT);
+*/
+    VALUE layout = GTYPE2CLASS(PANGO_TYPE_LAYOUT);
+    VALUE layoutline = GTYPE2CLASS(PANGO_TYPE_LAYOUT_LINE);
+/* deprecated
+    VALUE pattr = ATTRTYPE2CLASS(CSTR2RVAL("Attribute"));
+    VALUE pattrbool = ATTRTYPE2CLASS(CSTR2RVAL("AttrBool"));
+    VALUE pattr_color = ATTRTYPE2CLASS(CSTR2RVAL("AttrColor"));
+*/
+
+    RG_DEF_SMETHOD(context, -1);
+
+/* deprecated
+    rbg_define_method(context, "set_colormap", gdkpango_context_set_colormap, 1);
+*/
+    rbg_define_method(layout, "get_clip_region", gdkpango_layout_get_clip_region, 3);
+    rbg_define_method(layoutline, "get_clip_region", gdkpango_layout_line_get_clip_region, 3);
+
+/* deprecated
+    klass = rb_define_class_under(mGdk, "PangoAttrEmbossed", pattrbool);
+    rbg_define_method(klass, "initialize", gdkpango_attr_embossed_initialize, 1);
+    tmpattr = gdk_pango_attr_embossed_new(TRUE);
+    rbg_define_method(klass, "value", gdkpango_attr_embossed_value, 0);
+    RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
+    pango_attribute_destroy(tmpattr);
+*/
+
+/* deprecated
+    klass = rb_define_class_under(mGdk, "PangoAttrStipple", pattr);
+    rbg_define_method(klass, "initialize", gdkpango_attr_stipple_initialize, 1);
+    rbg_define_method(klass, "value", gdkpango_attr_stipple_value, 0);
+    tmpattr = gdk_pango_attr_stipple_new(NULL);
+    RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
+    pango_attribute_destroy(tmpattr);
+*/
+
+/* deprecated
+    klass = rb_define_class_under(mGdk, "PangoAttrEmbossColor", pattr_color);
+    rbg_define_method(klass, "initialize",
+                     gdkpango_attr_emboss_color_initialize, 1);
+    rbg_define_method(klass, "value", gdkpango_attr_emboss_color_value, 0);
+    tmpattr = gdk_pango_attr_emboss_color_new(&color);
+    RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
+    pango_attribute_destroy(tmpattr);
+*/
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpangorenderer.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpangorenderer.c
new file mode 100644
index 0000000..158cc4f
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpangorenderer.c
@@ -0,0 +1,144 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2005  Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+/* deprecated
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cPangoRenderer
+#define _SELF(s) (RVAL2GDKPANGORENDERER(s))
+
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE screen;
+    GdkScreen* gscreen;
+
+    rb_scan_args(argc, argv, "01", &screen);
+
+    if (NIL_P(screen)){
+        gscreen = gdk_screen_get_default();
+    } else {
+        gscreen = RVAL2GDKSCREEN(screen);
+    }
+
+    G_INITIALIZE(self, gdk_pango_renderer_new(gscreen));
+
+    return Qnil;
+}
+
+static VALUE
+rg_s_get_default(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE screen;
+    GdkScreen* gscreen;
+
+    rb_scan_args(argc, argv, "01", &screen);
+
+    if (NIL_P(screen)){
+        gscreen = gdk_screen_get_default();
+    } else {
+        gscreen = RVAL2GDKSCREEN(screen);
+    }
+    return GOBJ2RVAL(gdk_pango_renderer_get_default(gscreen));
+}
+
+static VALUE
+rg_s_default(G_GNUC_UNUSED VALUE self)
+{
+    GdkScreen* gscreen = gdk_screen_get_default();
+    return GOBJ2RVAL(gdk_pango_renderer_get_default(gscreen));
+}
+
+static VALUE
+rg_set_drawable(VALUE self, VALUE drawable)
+{
+    gdk_pango_renderer_set_drawable(_SELF(self), 
+                                    RVAL2GDKDRAWABLE(drawable));
+    return self;
+}
+
+static VALUE
+rg_set_gc(VALUE self, VALUE gc)
+{
+    gdk_pango_renderer_set_gc(_SELF(self), 
+                              NIL_P(gc) ? NULL : RVAL2GDKGC(gc));
+    return self;
+}
+
+#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
+static VALUE
+rg_set_stipple(VALUE self, VALUE part, VALUE stipple)
+{
+    gdk_pango_renderer_set_stipple(_SELF(self), RVAL2PANGORENDERPART(part),
+                                   NIL_P(stipple) ? NULL : RVAL2GDKBITMAP(stipple));
+
+    return self;
+}
+#else
+static VALUE
+prenderer_set_stipple(G_GNUC_UNUSED VALUE self,
+                      G_GNUC_UNUSED VALUE part,
+                      G_GNUC_UNUSED VALUE stipple)
+{
+    rb_warning("Gdk::PangoRender#set_tipple is not supported (Require pango-1.8.1 or later");
+
+    return self;
+}
+#endif
+
+#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
+static VALUE
+rg_set_override_color(VALUE self, VALUE part, VALUE color)
+{
+    gdk_pango_renderer_set_override_color(_SELF(self),
+                                          RVAL2PANGORENDERPART(part),
+                                          RVAL2GDKCOLOR(color));
+
+    return self;
+}
+#else
+static VALUE
+prenderer_set_override_color(G_GNUC_UNUSED VALUE self,
+                             G_GNUC_UNUSED VALUE part,
+                             G_GNUC_UNUSED VALUE color)
+{
+    rb_warning("Gdk::PangoRender#set_override_color is not supported (Require pango-1.8.1 or later");
+
+    return self;
+}
+#endif
+
+void
+Init_gdk_pangorenderer(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PANGO_RENDERER, "PangoRenderer", mGdk);
+
+    RG_DEF_METHOD(initialize, -1);
+    RG_DEF_METHOD(set_drawable, 1);
+    RG_DEF_METHOD(set_gc, 1);
+    RG_DEF_METHOD(set_stipple, 2);
+    RG_DEF_METHOD(set_override_color, 2);
+
+    RG_DEF_SMETHOD(get_default, -1);
+    RG_DEF_SMETHOD(default, 0);
+}
+*/
+
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpixbuf.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpixbuf.c
new file mode 100644
index 0000000..88a08cb
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkpixbuf.c
@@ -0,0 +1,65 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cPixbuf
+#define _SELF(s) RVAL2GDKPIXBUF(s)
+
+static VALUE
+rg_s_from_window(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE window, src_x, src_y, width, height;
+    GdkPixbuf *pixbuf;
+
+    rb_scan_args(argc, argv, "50", &window, &src_x, &src_y, &width, &height);
+
+    pixbuf = gdk_pixbuf_get_from_window(RVAL2GDKWINDOW(window),
+                                        NUM2INT(src_x), NUM2INT(src_y),
+                                        NUM2INT(width), NUM2INT(height));
+    return GOBJ2RVAL_UNREF(pixbuf);
+}
+
+static VALUE
+rg_s_from_surface(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE surface, src_x, src_y, width, height;
+    GdkPixbuf *pixbuf;
+
+    rb_scan_args(argc, argv, "50", &surface, &src_x, &src_y, &width, &height);
+
+    pixbuf = gdk_pixbuf_get_from_surface(RVAL2CRSURFACE(surface),
+                                         NUM2INT(src_x), NUM2INT(src_y),
+                                         NUM2INT(width), NUM2INT(height));
+    return GOBJ2RVAL_UNREF(pixbuf);
+}
+
+void
+Init_gdk_pixbuf(VALUE mGdk)
+{
+    /*
+     *  This defines Gdk::Pixbuf methods of GDK side.
+     */
+    VALUE RG_TARGET_NAMESPACE = GTYPE2CLASS(GDK_TYPE_PIXBUF);
+
+    RG_DEF_SMETHOD(from_window, -1);
+    RG_DEF_SMETHOD(from_surface, -1);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c
new file mode 100644
index 0000000..e6240a8
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c
@@ -0,0 +1,305 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2004 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE mProperty
+
+/* deprecated
+static VALUE
+rg_s_text_property_to_text_list(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    gint num, i;
+    gchar** list;
+    VALUE ret = Qnil;
+
+    if (argc == 3) {
+        VALUE encoding, format, text;
+        rb_scan_args(argc, argv, "30", &encoding, &format, &text);
+        StringValue(text);
+
+        num = gdk_text_property_to_text_list(RVAL2ATOM(encoding),
+                                             NUM2INT(format),
+                                             (const guchar*)RVAL2CSTR(text), 
+                                             RSTRING_LEN(text), &list);
+    } else {
+        VALUE display, encoding, format, text;
+        rb_scan_args(argc, argv, "40", &display, &encoding, &format, &text);
+        StringValue(text);
+
+        num = gdk_text_property_to_text_list_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                         RVAL2ATOM(encoding),
+                                                         NUM2INT(format),
+                                                         (const guchar*)RVAL2CSTR(text),
+                                                         RSTRING_LEN(text),
+                                                         &list);
+    }
+
+    ret = rb_ary_new2(num);
+    for (i =0; i < num; i++){
+        rb_ary_push(ret, CSTR2RVAL(list[i]));
+    }
+    gdk_free_text_list(list);
+    return ret;
+}
+*/
+
+/* TODO
+static VALUE
+rg_s_text_property_to_utf8_list(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    gint num, i;
+    gchar** list;
+    VALUE ret = Qnil;
+
+    if (argc == 3) {
+        VALUE encoding, format, text;
+        rb_scan_args(argc, argv, "30", &encoding, &format, &text);
+        StringValue(text);
+
+        num = gdk_text_property_to_utf8_list(RVAL2ATOM(encoding),
+                                             NUM2INT(format),
+                                             (const guchar*)RVAL2CSTR(text),
+                                             RSTRING_LEN(text), &list);
+    } else {
+        VALUE display, encoding, format, text;
+        rb_scan_args(argc, argv, "40", &display, &encoding, &format, &text);
+        StringValue(text);
+
+        num = gdk_text_property_to_utf8_list_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                         RVAL2ATOM(encoding),
+                                                         NUM2INT(format),
+                                                         (const guchar*)RVAL2CSTR(text),
+                                                         RSTRING_LEN(text),
+                                                         &list);
+    }
+
+    ret = rb_ary_new2(num);
+    for (i =0; i < num; i++){
+        rb_ary_push(ret, CSTR2RVAL(list[i]));
+    }
+    g_strfreev(list);
+    return ret;
+}
+*/
+
+/* deprecated
+static VALUE
+rg_s_string_to_compound_text(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    gint num;
+    GdkAtom encoding;
+    gint format;
+    guchar *ctext;
+    gint length;
+
+    if (argc == 1) {
+        VALUE str;
+        rb_scan_args(argc, argv, "10", &str);
+        num = gdk_string_to_compound_text(RVAL2CSTR(str),
+                                          &encoding, &format,
+                                          &ctext, &length);
+    } else {
+        VALUE display, str;
+
+        rb_scan_args(argc, argv, "20", &display, &str);
+        num = gdk_string_to_compound_text_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                      RVAL2CSTR(str),
+                                                      &encoding, &format,
+                                                      &ctext, &length);
+    }
+
+    if (num == 0){
+        VALUE ret = CSTR2RVAL((const char*)ctext);
+        gdk_free_compound_text(ctext);
+        return rb_ary_new3(3, GDKATOM2RVAL(encoding),
+                           INT2NUM(format), ret);
+    } else {
+        rb_raise(rb_eRuntimeError, "failed to converts a string %d\n", num);
+    }
+    return Qnil;
+}
+*/
+
+static VALUE
+rg_s_utf8_to_string_target(G_GNUC_UNUSED VALUE self, VALUE str)
+{
+    return CSTR2RVAL((const char*)gdk_utf8_to_string_target(RVAL2CSTR(str)));
+}
+
+/* deprecated
+static VALUE
+rg_s_utf8_to_compound_text(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    GdkAtom encoding;
+    gint format;
+    guchar *ctext;
+    gint length;
+    gint ret;
+
+    if (argc == 1) {
+        VALUE str;
+        rb_scan_args(argc, argv, "10", &str);
+
+        ret = gdk_utf8_to_compound_text(RVAL2CSTR(str),
+                                        &encoding, &format,
+                                        &ctext, &length);
+    } else {
+        VALUE display, str;
+
+        rb_scan_args(argc, argv, "20", &display, &str);
+        ret = gdk_utf8_to_compound_text_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                    RVAL2CSTR(str),
+                                                    &encoding, &format,
+                                                    &ctext, &length);
+    }
+
+    if (ret){
+        VALUE val = CSTR2RVAL((const char*)ctext);
+        gdk_free_compound_text(ctext);
+        return rb_ary_new3(3, GDKATOM2RVAL(encoding),
+                           INT2NUM(format), val);
+    } else {
+        rb_raise(rb_eRuntimeError, "failed to converts a string %d\n", ret);
+    }
+    return Qnil;
+}
+*/
+
+/* TODO
+static VALUE
+rg_s_change(int argc, VALUE *argv, VALUE self)
+{
+    int        fmt, len;
+    void*      dat;
+    GdkAtom    ntype;
+    VALUE win, property, type, size= Qnil, mode, src;
+
+    if(6 == argc)
+        rb_scan_args(argc, argv, "60", &win, &property, &type, &size, &mode, &src);
+    else
+        rb_scan_args(argc, argv, "50", &win, &property, &type, &mode, &src);
+
+    rbgtk_atom2selectiondata(type, size, src, &ntype, &dat, &fmt, &len);
+
+    gdk_property_change(RVAL2GDKWINDOW(win), RVAL2ATOM(property), 
+                        ntype, fmt, RVAL2GDKPROPMODE(mode), dat, len);
+
+    rbgtk_atom2selectiondata_free(ntype, dat);
+
+    return self;
+}
+*/
+
+static VALUE
+rg_s_get(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    /* for argument processing */
+    GdkAtom     rtype;
+    gint        rfmt, rlen;
+    guchar* rdat;
+    VALUE win, property, type, offset=INT2FIX(0), length=INT2FIX(9999), delete;
+
+    /* for inner processing */
+    gint        i;
+    size_t j;
+    VALUE   ret = 0;
+
+    if(6 == argc)
+        rb_scan_args(argc, argv, "60", &win, &property, &type, &offset, &length, &delete);
+    else
+        rb_scan_args(argc, argv, "40", &win, &property, &type, &delete);
+
+    if(gdk_property_get(RVAL2GDKWINDOW(win), RVAL2ATOM(property), RVAL2ATOM(type),
+                        NUM2INT(offset), NUM2INT(length),
+                        RVAL2CBOOL(delete), &rtype, &rfmt, &rlen, &rdat) == FALSE){
+        return Qnil;
+    }
+
+    switch(rfmt){
+      case 8:
+      default:
+        ret = RBG_STRING_SET_UTF8_ENCODING(rb_str_new((const char*)rdat, rlen));
+        break;
+
+      case 16:
+        ret = rb_ary_new();
+
+        for( i = 0; i < rlen; i++){
+            rb_ary_push(ret, rb_Integer(((unsigned short*)rdat)[i]));
+        }
+        break;
+
+      case 32:
+         ret = rb_ary_new();
+
+         if(rtype != GDK_SELECTION_TYPE_ATOM){
+           for(j = 0; j < (rlen/sizeof(unsigned long)); j++){
+             rb_ary_push(ret, INT2FIX(((unsigned long*)rdat)[j]));
+           }
+         } else {
+           for(j = 0; j < (rlen/sizeof(unsigned long)); j++){
+             rb_ary_push(ret, GDKATOM2RVAL((GdkAtom)((unsigned long*)rdat)[j]));
+           }
+         }
+        break;
+    }
+
+    return rb_ary_new3(3, GDKATOM2RVAL(rtype), 
+                       ret, INT2NUM(rlen));
+}
+
+static VALUE
+rg_s_delete(VALUE self, VALUE win, VALUE property)
+{
+    gdk_property_delete(RVAL2GDKWINDOW(win), RVAL2ATOM(property));
+    return self;
+}
+
+void
+Init_gdk_property(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Property");
+
+/* deprecated
+    RG_DEF_SMETHOD(text_property_to_text_list, -1);
+*/
+/* TODO
+    RG_DEF_SMETHOD(text_property_to_utf8_list, -1);
+*/
+/* deprecated
+    RG_DEF_SMETHOD(string_to_compound_text, -1);
+*/
+    RG_DEF_SMETHOD(utf8_to_string_target, 1);
+/* deprecated
+    RG_DEF_SMETHOD(utf8_to_compound_text, -1);
+*/
+/* TODO
+    RG_DEF_SMETHOD(change, -1);
+*/
+    RG_DEF_SMETHOD(get, -1);
+    RG_DEF_SMETHOD(delete, 2);
+
+    G_DEF_CLASS(GDK_TYPE_PROP_MODE, "PropMode", RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrectangle.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrectangle.c
new file mode 100644
index 0000000..335e0da
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrectangle.c
@@ -0,0 +1,140 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Masao Mutoh
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cRectangle
+#define _SELF(r) (RVAL2GDKRECTANGLE(r))
+
+static VALUE
+rg_initialize(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
+{
+    GdkRectangle rectangle;
+
+    rectangle.x = NUM2INT(x);
+    rectangle.y = NUM2INT(y);
+    rectangle.width = NUM2INT(width);
+    rectangle.height = NUM2INT(height);
+
+    G_INITIALIZE(self, g_boxed_copy(GDK_TYPE_RECTANGLE, &rectangle));
+    return Qnil;
+}
+
+static VALUE
+rg_intersect(VALUE self, VALUE other)
+{
+    GdkRectangle dest;
+    gboolean ret = gdk_rectangle_intersect(_SELF(self), _SELF(other), &dest);
+    return ret ? GDKRECTANGLE2RVAL(&dest) : Qnil;
+}
+
+static VALUE
+rg_union(VALUE self, VALUE other)
+{
+    GdkRectangle dest;
+    gdk_rectangle_union(_SELF(self), _SELF(other), &dest);
+    return GDKRECTANGLE2RVAL(&dest);
+}
+
+/* Struct accessors */
+static VALUE
+rg_x(VALUE self)
+{
+    return INT2NUM(_SELF(self)->x);
+}
+
+static VALUE
+rg_y(VALUE self)
+{
+    return INT2NUM(_SELF(self)->y);
+}
+
+static VALUE
+rg_width(VALUE self)
+{
+    return INT2NUM(_SELF(self)->width);
+}
+
+static VALUE
+rg_height(VALUE self)
+{
+    return INT2NUM(_SELF(self)->height);
+}
+
+static VALUE
+rg_set_x(VALUE self, VALUE x)
+{
+    _SELF(self)->x = NUM2INT(x);
+    return self;
+}
+
+static VALUE
+rg_set_y(VALUE self, VALUE y)
+{
+    _SELF(self)->y = NUM2INT(y);
+    return self;
+}
+
+static VALUE
+rg_set_width(VALUE self, VALUE width)
+{
+    _SELF(self)->width = NUM2INT(width);
+    return self;
+}
+
+static VALUE
+rg_set_height(VALUE self, VALUE height)
+{
+    _SELF(self)->height = NUM2INT(height);
+    return self;
+}
+
+static VALUE
+rg_to_a(VALUE self)
+{
+  GdkRectangle* a = _SELF(self);
+  return rb_ary_new3(4, INT2FIX(a->x), INT2FIX(a->y),
+                     INT2FIX(a->width), INT2FIX(a->height));
+}
+
+void
+Init_gdk_rectangle(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_RECTANGLE, "Rectangle", mGdk);
+
+    RG_DEF_METHOD(initialize, 4);
+    RG_DEF_METHOD(intersect, 1);
+    RG_DEF_ALIAS("&", "intersect");
+    RG_DEF_METHOD(union, 1);
+    RG_DEF_ALIAS("|", "union");
+    RG_DEF_METHOD(x, 0);
+    RG_DEF_METHOD(y, 0);
+    RG_DEF_METHOD(width, 0);
+    RG_DEF_METHOD(height, 0);
+    RG_DEF_METHOD(set_x, 1);
+    RG_DEF_METHOD(set_y, 1);
+    RG_DEF_METHOD(set_width, 1);
+    RG_DEF_METHOD(set_height, 1);
+    RG_DEF_METHOD(to_a, 0);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgb.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgb.c
new file mode 100644
index 0000000..a84d676
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgb.c
@@ -0,0 +1,199 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+/* deprecated
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE mRGB
+#define RVAL2DRAW(s) RVAL2GDKDRAWABLE(s)
+
+static VALUE
+rg_s_draw_rgb_image(int argc, VALUE *argv, VALUE self)
+{
+    VALUE win, gc, x, y, w, h, dither, buf, rowstride, xdith, ydith;
+
+    rb_scan_args(argc, argv, "92", &win, &gc, &x, &y, &w, &h, &dither, 
+                 &buf, &rowstride, &xdith, &ydith);
+
+    if (argc == 9){
+        gdk_draw_rgb_image(RVAL2DRAW(win), RVAL2GDKGC(gc),
+                           NUM2INT(x), NUM2INT(y),
+                           NUM2INT(w), NUM2INT(h),
+                           RVAL2GDKRGBDITHER(dither),
+                           (guchar*)RVAL2CSTR(buf),
+                           NUM2INT(rowstride));
+    } else {
+        gdk_draw_rgb_image_dithalign(RVAL2DRAW(win), RVAL2GDKGC(gc),
+                                     NUM2INT(x), NUM2INT(y),
+                                     NUM2INT(w), NUM2INT(h),
+                                     RVAL2GDKRGBDITHER(dither),
+                                     (guchar*)RVAL2CSTR(buf),
+                                     NUM2INT(rowstride),
+                                     NUM2INT(xdith), NUM2INT(ydith));
+    }
+
+    return self;
+}
+
+static VALUE
+rg_s_draw_indexed_image(VALUE self, VALUE win, VALUE rbgc, VALUE rbx, VALUE rby,
+                       VALUE rbwidth, VALUE rbheight, VALUE rbdither,
+                       VALUE rbbuf, VALUE rbrowstride, VALUE rbcolors)
+{
+    GdkDrawable *drawable = RVAL2DRAW(win);
+    GdkGC *gc = RVAL2GDKGC(rbgc);
+    gint x = NUM2INT(rbx);
+    gint y = NUM2INT(rby);
+    gint width = NUM2INT(rbwidth);
+    gint height = NUM2INT(rbheight);
+    GdkRgbDither dither = RVAL2GDKRGBDITHER(rbdither);
+    const guchar *buf = (const guchar *)RVAL2CSTR(rbbuf);
+    gint rowstride = NUM2INT(rbrowstride);
+    long n;
+    guint32 *colors = RVAL2GUINT32S(rbcolors, n);
+    GdkRgbCmap *cmap;
+
+    if (n < 0 || n > 255) {
+        g_free(colors);
+
+        rb_raise(rb_eArgError, "colors: out of range (0 - 255)");
+    }
+
+    cmap = gdk_rgb_cmap_new(colors, n);
+
+    g_free(colors);
+
+    gdk_draw_indexed_image(drawable, gc, x, y, width, height, dither, buf, rowstride, cmap);
+
+    gdk_rgb_cmap_free(cmap);
+
+    return self;
+}
+
+static VALUE
+rg_s_draw_gray_image(VALUE self, VALUE win, VALUE gc, VALUE x, VALUE y, VALUE w, VALUE h, VALUE dither, VALUE buf, VALUE rowstride)
+{
+    gdk_draw_gray_image(RVAL2DRAW(win), RVAL2GDKGC(gc),
+                        NUM2INT(x), NUM2INT(y),
+                        NUM2INT(w), NUM2INT(h),
+                        RVAL2GDKRGBDITHER(dither),
+                        (guchar*)RVAL2CSTR(buf),
+                        NUM2INT(rowstride));
+    return self;
+}
+
+static VALUE
+rg_s_draw_rgb_32_image(int argc, VALUE *argv, VALUE self)
+{
+    VALUE win, gc, x, y, w, h, dither, buf, rowstride, xdith, ydith;
+
+    rb_scan_args(argc, argv, "92", &win, &gc, &x, &y, &w, &h, &dither, 
+                 &buf, &rowstride, &xdith, &ydith);
+
+    if (argc == 9){
+        gdk_draw_rgb_32_image(RVAL2DRAW(win), RVAL2GDKGC(gc),
+                              NUM2INT(x), NUM2INT(y),
+                              NUM2INT(w), NUM2INT(h),
+                              RVAL2GDKRGBDITHER(dither),
+                              (guchar*)RVAL2CSTR(buf),
+                              NUM2INT(rowstride));
+    } else {
+        gdk_draw_rgb_32_image_dithalign(RVAL2DRAW(win), RVAL2GDKGC(gc),
+                                        NUM2INT(x), NUM2INT(y),
+                                        NUM2INT(w), NUM2INT(h),
+                                        RVAL2GDKRGBDITHER(dither),
+                                        (guchar*)RVAL2CSTR(buf),
+                                        NUM2INT(rowstride), NUM2INT(xdith), NUM2INT(ydith));
+    }
+    return self;
+}
+
+static VALUE
+rg_s_find_color(VALUE self, VALUE colormap, VALUE color)
+{
+    gdk_rgb_find_color(RVAL2GDKCOLORMAP(colormap),
+                       RVAL2GDKCOLOR(color));
+    return self;
+}
+
+static VALUE
+rg_s_set_install(VALUE self, VALUE install)
+{
+    gdk_rgb_set_install(RVAL2CBOOL(install));
+    return self;
+}
+
+static VALUE
+rg_s_set_min_colors(VALUE self, VALUE min_colors)
+{
+    gdk_rgb_set_min_colors(NUM2INT(min_colors));
+    return self;
+}
+
+static VALUE
+rg_s_visual(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_rgb_get_visual());
+}
+
+static VALUE
+rg_s_colormap(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_rgb_get_colormap());
+}
+
+static VALUE
+rg_s_ditherable_p(G_GNUC_UNUSED VALUE self)
+{
+    return CBOOL2RVAL(gdk_rgb_ditherable());
+}
+
+static VALUE
+rg_s_set_verbose(VALUE self, VALUE verbose)
+{
+    gdk_rgb_set_verbose(RVAL2CBOOL(verbose));
+    return self;
+}
+
+void
+Init_gdk_rgb(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "RGB");
+
+    RG_DEF_SMETHOD(draw_rgb_image, -1);
+    RG_DEF_SMETHOD(draw_indexed_image, 10);
+    RG_DEF_SMETHOD(draw_gray_image, 9);
+    RG_DEF_SMETHOD(draw_rgb_32_image, -1);
+    RG_DEF_SMETHOD(find_color, 2);
+    RG_DEF_SMETHOD(set_install, 1);
+    RG_DEF_SMETHOD(set_min_colors, 0);
+    RG_DEF_SMETHOD(visual, 0);
+    RG_DEF_SMETHOD(colormap, 0);
+    RG_DEF_SMETHOD_P(ditherable, 0);
+    RG_DEF_SMETHOD(set_verbose, 1);
+
+    G_DEF_CLASS(GDK_TYPE_RGB_DITHER, "Dither", RG_TARGET_NAMESPACE);
+}
+*/
+
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgba.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgba.c
new file mode 100644
index 0000000..bfdfb60
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkrgba.c
@@ -0,0 +1,142 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cRGBA
+#define _SELF(self) (RVAL2GDKRGBA(self))
+
+static VALUE
+rg_s_parse(G_GNUC_UNUSED VALUE self, VALUE spec)
+{
+    GdkRGBA color;
+    if (!gdk_rgba_parse(&color, RVAL2CSTR(spec)))
+        rb_raise(rb_eArgError, "can't parse color representation `%s'", RVAL2CSTR(spec));
+    return GDKRGBA2RVAL(&color);
+}
+
+static VALUE
+rg_initialize(VALUE self, VALUE red, VALUE green, VALUE blue, VALUE alpha)
+{
+    GdkRGBA rgba;
+
+    rgba.red = NUM2DBL(red);
+    rgba.green = NUM2DBL(green);
+    rgba.blue = NUM2DBL(blue);
+    rgba.alpha = NUM2DBL(alpha);
+
+    G_INITIALIZE(self, g_boxed_copy(GDK_TYPE_RGBA, &rgba));
+
+    return Qnil;
+}
+
+static VALUE
+rg_red(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->red);
+}
+
+static VALUE
+rg_set_red(VALUE self, VALUE red)
+{
+    _SELF(self)->red = NUM2DBL(red);
+    return self;
+}
+
+static VALUE
+rg_green(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->green);
+}
+
+static VALUE
+rg_set_green(VALUE self, VALUE green)
+{
+    _SELF(self)->green = NUM2DBL(green);
+    return self;
+}
+
+static VALUE
+rg_blue(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->blue);
+}
+
+static VALUE
+rg_set_blue(VALUE self, VALUE blue)
+{
+    _SELF(self)->blue = NUM2DBL(blue);
+    return self;
+}
+
+static VALUE
+rg_alpha(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->alpha);
+}
+
+static VALUE
+rg_set_alpha(VALUE self, VALUE alpha)
+{
+    _SELF(self)->alpha = NUM2DBL(alpha);
+    return self;
+}
+
+static VALUE
+rg_to_a(VALUE self)
+{
+    GdkRGBA *rgba = _SELF(self);
+    return rb_ary_new3(4, DBL2NUM(rgba->red), 
+                          DBL2NUM(rgba->green),
+                          DBL2NUM(rgba->blue),
+                          DBL2NUM(rgba->alpha));
+}
+
+static VALUE
+rg_to_s(VALUE self)
+{
+    return CSTR2RVAL_FREE(gdk_rgba_to_string(_SELF(self)));
+}
+
+static VALUE
+rg_operator_equal(VALUE self, VALUE other)
+{
+    return CBOOL2RVAL(gdk_rgba_equal(_SELF(self), _SELF(other)));
+}
+
+void
+Init_gdk_rgba(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_RGBA, "RGBA", mGdk);
+
+    RG_DEF_SMETHOD(parse, 1);
+    RG_DEF_METHOD(initialize, 4);
+    RG_DEF_METHOD(red, 0);
+    RG_DEF_METHOD(set_red, 1);
+    RG_DEF_METHOD(green, 0);
+    RG_DEF_METHOD(set_green, 1);
+    RG_DEF_METHOD(blue, 0);
+    RG_DEF_METHOD(set_blue, 1);
+    RG_DEF_METHOD(alpha, 0);
+    RG_DEF_METHOD(set_alpha, 1);
+    RG_DEF_METHOD(to_a, 0);
+    RG_DEF_METHOD(to_s, 0);
+    RG_DEF_METHOD_OPERATOR("==", equal, 1);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkscreen.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkscreen.c
new file mode 100644
index 0000000..08efe23
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkscreen.c
@@ -0,0 +1,443 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003-2006 Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003  Geoff Youngs
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+#ifdef HAVE_RB_CAIRO_H
+#include <rb_cairo.h>
+#endif
+
+#define RG_TARGET_NAMESPACE cScreen
+#define _SELF(i) RVAL2GDKSCREEN(i)
+
+static ID id_new;
+
+static VALUE
+rg_s_default(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_default());
+}
+
+/* deprecated
+static VALUE
+rg_default_colormap(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_default_colormap(_SELF(self)));
+}
+
+static VALUE
+rg_set_default_colormap(VALUE self, VALUE colormap)
+{
+    gdk_screen_set_default_colormap(_SELF(self),
+                                    RVAL2GDKCOLORMAP(colormap));
+    return self;
+}
+
+static VALUE
+rg_system_colormap(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_system_colormap(_SELF(self)));
+}
+*/
+
+static VALUE
+rg_system_visual(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_system_visual(_SELF(self)));
+}
+
+/* deprecated
+static VALUE
+rg_rgb_colormap(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_rgb_colormap(_SELF(self)));
+}
+
+static VALUE
+rg_rgb_visual(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_rgb_visual(_SELF(self)));
+}
+*/
+
+/* deprecated
+static VALUE
+rg_rgba_colormap(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_rgba_colormap(_SELF(self)));
+}
+*/
+
+static VALUE
+rg_rgba_visual(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_rgba_visual(_SELF(self)));
+}
+
+static VALUE
+rg_composited_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_screen_is_composited(_SELF(self)));
+}
+
+static VALUE
+rg_root_window(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_root_window(_SELF(self)));
+}
+
+static VALUE
+rg_display(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_display(_SELF(self)));
+}
+
+static VALUE
+rg_number(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_number(_SELF(self)));
+}
+static VALUE
+rg_width(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_width(_SELF(self)));
+}
+static VALUE
+rg_height(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_height(_SELF(self)));
+}
+static VALUE
+rg_width_mm(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_width_mm(_SELF(self)));
+}
+static VALUE
+rg_height_mm(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_height_mm(_SELF(self)));
+}
+
+static VALUE
+rg_visuals(VALUE self)
+{
+    return GOBJGLIST2RVAL_FREE(gdk_screen_list_visuals(_SELF(self)),
+                               g_list_free, NULL);
+}
+
+static VALUE
+rg_toplevel_windows(VALUE self)
+{
+    return GOBJGLIST2RVAL_FREE(gdk_screen_get_toplevel_windows(_SELF(self)),
+                               g_list_free, NULL);
+}
+
+static VALUE
+rg_display_name(VALUE self)
+{
+    gchar* name = gdk_screen_make_display_name(_SELF(self));
+    VALUE ret = CSTR2RVAL(name);
+    g_free(name);
+    return ret;
+}
+
+static VALUE
+rg_n_monitors(VALUE self)
+{
+      return INT2NUM(gdk_screen_get_n_monitors(_SELF(self)));
+}
+
+static VALUE
+rg_monitor_geometry(VALUE self, VALUE num)
+{
+      GdkRectangle rect;
+      gdk_screen_get_monitor_geometry(_SELF(self), NUM2INT(num), &rect);
+      return GDKRECTANGLE2RVAL(&rect);
+}
+
+static VALUE
+rg_get_monitor(int argc, VALUE *argv, VALUE self)
+{
+    VALUE arg1, arg2;
+    VALUE ret;
+
+    rb_scan_args(argc, argv, "11", &arg1, &arg2);
+    if (argc == 2){
+        ret = INT2NUM(gdk_screen_get_monitor_at_point(_SELF(self),
+                                                      NUM2INT(arg1), NUM2INT(arg2)));
+    } else if (argc == 1){
+        ret = INT2NUM(gdk_screen_get_monitor_at_window(_SELF(self),
+                                                       RVAL2GDKWINDOW(arg1)));
+    } else {
+        rb_raise(rb_eArgError, "Wrong number of arguments: %d", argc);
+    }
+    return ret;
+}
+
+/* deprecated
+static VALUE
+rg_broadcast_client_message(VALUE self, VALUE event)
+{
+    gdk_screen_broadcast_client_message(_SELF(self), RVAL2GEV(event));
+    return self;
+}
+*/
+
+/*
+  type: String, Integer, Gdk::Color.
+ */
+static VALUE
+rg_get_setting(int argc, VALUE *argv, VALUE self)
+{
+    VALUE name, type;
+    GType gtype;
+    GValue val = G_VALUE_INIT;
+    gboolean ret;
+    VALUE value;
+
+    rb_scan_args(argc, argv, "11", &name, &type);
+    if (NIL_P(type))
+        gtype = G_TYPE_STRING;
+    else
+        gtype = CLASS2GTYPE(type);
+
+    g_value_init(&val, gtype);
+    ret = gdk_screen_get_setting(_SELF(self), RVAL2CSTR(name), &val);
+    value = ret ? GVAL2RVAL(&val) : Qnil;
+    g_value_unset(&val);
+    return value;
+}
+
+#ifdef HAVE_RB_CAIRO_H
+static VALUE
+gdkscreen_get_font_options(VALUE self)
+{
+    return CRFONTOPTIONS2RVAL((cairo_font_options_t *)gdk_screen_get_font_options(_SELF(self)));
+}
+
+static VALUE
+gdkscreen_set_font_options(VALUE self, VALUE options)
+{
+    gdk_screen_set_font_options(_SELF(self), 
+                                (const cairo_font_options_t *)RVAL2CRFONTOPTIONS(options));
+    return self;
+}
+#endif
+
+static VALUE
+rg_active_window(VALUE self)
+{
+    return GOBJ2RVAL(gdk_screen_get_active_window(_SELF(self)));
+}
+
+static VALUE
+rg_window_stack(VALUE self)
+{
+    GList* list = gdk_screen_get_window_stack(_SELF(self));
+    VALUE ary = rb_ary_new();
+    while (list) {
+        rb_ary_push(ary, GOBJ2RVAL(list->data));
+        g_object_unref(list->data);
+        list = list->next;
+    }
+    g_list_free(list);
+    return ary;
+}
+
+static void
+child_setup(gpointer func)
+{
+    if (! NIL_P(func)){
+        rb_funcall((VALUE)func, id_call, 0);
+    }
+}
+
+/* deprecated
+static VALUE
+rg_spawn_on_screen(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
+{
+    GError *err = NULL;
+    gboolean ret;
+    gint child_pid;
+    VALUE func = Qnil;
+    gchar **gargv;
+    gchar **genvp;
+
+    if (rb_block_given_p()) {
+        func = rb_block_proc();
+        G_RELATIVE(self, func);
+    }
+
+    gargv = (gchar **)RVAL2STRV(argv);
+    genvp = (gchar **)RVAL2STRV_ACCEPT_NIL(envp);
+    ret = gdk_spawn_on_screen(_SELF(self),
+                              RVAL2CSTR_ACCEPT_NIL(working_directory),
+                              gargv, genvp, NUM2INT(flags),
+                              (GSpawnChildSetupFunc)child_setup, (gpointer)func,
+                              &child_pid, &err);
+    g_free(gargv);
+    g_free(genvp);
+    if (!ret)
+        RAISE_GERROR(err);
+
+    return INT2NUM(child_pid);
+}
+
+static VALUE
+rg_spawn_on_screen_with_pipes(VALUE self, VALUE working_directory, VALUE argv, VALUE envp, VALUE flags)
+{
+    GError *err = NULL;
+    gboolean ret;
+    gint child_pid;
+    VALUE func = Qnil;
+    gchar **gargv;
+    gchar **genvp;
+    gint standard_input, standard_output, standard_error;
+
+    if (rb_block_given_p()) {
+        func = rb_block_proc();
+        G_RELATIVE(self, func);
+    }
+
+    gargv = (gchar **)RVAL2STRV(argv);
+    genvp = (gchar **)RVAL2STRV_ACCEPT_NIL(envp);
+    ret = gdk_spawn_on_screen_with_pipes(_SELF(self),
+                                         RVAL2CSTR_ACCEPT_NIL(working_directory),
+                                         gargv, genvp, NUM2INT(flags),
+                                         (GSpawnChildSetupFunc)child_setup, (gpointer)func,
+                                         &child_pid, 
+                                         &standard_input, &standard_output,
+                                         &standard_error, &err);
+    g_free(gargv);
+    g_free(genvp);
+    if (!ret)
+        RAISE_GERROR(err);
+
+    return rb_ary_new3(4, INT2NUM(child_pid), 
+                       rb_funcall(rb_cIO, id_new, 1, INT2NUM(standard_input)),
+                       rb_funcall(rb_cIO, id_new, 1, INT2NUM(standard_output)),
+                       rb_funcall(rb_cIO, id_new, 1, INT2NUM(standard_error)));
+}
+*/
+
+static VALUE
+rg_spawn_command_line_on_screen(G_GNUC_UNUSED VALUE self, VALUE command_line)
+{
+    GError *err = NULL;
+    VALUE ret;
+
+    ret = CBOOL2RVAL(g_spawn_command_line_async(RVAL2CSTR(command_line), &err));
+    if (!ret) RAISE_GERROR(err);
+
+    return ret;   
+}
+
+/* From X Window System Interaction */
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+static VALUE
+rg_xnumber(VALUE self)
+{
+    return INT2NUM(GDK_SCREEN_XNUMBER(_SELF(self)));
+}
+static VALUE
+rg_supports_net_wm_hint_p(VALUE self, VALUE property)
+{
+    return CBOOL2RVAL(gdk_x11_screen_supports_net_wm_hint(_SELF(self),
+                                                          RVAL2ATOM(property)));
+}
+
+static VALUE
+rg_window_manager_name(VALUE self)
+{
+    return CSTR2RVAL(gdk_x11_screen_get_window_manager_name(_SELF(self)));
+}
+static VALUE
+rg_screen_number(VALUE self)
+{
+    return INT2NUM(gdk_x11_screen_get_screen_number(_SELF(self)));
+}
+#endif
+
+void 
+Init_gdk_screen(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_SCREEN, "Screen", mGdk);
+
+    id_new = rb_intern("new");
+
+    RG_DEF_SMETHOD(default, 0);
+/* deprecated
+    RG_DEF_METHOD(default_colormap, 0);
+    RG_DEF_METHOD(set_default_colormap, 1);
+    RG_DEF_METHOD(system_colormap, 0);
+*/
+    RG_DEF_METHOD(system_visual, 0);
+/* deprecated
+    RG_DEF_METHOD(rgb_colormap, 0);
+    RG_DEF_METHOD(rgb_visual, 0);
+*/
+/* deprecated
+    RG_DEF_METHOD(rgba_colormap, 0);
+*/
+    RG_DEF_METHOD(rgba_visual, 0);
+    RG_DEF_METHOD_P(composited, 0);
+    RG_DEF_METHOD(root_window, 0);
+    RG_DEF_METHOD(display, 0);
+    RG_DEF_METHOD(number, 0);
+    RG_DEF_METHOD(width, 0);
+    RG_DEF_METHOD(height, 0);
+    RG_DEF_METHOD(width_mm, 0);
+    RG_DEF_METHOD(height_mm, 0);
+    RG_DEF_METHOD(visuals, 0);
+    RG_DEF_METHOD(toplevel_windows, 0);
+    RG_DEF_METHOD(display_name, 0);
+    RG_DEF_METHOD(n_monitors, 0);
+    RG_DEF_METHOD(monitor_geometry, 1);
+    RG_DEF_METHOD(get_monitor, -1);
+/* deprecated
+    RG_DEF_METHOD(broadcast_client_message, 1);
+*/
+    RG_DEF_METHOD(get_setting, -1);
+#ifdef HAVE_RB_CAIRO_H
+    G_REPLACE_GET_PROPERTY(RG_TARGET_NAMESPACE, "font_options", gdkscreen_get_font_options, 0);
+    G_REPLACE_SET_PROPERTY(RG_TARGET_NAMESPACE, "font_options", gdkscreen_set_font_options, 1);
+#endif
+    RG_DEF_METHOD(active_window, 0);
+    RG_DEF_METHOD(window_stack, 0);
+
+/* deprecated
+    RG_DEF_METHOD(spawn_on_screen, 4);
+    RG_DEF_METHOD(spawn_on_screen_with_pipes, 4);
+*/
+    RG_DEF_METHOD(spawn_command_line_on_screen, 1);
+
+#ifdef GDK_WINDOWING_X11
+    RG_DEF_METHOD(xnumber, 0);
+    RG_DEF_METHOD_P(supports_net_wm_hint, 0);
+    RG_DEF_METHOD(window_manager_name, 0);
+    RG_DEF_METHOD(screen_number, 0);
+#endif
+
+#ifdef GDK_WINDOWING_X11
+    G_DEF_CLASS3("GdkScreenX11", "ScreenX11", mGdk);
+#endif
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkselection.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkselection.c
new file mode 100644
index 0000000..29246ca
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkselection.c
@@ -0,0 +1,146 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2004 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE mSelection
+
+static VALUE
+rg_s_owner_set(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE owner, selection, time, send_event;
+    int ret;
+
+    if (argc == 4){
+        rb_scan_args(argc, argv, "40", &owner, &selection, &time, &send_event);
+        ret = gdk_selection_owner_set(RVAL2GDKWINDOW(owner), 
+                                      RVAL2ATOM(selection), 
+                                      NUM2UINT(time), RVAL2CBOOL(send_event));
+    } else {
+      VALUE display = Qnil;
+      rb_scan_args(argc, argv, "50", &display, &owner, &selection, &time, &send_event);
+      ret = gdk_selection_owner_set_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                RVAL2GDKWINDOW(owner), 
+                                                RVAL2ATOM(selection), 
+                                                NUM2UINT(time), RVAL2CBOOL(send_event));
+    }
+    return CBOOL2RVAL(ret);
+}
+
+static VALUE
+rg_s_owner_get(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE selection;
+
+    if (argc == 1) {
+        rb_scan_args(argc, argv, "10", &selection);
+        return GOBJ2RVAL(gdk_selection_owner_get(RVAL2ATOM(selection)));
+    } else {
+      VALUE display = Qnil;
+      rb_scan_args(argc, argv, "20", &display, &selection);
+      return GOBJ2RVAL(gdk_selection_owner_get_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                                           RVAL2ATOM(selection)));
+    }
+}
+
+static VALUE
+rg_s_convert(VALUE self, VALUE requestor, VALUE selection, VALUE target, VALUE time)
+{
+    gdk_selection_convert(RVAL2GDKWINDOW(requestor), 
+                          RVAL2ATOM(selection), 
+                          RVAL2ATOM(target), NUM2INT(time));
+    return self;
+}
+
+static VALUE
+rg_s_property_get(G_GNUC_UNUSED VALUE self, VALUE requestor)
+{
+    guchar *data;
+    GdkAtom prop_type;
+    gint prop_format;
+    VALUE ary;
+
+    gdk_selection_property_get(RVAL2GDKWINDOW(requestor), &data, 
+                               &prop_type, &prop_format);
+
+    ary = rb_ary_new3(3, CSTR2RVAL((const char*)data), GDKATOM2RVAL(prop_type), 
+                      INT2NUM(prop_format));
+    g_free(data);
+    return ary;
+}
+
+static VALUE
+rg_s_send_notify(int argc, VALUE *argv, VALUE self)
+{
+    VALUE requestor, selection, target, property, time;
+
+    if (argc == 5) {
+        rb_scan_args(argc, argv, "50", &requestor, &selection, &target, &property, &time);
+        gdk_selection_send_notify(RVAL2GDKWINDOW(requestor), RVAL2ATOM(selection),
+                                  RVAL2ATOM(target), 
+                                  NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), 
+                                  NUM2INT(time));
+    } else {
+      VALUE display = Qnil;
+      rb_scan_args(argc, argv, "60", &display, &requestor, &selection, &target, &property, &time);
+      gdk_selection_send_notify_for_display(RVAL2GDKDISPLAYOBJECT(display),
+                                            RVAL2GDKWINDOW(requestor), RVAL2ATOM(selection),
+                                            RVAL2ATOM(target), 
+                                            NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), 
+                                            NUM2INT(time));
+    }
+    return self;
+}
+
+void
+Init_gdk_selection(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Selection");
+
+    RG_DEF_SMETHOD(owner_set, -1);
+    RG_DEF_SMETHOD(owner_get, -1);
+    RG_DEF_SMETHOD(convert, 4);
+    RG_DEF_SMETHOD(property_get, 1);
+    RG_DEF_SMETHOD(send_notify, -1);
+
+    /* Constants */
+    rb_define_const(RG_TARGET_NAMESPACE, "PRIMARY", GDKATOM2RVAL(GDK_SELECTION_PRIMARY));
+    rb_define_const(RG_TARGET_NAMESPACE, "SECONDARY", GDKATOM2RVAL(GDK_SELECTION_SECONDARY));
+    rb_define_const(RG_TARGET_NAMESPACE, "CLIPBOARD", GDKATOM2RVAL(GDK_SELECTION_CLIPBOARD));
+
+    /* GdkSelectionType */
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_ATOM", GDKATOM2RVAL(GDK_SELECTION_TYPE_ATOM));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_BITMAP", GDKATOM2RVAL(GDK_SELECTION_TYPE_BITMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_COLORMAP", GDKATOM2RVAL(GDK_SELECTION_TYPE_COLORMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_DRAWABLE", GDKATOM2RVAL(GDK_SELECTION_TYPE_DRAWABLE));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_INTEGER", GDKATOM2RVAL(GDK_SELECTION_TYPE_INTEGER));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_PIXMAP", GDKATOM2RVAL(GDK_SELECTION_TYPE_PIXMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_WINDOW", GDKATOM2RVAL(GDK_SELECTION_TYPE_WINDOW));
+    rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRING", GDKATOM2RVAL(GDK_SELECTION_TYPE_STRING));
+
+    /* GdkTarget */
+    rb_define_const(RG_TARGET_NAMESPACE, "TARGET_BITMAP", GDKATOM2RVAL(GDK_TARGET_BITMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TARGET_COLORMAP", GDKATOM2RVAL(GDK_TARGET_COLORMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TARGET_DRAWABLE", GDKATOM2RVAL(GDK_TARGET_DRAWABLE));
+    rb_define_const(RG_TARGET_NAMESPACE, "TARGET_PIXMAP", GDKATOM2RVAL(GDK_TARGET_PIXMAP));
+    rb_define_const(RG_TARGET_NAMESPACE, "TARGET_STRING", GDKATOM2RVAL(GDK_TARGET_STRING));
+
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkthreads.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkthreads.c
new file mode 100644
index 0000000..59aa46f
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkthreads.c
@@ -0,0 +1,77 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003-2005 Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#ifdef   G_THREADS_ENABLED
+
+#define RG_TARGET_NAMESPACE mThreads
+
+static VALUE
+rg_s_init(VALUE self)
+{
+#ifndef GDK_WINDOWING_WIN32
+    if (!g_thread_supported()){
+        g_thread_init(NULL);
+    }
+    gdk_threads_init();
+#endif
+    return self;
+}
+
+static VALUE
+rg_s_enter(VALUE self)
+{
+    gdk_threads_enter();
+    return self;
+}
+
+static VALUE
+rg_s_leave(VALUE self)
+{
+    gdk_threads_leave();
+    return self;
+}
+
+static VALUE
+rg_s_synchronize(G_GNUC_UNUSED VALUE self)
+{
+    VALUE func = rb_block_proc();
+    gdk_threads_enter();
+    func = rb_block_proc();
+    rb_funcall(func, id_call, 0);
+    gdk_threads_leave();
+    return Qnil;
+}
+#endif
+
+void
+Init_gdk_threads(VALUE mGdk)
+{
+#ifdef   G_THREADS_ENABLED
+    VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Threads");
+
+    RG_DEF_SMETHOD(init, 0);
+    RG_DEF_SMETHOD(enter, 0);
+    RG_DEF_SMETHOD(leave, 0);
+    RG_DEF_SMETHOD(synchronize, 0);
+#endif
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdktimecoord.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdktimecoord.c
new file mode 100644
index 0000000..10c4ee2
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdktimecoord.c
@@ -0,0 +1,133 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003  Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cTimeCoord
+#define _SELF(s) (RVAL2GDKTIMECOORD(s))
+
+/**********************************/
+static GdkTimeCoord*
+timecoord_copy(const GdkTimeCoord* val)
+{
+    GdkTimeCoord* new_val;
+    g_return_val_if_fail (val != NULL, NULL);
+    new_val = g_new(GdkTimeCoord, 1);
+    *new_val = *val;
+    return new_val;
+}
+
+GType
+gdk_timecoord_get_type(void)
+{
+    static GType our_type = 0;
+
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static ("GdkTimeCoord",
+                    (GBoxedCopyFunc)timecoord_copy,
+                    (GBoxedFreeFunc)g_free);
+    return our_type;
+}
+/**********************************/
+
+static VALUE
+rg_initialize(VALUE self, VALUE rbtime, VALUE rbaxes)
+{
+    guint32 time = NUM2UINT(rbtime);
+    long n;
+    gdouble *axes = RVAL2GDOUBLES(rbaxes, n);
+    GdkTimeCoord *coord;
+
+    if (n > GDK_MAX_TIMECOORD_AXES) {
+        g_free(axes);
+
+        rb_raise(rb_eArgError,
+                 "axes out of range: %ld (0..%d)",
+                 n, GDK_MAX_TIMECOORD_AXES);
+    }
+
+    coord = g_new(GdkTimeCoord, 1);
+    coord->time = time;
+    MEMCPY(coord->axes, axes, gdouble, n);
+
+    g_free(axes);
+
+    G_INITIALIZE(self, coord);
+
+    return Qnil;
+}
+
+static VALUE
+rg_time(VALUE self)
+{
+    return UINT2NUM(_SELF(self)->time);
+}
+
+static VALUE
+rg_set_time(VALUE self, VALUE time)
+{
+    _SELF(self)->time = NUM2UINT(time);
+    return self;
+}
+
+static VALUE
+rg_axes(VALUE self)
+{
+    VALUE ary = rb_ary_new();
+    int i;
+    for (i = 0; i < GDK_MAX_TIMECOORD_AXES; i++){
+        rb_ary_push(ary, rb_float_new(_SELF(self)->axes[i]));
+    }
+    return ary;
+}
+
+static VALUE
+rg_set_axes(VALUE self, VALUE rbaxes)
+{
+    GdkTimeCoord *coord = _SELF(self);
+    VALUE axes = rb_ary_to_ary(rbaxes);
+    long i;
+    long n = RARRAY_LEN(axes);
+
+    if (n < 0 || n > GDK_MAX_TIMECOORD_AXES)
+        rb_raise(rb_eArgError,
+                 "axes out of range: %ld (0..%d)",
+                 n, GDK_MAX_TIMECOORD_AXES);
+
+    for (i = 0; i < n; i++)
+        coord->axes[i] = NUM2DBL(RARRAY_PTR(axes)[i]);
+
+    return self;
+}
+
+void
+Init_gdk_timecoord(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_TIME_COORD, "TimeCoord", mGdk);
+
+    RG_DEF_METHOD(initialize, 2);
+    RG_DEF_METHOD(time, 0);
+    RG_DEF_METHOD(set_time, 1);
+    RG_DEF_METHOD(axes, 0);
+    RG_DEF_METHOD(set_axes, 1);
+
+    rb_define_const(RG_TARGET_NAMESPACE, "MAX_AXES", INT2NUM(GDK_MAX_TIMECOORD_AXES));
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkvisual.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkvisual.c
new file mode 100644
index 0000000..4d76d8c
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkvisual.c
@@ -0,0 +1,251 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2002-2004 Masao Mutoh
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#define RG_TARGET_NAMESPACE cVisual
+#define _SELF(self) (RVAL2GDKVISUAL(self))
+
+static VALUE
+rg_s_query_depths(G_GNUC_UNUSED VALUE self)
+{
+    gint *depth;
+    gint count;
+    VALUE ary;
+    int i;
+
+    gdk_query_depths(&depth, &count);
+    ary = rb_ary_new2(count);
+    for (i = 0; i < count; i++) {
+        rb_ary_push(ary, INT2NUM((depth)[i]));
+    }
+    return ary;
+}
+
+static VALUE
+rg_s_query_visual_types(G_GNUC_UNUSED VALUE self)
+{
+    GdkVisualType *visual_types;
+    gint count;
+    VALUE ary;
+    int i;
+
+    gdk_query_visual_types(&visual_types, &count);
+    ary = rb_ary_new2(count);
+    for (i = 0; i < count; i++) {
+        rb_ary_push(ary, GDKVISUALTYPE2RVAL((visual_types)[i]));
+    }
+    return ary;
+}
+
+static VALUE
+rg_s_visuals(G_GNUC_UNUSED VALUE self)
+{
+    GList *list = gdk_list_visuals(), *cur;
+    VALUE ary = rb_ary_new();
+
+    for (cur = list; cur != NULL; cur = cur->next) {
+        rb_ary_push(ary, GOBJ2RVAL((GdkVisual *)cur->data));
+    }
+    g_list_free(list);
+    return ary;
+}
+
+static VALUE
+rg_s_best_depth(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_visual_get_best_depth());
+}
+
+static VALUE
+rg_s_best_type(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_visual_get_best_type());
+}
+
+static VALUE
+rg_s_system(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_visual_get_system());
+}
+
+static VALUE
+rg_s_best(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_visual_get_best());
+}
+
+static VALUE
+rg_s_best_with_depth(G_GNUC_UNUSED VALUE self, VALUE depth)
+{
+    return GOBJ2RVAL(gdk_visual_get_best_with_depth(NUM2INT(depth)));
+}
+
+static VALUE
+rg_s_best_with_type(G_GNUC_UNUSED VALUE self, VALUE type)
+{
+    return GOBJ2RVAL(gdk_visual_get_best_with_depth(
+                                    (GdkVisualType)GDKVISUALTYPE2RVAL(type)));
+}
+
+static VALUE
+rg_s_best_with_both(G_GNUC_UNUSED VALUE self, VALUE depth, VALUE type)
+{
+    return GOBJ2RVAL(gdk_visual_get_best_with_both(
+                                    NUM2INT(depth),
+                                    (GdkVisualType)RVAL2GDKVISUALTYPE(type)));
+}
+
+static VALUE
+rg_screen(VALUE self)
+{
+    return GOBJ2RVAL(gdk_visual_get_screen(_SELF(self)));
+}
+
+/* Structure accessors */
+static VALUE
+rg_visual_type(VALUE self)
+{
+    return GDKVISUALTYPE2RVAL(gdk_visual_get_visual_type(_SELF(self)));
+}
+
+static VALUE
+rg_depth(VALUE self)
+{
+    return INT2FIX(gdk_visual_get_depth(_SELF(self)));
+}
+
+static VALUE
+rg_byte_order(VALUE self)
+{
+    return GDKBYTEORDER2RVAL(gdk_visual_get_byte_order(_SELF(self)));
+}
+
+static VALUE
+rg_colormap_size(VALUE self)
+{
+    return INT2FIX(gdk_visual_get_colormap_size(_SELF(self)));
+}
+
+static VALUE
+rg_bits_per_rgb(VALUE self)
+{
+    return INT2FIX(gdk_visual_get_bits_per_rgb(_SELF(self)));
+}
+
+/* TODO
+static VALUE
+rg_red_mask(VALUE self)
+{
+    return INT2FIX(_SELF(self)->red_mask);
+}
+
+static VALUE
+rg_red_shift(VALUE self)
+{
+    return INT2FIX(_SELF(self)->red_shift);
+}
+
+static VALUE
+rg_red_prec(VALUE self)
+{
+    return INT2FIX(_SELF(self)->red_prec);
+}
+
+static VALUE
+rg_green_mask(VALUE self)
+{
+    return INT2FIX(_SELF(self)->green_mask);
+}
+
+static VALUE
+rg_green_shift(VALUE self)
+{
+    return INT2FIX(_SELF(self)->green_shift);
+}
+
+static VALUE
+rg_green_prec(VALUE self)
+{
+    return INT2FIX(_SELF(self)->green_prec);
+}
+
+static VALUE
+rg_blue_mask(VALUE self)
+{
+    return INT2FIX(_SELF(self)->blue_mask);
+}
+
+static VALUE
+rg_blue_shift(VALUE self)
+{
+    return INT2FIX(_SELF(self)->blue_shift);
+}
+
+static VALUE
+rg_blue_prec(VALUE self)
+{
+    return INT2FIX(_SELF(self)->blue_prec);
+}
+*/
+
+void
+Init_gdk_visual(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_VISUAL, "Visual", mGdk);
+
+    /* class methods */
+    RG_DEF_SMETHOD(query_depths, 0);
+    RG_DEF_SMETHOD(query_visual_types, 0);
+    RG_DEF_SMETHOD(visuals, 0);
+    RG_DEF_SMETHOD(best_depth, 0);
+    RG_DEF_SMETHOD(best_type, 0);
+    RG_DEF_SMETHOD(system, 0);
+    RG_DEF_SMETHOD(best, 0);
+    RG_DEF_SMETHOD(best_with_depth, 1);
+    RG_DEF_SMETHOD(best_with_type, 1);
+    RG_DEF_SMETHOD(best_with_both, 2);
+
+    /* instance methods */
+    RG_DEF_METHOD(screen, 0);
+    RG_DEF_METHOD(visual_type, 0);
+    RG_DEF_METHOD(depth, 0);
+    RG_DEF_METHOD(byte_order, 0);
+    RG_DEF_METHOD(colormap_size, 0);
+    RG_DEF_METHOD(bits_per_rgb, 0);
+/* TODO
+    RG_DEF_METHOD(red_mask, 0);
+    RG_DEF_METHOD(red_shift, 0);
+    RG_DEF_METHOD(red_prec, 0);
+    RG_DEF_METHOD(green_mask, 0);
+    RG_DEF_METHOD(green_shift, 0);
+    RG_DEF_METHOD(green_prec, 0);
+    RG_DEF_METHOD(blue_mask, 0);
+    RG_DEF_METHOD(blue_shift, 0);
+    RG_DEF_METHOD(blue_prec, 0);
+*/
+
+    G_DEF_CLASS(GDK_TYPE_VISUAL_TYPE, "Type", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_BYTE_ORDER, "ByteOrder", RG_TARGET_NAMESPACE);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindow.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindow.c
new file mode 100644
index 0000000..1861c16
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindow.c
@@ -0,0 +1,1069 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2002-2013 Ruby-GNOME2 Project Team
+ *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
+ *                          Daisuke Kanda,
+ *                          Hiroshi Igarashi
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#ifdef HAVE_RB_CAIRO_H
+#include <rb_cairo.h>
+#endif
+
+#define RG_TARGET_NAMESPACE cWindow
+#define _SELF(s) RVAL2GDKWINDOW(s)
+
+static VALUE
+rg_initialize(VALUE self, VALUE parent, VALUE attributes, VALUE attributes_mask)
+{
+    GdkWindow *win;
+    win = gdk_window_new(NIL_P(parent) ? NULL : _SELF(parent),
+                         RVAL2GDKWINDOWATTR(attributes),
+                         RVAL2GDKWINDOWATTRIBUTESTYPE(attributes_mask));
+    G_INITIALIZE(self, win);
+
+    return Qnil;
+}
+
+static VALUE
+rg_destroy(VALUE self)
+{
+    gdk_window_destroy(_SELF(self));
+    return Qnil;
+}
+
+static VALUE
+rg_window_type(VALUE self)
+{
+    return GDKWINDOWTYPE2RVAL(gdk_window_get_window_type(_SELF(self)));
+}
+
+static VALUE
+rg_display(VALUE self)
+{
+    return GOBJ2RVAL(gdk_window_get_display(_SELF(self)));
+}
+
+static VALUE
+rg_show(VALUE self)
+{
+    gdk_window_show(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_show_unraised(VALUE self)
+{
+    gdk_window_show_unraised(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_hide(VALUE self)
+{
+    gdk_window_hide(_SELF(self));
+    return Qnil;
+}
+
+static VALUE
+rg_visible_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_window_is_visible(_SELF(self)));
+}
+
+static VALUE
+rg_viewable_p(VALUE self)
+{
+    return CBOOL2RVAL(gdk_window_is_viewable(_SELF(self)));
+}
+
+static VALUE
+rg_state(VALUE self)
+{
+    return GDKWINDOWSTATE2RVAL(gdk_window_get_state(_SELF(self)));
+}
+
+static VALUE
+rg_withdraw(VALUE self)
+{
+    gdk_window_withdraw(_SELF(self));
+    return Qnil;
+}
+
+static VALUE
+rg_iconify(VALUE self)
+{
+    gdk_window_iconify(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_deiconify(VALUE self)
+{
+    gdk_window_deiconify(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_stick(VALUE self)
+{
+    gdk_window_stick(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_unstick(VALUE self)
+{
+    gdk_window_unstick(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_maximize(VALUE self)
+{
+    gdk_window_maximize(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_unmaximize(VALUE self)
+{
+    gdk_window_unmaximize(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_fullscreen(VALUE self)
+{
+    gdk_window_fullscreen(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_unfullscreen(VALUE self)
+{
+    gdk_window_unfullscreen(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_set_keep_above(VALUE self, VALUE setting)
+{
+    gdk_window_set_keep_above(_SELF(self), RVAL2CBOOL(setting));
+    return self;
+}
+
+static VALUE
+rg_set_keep_below(VALUE self, VALUE setting)
+{
+    gdk_window_set_keep_below(_SELF(self), RVAL2CBOOL(setting));
+    return self;
+}
+
+static VALUE
+rg_move(VALUE self, VALUE x, VALUE y)
+{
+    gdk_window_move(_SELF(self), NUM2INT(x), NUM2INT(y));
+    return self;
+}
+
+static VALUE
+rg_resize(VALUE self, VALUE w, VALUE h)
+{
+    gdk_window_resize(_SELF(self), NUM2INT(w), NUM2INT(h));
+    return self;
+}
+
+static VALUE
+rg_move_resize(VALUE self, VALUE x, VALUE y, VALUE w, VALUE h)
+{
+    gdk_window_move_resize(_SELF(self), NUM2INT(x), NUM2INT(y), NUM2INT(w), NUM2INT(h));
+    return self;
+}
+
+static VALUE
+rg_scroll(VALUE self, VALUE dx, VALUE dy)
+{
+    gdk_window_scroll(_SELF(self), NUM2INT(dx), NUM2INT(dy));
+    return self;
+}
+
+static VALUE
+rg_move_region(VALUE self, VALUE region, VALUE dx, VALUE dy)
+{
+    gdk_window_move_region(_SELF(self),
+                           RVAL2CRREGION(region),
+                           NUM2INT(dx),
+                           NUM2INT(dy));
+    return self;
+}
+
+static VALUE
+rg_reparent(VALUE self, VALUE new_parent, VALUE x, VALUE y)
+{
+    gdk_window_reparent(_SELF(self), _SELF(new_parent), NUM2INT(x), NUM2INT(y));
+    return self;
+}
+
+static VALUE
+rg_raise(VALUE self)
+{
+    gdk_window_raise(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_lower(VALUE self)
+{
+    gdk_window_lower(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_focus(VALUE self, VALUE timestamp)
+{
+    gdk_window_focus(_SELF(self), NUM2UINT(timestamp));
+    return self;
+}
+
+static VALUE
+rg_register_dnd(VALUE self)
+{
+    gdk_window_register_dnd(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_begin_resize_drag(VALUE self, VALUE edge, VALUE button, VALUE root_x, VALUE root_y, VALUE timestamp)
+{
+    gdk_window_begin_resize_drag(_SELF(self),
+                                 RVAL2GDKWINDOWEDGE(edge),
+                                 NUM2INT(button),
+                                 NUM2INT(root_x), NUM2INT(root_y),
+                                 NUM2UINT(timestamp));
+    return self;
+}
+
+static VALUE
+rg_begin_move_drag(VALUE self, VALUE button, VALUE root_x, VALUE root_y, VALUE timestamp)
+{
+    gdk_window_begin_move_drag(_SELF(self), NUM2INT(button),
+                               NUM2INT(root_x), NUM2INT(root_y),
+                                 NUM2UINT(timestamp));
+    return self;
+}
+
+static VALUE
+rg_s_constrain_size(G_GNUC_UNUSED VALUE self, VALUE geometry, VALUE flags, VALUE w, VALUE h)
+{
+    gint new_width, new_height;
+    gdk_window_constrain_size(RVAL2GDKGEOMETRY(geometry),
+                              RVAL2GDKWINDOWHINTS(flags),
+                              NUM2INT(w), NUM2INT(h), &new_width, &new_height);
+    return rb_assoc_new(INT2NUM(new_width), INT2NUM(new_height));
+}
+
+static VALUE
+rg_beep(VALUE self)
+{
+    gdk_window_beep(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_begin_paint(VALUE self, VALUE area)
+{
+    if (rb_obj_is_kind_of(area, GTYPE2CLASS(GDK_TYPE_RECTANGLE))){
+        gdk_window_begin_paint_rect(_SELF(self),
+                                    RVAL2GDKRECTANGLE(area));
+    } else {
+        gdk_window_begin_paint_region(_SELF(self), RVAL2CRREGION(area));
+    }
+    return self;
+}
+
+static VALUE
+rg_end_paint(VALUE self)
+{
+    gdk_window_end_paint(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_invalidate(VALUE self, VALUE area, VALUE invalidate_children)
+{
+    if (rb_obj_is_kind_of(area, GTYPE2CLASS(GDK_TYPE_RECTANGLE))){
+        gdk_window_invalidate_rect(_SELF(self),
+                                   RVAL2GDKRECTANGLE(area),
+                                   RVAL2CBOOL(invalidate_children));
+    } else {
+        gdk_window_invalidate_region(_SELF(self),
+                                     RVAL2CRREGION(area),
+                                     RVAL2CBOOL(invalidate_children));
+    }
+    return self;
+}
+
+static gboolean
+invalidate_child_func_wrap(GdkWindow *window, VALUE func)
+{
+    VALUE result = rb_funcall(func, id_call, 1, GOBJ2RVAL(window));
+    return RVAL2CBOOL(result);
+}
+
+static VALUE
+rg_invalidate_maybe_recurse(VALUE self, VALUE region)
+{
+    VALUE func = (VALUE)NULL;
+    if (rb_block_given_p()){
+        func = rb_block_proc();
+        G_RELATIVE(self, func);
+    }
+    gdk_window_invalidate_maybe_recurse(_SELF(self),
+                                        RVAL2CRREGION(region),
+                                        (GdkWindowChildFunc)invalidate_child_func_wrap,
+                                        (gpointer)func);
+    return self;
+}
+
+static VALUE
+rg_update_area(VALUE self)
+{
+    return CRREGION2RVAL(gdk_window_get_update_area(_SELF(self)));
+}
+
+static VALUE
+rg_freeze_updates(VALUE self)
+{
+    gdk_window_freeze_updates(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_thaw_updates(VALUE self)
+{
+    gdk_window_thaw_updates(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_s_process_all_updates(VALUE self)
+{
+    gdk_window_process_all_updates();
+    return self;
+}
+
+static VALUE
+rg_process_updates(VALUE self, VALUE update_children)
+{
+    gdk_window_process_updates(_SELF(self), RVAL2CBOOL(update_children));
+    return self;
+}
+
+static VALUE
+rg_s_set_debug_updates(VALUE self, VALUE setting)
+{
+    gdk_window_set_debug_updates(RVAL2CBOOL(setting));
+    return self;
+}
+
+static VALUE
+rg_configure_finished(VALUE self)
+{
+    gdk_window_configure_finished(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_enable_synchronized_configure(VALUE self)
+{
+    gdk_window_enable_synchronized_configure(_SELF(self));
+
+    if (rb_block_given_p()) {
+        rb_ensure(rb_yield, self, rg_configure_finished, self);
+    }
+    return self;
+}
+
+static VALUE
+rg_set_user_data(VALUE self, VALUE user_data)
+{
+    gdk_window_set_user_data(_SELF(self), (gpointer)RVAL2GOBJ(user_data));
+    return self;
+}
+
+static VALUE
+rg_set_override_redirect(VALUE self, VALUE override_redirect)
+{
+    gdk_window_set_override_redirect(_SELF(self),
+                                     RVAL2CBOOL(override_redirect));
+    return self;
+}
+
+static VALUE
+rg_set_accept_focus(VALUE self, VALUE accept_focus)
+{
+    gdk_window_set_accept_focus(_SELF(self), RVAL2CBOOL(accept_focus));
+    return self;
+}
+
+static VALUE
+rg_set_focus_on_map(VALUE self, VALUE focus_on_map)
+{
+    gdk_window_set_focus_on_map(_SELF(self), RVAL2CBOOL(focus_on_map));
+    return self;
+}
+
+static VALUE
+rg_shape_combine_region(VALUE self, VALUE shape_region, VALUE offset_x, VALUE offset_y)
+{
+    gdk_window_shape_combine_region(_SELF(self),
+                                    NIL_P(shape_region) ? NULL : RVAL2CRREGION(shape_region),
+                                    INT2NUM(offset_x), INT2NUM(offset_y));
+    return self;
+}
+
+static VALUE
+rg_set_child_shapes(VALUE self)
+{
+    gdk_window_set_child_shapes(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_merge_child_shapes(VALUE self)
+{
+    gdk_window_merge_child_shapes(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_input_shape_combine_region(VALUE self, VALUE shape_region, VALUE offset_x, VALUE offset_y)
+{
+    gdk_window_input_shape_combine_region(_SELF(self),
+                                          RVAL2CRREGION(shape_region),
+                                          NUM2INT(offset_x),
+                                          NUM2INT(offset_y));
+    return self;
+}
+
+static VALUE
+rg_set_child_input_shapes(VALUE self)
+{
+    gdk_window_set_child_input_shapes(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_merge_child_input_shapes(VALUE self)
+{
+    gdk_window_merge_child_input_shapes(_SELF(self));
+    return self;
+}
+
+static VALUE
+rg_set_static_gravities(VALUE self, VALUE use_static)
+{
+    gboolean ret = gdk_window_set_static_gravities(_SELF(self),
+                                                   RVAL2CBOOL(use_static));
+    if (! ret)
+        rb_raise(rb_eRuntimeError, "couldn't turn on static gravity");
+
+    return self;
+}
+
+static VALUE
+rg_set_title(VALUE self, VALUE title)
+{
+    gdk_window_set_title(_SELF(self),RVAL2CSTR(title));
+    return self;
+}
+
+static VALUE
+rg_set_background(VALUE self, VALUE color)
+{
+    gdk_window_set_background(_SELF(self), RVAL2GDKCOLOR(color));
+    return self;
+}
+
+static VALUE
+rg_user_data(VALUE self)
+{
+    GObject *data = NULL;
+    gdk_window_get_user_data(_SELF(self), (gpointer)&data);
+    return GOBJ2RVAL(data);
+}
+
+static VALUE
+rg_geometry(VALUE self)
+{
+    gint x, y, w, h;
+    gdk_window_get_geometry(_SELF(self), &x, &y, &w, &h);
+    return rb_ary_new3(4, INT2NUM(x), INT2NUM(y),
+                       INT2NUM(w), INT2NUM(h));
+}
+
+static VALUE
+rg_set_geometry_hints(VALUE self, VALUE geometry, VALUE geom_mask)
+{
+    gdk_window_set_geometry_hints(_SELF(self),
+                                  NIL_P(geometry) ? (GdkGeometry*)NULL : RVAL2GDKGEOMETRY(geometry),
+                                  RVAL2GDKWINDOWHINTS(geom_mask));
+    return self;
+}
+
+static VALUE
+rg_width(VALUE self)
+{
+    return INT2NUM(gdk_window_get_width(_SELF(self)));
+}
+
+static VALUE
+rg_height(VALUE self)
+{
+    return INT2NUM(gdk_window_get_height(_SELF(self)));
+}
+
+static VALUE
+rg_set_icon_list(VALUE self, VALUE rbpixbufs)
+{
+    GdkWindow *window = _SELF(self);
+    GList *pixbufs = RVAL2GDKPIXBUFGLIST(rbpixbufs);
+
+    gdk_window_set_icon_list(window, pixbufs);
+
+    g_list_free(pixbufs);
+
+    return self;
+}
+
+static VALUE
+rg_set_modal_hint(VALUE self, VALUE modal)
+{
+    gdk_window_set_modal_hint(_SELF(self), RVAL2CBOOL(modal));
+    return self;
+}
+
+static VALUE
+rg_set_type_hint(VALUE self, VALUE hint)
+{
+    gdk_window_set_type_hint(_SELF(self), RVAL2GDKWINDOWHINT(hint));
+    return self;
+}
+
+static VALUE
+rg_type_hint(VALUE self)
+{
+    return GDKWINDOWHINT2RVAL(gdk_window_get_type_hint(_SELF(self)));
+}
+
+static VALUE
+rg_set_skip_taskbar_hint(VALUE self, VALUE hint)
+{
+    gdk_window_set_skip_taskbar_hint(_SELF(self), RVAL2CBOOL(hint));
+    return self;
+}
+
+static VALUE
+rg_set_skip_pager_hint(VALUE self, VALUE hint)
+{
+    gdk_window_set_skip_pager_hint(_SELF(self), RVAL2CBOOL(hint));
+    return self;
+}
+
+static VALUE
+rg_set_urgency_hint(VALUE self, VALUE hint)
+{
+    gdk_window_set_urgency_hint(_SELF(self), RVAL2CBOOL(hint));
+    return self;
+}
+
+static VALUE
+rg_position(VALUE self)
+{
+    gint x, y;
+    gdk_window_get_position(_SELF(self), &x, &y);
+    return rb_assoc_new(INT2NUM(x), INT2NUM(y));
+}
+
+static VALUE
+rg_root_origin(VALUE self)
+{
+    int x, y;
+    gdk_window_get_root_origin(_SELF(self), &x, &y);
+    return rb_assoc_new(INT2FIX(x), INT2FIX(y));
+}
+
+static VALUE
+rg_frame_extents(VALUE self)
+{
+    GdkRectangle rect;
+    gdk_window_get_frame_extents(_SELF(self), &rect);
+    return GDKRECTANGLE2RVAL(&rect);
+}
+
+static VALUE
+rg_origin(VALUE self)
+{
+    gint x, y;
+    gdk_window_get_origin(_SELF(self), &x, &y);
+    return rb_assoc_new(INT2NUM(x), INT2NUM(y));
+}
+
+static VALUE
+rg_parent(VALUE self)
+{
+    return GOBJ2RVAL(gdk_window_get_parent(_SELF(self)));
+}
+
+static VALUE
+rg_toplevel(VALUE self)
+{
+    return GOBJ2RVAL(gdk_window_get_toplevel(_SELF(self)));
+}
+
+static VALUE
+rg_children(VALUE self)
+{
+    /* Don't use gdk_window_get_children() here */
+    GList *list = gdk_window_peek_children(_SELF(self));
+    VALUE ary = rb_ary_new();
+    while (list) {
+        rb_ary_push(ary, GOBJ2RVAL(list->data));
+        list = list->next;
+    }
+    return ary;
+}
+
+static VALUE
+rg_events(VALUE self)
+{
+    return GDKEVENTMASK2RVAL(gdk_window_get_events(_SELF(self)));
+}
+
+static VALUE
+rg_set_events(VALUE self, VALUE mask)
+{
+    gdk_window_set_events(_SELF(self), RVAL2GDKEVENTMASK(mask));
+    return self;
+}
+
+/* deprecated
+static VALUE
+rg_set_icon(VALUE self, VALUE icon, VALUE pixmap, VALUE mask)
+{
+    gdk_window_set_icon(_SELF(self), NIL_P(icon) ? NULL :_SELF(icon),
+                        NIL_P(pixmap) ? NULL : RVAL2GDKPIXMAP(pixmap),
+                        NIL_P(mask) ? NULL : RVAL2GDKBITMAP(mask));
+    return self;
+}
+*/
+
+static VALUE
+rg_set_icon_name(VALUE self, VALUE name)
+{
+    gdk_window_set_icon_name(_SELF(self), RVAL2CSTR(name));
+    return self;
+}
+
+static VALUE
+rg_set_transient_for(VALUE self, VALUE parent)
+{
+    gdk_window_set_transient_for(_SELF(self), _SELF(parent));
+    return self;
+}
+
+static VALUE
+rg_set_role(VALUE self, VALUE role)
+{
+    gdk_window_set_role(_SELF(self), RVAL2CSTR(role));
+    return self;
+}
+
+static VALUE
+rg_set_group(VALUE self, VALUE leader)
+{
+    gdk_window_set_group(_SELF(self), _SELF(leader));
+    return self;
+}
+
+static VALUE
+rg_group(VALUE self)
+{
+    return GOBJ2RVAL(gdk_window_get_group(_SELF(self)));
+}
+
+static VALUE
+rg_set_decorations(VALUE self, VALUE decor)
+{
+    gdk_window_set_decorations(_SELF(self), RVAL2GDKWMDECORATION(decor));
+    return self;
+}
+
+static VALUE
+rg_decorations(VALUE self)
+{
+    GdkWMDecoration decorations;
+    gboolean ret = gdk_window_get_decorations(_SELF(self), &decorations);
+    return ret ? GDKWMDECORATION2RVAL(decorations) : Qnil;
+}
+
+static VALUE
+rg_set_functions(VALUE self, VALUE func)
+{
+    gdk_window_set_functions(_SELF(self), RVAL2GDKWMFUNCTION(func));
+    return self;
+}
+
+static VALUE
+rg_set_composited(VALUE self, VALUE composited)
+{
+    gdk_window_set_composited(_SELF(self), RVAL2CBOOL(composited));
+    return self;
+}
+
+static VALUE
+rg_set_opacity(VALUE self, VALUE opacity)
+{
+    gdk_window_set_opacity(_SELF(self), NUM2DBL(opacity));
+    return self;
+}
+
+static VALUE
+rg_set_startup_id(VALUE self, VALUE startup_id)
+{
+    gdk_window_set_startup_id(_SELF(self), RVAL2CSTR_ACCEPT_NIL(startup_id));
+    return self;
+}
+
+/* deprecated
+static VALUE
+rg_s_toplevels(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJGLIST2RVAL_FREE(gdk_window_get_toplevels(), g_list_free, NULL);
+}
+*/
+
+static VALUE
+rg_s_default_root_window(G_GNUC_UNUSED VALUE self)
+{
+    return GOBJ2RVAL(gdk_get_default_root_window());
+}
+
+/* Would you need this?
+GdkPointerHooks* gdk_set_pointer_hooks      (const GdkPointerHooks *new_hooks);
+*/
+
+/* From X Window System Interaction */
+/* deprecated
+static VALUE
+rg_s_foreign_new(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE arg[2];
+    GdkWindow * win = NULL;
+
+    rb_scan_args(argc, argv, "11", &arg[0], &arg[1]);
+
+    switch(argc)
+    {
+      case 1:
+        win = gdk_window_foreign_new(RVAL2GDKNATIVEWINDOW(arg[0]));
+        break;
+      case 2:
+        win = gdk_window_foreign_new_for_display(RVAL2GOBJ(arg[0]),
+                                                 RVAL2GDKNATIVEWINDOW(arg[1]));
+        break;
+    default:
+        break;
+    }
+    if (win == NULL)
+        return Qnil;
+    else {
+        return GOBJ2RVAL(win);
+    }
+}
+
+static VALUE
+rg_s_lookup(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
+{
+    VALUE arg[2];
+    GdkWindow * win = NULL;
+
+    rb_scan_args(argc, argv, "11", &arg[0], &arg[1]);
+
+    switch(argc)
+    {
+      case 1:
+        win = gdk_window_lookup(RVAL2GDKNATIVEWINDOW(arg[0]));
+        break;
+      case 2:
+        win = gdk_window_lookup_for_display(RVAL2GOBJ(arg[0]), RVAL2GDKNATIVEWINDOW(arg[1]));
+        break;
+    default:
+        break;
+    }
+    if (win == NULL)
+        return Qnil;
+    else {
+        return GOBJ2RVAL(win);
+    }
+}
+*/
+
+struct rbgdk_rval2gdkatomglist_args {
+    VALUE ary;
+    long n;
+    GList *result;
+};
+
+static VALUE
+rbgdk_rval2gdkatomglist_body(VALUE value)
+{
+    long i;
+    struct rbgdk_rval2gdkatomglist_args *args = (struct rbgdk_rval2gdkatomglist_args *)value;
+
+    for (i = 0; i < args->n; i++)
+        args->result = g_list_append(args->result, GINT_TO_POINTER(RVAL2ATOM(RARRAY_PTR(args->ary)[i])));
+
+    return Qnil;
+}
+
+static G_GNUC_NORETURN VALUE
+rbgdk_rval2gdkatomglist_rescue(VALUE value)
+{
+    g_free(((struct rbgdk_rval2gdkatomglist_args *)value)->result);
+
+    rb_exc_raise(rb_errinfo());
+}
+
+static GList *
+rbgdk_rval2gdkatomglist(VALUE value)
+{
+    struct rbgdk_rval2gdkatomglist_args args;
+
+    args.ary = rb_ary_to_ary(value);
+    args.n = RARRAY_LEN(args.ary);
+    args.result = NULL;
+
+    rb_rescue(rbgdk_rval2gdkatomglist_body, (VALUE)&args,
+              rbgdk_rval2gdkatomglist_rescue, (VALUE)&args);
+
+    return args.result;
+}
+
+#define RVAL2GDKATOMGLIST(value) rbgdk_rval2gdkatomglist(value)
+
+static VALUE
+rg_drag_begin(VALUE self, VALUE targets)
+{
+    GList *list = RVAL2GDKATOMGLIST(targets);
+    GdkDragContext *result = gdk_drag_begin(_SELF(self), list);
+    g_list_free(list);
+
+    return GOBJ2RVAL(result);
+}
+
+static VALUE
+rg_drag_protocol(VALUE self)
+{
+    GdkWindow *target;
+    GdkWindow **p;
+    GdkDragProtocol prot;
+    VALUE ary = rb_ary_new();
+
+    prot = gdk_window_get_drag_protocol(_SELF(self), &target);
+    for (p = ⌖ *p; p++)
+        rb_ary_push(ary, GOBJ2RVAL(*p));
+
+    return rb_ary_new3(2, GDKDRAGPROTOCOL2RVAL(prot), ary);
+}
+
+static VALUE
+rg_get_device_position(VALUE self, VALUE device)
+{
+    gint x, y;
+    GdkModifierType state;
+    GdkWindow *underneath_window;
+
+    underneath_window =
+        gdk_window_get_device_position(_SELF(self),
+                                       RVAL2GDKDEVICE(device),
+                                       &x, &y, &state);
+    return rb_ary_new3(4,
+                       GOBJ2RVAL(underneath_window),
+                       INT2NUM(x), INT2NUM(y), GDKMODIFIERTYPE2RVAL(state));
+}
+
+#ifdef HAVE_RB_CAIRO_H
+static VALUE
+rg_create_cairo_context(VALUE self)
+{
+    VALUE rb_cr;
+    cairo_t *cr;
+    cr = gdk_cairo_create(_SELF(self));
+    rb_cairo_check_status(cairo_status(cr));
+    rb_cr = CRCONTEXT2RVAL(cr);
+    cairo_destroy (cr);
+    return rb_cr;
+}
+#endif
+
+void
+Init_gdk_window(VALUE mGdk)
+{
+    GObjectClass *g_class;
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_WINDOW, "Window", mGdk);
+
+    g_class = g_type_class_peek(GDK_TYPE_WINDOW);
+
+    RG_DEF_METHOD(initialize, 3);
+    RG_DEF_METHOD(destroy, 0);
+    RG_DEF_METHOD(window_type, 0);
+    RG_DEF_METHOD(display, 0);
+    RG_DEF_SMETHOD(constrain_size, 4);
+    RG_DEF_SMETHOD(process_all_updates, 0);
+    RG_DEF_SMETHOD(set_debug_updates, 1);
+    RG_DEF_METHOD(show, 0);
+    RG_DEF_METHOD(show_unraised, 0);
+    RG_DEF_METHOD(hide, 0);
+    RG_DEF_METHOD_P(visible, 0);
+    RG_DEF_METHOD_P(viewable, 0);
+    RG_DEF_METHOD(withdraw, 0);
+    RG_DEF_METHOD(state, 0);
+    RG_DEF_METHOD(iconify, 0);
+    RG_DEF_METHOD(deiconify, 0);
+    RG_DEF_METHOD(stick, 0);
+    RG_DEF_METHOD(unstick, 0);
+    RG_DEF_METHOD(maximize, 0);
+    RG_DEF_METHOD(unmaximize, 0);
+    RG_DEF_METHOD(fullscreen, 0);
+    RG_DEF_METHOD(unfullscreen, 0);
+    RG_DEF_METHOD(set_keep_above, 1);
+    RG_DEF_METHOD(set_keep_below, 1);
+    RG_DEF_METHOD(move, 2);
+    RG_DEF_METHOD(resize, 2);
+    RG_DEF_METHOD(move_resize, 4);
+    RG_DEF_METHOD(scroll, 2);
+    RG_DEF_METHOD(move_region, 3);
+    RG_DEF_METHOD(reparent, 3);
+    RG_DEF_METHOD(raise, 0);
+    RG_DEF_METHOD(lower, 0);
+    RG_DEF_METHOD(focus, 1);
+    RG_DEF_METHOD(register_dnd, 0);
+    RG_DEF_METHOD(beep, 0);
+    RG_DEF_METHOD(begin_resize_drag, 5);
+    RG_DEF_METHOD(begin_move_drag, 4);
+    RG_DEF_METHOD(begin_paint, 1);
+    RG_DEF_METHOD(end_paint, 0);
+    RG_DEF_METHOD(invalidate, 2);
+    RG_DEF_METHOD(invalidate_maybe_recurse, 1);
+    RG_DEF_METHOD(update_area, 0);
+    RG_DEF_METHOD(freeze_updates, 0);
+    RG_DEF_METHOD(thaw_updates, 0);
+    RG_DEF_METHOD(process_updates, 1);
+    RG_DEF_METHOD(configure_finished, 0);
+    RG_DEF_METHOD(enable_synchronized_configure, 0);
+    RG_DEF_METHOD(set_user_data, 1);
+    RG_DEF_METHOD(set_override_redirect, 1);
+    RG_DEF_METHOD(set_accept_focus, 1);
+    RG_DEF_METHOD(set_focus_on_map, 1);
+    RG_DEF_METHOD(shape_combine_region, 3);
+    RG_DEF_METHOD(set_child_shapes, 0);
+    RG_DEF_METHOD(merge_child_shapes, 0);
+    RG_DEF_METHOD(input_shape_combine_region, 3);
+    RG_DEF_METHOD(set_child_input_shapes, 0);
+    RG_DEF_METHOD(merge_child_input_shapes, 0);
+    RG_DEF_METHOD(set_static_gravities, 1);
+    RG_DEF_METHOD(set_title, 1);
+    RG_DEF_METHOD(set_background, 1);
+    RG_DEF_METHOD(user_data, 0);
+    RG_DEF_METHOD(geometry, 0);
+    RG_DEF_METHOD(set_geometry_hints, 2);
+    RG_DEF_METHOD(width, 0);
+    RG_DEF_METHOD(height, 0);
+    RG_DEF_METHOD(set_icon_list, 1);
+    RG_DEF_METHOD(set_modal_hint, 1);
+    RG_DEF_METHOD(set_type_hint, 1);
+    RG_DEF_METHOD(type_hint, 0);
+
+    RG_DEF_METHOD(set_skip_taskbar_hint, 1);
+    RG_DEF_METHOD(set_skip_pager_hint, 1);
+    RG_DEF_METHOD(set_urgency_hint, 1);
+    RG_DEF_METHOD(position, 0);
+    RG_DEF_METHOD(root_origin, 0);
+    RG_DEF_METHOD(frame_extents, 0);
+    RG_DEF_METHOD(origin, 0);
+    RG_DEF_METHOD(parent, 0);
+    RG_DEF_METHOD(toplevel, 0);
+    RG_DEF_SMETHOD(default_root_window, 0);
+    RG_DEF_METHOD(children, 0);
+    RG_DEF_METHOD(events, 0);
+    RG_DEF_METHOD(set_events, 1);
+/* deprecated
+    RG_DEF_METHOD(set_icon, 3);
+*/
+    RG_DEF_METHOD(set_icon_name, 1);
+    RG_DEF_METHOD(set_transient_for, 1);
+    RG_DEF_METHOD(set_role, 1);
+    RG_DEF_METHOD(set_group, 1);
+    RG_DEF_METHOD(group, 0);
+    RG_DEF_METHOD(set_decorations, 1);
+    RG_DEF_METHOD(decorations, 0);
+    RG_DEF_METHOD(set_functions, 1);
+    RG_DEF_METHOD(set_composited, 1);
+    RG_DEF_METHOD(set_opacity, 1);
+    RG_DEF_METHOD(set_startup_id, 1);
+/* deprecated
+    RG_DEF_SMETHOD(toplevels, 0);
+
+    RG_DEF_SMETHOD(foreign_new, -1);
+    RG_DEF_SMETHOD(lookup, -1);
+*/
+    RG_DEF_METHOD(drag_begin, 1);
+    RG_DEF_METHOD(drag_protocol, 0);
+    RG_DEF_METHOD(get_device_position, 1);
+
+#ifdef HAVE_RB_CAIRO_H
+    RG_DEF_METHOD(create_cairo_context, 0);
+#endif
+
+    G_DEF_CLASS(GDK_TYPE_WINDOW_TYPE, "Type", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WINDOW_WINDOW_CLASS, "WindowClass",
+                RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WINDOW_HINTS, "Hints", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_GRAVITY, "Gravity", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WINDOW_EDGE, "Edge", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WINDOW_TYPE_HINT, "TypeHint", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WINDOW_ATTRIBUTES_TYPE, "AttributesType", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_FILTER_RETURN, "FilterReturn", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_MODIFIER_TYPE, "ModifierType", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WM_DECORATION, "WMDecoration", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(GDK_TYPE_WM_FUNCTION, "WMFunction", RG_TARGET_NAMESPACE);
+
+    rb_define_const(RG_TARGET_NAMESPACE, "PARENT_RELATIVE", INT2FIX(GDK_PARENT_RELATIVE));
+
+#ifdef GDK_WINDOWING_X11
+    G_DEF_CLASS3("GdkWindowImplX11", "WindowImplX11", mGdk);
+#elif defined(GDK_WINDOWING_WIN32)
+    G_DEF_CLASS3("GdkWindowImplWin32", "WindowImplWin32", mGdk);
+#elif defined(GDK_WINDOWING_FB)
+    G_DEF_CLASS3("GdkWindowFB", "WindowFB", mGdk);
+#endif
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindowattr.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindowattr.c
new file mode 100644
index 0000000..918647b
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkwindowattr.c
@@ -0,0 +1,191 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2003  Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+/*****************************************/
+static GdkWindowAttr*
+attr_copy(const GdkWindowAttr* win)
+{
+    GdkWindowAttr* new_win;
+    g_return_val_if_fail (win != NULL, NULL);
+    new_win = g_new(GdkWindowAttr, 1);
+    *new_win = *win;
+    return new_win;
+}
+
+GType
+gdk_windowattr_get_type(void)
+{
+  static GType our_type = 0;
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("GdkWindowAttr",
+                    (GBoxedCopyFunc)attr_copy,
+                    (GBoxedFreeFunc)g_free);
+  return our_type;
+}
+/*****************************************/
+
+#define RG_TARGET_NAMESPACE cWindowAttr
+#define _SELF(w) (RVAL2GDKWINDOWATTR(w))
+
+static VALUE
+rg_initialize(VALUE self, VALUE width, VALUE height, VALUE wclass,
+        VALUE window_type)
+{
+    GdkWindowAttr attribute;
+    attribute.width = NUM2INT(width);
+    attribute.height = NUM2INT(height);
+    attribute.wclass = RVAL2GDKWINDOWWINDOWCLASS(wclass);
+    attribute.window_type = RVAL2GDKWINDOWTYPE(window_type);
+    G_INITIALIZE(self, g_boxed_copy(GDK_TYPE_WINDOW_ATTR, &attribute));
+    return Qnil;
+}
+
+#define ATTR_STR(name)\
+static VALUE \
+attr_get_ ## name (VALUE self)\
+{\
+    return CSTR2RVAL(_SELF(self)->name);\
+}\
+static VALUE \
+attr_set_ ## name (VALUE self, VALUE val)\
+{\
+    _SELF(self)->name = (gchar *)RVAL2CSTR(val);\
+    return self;\
+}
+
+#define ATTR_INT(name)\
+static VALUE \
+attr_get_ ## name (VALUE self)\
+{\
+    return INT2NUM(_SELF(self)->name);\
+}\
+static VALUE \
+attr_set_ ## name (VALUE self, VALUE val)\
+{\
+    _SELF(self)->name = NUM2INT(val);\
+    return self;\
+}
+
+ATTR_STR(title);
+ATTR_INT(event_mask);
+ATTR_INT(x);
+ATTR_INT(y);
+ATTR_INT(width);
+ATTR_INT(height);
+
+static VALUE
+rg_wclass(VALUE self)
+{
+    return GDKWINDOWWINDOWCLASS2RVAL(_SELF(self)->wclass);
+}
+static VALUE
+rg_set_wclass(VALUE self, VALUE val)
+{
+    _SELF(self)->wclass = RVAL2GDKWINDOWWINDOWCLASS(val);
+    return self;
+}
+
+static VALUE
+rg_visual(VALUE self)
+{
+    return GOBJ2RVAL(_SELF(self)->visual);
+}
+static VALUE
+rg_set_visual(VALUE self, VALUE val)
+{
+    _SELF(self)->visual = RVAL2GDKVISUAL(val);
+    return self;
+}
+
+static VALUE
+rg_window_type(VALUE self)
+{
+    return GDKWINDOWTYPE2RVAL(_SELF(self)->window_type);
+}
+static VALUE
+rg_set_window_type(VALUE self, VALUE val)
+{
+    _SELF(self)->window_type = RVAL2GDKWINDOWTYPE(val);
+    return self;
+}
+
+static VALUE
+rg_cursor(VALUE self)
+{
+    return GDKCURSOR2RVAL(_SELF(self)->cursor);
+}
+static VALUE
+rg_set_cursor(VALUE self, VALUE val)
+{
+    _SELF(self)->cursor = RVAL2GDKCURSOR(val);
+    return self;
+}
+
+ATTR_STR(wmclass_name);
+ATTR_STR(wmclass_class);
+
+static VALUE
+rg_override_redirect(VALUE self)
+{
+    return CBOOL2RVAL(_SELF(self)->override_redirect);
+}
+static VALUE
+rg_set_override_redirect(VALUE self, VALUE val)
+{
+    _SELF(self)->override_redirect = RVAL2CBOOL(val);
+    return self;
+}
+
+void 
+Init_gdk_windowattr(VALUE mGdk)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_WINDOW_ATTR, "WindowAttr", mGdk);
+
+    RG_DEF_METHOD(initialize, 4);
+    rbg_define_method(RG_TARGET_NAMESPACE, "title", attr_get_title, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_title", attr_set_title, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "event_mask", attr_get_event_mask, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_event_mask", attr_set_event_mask, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "x", attr_get_x, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_x", attr_set_x, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "y", attr_get_y, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_y", attr_set_y, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "width", attr_get_width, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_width", attr_set_width, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "height", attr_get_height, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_height", attr_set_height, 1);
+    RG_DEF_METHOD(wclass, 0);
+    RG_DEF_METHOD(set_wclass, 1);
+    RG_DEF_METHOD(visual, 0);
+    RG_DEF_METHOD(set_visual, 1);
+    RG_DEF_METHOD(window_type, 0);
+    RG_DEF_METHOD(set_window_type, 1);
+    RG_DEF_METHOD(cursor, 0);
+    RG_DEF_METHOD(set_cursor, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "wmclass_name", attr_get_wmclass_name, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_wmclass_name", attr_set_wmclass_name, 1);
+    rbg_define_method(RG_TARGET_NAMESPACE, "wmclass_class", attr_get_wmclass_class, 0);
+    rbg_define_method(RG_TARGET_NAMESPACE, "set_wmclass_class", attr_set_wmclass_class, 1);
+    RG_DEF_METHOD(override_redirect, 0);
+    RG_DEF_METHOD(set_override_redirect, 1);
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11.c
new file mode 100644
index 0000000..8a7bc2d
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11.c
@@ -0,0 +1,102 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2005  Masao Mutoh
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+#ifdef GDK_WINDOWING_X11
+
+#define RG_TARGET_NAMESPACE mGdkX11
+
+/* deprecated
+static VALUE
+rg_s_xid_table_lookup(int argc, VALUE *argv, VALUE self)
+{
+    VALUE arg[2];
+    GdkPixmap* win = NULL;
+
+    rb_scan_args(argc, argv, "11", &arg[0], &arg[1]);
+
+    switch(argc)
+    {
+      case 1:
+        win = gdk_xid_table_lookup(NUM2UINT(arg[0]));
+        break;
+      case 2:
+        win = gdk_xid_table_lookup_for_display(RVAL2GOBJ(arg[0]), NUM2UINT(arg[1])); 
+        break;
+    }
+    if (win == NULL)
+        return Qnil;
+    else {
+        return GOBJ2RVAL(win);
+    }
+}
+*/
+
+/* deprecated
+static VALUE
+rg_s_net_wm_supports_p(VALUE self, VALUE property)
+{
+    return CBOOL2RVAL(gdk_net_wm_supports(RVAL2ATOM(property)));
+}
+*/
+
+static VALUE
+rg_s_default_screen(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(gdk_x11_get_default_screen());
+}
+
+static VALUE
+rg_s_grab_server(G_GNUC_UNUSED VALUE self)
+{
+    gdk_x11_grab_server();
+    return Qnil;
+}
+
+static VALUE
+rg_s_ungrab_server(G_GNUC_UNUSED VALUE self)
+{
+    gdk_x11_ungrab_server();
+    return Qnil;
+}
+#endif
+
+void
+Init_gdkx11(void)
+{
+#ifdef GDK_WINDOWING_X11
+    VALUE RG_TARGET_NAMESPACE = rb_define_module("GdkX11");
+
+/* deprecated
+    RG_DEF_SMETHOD(xid_table_lookup, -1);
+*/
+/* deprecated
+    RG_DEF_SMETHOD_P(net_wm_supports, 1);
+*/
+
+    RG_DEF_SMETHOD(default_screen, 0);
+    RG_DEF_SMETHOD(grab_server, 0);
+
+    RG_DEF_SMETHOD(ungrab_server, 0);
+
+    Init_gdkx11_x11window(RG_TARGET_NAMESPACE);
+#endif
+}
diff --git a/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11x11window.c b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11x11window.c
new file mode 100644
index 0000000..1d09d0f
--- /dev/null
+++ b/gdk3-no-gi/ext/gdk3-no-gi/rbgdkx11x11window.c
@@ -0,0 +1,66 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgdk3private.h"
+
+#ifdef GDK_WINDOWING_X11
+#define RG_TARGET_NAMESPACE cX11Window
+#define _SELF(self) (RVAL2GDKX11WINDOW(self))
+
+static VALUE
+rg_xid(VALUE self)
+{
+    return ULONG2NUM(gdk_x11_window_get_xid(_SELF(self)));
+}
+
+static VALUE
+rg_move_to_current_desktop(VALUE self)
+{
+    gdk_x11_window_move_to_current_desktop(_SELF(self));
+
+    return self;
+}
+
+static VALUE
+rg_server_time(VALUE self)
+{
+    return UINT2NUM(gdk_x11_get_server_time(_SELF(self)));
+}
+
+static VALUE
+rg_set_user_time(VALUE self, VALUE time)
+{
+    gdk_x11_window_set_user_time(_SELF(self), NUM2UINT(time));
+    return Qnil;
+}
+#endif
+
+void
+Init_gdkx11_x11window(VALUE mGdkX11)
+{
+#ifdef GDK_WINDOWING_X11
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_X11_WINDOW, "X11Window", mGdkX11);
+
+    RG_DEF_METHOD(xid, 0);
+    RG_DEF_METHOD(move_to_current_desktop, 0);
+    RG_DEF_METHOD(server_time, 0);
+    RG_DEF_METHOD(set_user_time, 1);
+#endif
+}
diff --git a/gdk3-no-gi/extconf.rb b/gdk3-no-gi/extconf.rb
new file mode 100755
index 0000000..13e3d2c
--- /dev/null
+++ b/gdk3-no-gi/extconf.rb
@@ -0,0 +1,49 @@
+#!/usr/bin/env ruby
+
+require 'pathname'
+require 'mkmf'
+require 'rbconfig'
+require 'fileutils'
+
+package = "gdk3-no-gi"
+
+base_dir = Pathname(__FILE__).dirname.expand_path
+ext_dir = base_dir + "ext" + package
+mkmf_gnome2_dir = base_dir + 'lib'
+
+ruby = File.join(RbConfig::CONFIG['bindir'],
+                 RbConfig::CONFIG['ruby_install_name'] +
+                 RbConfig::CONFIG["EXEEXT"])
+
+build_dir = Pathname("ext") + package
+FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
+extconf_rb_path = ext_dir + "extconf.rb"
+system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
+
+create_makefile(package)
+FileUtils.mv("Makefile", "Makefile.lib")
+
+File.open("Makefile", "w") do |makefile|
+  makefile.puts(<<-EOM)
+all:
+	(cd ext/#{package} && $(MAKE))
+	$(MAKE) -f Makefile.lib
+
+install:
+	(cd ext/#{package} && $(MAKE) install)
+	$(MAKE) -f Makefile.lib install
+
+site-install:
+	(cd ext/#{package} && $(MAKE) site-install)
+	$(MAKE) -f Makefile.lib site-install
+
+clean:
+	(cd ext/#{package} && $(MAKE) clean)
+	$(MAKE) -f Makefile.lib clean
+
+distclean:
+	(cd ext/#{package} && $(MAKE) distclean)
+	$(MAKE) -f Makefile.lib distclean
+	@rm -f Makefile.lib
+EOM
+end
diff --git a/gdk3-no-gi/lib/gdk3.rb b/gdk3-no-gi/lib/gdk3.rb
new file mode 100644
index 0000000..eb8859e
--- /dev/null
+++ b/gdk3-no-gi/lib/gdk3.rb
@@ -0,0 +1,3 @@
+require 'gdk3/base'
+require 'gdk3/deprecated'
+
diff --git a/gdk3-no-gi/lib/gdk3/base.rb b/gdk3-no-gi/lib/gdk3/base.rb
new file mode 100644
index 0000000..0847eb9
--- /dev/null
+++ b/gdk3-no-gi/lib/gdk3/base.rb
@@ -0,0 +1,59 @@
+=begin
+  Copyright (c) 2006-2011 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require 'glib2'
+require 'pango'
+require 'gdk_pixbuf2'
+
+base_dir = Pathname.new(__FILE__).dirname.dirname.dirname.expand_path
+vendor_dir = base_dir + "vendor" + "local"
+vendor_bin_dir = vendor_dir + "bin"
+GLib.prepend_dll_path(vendor_bin_dir)
+begin
+  major, minor, _ = RUBY_VERSION.split(/\./)
+  require "#{major}.#{minor}/gdk3.so"
+rescue LoadError
+  require "gdk3.so"
+end
+
+if vendor_dir.exist?
+  begin
+    require "gobject-introspection"
+    vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
+    GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
+  rescue LoadError
+  end
+end
+
+module Gdk
+  LOG_DOMAIN = "Gdk"
+end
+
+if Gdk.cairo_available?
+  module Cairo
+    class Context
+      if method_defined?(:set_source_color)
+        alias_method :set_source_not_gdk_color, :set_source_color
+        def set_source_color(color)
+          if color.is_a?(Gdk::Color)
+            set_source_gdk_color(color)
+          else
+            set_source_not_gdk_color(color)
+          end
+        end
+      else
+        alias_method :set_source_color, :set_source_gdk_color
+      end
+
+      def source_color=(color)
+        set_source_color(color)
+        color
+      end
+    end
+  end
+end
+
+GLib::Log.set_log_domain(Gdk::LOG_DOMAIN)
+
diff --git a/gdk3-no-gi/lib/gdk3/deprecated.rb b/gdk3-no-gi/lib/gdk3/deprecated.rb
new file mode 100644
index 0000000..ee64152
--- /dev/null
+++ b/gdk3-no-gi/lib/gdk3/deprecated.rb
@@ -0,0 +1,165 @@
+module Gdk
+  extend GLib::Deprecatable
+  define_deprecated_enums :GrabStatus, 'GRAB'
+  define_deprecated_enums :Status
+  define_deprecated_const :Image, :raise => "Use 'Gdk::Pixbuf' or 'Cairo::Surface' instead."
+  define_deprecated_const :Colormap, :raise => "Use 'Gdk::Visual' instead."
+  define_deprecated_const :Input, :raise => "Use 'GLib::IOChannel' instead."
+  define_deprecated_const :X11, 'GdkX11'
+  define_deprecated_singleton_method :pointer_grab, :raise => "Use 'Gdk::Device#grab'."
+  define_deprecated_singleton_method :pointer_ungrab, :raise => "Use 'Gdk::Device#ungrab'."
+  define_deprecated_singleton_method :keyboard_grab, :raise => "Use 'Gdk::Device#grab'."
+  define_deprecated_singleton_method :keyboard_ungrab, :raise => "Use 'Gdk::Device#ungrab'."
+  define_deprecated_singleton_method :pointer_is_grabbed?, :raise => "Use 'Gdk::Display#device_is_grabbed?'."
+
+  class Cursor
+    extend GLib::Deprecatable
+    define_deprecated_enums :Type
+    define_deprecated_method :pixmap?, :warn => "Don't use this method." do |_self|
+      false
+    end
+  end
+
+  class Device
+    extend GLib::Deprecatable
+    define_deprecated_enums :AxisUse, 'AXIS'
+    define_deprecated_enums :ExtensionMode, 'EXTENSION_EVENTS'
+    define_deprecated_enums :InputMode, 'MODE'
+    define_deprecated_enums :InputSource, 'SOURCE'
+    define_deprecated_method :source, :input_source
+  end
+
+  class Display
+    extend GLib::Deprecatable
+    define_deprecated_method :double_click_time, :raise => "Don't use this method."
+    define_deprecated_method :double_click_distance, :raise => "Don't use this method."
+    define_deprecated_method :button_click_time, :raise => "Don't use this method."
+    define_deprecated_method :button_window, :raise => "Don't use this method."
+    define_deprecated_method :button_number, :raise => "Don't use this method."
+    define_deprecated_method :button_x, :raise => "Don't use this method."
+    define_deprecated_method :button_y, :raise => "Don't use this method."
+    define_deprecated_method :pointer, :raise => "Use 'Gdk::Device#get_position'."
+    define_deprecated_method :pointer_ungrab, :raise => "Use 'Gdk::Device#ungrab'."
+    define_deprecated_method :pointer_grabbed_p, :raise => "Use 'Gdk::Display#device_is_grabbed?'."
+    define_deprecated_method :window_at_pointer, :raise => "Use 'Gdk::Device#get_window_at_position'."
+    define_deprecated_method :warp_pointer, :raise => "Use 'Gdk::Device#warp'."
+    define_deprecated_method :devices, :raise => "Use 'Gdk::DeviceManager#devices'."
+  end
+
+  class DragContext
+    extend GLib::Deprecatable
+    define_deprecated_flags :Action, 'ACTION'
+    define_deprecated_enums :Protocol, 'PROTO'
+    define_deprecated_singleton_method :drag_begin, :warn => "Use 'Gdk::Window#drag_begin'." do |_self, window, targets|
+      window.drag_begin(targets)
+    end
+    define_deprecated_singleton_method :get_protocol, :raise => "Use 'Gdk::Window#drag_protocol'."
+    define_deprecated_method :initialize, :raise => "Use 'Gdk::Window#drag_begin'."
+    define_deprecated_method :action, :selected_action
+    define_deprecated_method :source?, :warn => "Don't use this method."
+    define_deprecated_method :start_time, :raise => "Don't use this method."
+  end
+
+  class Event
+    extend GLib::Deprecatable
+    define_deprecated_flags :Mask
+    define_deprecated_enums :Type
+  end
+
+  class EventCrossing
+    extend GLib::Deprecatable
+    define_deprecated_enums :Mode
+    define_deprecated_enums :NotifyType, 'NOTIFY'
+  end
+
+  class EventOwnerChange
+    extend GLib::Deprecatable
+    define_deprecated_enums :OwnerChange
+  end
+
+  class EventProperty
+    extend GLib::Deprecatable
+    define_deprecated_enums :State, 'PROPERTY'
+  end
+
+  class EventScroll
+    extend GLib::Deprecatable
+    define_deprecated_enums :Direction
+  end
+
+  class EventSetting
+    extend GLib::Deprecatable
+    define_deprecated_enums :Action, 'ACTION'
+  end
+
+  class EventVisibility
+    extend GLib::Deprecatable
+    define_deprecated_enums :State
+  end
+
+  class EventWindowState
+    extend GLib::Deprecatable
+    define_deprecated_flags :WindowState
+  end
+
+  module Keyval
+    extend GLib::Deprecatable
+    constants.each do |key|
+      define_deprecated_const key.to_s.sub(/^GDK_KEY_/, 'GDK_'), [self, key].join('::')
+    end
+  end
+
+  class Pixmap
+    extend GLib::Deprecatable
+    define_deprecated_method :initialize, :raise => "Use 'Gdk::Window#create_similar_surface'."
+    define_deprecated_singleton_method :create_from_data, :raise => "Use 'Cairo::ImageSurface.new'."
+    define_deprecated_singleton_method :create_from_xbm, :raise => "Use 'Cairo::ImageSurface.new'."
+    define_deprecated_singleton_method :create_from_xpm, :raise => "Use 'Gdk::Pixbuf.new'."
+    define_deprecated_singleton_method :create_from_xpm_d, :raise => "Use 'Gdk::Pixbuf.new'."
+    define_deprecated_singleton_method :colormap_create_from_xpm, :raise => "Use 'Gdk::Pixbuf.new'."
+    define_deprecated_singleton_method :colormap_create_from_xpm_d, :raise => "Use 'Gdk::Pixbuf.new'."
+    define_deprecated_singleton_method :foreign_new, :raise => "Don't use this method."
+    define_deprecated_singleton_method :lookup, :raise => "Don't use this method."
+  end
+
+  module Property
+    extend GLib::Deprecatable
+    define_deprecated_enums :PropMode, 'MODE'
+  end
+
+  class Visual
+    extend GLib::Deprecatable
+    define_deprecated_enums :ByteOrder
+    define_deprecated_enums :Type
+  end
+
+  class Window
+    extend GLib::Deprecatable
+    define_deprecated_flags :AttributesType, 'WA'
+    define_deprecated_enums :Edge, 'EDGE'
+    define_deprecated_enums :FilterReturn, 'FILTER'
+    define_deprecated_enums :Gravity, 'GRAVITY'
+    define_deprecated_flags :Hints, 'HINT'
+    define_deprecated_flags :ModifierType
+    define_deprecated_enums :Type
+    define_deprecated_enums :TypeHint, 'TYPE_HINT'
+    define_deprecated_enums :WindowClass
+    define_deprecated_flags :WMDecoration, 'DECOR'
+    define_deprecated_flags :WMFunction, 'FUNC'
+    define_deprecated_method :clear, :warn => "Don't use this method."
+    define_deprecated_method :clear_area, :warn => "Don't use this method."
+    define_deprecated_method :internal_paint_info, :raise => "Don't use this method."
+    define_deprecated_method :shape_combine_mask, :warn => "Don't use this method."
+    define_deprecated_method :input_shape_combine_mask, :warn => "Don't use this method."
+    define_deprecated_method :set_back_pixmap, :warn => "Don't use this method."
+    define_deprecated_singleton_method :at_pointer, :raise => "Use 'Gdk::Device#get_window_at_position'."
+    define_deprecated_method :pointer, :raise => "Use 'Gdk::Device#get_device_position'."
+  end
+
+  class WindowAttr
+    extend GLib::Deprecatable
+    define_deprecated_method :colormap, :raise => "Don't use this method."
+    define_deprecated_method :set_colormap, :warn => "Don't use this method."
+    alias :colormap= :set_colormap
+  end
+end
diff --git a/gdk3-no-gi/patches/gdk+-3.10.6-remove-def-use.diff b/gdk3-no-gi/patches/gdk+-3.10.6-remove-def-use.diff
new file mode 100644
index 0000000..8621a5d
--- /dev/null
+++ b/gdk3-no-gi/patches/gdk+-3.10.6-remove-def-use.diff
@@ -0,0 +1,106 @@
+diff -ru gtk+-3.10.6.orig/gdk/Makefile.am gtk+-3.10.6/gdk/Makefile.am
+--- gtk+-3.10.6.orig/gdk/Makefile.am	2013-12-05 12:17:39.000000000 +0900
++++ gtk+-3.10.6/gdk/Makefile.am	2013-12-25 23:10:14.691695701 +0900
+@@ -179,8 +179,8 @@
+ if USE_WIN32
+ libgdk_3_la_SOURCES += gdkkeynames.c
+ libgdk_3_la_LIBADD += win32/libgdk-win32.la
+-libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
+-libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
++libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o
++libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -no-undefined
+ endif # USE_WIN32
+ 
+ if USE_BROADWAY
+@@ -270,17 +270,6 @@
+ 
+ endif # HAVE_INTROSPECTION
+ 
+-if OS_WIN32
+-install-def-file: gdk.def
+-	mkdir -p $(DESTDIR)$(libdir)
+-	$(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-3.0.def
+-uninstall-def-file:
+-	-rm $(DESTDIR)$(libdir)/gdk-win32-3.0.def
+-else
+-install-def-file:
+-uninstall-def-file:
+-endif
+-
+ if MS_LIB_AVAILABLE
+ noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
+ 
+@@ -382,9 +371,9 @@
+ 
+ DISTCLEANFILES = gdkconfig.h stamp-gc-h
+ 
+-install-data-local: install-ms-lib install-def-file
++install-data-local: install-ms-lib
+ 
+-uninstall-local: uninstall-ms-lib uninstall-def-file
++uninstall-local: uninstall-ms-lib
+ 	rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
+ 
+ # if srcdir!=builddir, clean out maintainer-clean files from builddir
+diff -ru gtk+-3.10.6.orig/gtk/Makefile.am gtk+-3.10.6/gtk/Makefile.am
+--- gtk+-3.10.6.orig/gtk/Makefile.am	2013-12-05 12:51:06.000000000 +0900
++++ gtk+-3.10.6/gtk/Makefile.am	2013-12-25 23:10:26.047429593 +0900
+@@ -61,29 +61,18 @@
+ endif
+ 
+ if OS_WIN32
+-gtk_def = gtk.def
+-gtk_win32_symbols = -export-symbols $(srcdir)/gtk.def
+-
+ gtk_win32_res = gtk-win32-res.o
+ gtk_win32_res_ldflag = -Wl,gtk-win32-res.o
+ 
+ gtk-win32-res.o : gtk-win32.rc
+ 	$(WINDRES) gtk-win32.rc $@
+-
+-install-def-file: gtk.def
+-	$(INSTALL) $(srcdir)/gtk.def $(DESTDIR)$(libdir)/gtk-win32-3.0.def
+-uninstall-def-file:
+-	-rm $(DESTDIR)$(libdir)/gtk-win32-3.0.def
+-else
+-install-def-file:
+-uninstall-def-file:
+ endif
+ 
+ if MS_LIB_AVAILABLE
+ noinst_DATA = gtk-win32-$(GTK_API_VERSION).lib
+ 
+-gtk-win32-$(GTK_API_VERSION).lib: libgtk-win32-$(GTK_API_VERSION).la gtk.def
+-	lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgtk-win32-$(GTK_API_VERSION)- at LT_CURRENT_MINUS_AGE@.dll -def:gtk.def -out:$@
++gtk-win32-$(GTK_API_VERSION).lib: libgtk-win32-$(GTK_API_VERSION).la
++	lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgtk-win32-$(GTK_API_VERSION)- at LT_CURRENT_MINUS_AGE@.dll -out:$@
+ 
+ install-ms-lib:
+ 	$(INSTALL) gtk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
+@@ -1233,8 +1222,8 @@
+ if USE_WIN32
+ libgtk_3_la_LIBADD += -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32
+ libgtk_3_la_LDFLAGS += -Wl,-luuid
+-libgtk_3_la_DEPENDENCIES += $(gtk_def) $(gtk_win32_res) $(deps)
+-libgtk_target_ldflags = $(gtk_win32_res_ldflag) $(gtk_win32_symbols)
++libgtk_3_la_DEPENDENCIES += $(gtk_win32_res) $(deps)
++libgtk_target_ldflags = $(gtk_win32_res_ldflag)
+ endif
+ 
+ install-exec-hook:
+@@ -1286,13 +1275,13 @@
+ 	rm libgtk.vs10.sourcefiles.filters
+ 
+ # Install a RC file for the default GTK+ theme, and key themes
+-install-data-local: install-ms-lib install-def-file install-mac-key-theme
++install-data-local: install-ms-lib install-mac-key-theme
+ 	$(MKDIR_P) $(DESTDIR)$(datadir)/themes/Default/gtk-3.0
+ 	$(INSTALL_DATA) $(srcdir)/gtk-keys.css.default $(DESTDIR)$(datadir)/themes/Default/gtk-3.0/gtk-keys.css
+ 	$(MKDIR_P) $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0
+ 	$(INSTALL_DATA) $(srcdir)/gtk-keys.css.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0/gtk-keys.css
+ 
+-uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-mac-key-theme
++uninstall-local: uninstall-ms-lib uninstall-mac-key-theme
+ 	rm -f $(DESTDIR)$(datadir)/themes/Raleigh/gtk-3.0/gtk.css
+ 	rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-3.0/gtk-keys.css
+ 	rm -f $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0/gtk-keys.css
diff --git a/gdk3/test/gdk-test-utils.rb b/gdk3-no-gi/test/gdk-test-utils.rb
similarity index 100%
copy from gdk3/test/gdk-test-utils.rb
copy to gdk3-no-gi/test/gdk-test-utils.rb
diff --git a/gdk3-no-gi/test/run-test.rb b/gdk3-no-gi/test/run-test.rb
new file mode 100755
index 0000000..5da2ebe
--- /dev/null
+++ b/gdk3-no-gi/test/run-test.rb
@@ -0,0 +1,50 @@
+#!/usr/bin/env ruby
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
+ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
+
+glib_base = File.join(ruby_gnome2_base, "glib2")
+atk_base = File.join(ruby_gnome2_base, "atk")
+pango_base = File.join(ruby_gnome2_base, "pango")
+gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
+gdk3_no_gi_base = File.join(ruby_gnome2_base, "gdk3-no-gi")
+
+[[glib_base, "glib2"],
+ [atk_base, "atk"],
+ [pango_base, "pango"],
+ [gdk_pixbuf_base, "gdk_pixbuf2"],
+ [gdk3_no_gi_base, "gdk3-no-gi"]].each do |target, module_name|
+  if system("which make > /dev/null")
+    `make -C #{target.dump} > /dev/null` or exit(false)
+  end
+  $LOAD_PATH.unshift(File.join(target, "ext", module_name))
+  $LOAD_PATH.unshift(File.join(target, "lib"))
+end
+
+$LOAD_PATH.unshift(File.join(glib_base, "test"))
+require "glib-test-init"
+
+$LOAD_PATH.unshift(File.join(gdk3_no_gi_base, "test"))
+require "gdk-test-utils"
+
+require "gdk3"
+
+# TODO: workaround
+# exit Test::Unit::AutoRunner.run(true)
+exit true
diff --git a/gdk3-no-gi/test/test-gdk-color.rb b/gdk3-no-gi/test/test-gdk-color.rb
new file mode 100644
index 0000000..c7a347f
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-color.rb
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkColor < Test::Unit::TestCase
+  def test_to_s
+    color = Gdk::Color.new(0xffff, 0x1234, 0xabcd)
+    assert_equal("#ffff1234abcd", color.to_s)
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-event.rb b/gdk3-no-gi/test/test-gdk-event.rb
new file mode 100644
index 0000000..fb73e05
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-event.rb
@@ -0,0 +1,704 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkEvent < Test::Unit::TestCase
+  class TestConstant < self
+    def test_propagate
+      assert_false(Gdk::Event::PROPAGATE)
+    end
+
+    def test_stop
+      assert_true(Gdk::Event::STOP)
+    end
+  end
+
+  module TestAnyMethods
+    def test_window
+      assert_nil(event.window)
+    end
+
+    def test_send_event
+      assert_false(event.send_event?)
+    end
+  end
+
+  class TestAny < self
+    include TestAnyMethods
+
+    def setup
+      @event = Gdk::EventAny.new(:delete)
+    end
+
+    def event
+      @event
+    end
+
+    def test_delete
+      assert_equal("GDK_DELETE",
+                   Gdk::EventAny.new(:delete).event_type.name)
+    end
+
+    def test_destroy
+      assert_equal("GDK_DESTROY",
+                   Gdk::EventAny.new(:destroy).event_type.name)
+    end
+  end
+
+  class TestKey < self
+    include TestAnyMethods
+
+    def setup
+      @key = Gdk::EventKey.new(:key_press)
+    end
+
+    def event
+      @key
+    end
+
+    def test_key_press
+      assert_equal("GDK_KEY_PRESS",
+                   Gdk::EventKey.new(:key_press).event_type.name)
+    end
+
+    def test_key_release
+      assert_equal("GDK_KEY_RELEASE",
+                   Gdk::EventKey.new(:key_release).event_type.name)
+    end
+
+    def test_time
+      assert_kind_of(Integer, @key.time)
+    end
+
+    def test_state
+      assert_not_nil(@key.state)
+    end
+
+    def test_keyval
+      assert_kind_of(Integer, @key.keyval)
+    end
+  end
+
+  class TestButton < self
+    include TestAnyMethods
+
+    def setup
+      @button = Gdk::EventButton.new(:button_press)
+    end
+
+    def event
+      @button
+    end
+
+    def test_button_press
+      assert_equal("GDK_BUTTON_PRESS",
+                   Gdk::EventButton.new(:button_press).event_type.name)
+    end
+
+    def test_button2_press
+      assert_equal("GDK_2BUTTON_PRESS",
+                   Gdk::EventButton.new(:button2_press).event_type.name)
+    end
+
+    def test_button3_press
+      assert_equal("GDK_3BUTTON_PRESS",
+                   Gdk::EventButton.new(:button3_press).event_type.name)
+    end
+
+    def test_button_release
+      assert_equal("GDK_BUTTON_RELEASE",
+                   Gdk::EventButton.new(:button_release).event_type.name)
+    end
+
+    def test_time
+      assert_kind_of(Integer, @button.time)
+    end
+
+    def test_x
+      assert_kind_of(Float, @button.x)
+    end
+
+    def test_y
+      assert_kind_of(Float, @button.y)
+    end
+
+    def test_state
+      assert_not_nil(@button.state)
+    end
+
+    def test_button
+      assert_kind_of(Integer, @button.button)
+    end
+
+    def test_x_root
+      assert_kind_of(Float, @button.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Float, @button.y_root)
+    end
+  end
+
+  class TestTouch < self
+    include TestAnyMethods
+
+    def setup
+      @touch = Gdk::EventTouch.new(:touch_begin)
+    end
+
+    def event
+      @touch
+    end
+
+    def test_time
+      assert_kind_of(Integer, @touch.time)
+    end
+
+    def test_x
+      assert_kind_of(Float, @touch.x)
+    end
+
+    def test_y
+      assert_kind_of(Float, @touch.y)
+    end
+
+    def test_axes
+      assert_nothing_raised do
+        @touch.axes
+      end
+    end
+
+    def test_state
+      assert_not_nil(@touch.state)
+    end
+
+    def test_touch_begin
+      assert_equal("GDK_TOUCH_BEGIN",
+                   Gdk::EventTouch.new(:touch_begin).event_type.name)
+    end
+
+    def test_touch_update
+      assert_equal("GDK_TOUCH_UPDATE",
+                   Gdk::EventTouch.new(:touch_update).event_type.name)
+    end
+
+    def test_touch_cancel
+      assert_equal("GDK_TOUCH_CANCEL",
+                   Gdk::EventTouch.new(:touch_cancel).event_type.name)
+    end
+
+    def test_touch_end
+      assert_equal("GDK_TOUCH_END",
+                   Gdk::EventTouch.new(:touch_end).event_type.name)
+    end
+
+    def test_emulating_pointer
+      assert_nothing_raised do
+        @touch.emulating_pointer
+      end
+    end
+
+    def test_device
+      assert_nothing_raised do
+        @touch.device
+      end
+    end
+
+    def test_x_root
+      assert_kind_of(Float, @touch.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Float, @touch.y_root)
+    end
+  end
+
+  class TestScroll < self
+    include TestAnyMethods
+
+    def setup
+      @scroll = Gdk::EventScroll.new
+    end
+
+    def event
+      @scroll
+    end
+
+    def test_time
+      assert_kind_of(Integer, @scroll.time)
+    end
+
+    def test_x
+      assert_kind_of(Float, @scroll.x)
+    end
+
+    def test_y
+      assert_kind_of(Float, @scroll.y)
+    end
+
+    def test_state
+      assert_not_nil(@scroll.state)
+    end
+
+    def test_direction
+      assert_kind_of(Gdk::EventScroll::Direction, @scroll.direction)
+    end
+
+    def test_x_root
+      assert_kind_of(Float, @scroll.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Float, @scroll.y_root)
+    end
+  end
+
+  class TestMotion < self
+    include TestAnyMethods
+
+    def setup
+      @motion = Gdk::EventMotion.new
+    end
+
+    def event
+      @motion
+    end
+
+    def test_time
+      assert_kind_of(Integer, @motion.time)
+    end
+
+    def test_x
+      assert_kind_of(Float, @motion.x)
+    end
+
+    def test_y
+      assert_kind_of(Float, @motion.y)
+    end
+
+    def test_state
+      assert_not_nil(@motion.state)
+    end
+
+    def test_x_root
+      assert_kind_of(Float, @motion.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Float, @motion.y_root)
+    end
+
+    def test_request
+      assert_nothing_raised do
+        @motion.request
+      end
+    end
+  end
+
+  class TestVisibility < self
+    include TestAnyMethods
+
+    def setup
+      @visibility = Gdk::EventVisibility.new(:visibility_notify)
+    end
+
+    def event
+      @visibility
+    end
+
+    def test_state
+      assert_kind_of(Gdk::EventVisibility::State, @visibility.state)
+    end
+  end
+
+  class TestCrossing < self
+    include TestAnyMethods
+
+    def setup
+      @crossing = Gdk::EventCrossing.new(:enter_notify)
+    end
+
+    def event
+      @crossing
+    end
+
+    def test_enter_notify
+      assert_equal("GDK_ENTER_NOTIFY",
+                   Gdk::EventCrossing.new(:enter_notify).event_type.name)
+    end
+
+    def test_leave_notify
+      assert_equal("GDK_LEAVE_NOTIFY",
+                   Gdk::EventCrossing.new(:leave_notify).event_type.name)
+    end
+
+    def test_time
+      assert_kind_of(Integer, @crossing.time)
+    end
+
+    def test_x
+      # TODO: Is Float better?
+      assert_kind_of(Integer, @crossing.x)
+    end
+
+    def test_y
+      # TODO: Is Float better?
+      assert_kind_of(Integer, @crossing.y)
+    end
+
+    def test_x_root
+      assert_kind_of(Float, @crossing.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Float, @crossing.y_root)
+    end
+
+    def test_mode
+      assert_kind_of(Gdk::EventCrossing::Mode, @crossing.mode)
+    end
+
+    def test_detail
+      assert_not_nil(@crossing.detail)
+    end
+
+    def test_state
+      assert_not_nil(@crossing.state)
+    end
+  end
+
+  class TestFocus < self
+    include TestAnyMethods
+
+    def setup
+      @focus = Gdk::EventFocus.new
+    end
+
+    def event
+      @focus
+    end
+
+    def test_in
+      assert_false(@focus.in?)
+    end
+  end
+
+  class TestConfigure < self
+    include TestAnyMethods
+
+    def setup
+      @configure = Gdk::EventConfigure.new
+    end
+
+    def event
+      @configure
+    end
+
+    def test_x
+      assert_kind_of(Integer, @configure.x)
+    end
+
+    def test_y
+      assert_kind_of(Integer, @configure.y)
+    end
+
+    def test_width
+      assert_kind_of(Integer, @configure.width)
+    end
+
+    def test_height
+      assert_kind_of(Integer, @configure.height)
+    end
+  end
+
+  class TestProperty < self
+    include TestAnyMethods
+
+    def setup
+      @property = Gdk::EventProperty.new
+    end
+
+    def event
+      @property
+    end
+
+    def test_atom
+      assert_nothing_raised do
+        @property.atom
+      end
+    end
+
+    def test_time
+      assert_kind_of(Integer, @property.time)
+    end
+
+    def test_state
+      assert_equal(Gdk::EventProperty::State::NEW_VALUE, @property.state)
+    end
+  end
+
+  class TestSelection < self
+    include TestAnyMethods
+
+    def setup
+      @selection = Gdk::EventSelection.new(:selection_clear)
+    end
+
+    def event
+      @selection
+    end
+
+    def test_selection_clear
+      assert_equal("GDK_SELECTION_CLEAR",
+                   Gdk::EventSelection.new(:selection_clear).event_type.name)
+    end
+
+    def test_selection_notify
+      assert_equal("GDK_SELECTION_NOTIFY",
+                   Gdk::EventSelection.new(:selection_notify).event_type.name)
+    end
+
+    def test_selection_request
+      assert_equal("GDK_SELECTION_REQUEST",
+                   Gdk::EventSelection.new(:selection_request).event_type.name)
+    end
+
+    def test_selection
+      assert_nothing_raised do
+        @selection.selection
+      end
+    end
+
+    def test_target
+      assert_nothing_raised do
+        @selection.target
+      end
+    end
+
+    def test_property
+      assert_nothing_raised do
+        @selection.property
+      end
+    end
+
+    def test_time
+      assert_kind_of(Integer, @selection.time)
+    end
+  end
+
+  class TestDND < self
+    include TestAnyMethods
+
+    def setup
+      @dnd = Gdk::EventDND.new(:drag_enter)
+    end
+
+    def event
+      @dnd
+    end
+
+    def test_drag_enter
+      assert_equal("GDK_DRAG_ENTER",
+                   Gdk::EventDND.new(:drag_enter).event_type.name)
+    end
+
+    def test_drag_leave
+      assert_equal("GDK_DRAG_LEAVE",
+                   Gdk::EventDND.new(:drag_leave).event_type.name)
+    end
+
+    def test_drag_motion
+      assert_equal("GDK_DRAG_MOTION",
+                   Gdk::EventDND.new(:drag_motion).event_type.name)
+    end
+
+    def test_drag_status
+      assert_equal("GDK_DRAG_STATUS",
+                   Gdk::EventDND.new(:drag_status).event_type.name)
+    end
+
+    def test_drop_start
+      assert_equal("GDK_DROP_START",
+                   Gdk::EventDND.new(:drop_start).event_type.name)
+    end
+
+    def test_drop_finished
+      assert_equal("GDK_DROP_FINISHED",
+                   Gdk::EventDND.new(:drop_finished).event_type.name)
+    end
+
+    def test_context
+      assert_nothing_raised do
+        @dnd.context
+      end
+    end
+
+    def test_time
+      assert_kind_of(Integer, @dnd.time)
+    end
+
+    def test_x_root
+      assert_kind_of(Integer, @dnd.x_root)
+    end
+
+    def test_y_root
+      assert_kind_of(Integer, @dnd.y_root)
+    end
+  end
+
+  class TestProximity < self
+    include TestAnyMethods
+
+    def setup
+      @proximity = Gdk::EventProximity.new(:proximity_in)
+    end
+
+    def event
+      @proximity
+    end
+
+    def test_proximity_in
+      assert_equal("GDK_PROXIMITY_IN",
+                   Gdk::EventProximity.new(:proximity_in).event_type.name)
+    end
+
+    def test_proximity_out
+      assert_equal("GDK_PROXIMITY_OUT",
+                   Gdk::EventProximity.new(:proximity_out).event_type.name)
+    end
+
+    def test_time
+      assert_kind_of(Integer, @proximity.time)
+    end
+
+    def test_device
+      assert_nothing_raised do
+        @proximity.device
+      end
+    end
+  end
+
+  class TestWindowState < self
+    include TestAnyMethods
+
+    def setup
+      @window_state = Gdk::EventWindowState.new
+    end
+
+    def event
+      @window_state
+    end
+
+    def test_changed_mask
+      assert_nothing_raised do
+        @window_state.changed_mask
+      end
+    end
+
+    def test_new_window_state
+      assert_nothing_raised do
+        @window_state.new_window_state
+      end
+    end
+  end
+
+  class TestSetting < self
+    include TestAnyMethods
+
+    def setup
+      @setting = Gdk::EventSetting.new
+    end
+
+    def event
+      @setting
+    end
+
+    def test_action
+      assert_nothing_raised do
+        @setting.action
+      end
+    end
+
+    def test_name
+      assert_nothing_raised do
+        @setting.name
+      end
+    end
+  end
+
+  class TestOwnerChange < self
+    def setup
+      @owner_change = Gdk::EventOwnerChange.new
+    end
+
+    def event
+      @owner_change
+    end
+
+    def test_owner
+      assert_nothing_raised do
+        @owner_change.owner
+      end
+    end
+
+    def test_reason
+      assert_nothing_raised do
+        @owner_change.reason
+      end
+    end
+
+    def test_selection
+      assert_nothing_raised do
+        @owner_change.selection
+      end
+    end
+
+    def test_time
+      assert_kind_of(Integer, @owner_change.time)
+    end
+
+    def test_selection_time
+      assert_kind_of(Integer, @owner_change.selection_time)
+    end
+  end
+
+  class TestGrabBroken < self
+    include TestAnyMethods
+
+    def setup
+      @grab_broken = Gdk::EventGrabBroken.new
+    end
+
+    def event
+      @grab_broken
+    end
+
+    def test_keyboard
+      assert_boolean(@grab_broken.keyboard?)
+    end
+
+    def test_implicit
+      assert_boolean(@grab_broken.implicit?)
+    end
+
+    def test_grab_window
+      assert_nothing_raised do
+        @grab_broken.grab_window
+      end
+    end
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-geometry.rb b/gdk3-no-gi/test/test-gdk-geometry.rb
new file mode 100644
index 0000000..087dbbf
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-geometry.rb
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkGeometry < Test::Unit::TestCase
+  def test_min_width
+    geometry = Gdk::Geometry.new
+    assert_equal(0, geometry.min_width)
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-pixbuf.rb b/gdk3-no-gi/test/test-gdk-pixbuf.rb
new file mode 100644
index 0000000..99299d1
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-pixbuf.rb
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkPixbuf < Test::Unit::TestCase
+  def test_from_window
+    gdk_window = Gdk::Window.default_root_window
+    src_x = 0
+    src_y = 0
+    width = 0
+    height = 0
+
+    assert_nothing_raised do
+      Gdk::Pixbuf.from_window(gdk_window,
+                              src_x,
+                              src_y,
+                              width,
+                              height)
+    end
+  end
+
+  def test_from_surface
+    surface = Cairo::ImageSurface.new(:argb32, 290, 200)
+    src_x = 0
+    src_y = 0
+    width = 290
+    height = 200
+
+    pixbuf = Gdk::Pixbuf.from_surface(surface,
+                                      src_x,
+                                      src_y,
+                                      width,
+                                      height)
+
+    assert_kind_of(Gdk::Pixbuf, pixbuf)
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-rectangle.rb b/gdk3-no-gi/test/test-gdk-rectangle.rb
new file mode 100644
index 0000000..8c0548e
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-rectangle.rb
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkRectangle < Test::Unit::TestCase
+  def test_width
+    rectangle = Gdk::Rectangle.new(0, 10, 20, 30)
+    assert_equal(20, rectangle.width)
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-rgba.rb b/gdk3-no-gi/test/test-gdk-rgba.rb
new file mode 100644
index 0000000..8ab33cf
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-rgba.rb
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkRGBA < Test::Unit::TestCase
+  def test_to_s
+    rgba = Gdk::RGBA.new(0.2, 0.4, 0.6, 0.5)
+    assert_equal("rgba(51,102,153,0.5)", rgba.to_s)
+  end
+end
diff --git a/gdk3-no-gi/test/test-gdk-window-attr.rb b/gdk3-no-gi/test/test-gdk-window-attr.rb
new file mode 100644
index 0000000..8678eec
--- /dev/null
+++ b/gdk3-no-gi/test/test-gdk-window-attr.rb
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkWindowAttr < Test::Unit::TestCase
+  include GdkTestUtils
+
+  def test_initialize
+    attrs = Gdk::WindowAttr.new(100, 100, :input_only, :temp)
+    assert_equal([
+                   100,
+                   100,
+                   Gdk::Window::WindowClass::INPUT_ONLY,
+                   Gdk::Window::Type::TEMP,
+                 ],
+                 [attrs.width, attrs.height, attrs.wclass, attrs.window_type])
+  end
+end
diff --git a/gdk3/Rakefile b/gdk3/Rakefile
index d9fd146..a8d0f12 100644
--- a/gdk3/Rakefile
+++ b/gdk3/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -44,16 +44,31 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
   ]
   package.external_packages = [
     {
+      :name => "libepoxy",
+      :download_base_url => "https://github.com/anholt/libepoxy/releases/download/v1.3.1",
+      :label => "Epoxy",
+      :version => "1.3.1",
+      :compression_method => "bz2",
+      :windows => {
+        :configure_args => [
+        ],
+        :built_file => "bin/libepoxy-0.dll",
+      },
+    },
+    {
       :name => "gtk+",
       :download_site => :gnome,
       :label => "GTK+",
-      :version => "3.14.6",
+      :version => "3.16.6",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--enable-introspection",
           "--with-included-immodules",
         ],
+        :patches => [
+          "gtk+-3.16.6-add-missing-exeext.diff",
+        ],
         :need_autoreconf => true,
         :build_concurrently => false,
         :built_file => "bin/libgdk-3-0.dll",
@@ -63,7 +78,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "adwaita-icon-theme",
       :download_site => :gnome,
       :label => "adwaita-icon-theme",
-      :version => "3.14.1",
+      :version => "3.16.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => [],
diff --git a/gdk3/lib/gdk3.rb b/gdk3/lib/gdk3.rb
index d7f5797..8020b31 100644
--- a/gdk3/lib/gdk3.rb
+++ b/gdk3/lib/gdk3.rb
@@ -53,6 +53,9 @@ module Gdk
       end
       loader = Loader.new(self)
       loader.load("Gdk")
+      if Object.const_defined?(:Gtk) and Gtk.respond_to?(:init)
+        Gtk.init
+      end
     end
 
     def cairo_available?
diff --git a/gdk3/lib/gdk3/cursor.rb b/gdk3/lib/gdk3/cursor.rb
new file mode 100644
index 0000000..5ff1be3
--- /dev/null
+++ b/gdk3/lib/gdk3/cursor.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gdk
+  class Cursor
+    alias_method :initialize_raw, :initialize
+    def initialize(*args)
+      if args.last.is_a?(Hash)
+        options = args.pop
+      else
+        options = {}
+      end
+      display = options[:display] || Display.default
+
+      initialize_raw(display, *args)
+    end
+  end
+end
diff --git a/gdk3/lib/gdk3/deprecated.rb b/gdk3/lib/gdk3/deprecated.rb
index e49ee3e..b72d797 100644
--- a/gdk3/lib/gdk3/deprecated.rb
+++ b/gdk3/lib/gdk3/deprecated.rb
@@ -9,7 +9,7 @@ module Gdk
 
   class Cursor
     extend GLib::Deprecatable
-    define_deprecated_enums :Type
+    define_deprecated_enums :CursorType
     define_deprecated_method :pixmap?, :warn => "Don't use this method." do |_self|
       false
     end
@@ -21,7 +21,14 @@ module Gdk
   class Device
     extend GLib::Deprecatable
     define_deprecated_enums :AxisUse, 'AXIS'
-    define_deprecated_enums :ExtensionMode, 'EXTENSION_EVENTS'
+    define_deprecated_const "EXTENSION_EVENTS_NONE",
+                            :raise => "No longer available in GDK3."
+    define_deprecated_const "EXTENSION_EVENTS_ALL",
+                            :raise => "No longer available in GDK3."
+    define_deprecated_const "EXTENSION_EVENTS_CURSOR",
+                            :raise => "No longer available in GDK3."
+    define_deprecated_const "ExtensionMode",
+                            :raise => "No longer available in GDK3."
     define_deprecated_enums :InputMode, 'MODE'
     define_deprecated_enums :InputSource, 'SOURCE'
   end
@@ -39,8 +46,10 @@ module Gdk
 
   class DragContext
     extend GLib::Deprecatable
-    define_deprecated_flags :Action, 'ACTION'
-    define_deprecated_enums :Protocol, 'PROTO'
+    define_deprecated_flags :DragAction, 'ACTION'
+    define_deprecated_const :Action, "Gdk::DragAction"
+    define_deprecated_enums :DragProtocol, 'PROTO'
+    define_deprecated_const :Protocol, "Gdk::DragProtocol"
     define_deprecated_singleton_method :drag_begin, :warn => "Use 'Gdk::Window#drag_begin'." do |_self, window, targets|
       window.drag_begin(targets)
     end
@@ -53,13 +62,19 @@ module Gdk
 
   class Event
     extend GLib::Deprecatable
+
+    define_deprecated_const :CURRENT_TIME, "Gdk::CURRENT_TIME"
+
     define_deprecated_const :Mask, "Gdk::EventMask"
+    define_deprecated_enums "Gdk::EventMask"
+
     define_deprecated_const :Type, "Gdk::EventType"
+    define_deprecated_enums "Gdk::EventType"
   end
 
   class EventCrossing
     extend GLib::Deprecatable
-    define_deprecated_enums :Mode
+    define_deprecated_enums :CrossingMode
     define_deprecated_enums :NotifyType, 'NOTIFY'
   end
 
@@ -70,22 +85,23 @@ module Gdk
 
   class EventProperty
     extend GLib::Deprecatable
-    define_deprecated_enums :State, 'PROPERTY'
+    define_deprecated_enums :PropertyState, 'PROPERTY'
   end
 
   class EventScroll
     extend GLib::Deprecatable
-    define_deprecated_enums :Direction
+    define_deprecated_enums :ScrollDirection
   end
 
   class EventSetting
     extend GLib::Deprecatable
-    define_deprecated_enums :Action, 'ACTION'
+    define_deprecated_enums :SettingAction, 'ACTION'
   end
 
   class EventVisibility
     extend GLib::Deprecatable
-    define_deprecated_enums :State
+    define_deprecated_enums :VisibilityState
+    define_deprecated_const :State, "Gdk::VisibilityState"
   end
 
   class EventWindowState
@@ -126,24 +142,35 @@ module Gdk
   class Visual
     extend GLib::Deprecatable
     define_deprecated_enums :ByteOrder
-    define_deprecated_enums :Type
+    define_deprecated_enums :VisualType
+    define_deprecated_const :Type, "Gdk::VisualType"
   end
 
   class Window
     extend GLib::Deprecatable
 
     define_deprecated_const :Gravity, "Gdk::Gravity"
+    define_deprecated_enums "Gdk::Gravity"
     define_deprecated_const :AttributesType, "Gdk::WindowAttributesType"
+    define_deprecated_enums "Gdk::WindowAttributesType"
     define_deprecated_const :Edge, "Gdk::WindowEdge"
+    define_deprecated_enums "Gdk::WindowEdge"
     define_deprecated_const :FilterReturn, "Gdk::FilterReturn"
+    define_deprecated_enums "Gdk::FilterReturn"
     define_deprecated_const :Hints, "Gdk::WindowHints"
+    define_deprecated_enums "Gdk::WindowHints"
     define_deprecated_const :ModifierType, "Gdk::ModifierType"
+    define_deprecated_enums "Gdk::ModifierType"
     define_deprecated_const :Type, "Gdk::WindowType"
+    define_deprecated_enums "Gdk::WindowType"
     define_deprecated_const :TypeHint, "Gdk::WindowTypeHint"
-    define_deprecated_const :WindowClass, "Gdk::WindowWindowClass"
+    define_deprecated_enums "Gdk::WindowTypeHint"
     define_deprecated_const :Class, "Gdk::WindowWindowClass"
+    define_deprecated_enums "Gdk::WindowWindowClass"
     define_deprecated_const :WMDecoration, "Gdk::WMDecoration"
+    define_deprecated_enums "Gdk::WMDecoration"
     define_deprecated_const :WMFunction, "Gdk::WMFunction"
+    define_deprecated_enums "Gdk::WMFunction"
     define_deprecated_const :PARENT_RELATIVE, "Gdk::PARENT_RELATIVE"
     define_deprecated_method :clear, :warn => "Don't use this method."
     define_deprecated_method :clear_area, :warn => "Don't use this method."
@@ -151,6 +178,9 @@ module Gdk
     define_deprecated_method :shape_combine_mask, :warn => "Don't use this method."
     define_deprecated_method :input_shape_combine_mask, :warn => "Don't use this method."
     define_deprecated_method :set_back_pixmap, :warn => "Don't use this method."
+    define_deprecated_method :size, :warn => "Use #width and #height instead." do |_self|
+      [_self.width, _self.height]
+    end
   end
 
   class WindowAttr
diff --git a/gdk3/lib/gdk3/loader.rb b/gdk3/lib/gdk3/loader.rb
index a04cfc6..43f5d57 100644
--- a/gdk3/lib/gdk3/loader.rb
+++ b/gdk3/lib/gdk3/loader.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,12 +29,9 @@ module Gdk
       @event_motion_class ||= @base_module.const_get(:EventMotion)
     end
 
-    def rectangle_class
-      @rectangle_class ||= @base_module.const_get(:Rectangle)
-    end
-
     def pre_load(repository, namespace)
       setup_pending_constants
+      setup_pending_rectangle_functions
       define_keyval_module
       define_selection_module
       load_cairo_rectangle_int
@@ -56,6 +53,7 @@ module Gdk
                                       "Rectangle",
                                       @base_module,
                                       :size => info.size)
+      @rectangle_class = klass
       load_fields(info, klass)
       load_methods(info, klass)
     end
@@ -72,11 +70,18 @@ module Gdk
 
     def post_load(repository, namespace)
       apply_pending_constants
+      apply_pending_rectangle_functions
       require_libraries
       convert_event_classes
       define_selection_constants
     end
 
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+
     def setup_pending_constants
       @pending_constants = []
     end
@@ -90,12 +95,32 @@ module Gdk
       end
     end
 
+    def setup_pending_rectangle_functions
+      @pending_rectangle_get_type_function = nil
+      @pending_rectangle_functions = []
+    end
+
+    def apply_pending_rectangle_functions
+      get_type_info = @pending_rectangle_get_type_function
+      gtype = get_type_info.invoke({:arguments => []})
+      self.class.register_boxed_class_converter(gtype) do |rectangle|
+        @rectangle_class
+      end
+
+      @pending_rectangle_functions.each do |info|
+        name = info.name
+        define_method(info, @rectangle_class, name.gsub(/\Arectangle_/, ""))
+      end
+    end
+
     def require_libraries
       require "gdk3/atom"
       require "gdk3/color"
+      require "gdk3/cursor"
       require "gdk3/event"
       require "gdk3/rectangle"
       require "gdk3/rgba"
+      require "gdk3/screen"
       require "gdk3/window"
       require "gdk3/window-attr"
 
@@ -167,18 +192,19 @@ module Gdk
         "TYPE_STRING"     => "STRING",
       }
       selections.each do |key, value|
-        # TODO: Gdk::Atom.intern is not working yet.
-        #@selection_module.const_set(key, Gdk::Atom.intern(value))
+        @selection_module.const_set(key, Gdk::Atom.intern(value))
       end
     end
 
     def load_function_info(info)
       name = info.name
       case name
+      when "rectangle_get_type"
+        @pending_rectangle_get_type_function = info
+      when /\Arectangle_/
+        @pending_rectangle_functions << info
       when "init", /_get_type\z/
         # ignore
-      when /\Arectangle_/
-        define_method(info, rectangle_class, $POSTMATCH)
       when /\Apixbuf_/
         target_class = nil
         case $POSTMATCH
@@ -220,6 +246,10 @@ module Gdk
         end
       when /\Akeyval_/
         name = rubyish_method_name(info, :prefix => "keyval_")
+        case name
+        when "name"
+          name = "to_name"
+        end
         define_module_function(@keyval_module, name, info)
       else
         super
diff --git a/gdk3/lib/gdk3/rectangle.rb b/gdk3/lib/gdk3/rectangle.rb
index b21b827..0252757 100644
--- a/gdk3/lib/gdk3/rectangle.rb
+++ b/gdk3/lib/gdk3/rectangle.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -34,5 +34,21 @@ module Gdk
         nil
       end
     end
+
+    def inspect
+      super.gsub(/>\z/) do
+        " x=#{x.inspect} y=#{y.inspect} " +
+          "width=#{width.inspect} height=#{height.inspect}>"
+      end
+    end
+
+    def to_a
+      [x, y, width, height]
+    end
+
+    def ==(other)
+      other.is_a?(self.class) and
+        self.to_a == other.to_a
+    end
   end
 end
diff --git a/gdk3/lib/gdk3/rgba.rb b/gdk3/lib/gdk3/rgba.rb
index b278100..05db7b9 100644
--- a/gdk3/lib/gdk3/rgba.rb
+++ b/gdk3/lib/gdk3/rgba.rb
@@ -16,13 +16,34 @@
 
 module Gdk
   class RGBA
+    class << self
+      def parse(spec)
+        rgba = new
+        unless rgba.parse(spec)
+          available_formats = [
+            "COLOR_NAME",
+            "\#RGB",
+            "\#RRGGBB",
+            "\#RRRGGGBBB",
+            "\#RRRRGGGGBBBB",
+            "rgb(R, G, B)",
+            "rgba(R, G, B, A)",
+          ]
+          message = "invalid RGBA format: #{spec.inspect} "
+          message << "(available formats: #{available_formats.join(', ')})"
+          raise ArgumentError, message
+        end
+        rgba
+      end
+    end
+
     alias_method :initialize_raw, :initialize
-    def initialize(red, green, blue, alpha)
+    def initialize(red=nil, green=nil, blue=nil, alpha=nil)
       initialize_raw
-      self.red = red
-      self.green = green
-      self.blue = blue
-      self.alpha = alpha
+      self.red = red if red
+      self.green = green if green
+      self.blue = blue if blue
+      self.alpha = alpha || 1.0
     end
 
     def to_a
diff --git a/gdk3/lib/gdk3/screen.rb b/gdk3/lib/gdk3/screen.rb
new file mode 100644
index 0000000..0e1aceb
--- /dev/null
+++ b/gdk3/lib/gdk3/screen.rb
@@ -0,0 +1,40 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gdk
+  class Screen
+    alias_method :get_setting_raw, :get_setting
+    def get_setting(key, type=nil)
+      value = GLib::Value.new(type || GLib::Type::STRING)
+      found = get_setting_raw(key, value)
+      if found
+        value
+      else
+        nil
+      end
+    end
+
+    def get_monitor(window_or_x, y=nil)
+      if window_or_x.is_a?(Window)
+        window = window_or_x
+        get_monitor_at_window(window)
+      else
+        x = window_or_x
+        get_monitor_at_point(x, y)
+      end
+    end
+  end
+end
diff --git a/gdk3/patches/gtk+-3.16.6-add-missing-exeext.diff b/gdk3/patches/gtk+-3.16.6-add-missing-exeext.diff
new file mode 100644
index 0000000..609b5b9
--- /dev/null
+++ b/gdk3/patches/gtk+-3.16.6-add-missing-exeext.diff
@@ -0,0 +1,24 @@
+diff -ru gtk+-3.16.6.orig/demos/gtk-demo/Makefile.am gtk+-3.16.6/demos/gtk-demo/Makefile.am
+--- gtk+-3.16.6.orig/demos/gtk-demo/Makefile.am	2015-07-21 21:07:10.000000000 +0900
++++ gtk+-3.16.6/demos/gtk-demo/Makefile.am	2015-09-06 17:27:45.369228871 +0900
+@@ -173,7 +173,7 @@
+ dist_appsicon48_DATA = data/48x48/gtk3-demo.png data/48x48/gtk3-demo-symbolic.symbolic.png
+ dist_appsicon256_DATA = data/256x256/gtk3-demo.png data/256x256/gtk3-demo-symbolic.symbolic.png
+ 
+-update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache --ignore-theme-index --force
++update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache$(EXEEXT) --ignore-theme-index --force
+ 
+ install-data-hook: install-update-icon-cache
+ uninstall-hook: uninstall-update-icon-cache
+diff -ru gtk+-3.16.6.orig/demos/widget-factory/Makefile.am gtk+-3.16.6/demos/widget-factory/Makefile.am
+--- gtk+-3.16.6.orig/demos/widget-factory/Makefile.am	2015-07-18 10:06:51.000000000 +0900
++++ gtk+-3.16.6/demos/widget-factory/Makefile.am	2015-09-06 17:27:55.368984992 +0900
+@@ -47,7 +47,7 @@
+ dist_appsicon48_DATA = data/48x48/gtk3-widget-factory.png data/48x48/gtk3-widget-factory-symbolic.symbolic.png
+ dist_appsicon256_DATA = data/256x256/gtk3-widget-factory.png data/256x256/gtk3-widget-factory-symbolic.symbolic.png
+ 
+-update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache --ignore-theme-index --force
++update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache$(EXEEXT) --ignore-theme-index --force
+ 
+ install-data-hook: install-update-icon-cache
+ uninstall-hook: uninstall-update-icon-cache
diff --git a/gdk3/test/fixture/ruby-gnome2-logo.png b/gdk3/test/fixture/ruby-gnome2-logo.png
new file mode 100644
index 0000000..0b38a52
Binary files /dev/null and b/gdk3/test/fixture/ruby-gnome2-logo.png differ
diff --git a/gdk3/test/gdk-test-utils.rb b/gdk3/test/gdk-test-utils.rb
index f9ef9c2..6cf8eac 100644
--- a/gdk3/test/gdk-test-utils.rb
+++ b/gdk3/test/gdk-test-utils.rb
@@ -18,4 +18,17 @@ require "test-unit"
 require "test/unit/notify"
 
 module GdkTestUtils
+  private
+  def only_gdk_version(major, minor, micro=nil)
+    micro ||= 0
+    gdk_version_raw = `pkg-config --modversion gdk-3.0`.chomp
+    gdk_version = gdk_version_raw.split(".").collect(&:to_i)
+    unless (gdk_version <=> [major, minor, micro]) >= 0
+      omit("Require GDK >= #{major}.#{minor}.#{micro}")
+    end
+  end
+
+  def fixture_path(*components)
+    File.join(File.dirname(__FILE__), "fixture", *components)
+  end
 end
diff --git a/gdk3/test/test-gdk-atom.rb b/gdk3/test/test-gdk-atom.rb
new file mode 100644
index 0000000..0df98d8
--- /dev/null
+++ b/gdk3/test/test-gdk-atom.rb
@@ -0,0 +1,24 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkAtom < Test::Unit::TestCase
+  sub_test_case ".intern" do
+    def test_only_name
+      atom = Gdk::Atom.intern("CLIPBOARD")
+      assert_equal("CLIPBOARD", atom.name)
+    end
+  end
+end
diff --git a/gdk3/test/test-gdk-cursor.rb b/gdk3/test/test-gdk-cursor.rb
new file mode 100644
index 0000000..8f8e596
--- /dev/null
+++ b/gdk3/test/test-gdk-cursor.rb
@@ -0,0 +1,44 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkCursor < Test::Unit::TestCase
+  include GdkTestUtils
+
+  sub_test_case ".new" do
+    test "type" do
+      cursor = Gdk::Cursor.new(:arrow)
+      assert_equal(Gdk::CursorType::ARROW, cursor.cursor_type)
+    end
+
+    test "pixbuf" do
+      pixbuf = Gdk::Pixbuf.new(:file => fixture_path("ruby-gnome2-logo.png"))
+      cursor = Gdk::Cursor.new(pixbuf, 0, 0)
+      assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
+    end
+
+    test "surface" do
+      only_gdk_version(3, 10, 0)
+      surface = Cairo::ImageSurface.new(100, 100)
+      cursor = Gdk::Cursor.new(surface, 0, 0)
+      assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
+    end
+
+    test "name" do
+      cursor = Gdk::Cursor.new("cross")
+      assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
+    end
+  end
+end
diff --git a/gdk3/test/test-gdk-event-mask.rb b/gdk3/test/test-gdk-event-mask.rb
new file mode 100644
index 0000000..c4ed87f
--- /dev/null
+++ b/gdk3/test/test-gdk-event-mask.rb
@@ -0,0 +1,21 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkEventMask < Test::Unit::TestCase
+  def test_button_press_mask
+    assert_equal("button-press-mask", Gdk::EventMask::BUTTON_PRESS_MASK.nick)
+  end
+end
diff --git a/gdk3/test/test-gdk-keyval.rb b/gdk3/test/test-gdk-keyval.rb
index 96818cf..dc28c88 100644
--- a/gdk3/test/test-gdk-keyval.rb
+++ b/gdk3/test/test-gdk-keyval.rb
@@ -19,6 +19,14 @@ class TestGdkKeyval < Test::Unit::TestCase
     assert_equal("a".unpack("c")[0], Gdk::Keyval::KEY_a)
   end
 
+  def test_to_name
+    assert_equal("A", Gdk::Keyval.to_name(Gdk::Keyval::KEY_A))
+  end
+
+  def test_from_name
+    assert_equal("A".unpack("c")[0], Gdk::Keyval.from_name("A"))
+  end
+
   sub_test_case "#lower?" do
     def test_lower
       assert_true(Gdk::Keyval.lower?(Gdk::Keyval::KEY_a))
@@ -39,10 +47,6 @@ class TestGdkKeyval < Test::Unit::TestCase
     end
   end
 
-  def test_name
-    assert_equal("A", Gdk::Keyval.name(Gdk::Keyval::KEY_A))
-  end
-
   sub_test_case "#to_lower" do
     def test_lower
       assert_equal(Gdk::Keyval::KEY_a,
diff --git a/gdk3/test/test-gdk-rectangle.rb b/gdk3/test/test-gdk-rectangle.rb
index f81d272..0867f4c 100644
--- a/gdk3/test/test-gdk-rectangle.rb
+++ b/gdk3/test/test-gdk-rectangle.rb
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -52,4 +52,23 @@ class TestGdkRectangle < Test::Unit::TestCase
                    unioned_rectangle.height,
                  ])
   end
+
+  def test_to_a
+    rectangle = Gdk::Rectangle.new(0, 10, 20, 30)
+    assert_equal([
+                   0,
+                   10,
+                   20,
+                   30,
+                 ],
+                 rectangle.to_a)
+  end
+
+  test "#==" do
+    rectangle1 = Gdk::Rectangle.new(0, 10, 20, 30)
+    rectangle2 = Gdk::Rectangle.new(0, 10, 20, 30)
+    assert do
+      rectangle1 == rectangle2
+    end
+  end
 end
diff --git a/gdk3/test/test-gdk-rgba.rb b/gdk3/test/test-gdk-rgba.rb
index 67254d0..a5fa1f2 100644
--- a/gdk3/test/test-gdk-rgba.rb
+++ b/gdk3/test/test-gdk-rgba.rb
@@ -26,4 +26,69 @@ class TestGdkRGBA < Test::Unit::TestCase
     rgba = Gdk::RGBA.new(0.2, 0.4, 0.6, 0.5)
     assert_equal([0.2, 0.4, 0.6, 0.5], rgba.to_a)
   end
+
+  sub_test_case("new") do
+    def test_empty
+      rgba = Gdk::RGBA.new
+      assert_equal([0.0, 0.0, 0.0, 1.0], rgba.to_a)
+    end
+
+    def test_rgb
+      rgba = Gdk::RGBA.new(0.2, 0.4, 0.6)
+      assert_equal([0.2, 0.4, 0.6, 1.0], rgba.to_a)
+    end
+  end
+
+  sub_test_case("parse") do
+    def test_name
+      rgba = Gdk::RGBA.parse("red")
+      assert_equal([1.0, 0.0, 0.0, 1.0], rgba.to_a)
+    end
+
+    def test_hash_rgb
+      rgba = Gdk::RGBA.parse("#f0f")
+      assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
+    end
+
+    def test_hash_rrggbb
+      rgba = Gdk::RGBA.parse("#ff00ff")
+      assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
+    end
+
+    def test_hash_rrrgggbbb
+      rgba = Gdk::RGBA.parse("#fff000fff")
+      assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
+    end
+
+    def test_hash_rrrrggggbbbb
+      rgba = Gdk::RGBA.parse("#ffff0000ffff")
+      assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
+    end
+
+    def test_rgb
+      rgba = Gdk::RGBA.parse("rgb(255, 0, 255)")
+      assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
+    end
+
+    def test_rgba
+      rgba = Gdk::RGBA.parse("rgba(255, 0, 255, 0.5)")
+      assert_equal([1.0, 0.0, 1.0, 0.5], rgba.to_a)
+    end
+
+    def test_invalid
+      message = "invalid RGBA format: \"invalid\" "
+      message << "(available formats: "
+      message << "COLOR_NAME, "
+      message << "\#RGB, "
+      message << "\#RRGGBB, "
+      message << "\#RRRGGGBBB, "
+      message << "\#RRRRGGGGBBBB, "
+      message << "rgb(R, G, B), "
+      message << "rgba(R, G, B, A)"
+      message << ")"
+      assert_raise(ArgumentError.new(message)) do
+        Gdk::RGBA.parse("invalid")
+      end
+    end
+  end
 end
diff --git a/gdk3/test/test-gdk-selection.rb b/gdk3/test/test-gdk-selection.rb
new file mode 100644
index 0000000..6f4444e
--- /dev/null
+++ b/gdk3/test/test-gdk-selection.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkSelection < Test::Unit::TestCase
+  class TestConstant < self
+    def test_primary
+      atom = Gdk::Selection::PRIMARY
+      assert_equal("PRIMARY", atom.name)
+    end
+
+    def test_clipboard
+      atom = Gdk::Selection::CLIPBOARD
+      assert_equal("CLIPBOARD", atom.name)
+    end
+  end
+end
diff --git a/gdk_pixbuf2/Rakefile b/gdk_pixbuf2/Rakefile
index 0d94dc3..b7e36c7 100644
--- a/gdk_pixbuf2/Rakefile
+++ b/gdk_pixbuf2/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./../glib2/lib")
 require "gnome2/rake/package-task"
diff --git a/gio2/Makefile b/gio2/Makefile
deleted file mode 100644
index 27a3d42..0000000
--- a/gio2/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all:
-	(cd ext/gio2 && $(MAKE))
-	$(MAKE) -f Makefile.lib
-
-install:
-	(cd ext/gio2 && $(MAKE) install)
-	$(MAKE) -f Makefile.lib install
-
-site-install:
-	(cd ext/gio2 && $(MAKE) site-install)
-	$(MAKE) -f Makefile.lib site-install
-
-clean:
-	(cd ext/gio2 && $(MAKE) clean)
-	$(MAKE) -f Makefile.lib clean
-
-distclean:
-	(cd ext/gio2 && $(MAKE) distclean)
-	$(MAKE) -f Makefile.lib distclean
-	@rm -f Makefile.lib
diff --git a/gio2/Makefile.lib b/gio2/Makefile.lib
deleted file mode 100644
index 7bb4d00..0000000
--- a/gio2/Makefile.lib
+++ /dev/null
@@ -1,226 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/gio2
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
-DEFS     = 
-CPPFLAGS =  -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = 
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = 
-SRCS = $(ORIG_SRCS) 
-OBJS = 
-HDRS = 
-TARGET = 
-TARGET_NAME = 
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = 
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    Makefile
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: Makefile
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-install-rb-default: $(RUBYLIBDIR)/gio2/inet-address.rb
-$(RUBYLIBDIR)/gio2/inet-address.rb: $(srcdir)/lib/gio2/inet-address.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/inet-address.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/deprecated.rb
-$(RUBYLIBDIR)/gio2/deprecated.rb: $(srcdir)/lib/gio2/deprecated.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/deprecated.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/pollable-input-stream.rb
-$(RUBYLIBDIR)/gio2/pollable-input-stream.rb: $(srcdir)/lib/gio2/pollable-input-stream.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/pollable-input-stream.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/input-stream.rb
-$(RUBYLIBDIR)/gio2/input-stream.rb: $(srcdir)/lib/gio2/input-stream.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/input-stream.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/loader.rb
-$(RUBYLIBDIR)/gio2/loader.rb: $(srcdir)/lib/gio2/loader.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/loader.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/resources.rb
-$(RUBYLIBDIR)/gio2/resources.rb: $(srcdir)/lib/gio2/resources.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/resources.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gio2/pollable-output-stream.rb
-$(RUBYLIBDIR)/gio2/pollable-output-stream.rb: $(srcdir)/lib/gio2/pollable-output-stream.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2/pollable-output-stream.rb $(@D)
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-install-rb-default: $(RUBYLIBDIR)/gio2.rb
-$(RUBYLIBDIR)/gio2.rb: $(srcdir)/lib/gio2.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gio2.rb $(@D)
-pre-install-rb-default:
-	$(ECHO) installing default  libraries
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gio2.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)/gio2
-	$(Q) $(TOUCH) $@
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
diff --git a/gio2/ext/gio2/Makefile b/gio2/ext/gio2/Makefile
deleted file mode 100644
index 627ca91..0000000
--- a/gio2/ext/gio2/Makefile
+++ /dev/null
@@ -1,244 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/gio2/ext/gio2
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wall -Waggregate-return -Wcast-align -Wextra -Wformat=2 -Winit-self -Wlarger-than-65500 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wp,-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wswitch-default -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings -pthread -I/usr/include [...]
-INCFLAGS = -I. -I/home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection/ext/gobject-introspection -I/home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection/ext/gobject-introspection -I/home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection/ext/gobject-introspection -I/home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection/ext/gobject-introspection -I/var/lib/gems/2.1.0/gems/gobject-introspection-2.2.3/ext/gobject-introspection -I/home/kou/work/ruby/ruby-gnome2.clean/glib [...]
-DEFS     = 
-CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DRUBY_GIO2_COMPILATION -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = ruby-gio2.pc
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lgirepository-1.0 -lglib-2.0 -lgobject-2.0 -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = rb-gio2-pollable-source.c rb-gio2.c
-SRCS = $(ORIG_SRCS) 
-OBJS = rb-gio2-pollable-source.o rb-gio2.o
-HDRS = $(srcdir)/rb-gio2.h
-TARGET = gio2
-TARGET_NAME = gio2
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = $(TARGET).so
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    $(DLLIB)
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: $(DLLIB) $(TIMESTAMP_DIR)/.RUBYARCHDIR.time
-	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
-clean-static::
-	-$(Q)$(RM) $(STATIC_LIB)
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default:
-	$(ECHO) installing default gio2 libraries
-$(TIMESTAMP_DIR)/.RUBYARCHDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
-.SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
-
-.cc.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.mm.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cxx.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cpp.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.C.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.c.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-.m.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-$(DLLIB): $(OBJS) Makefile
-	$(ECHO) linking shared-object $(DLLIB)
-	-$(Q)$(RM) $(@)
-	$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
-
-
-
-###
-install: install-pc
-install-pc:
-	if test -n "$(pkgconfigdir)"; then			\
-	  $(MAKEDIRS) $(pkgconfigdir);				\
-	  $(INSTALL_DATA) ruby-gio2.pc $(pkgconfigdir);		\
-	fi
diff --git a/gio2/ext/gio2/rb-gio2-application.c b/gio2/ext/gio2/rb-gio2-application.c
new file mode 100644
index 0000000..386dea8
--- /dev/null
+++ b/gio2/ext/gio2/rb-gio2-application.c
@@ -0,0 +1,54 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rb-gio2.h"
+
+#define RG_TARGET_NAMESPACE cApplication
+
+static VALUE
+rg_open_signal_func(G_GNUC_UNUSED guint num, const GValue *values)
+{
+    VALUE rb_files;
+    GFile **files;
+    gint i, n_files;
+
+    files = g_value_get_pointer(&(values[1]));
+    n_files = g_value_get_int(&(values[2]));
+    rb_files = rb_ary_new2(n_files);
+    for (i = 0; i < n_files; i++) {
+        GFile *file = files[i];
+        rb_ary_push(rb_files, GOBJ2RVAL(file));
+    }
+
+    return rb_ary_new3(3,
+                       GVAL2RVAL(&values[0]),
+                       rb_files,
+                       GVAL2RVAL(&values[3]));
+}
+
+void
+rb_gio2_init_application (VALUE mGio)
+{
+    VALUE RG_TARGET_NAMESPACE;
+
+    RG_TARGET_NAMESPACE = rb_const_get(mGio, rb_intern("Application"));
+
+    G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "open", rg_open_signal_func);
+}
diff --git a/gio2/ext/gio2/rb-gio2.c b/gio2/ext/gio2/rb-gio2.c
index a582fe5..20f0a82 100644
--- a/gio2/ext/gio2/rb-gio2.c
+++ b/gio2/ext/gio2/rb-gio2.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -22,11 +22,58 @@
 
 #define RG_TARGET_NAMESPACE rb_mGio
 
+static gboolean
+name_equal(GIArgInfo *info, const gchar *target_name)
+{
+    GITypeInfo type_info;
+    GIBaseInfo *interface_info;
+    const gchar *namespace;
+    const gchar *name;
+    gboolean equal_name_p = FALSE;
+
+    g_arg_info_load_type(info, &type_info);
+    interface_info = g_type_info_get_interface(&type_info);
+    namespace = g_base_info_get_namespace(interface_info);
+    name = g_base_info_get_name(interface_info);
+    if (strcmp(namespace, "Gio") == 0 && strcmp(name, target_name) == 0) {
+        equal_name_p = TRUE;
+    }
+    g_base_info_unref(interface_info);
+
+    return equal_name_p;
+}
+
+static void
+rb_gio2_async_ready_callback_callback(GObject *source_object,
+                                      GAsyncResult *result,
+                                      gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_call;
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback, id_call, 2,
+               GOBJ2RVAL(source_object), GOBJ2RVAL(result));
+}
+
+static gpointer
+rb_gio2_async_ready_callback_finder(GIArgInfo *info)
+{
+    if (!name_equal(info, "AsyncReadyCallback")) {
+        return NULL;
+    }
+    return rb_gio2_async_ready_callback_callback;
+}
+
 void
 Init_gio2 (void)
 {
     VALUE RG_TARGET_NAMESPACE;
 
     RG_TARGET_NAMESPACE = rb_define_module("Gio");
+
+    rb_gio2_init_application(RG_TARGET_NAMESPACE);
     rb_gio2_init_pollable_source(RG_TARGET_NAMESPACE);
+
+    rb_gi_callback_register_finder(rb_gio2_async_ready_callback_finder);
 }
diff --git a/gio2/ext/gio2/rb-gio2.h b/gio2/ext/gio2/rb-gio2.h
index 0ab6dd6..29f0726 100644
--- a/gio2/ext/gio2/rb-gio2.h
+++ b/gio2/ext/gio2/rb-gio2.h
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -23,4 +23,5 @@
 #include <rb-gobject-introspection.h>
 
 extern void Init_gio2 (void);
+G_GNUC_INTERNAL extern void rb_gio2_init_application (VALUE rb_mGio);
 G_GNUC_INTERNAL extern void rb_gio2_init_pollable_source (VALUE rb_mGio);
diff --git a/gio2/ext/gio2/ruby-gio2.pc b/gio2/ext/gio2/ruby-gio2.pc
deleted file mode 100644
index b12db7e..0000000
--- a/gio2/ext/gio2/ruby-gio2.pc
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: Ruby/GIO2
-Description: Ruby bindings for glib I/O library
-Version: 2.2.4
\ No newline at end of file
diff --git a/gio2/lib/gio2.rb b/gio2/lib/gio2.rb
index e14c239..8881360 100644
--- a/gio2/lib/gio2.rb
+++ b/gio2/lib/gio2.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,6 @@ GLib.prepend_dll_path(vendor_bin_dir)
 vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
 GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
 
-require "gio2/deprecated"
 require "gio2/loader"
 
 module Gio
diff --git a/gio2/lib/gio2/action-map.rb b/gio2/lib/gio2/action-map.rb
new file mode 100644
index 0000000..73a2d9e
--- /dev/null
+++ b/gio2/lib/gio2/action-map.rb
@@ -0,0 +1,57 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gio
+  module ActionMap
+    alias_method :add_action_raw, :add_action
+    def add_action(action)
+      action = convert_to_action(action) unless action.is_a?(Action)
+      add_action_raw(action)
+      actions[action.name] = action
+    end
+
+    alias_method :remove_action_raw, :remove_action
+    def remove_action(name)
+      remove_action_raw(name)
+      actions.delete(name)
+    end
+
+    def add_actions(actions)
+      actions.each do |action|
+        add_action(action)
+      end
+    end
+
+    private
+    def actions
+      @acitions ||= {}
+    end
+
+    def convert_to_action(definition)
+      name = definition[:name]
+      parameter_type = definition[:parameter_type]
+      callback = definition[:callback]
+
+      action = SimpleAction.new(name, parameter_type)
+      if callback
+        action.signal_connect("activate") do |*args|
+          callback.call(*args)
+        end
+      end
+      action
+    end
+  end
+end
diff --git a/gio2/lib/gio2/action.rb b/gio2/lib/gio2/action.rb
new file mode 100644
index 0000000..1443443
--- /dev/null
+++ b/gio2/lib/gio2/action.rb
@@ -0,0 +1,30 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gio
+  module Action
+    alias_method :activate_raw, :activate
+    def activate(parameter=nil)
+      case parameter
+      when nil, GLib::Variant
+        # do nothing
+      else
+        parameter = GLib::Variant.new(parameter)
+      end
+      activate_raw(parameter)
+    end
+  end
+end
diff --git a/gio2/lib/gio2/loader.rb b/gio2/lib/gio2/loader.rb
index 375e23f..ebd55a1 100644
--- a/gio2/lib/gio2/loader.rb
+++ b/gio2/lib/gio2/loader.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -50,11 +50,16 @@ module Gio
     end
 
     def require_libraries
-      require "gio2/resources"
+      require "gio2/action"
+      require "gio2/action-map"
       require "gio2/inet-address"
       require "gio2/input-stream"
       require "gio2/pollable-input-stream"
       require "gio2/pollable-output-stream"
+      require "gio2/resources"
+      require "gio2/simple-action"
+
+      require "gio2/deprecated"
     end
 
     def define_content_type_class
@@ -183,7 +188,6 @@ module Gio
       case klass.name
       when "Gio::File"
         load_function_infos_file(infos, klass)
-        super
       else
         super
       end
diff --git a/gio2/lib/gio2/simple-action.rb b/gio2/lib/gio2/simple-action.rb
new file mode 100644
index 0000000..a9dc87c
--- /dev/null
+++ b/gio2/lib/gio2/simple-action.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gio
+  class SimpleAction
+    alias_method :initialize_raw, :initialize
+    def initialize(name, parameter_type=nil, state=nil)
+      if parameter_type.is_a?(String)
+        parameter_type = GLib::VariantType.new(parameter_type)
+      end
+      initialize_raw(name, parameter_type, state)
+    end
+  end
+end
diff --git a/gio2/test/fixture/resource/ruby-gio2.gresource b/gio2/test/fixture/resource/ruby-gio2.gresource
deleted file mode 100644
index c323875..0000000
Binary files a/gio2/test/fixture/resource/ruby-gio2.gresource and /dev/null differ
diff --git a/gio2/test/run-test.rb b/gio2/test/run-test.rb
index 6162e56..c3fe0a7 100755
--- a/gio2/test/run-test.rb
+++ b/gio2/test/run-test.rb
@@ -38,11 +38,13 @@ modules.each do |target, module_name|
   $LOAD_PATH.unshift(File.join(target, "lib"))
 end
 
+Dir.chdir(File.join(gio2_base, "test", "fixture", "resource")) do
+  system("rake") or exit(false)
+end
+
 $LOAD_PATH.unshift(File.join(glib_base, "test"))
 require "glib-test-init"
 
-$VERBOSE = false # TODO: remove me
-
 $LOAD_PATH.unshift(File.join(gio2_base, "test"))
 require "gio2-test-utils"
 
diff --git a/gio2/test/test-action-map.rb b/gio2/test/test-action-map.rb
new file mode 100644
index 0000000..8a601cc
--- /dev/null
+++ b/gio2/test/test-action-map.rb
@@ -0,0 +1,51 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+class TestActionMap < Test::Unit::TestCase
+  def setup
+    @map = Gio::SimpleActionGroup.new
+  end
+
+  sub_test_case "#add_actions" do
+    test "name" do
+      @map.add_actions([
+                         {
+                           :name => "open",
+                         }
+                       ])
+      action = @map.lookup_action("open")
+      assert_equal("open", action.name)
+    end
+
+    test "parameter_type" do
+      args = nil
+      callback = lambda do |*callback_args|
+        args = callback_args
+      end
+      @map.add_actions([
+                         {
+                           :name => "open",
+                           :parameter_type => "s",
+                           :callback => callback,
+                         }
+                       ])
+      action = @map.lookup_action("open")
+      action.activate("X")
+      assert_equal([action, "X"], args)
+    end
+  end
+end
diff --git a/gio2/test/test-file-monitor.rb b/gio2/test/test-file-monitor.rb
index 931d242..3f4348a 100644
--- a/gio2/test/test-file-monitor.rb
+++ b/gio2/test/test-file-monitor.rb
@@ -17,17 +17,15 @@
 class TestFileMonitor < Test::Unit::TestCase
   class Flags < self
     def test_file_monitor_flags
-      assert_nothing_raised do
-        Gio::FileMonitorFlags.new(Gio::FileMonitorFlags::SEND_MOVED)
-      end
+      assert_equal("send-moved",
+                   Gio::FileMonitorFlags::SEND_MOVED.nick)
     end
   end
 
   class Event < self
     def test_file_monitor_event
-      assert_nothing_raised do
-        Gio::FileMonitorEvent.new(Gio::FileMonitorEvent::CHANGED)
-      end
+      assert_equal("changed",
+                   Gio::FileMonitorEvent::CHANGED.nick)
     end
   end
 end
diff --git a/gio2/test/test-mount.rb b/gio2/test/test-mount.rb
new file mode 100644
index 0000000..6ef6fad
--- /dev/null
+++ b/gio2/test/test-mount.rb
@@ -0,0 +1,23 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestMount < Test::Unit::TestCase
+  def test_can_unmount
+    assert do
+      Gio::Mount.method_defined?(:can_unmount?)
+    end
+  end
+end
diff --git a/gio2/test/test-simple-action.rb b/gio2/test/test-simple-action.rb
new file mode 100644
index 0000000..85c256c
--- /dev/null
+++ b/gio2/test/test-simple-action.rb
@@ -0,0 +1,44 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+class TestSimpleAction < Test::Unit::TestCase
+  sub_test_case "#initialize" do
+    sub_test_case "parameter type" do
+      test "omit" do
+        action = Gio::SimpleAction.new("open")
+        assert_nil(action.parameter_type)
+      end
+
+      test "nil" do
+        action = Gio::SimpleAction.new("open", nil)
+        assert_nil(action.parameter_type)
+      end
+
+      test "String" do
+        action = Gio::SimpleAction.new("open", "s")
+        assert_equal(GLib::VariantType::STRING,
+                     action.parameter_type)
+      end
+
+      test "GLib::VariantType" do
+        action = Gio::SimpleAction.new("open", GLib::VariantType::STRING)
+        assert_equal(GLib::VariantType::STRING,
+                     action.parameter_type)
+      end
+    end
+  end
+end
diff --git a/glib2/Makefile b/glib2/Makefile
deleted file mode 100644
index 134c6fa..0000000
--- a/glib2/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all:
-	(cd ext/glib2 && $(MAKE))
-	$(MAKE) -f Makefile.lib
-
-install:
-	(cd ext/glib2 && $(MAKE) install)
-	$(MAKE) -f Makefile.lib install
-
-site-install:
-	(cd ext/glib2 && $(MAKE) site-install)
-	$(MAKE) -f Makefile.lib site-install
-
-clean:
-	(cd ext/glib2 && $(MAKE) clean)
-	$(MAKE) -f Makefile.lib clean
-
-distclean:
-	(cd ext/glib2 && $(MAKE) distclean)
-	$(MAKE) -f Makefile.lib distclean
-	@rm -f Makefile.lib
diff --git a/glib2/Makefile.lib b/glib2/Makefile.lib
deleted file mode 100644
index ebd1391..0000000
--- a/glib2/Makefile.lib
+++ /dev/null
@@ -1,242 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/glib2
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
-DEFS     = 
-CPPFLAGS =  -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = 
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = 
-SRCS = $(ORIG_SRCS) 
-OBJS = 
-HDRS = 
-TARGET = 
-TARGET_NAME = 
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = 
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    Makefile
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: Makefile
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-install-rb-default: $(RUBYLIBDIR)/gnome2-raketask.rb
-$(RUBYLIBDIR)/gnome2-raketask.rb: $(srcdir)/lib/gnome2-raketask.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2-raketask.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/mkmf-gnome2.rb
-$(RUBYLIBDIR)/mkmf-gnome2.rb: $(srcdir)/lib/mkmf-gnome2.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/mkmf-gnome2.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/glib-mkenums.rb
-$(RUBYLIBDIR)/glib-mkenums.rb: $(srcdir)/lib/glib-mkenums.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/glib-mkenums.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/glib2.rb
-$(RUBYLIBDIR)/glib2.rb: $(srcdir)/lib/glib2.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/glib2.rb $(@D)
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/native-binary-build-task.rb
-$(RUBYLIBDIR)/gnome2/rake/native-binary-build-task.rb: $(srcdir)/lib/gnome2/rake/native-binary-build-task.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/native-binary-build-task.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/windows-binary-download-task.rb
-$(RUBYLIBDIR)/gnome2/rake/windows-binary-download-task.rb: $(srcdir)/lib/gnome2/rake/windows-binary-download-task.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/windows-binary-download-task.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/windows-binary-build-task.rb
-$(RUBYLIBDIR)/gnome2/rake/windows-binary-build-task.rb: $(srcdir)/lib/gnome2/rake/windows-binary-build-task.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/windows-binary-build-task.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/package-task.rb
-$(RUBYLIBDIR)/gnome2/rake/package-task.rb: $(srcdir)/lib/gnome2/rake/package-task.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/package-task.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/external-package.rb
-$(RUBYLIBDIR)/gnome2/rake/external-package.rb: $(srcdir)/lib/gnome2/rake/external-package.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/external-package.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/source-download-task.rb
-$(RUBYLIBDIR)/gnome2/rake/source-download-task.rb: $(srcdir)/lib/gnome2/rake/source-download-task.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/source-download-task.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gnome2/rake/package.rb
-$(RUBYLIBDIR)/gnome2/rake/package.rb: $(srcdir)/lib/gnome2/rake/package.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gnome2/rake/package.rb $(@D)
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.glib2.time
-install-rb-default: $(RUBYLIBDIR)/glib2/deprecatable.rb
-$(RUBYLIBDIR)/glib2/deprecatable.rb: $(srcdir)/lib/glib2/deprecatable.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.glib2.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/glib2/deprecatable.rb $(@D)
-pre-install-rb-default:
-	$(ECHO) installing default  libraries
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)
-	$(Q) $(TOUCH) $@
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gnome2.-.rake.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)/gnome2/rake
-	$(Q) $(TOUCH) $@
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.-.glib2.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)/glib2
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
diff --git a/glib2/README b/glib2/README
deleted file mode 100644
index f475b67..0000000
--- a/glib2/README
+++ /dev/null
@@ -1,40 +0,0 @@
-Ruby/GLib2
-==========
-Ruby/GLib2 is a Ruby binding of GLib-2.12.x.
-
-Requirements
-------------
-
-  Ruby >= 1.9.x: http://www.ruby-lang.org/
-  pkg-config.rb: http://github.com/rcairo/pkg-config
-  GLib >= 2.12.x: http://www.gtk.org/
-
-Install (RubyGems)
-------------------
-
-  % sudo gem install glib2
-
-Windows:
-
-  > gem install glib2 --platform x86-mingw32
-
-Install (traditional)
----------------------
-
-Install ruby-1.9.x or later, pkg-config.rb and GLib-2.12.x.
-
-  % ruby extconf.rb
-  % make
-  % sudo make install
-
-Copying
--------
-   Copyright (c) 2002-2010 Ruby-GNOME2 Project Team
-
-   This program is free software.
-   You can distribute/modify this program under the terms of
-   the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
-
-Project Website
----------------
-   http://ruby-gnome2.sourceforge.jp/
diff --git a/glib2/README.md b/glib2/README.md
new file mode 100644
index 0000000..0cd5a2c
--- /dev/null
+++ b/glib2/README.md
@@ -0,0 +1,42 @@
+# Ruby/GLib2
+
+Ruby/GLib2 is a Ruby binding of GLib-2.12.x.
+
+## Requirements
+
+  Ruby >= 1.9.x: http://www.ruby-lang.org/
+  pkg-config.rb: http://github.com/rcairo/pkg-config
+  GLib >= 2.12.x: http://www.gtk.org/
+
+## Install (RubyGems)
+
+```
+  % sudo gem install glib2
+```
+Windows:
+
+```
+  > gem install glib2 --platform x86-mingw32
+```
+
+## Install (traditional)
+
+Install ruby-1.9.x or later, pkg-config.rb and GLib-2.12.x.
+
+```
+  % ruby extconf.rb
+  % make
+  % sudo make install
+```
+
+## Copying
+
+   Copyright (c) 2002-2010 Ruby-GNOME2 Project Team
+
+   This program is free software.
+   You can distribute/modify this program under the terms of
+   the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+
+## Project Website
+
+   http://ruby-gnome2.sourceforge.jp/
diff --git a/glib2/Rakefile b/glib2/Rakefile
index 07c2edc..97872e7 100644
--- a/glib2/Rakefile
+++ b/glib2/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./lib")
 require 'gnome2/rake/package-task'
@@ -38,7 +54,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gettext",
       :download_site => :gnu,
       :label => "gettext-runtime",
-      :version => "0.19.2",
+      :version => "0.19.5",
       :base_dir_in_package => "gettext-runtime",
       :windows => {
         :built_file => "bin/libintl-8.dll",
@@ -57,7 +73,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "glib",
       :download_site => :gnome,
       :label => "GLib",
-      :version => "2.42.1",
+      :version => "2.44.1",
       :compression_method => "xz",
       :windows => {
         :need_autoreconf => true,
@@ -85,33 +101,62 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "nettle",
       :download_base_url => "http://www.lysator.liu.se/~nisse/archive",
       :label => "Nettle",
-      :version => "2.7.1",
+      :version => "3.1.1",
       :windows => {
         :configure_args => [],
-        :built_file => "bin/libnettle-4-7.dll",
+        :built_file => "bin/libnettle-6-1.dll",
+      },
+    },
+    {
+      :name => "libtasn1",
+      :download_site => :gnu,
+      :label => "Libtasn1",
+      :version => "4.6",
+      :windows => {
+        :built_file => "bin/libtasn1-6.dll",
+      },
+    },
+    {
+      :name => "libidn",
+      :download_site => :gnu,
+      :label => "Libidn",
+      :version => "1.32",
+      :windows => {
+        :built_file => "bin/libidn-11.dll",
+      },
+    },
+    {
+      :name => "p11-kit",
+      :download_base_url => "http://p11-glue.freedesktop.org/releases",
+      :label => "p11-kit",
+      :version => "0.23.1",
+      :windows => {
+        :built_file => "bin/libp11-kit-0.dll",
       },
     },
     {
       :name => "gnutls",
-      :download_base_url => "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2",
+      :download_base_url => "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4",
       :label => "GnuTLS",
-      :version => "3.2.21",
+      :version => "3.4.4",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--disable-cxx",
+          "--disable-tools",
+          "--disable-doc",
         ],
         :use_cc_environment_variable => false,
         :patches => [
         ],
-        :built_file => "bin/libgnutls-28.dll",
+        :built_file => "bin/libgnutls-30.dll",
       },
     },
     {
       :name => "glib-networking",
       :download_site => :gnome,
       :label => "glib-networking",
-      :version => "2.42.1",
+      :version => "2.44.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/glib2/ext/glib2/Makefile b/glib2/ext/glib2/Makefile
deleted file mode 100644
index 5e1689b..0000000
--- a/glib2/ext/glib2/Makefile
+++ /dev/null
@@ -1,256 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/glib2/ext/glib2
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wall -Waggregate-return -Wcast-align -Wextra -Wformat=2 -Winit-self -Wlarger-than-65500 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wp,-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wswitch-default -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings -I/usr/include/glib-2.0 [...]
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -I$(vendorarchdir) 
-DEFS     = 
-CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_UNISTD_H -DHAVE_G_SPAWN_CLOSE_PID -DHAVE_G_THREAD_INIT -DHAVE_G_MAIN_DEPTH -DHAVE_G_LISTENV -DHAVE_RB_CHECK_ARRAY_TYPE -DHAVE_RB_CHECK_HASH_TYPE -DHAVE_RB_EXEC_RECURSIVE -DHAVE_RB_ERRINFO -DHAVE_RB_SOURCEFILE -DHAVE_RB_SOURCELINE -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RUBY_NATIVE_THREAD_P -DHAVE_RB_THREAD_CALL_WITH_GVL -DHAVE_RB_STR_NEW_CSTR -DHAVE_RB_GC_REGISTER_MARK_OBJECT -DHAVE_RB_EXC_NEW_STR  [...]
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -pthread
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = ruby-glib2.pc glib-enum-types.h glib-enum-types.c
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lglib-2.0 -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = rbgobj_value.c rbglibdeprecated.c rbglib_win32.c rbglib_mainloop.c rbgobj_convert.c rbglib_spawn.c rbglib_unicode.c rbglib_pollfd.c rbgobj_strv.c rbgutil.c rbglib_bookmarkfile.c rbglib_fileutils.c rbglib.c rbgobj_object.c rbglib_unichar.c rbgobj_valuearray.c rbgobj_typemodule.c rbglib_gettext.c rbglib_int64.c rbglib_iochannel_win32_socket.c rbglib_utf16.c rbgobj_signal.c rbglib_source.c rbglib_error.c rbgobj_closure.c rbglib_ucs4.c rbglib_threads.c rbgobj_param.c rbglib_shell [...]
-SRCS = $(ORIG_SRCS) rbgobj_value.c rbglibdeprecated.c rbglib_win32.c rbglib_mainloop.c rbgobj_convert.c rbglib_spawn.c rbglib_unicode.c rbglib_pollfd.c rbgobj_strv.c rbgutil.c rbglib_bookmarkfile.c rbglib_fileutils.c rbglib.c rbgobj_object.c rbglib_unichar.c rbgobj_valuearray.c rbgobj_typemodule.c rbglib_gettext.c rbglib_int64.c rbglib_iochannel_win32_socket.c rbglib_utf16.c rbgobj_signal.c rbglib_source.c rbglib_error.c rbgobj_closure.c rbglib_ucs4.c rbglib_threads.c rbgobj_param.c rbgl [...]
-OBJS = rbgobj_value.o rbglibdeprecated.o rbglib_win32.o rbglib_mainloop.o rbgobj_convert.o rbglib_spawn.o rbglib_unicode.o rbglib_pollfd.o rbgobj_strv.o rbgutil.o rbglib_bookmarkfile.o rbglib_fileutils.o rbglib.o rbgobj_object.o rbglib_unichar.o rbgobj_valuearray.o rbgobj_typemodule.o rbglib_gettext.o rbglib_int64.o rbglib_iochannel_win32_socket.o rbglib_utf16.o rbgobj_signal.o rbglib_source.o rbglib_error.o rbgobj_closure.o rbglib_ucs4.o rbglib_threads.o rbgobj_param.o rbglib_shell.o gl [...]
-HDRS = $(srcdir)/rbgutildeprecated.h $(srcdir)/rbglib.h $(srcdir)/rbglibdeprecated.h $(srcdir)/glib-enum-types.h $(srcdir)/rbgutil_list.h $(srcdir)/rbgprivate.h $(srcdir)/rbglib2conversions.h $(srcdir)/rbgobject.h $(srcdir)/rbgutil.h $(srcdir)/rbgcompat.h
-TARGET = glib2
-TARGET_NAME = glib2
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = $(TARGET).so
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    $(DLLIB)
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: $(DLLIB) $(TIMESTAMP_DIR)/.RUBYARCHDIR.time
-	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
-clean-static::
-	-$(Q)$(RM) $(STATIC_LIB)
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default:
-	$(ECHO) installing default glib2 libraries
-$(TIMESTAMP_DIR)/.RUBYARCHDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
-.SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
-
-.cc.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.mm.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cxx.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cpp.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.C.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.c.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-.m.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-$(DLLIB): $(OBJS) Makefile
-	$(ECHO) linking shared-object $(DLLIB)
-	-$(Q)$(RM) $(@)
-	$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
-
-
-
-###
-install-so: install-headers
-install-headers:
-	$(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgutil.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgutil_list.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgutildeprecated.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgobject.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgcompat.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) glib-enum-types.h $(RUBYARCHDIR)
-
-install: install-pc
-install-pc:
-	if test -n "$(pkgconfigdir)"; then			\
-	  $(MAKEDIRS) $(pkgconfigdir);				\
-	  $(INSTALL_DATA) ruby-glib2.pc $(pkgconfigdir);	\
-	fi
diff --git a/glib2/ext/glib2/extconf.rb b/glib2/ext/glib2/extconf.rb
index 1c5cd8d..55bbb58 100644
--- a/glib2/ext/glib2/extconf.rb
+++ b/glib2/ext/glib2/extconf.rb
@@ -61,7 +61,7 @@ ignore_headers = [
   "gmain.h",
   "gscanner.h",
 ]
-unless (/mingw|cygwin|mswin/ === RUBY_PLATFORM)
+unless windows_platform?
   ignore_headers << "gwin32.h"
 end
 headers = include_paths.split.inject([]) do |result, path|
diff --git a/glib2/ext/glib2/glib-enum-types.c b/glib2/ext/glib2/glib-enum-types.c
deleted file mode 100644
index 72edad2..0000000
--- a/glib2/ext/glib2/glib-enum-types.c
+++ /dev/null
@@ -1,1233 +0,0 @@
-
-/* Generated by glib-mkenums.rb ($Id$) */ 
-
-#include "glib-enum-types.h"
-#include <glib-object.h>
-
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gvariant.h" */
-GType
-g_variant_class_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_VARIANT_CLASS_BOOLEAN, "G_VARIANT_CLASS_BOOLEAN", "boolean" },
-      { G_VARIANT_CLASS_BYTE, "G_VARIANT_CLASS_BYTE", "byte" },
-      { G_VARIANT_CLASS_INT16, "G_VARIANT_CLASS_INT16", "int16" },
-      { G_VARIANT_CLASS_UINT16, "G_VARIANT_CLASS_UINT16", "uint16" },
-      { G_VARIANT_CLASS_INT32, "G_VARIANT_CLASS_INT32", "int32" },
-      { G_VARIANT_CLASS_UINT32, "G_VARIANT_CLASS_UINT32", "uint32" },
-      { G_VARIANT_CLASS_INT64, "G_VARIANT_CLASS_INT64", "int64" },
-      { G_VARIANT_CLASS_UINT64, "G_VARIANT_CLASS_UINT64", "uint64" },
-      { G_VARIANT_CLASS_HANDLE, "G_VARIANT_CLASS_HANDLE", "handle" },
-      { G_VARIANT_CLASS_DOUBLE, "G_VARIANT_CLASS_DOUBLE", "double" },
-      { G_VARIANT_CLASS_STRING, "G_VARIANT_CLASS_STRING", "string" },
-      { G_VARIANT_CLASS_OBJECT_PATH, "G_VARIANT_CLASS_OBJECT_PATH", "object-path" },
-      { G_VARIANT_CLASS_SIGNATURE, "G_VARIANT_CLASS_SIGNATURE", "signature" },
-      { G_VARIANT_CLASS_VARIANT, "G_VARIANT_CLASS_VARIANT", "variant" },
-      { G_VARIANT_CLASS_MAYBE, "G_VARIANT_CLASS_MAYBE", "maybe" },
-      { G_VARIANT_CLASS_ARRAY, "G_VARIANT_CLASS_ARRAY", "array" },
-      { G_VARIANT_CLASS_TUPLE, "G_VARIANT_CLASS_TUPLE", "tuple" },
-      { G_VARIANT_CLASS_DICT_ENTRY, "G_VARIANT_CLASS_DICT_ENTRY", "dict-entry" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GVariantClass", values);
-  }
-  return etype;
-}
-
-GType
-g_variant_parse_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_VARIANT_PARSE_ERROR_FAILED, "G_VARIANT_PARSE_ERROR_FAILED", "failed" },
-      { G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, "G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED", "basic-type-expected" },
-      { G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, "G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE", "cannot-infer-type" },
-      { G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, "G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED", "definite-type-expected" },
-      { G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, "G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END", "input-not-at-end" },
-      { G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, "G_VARIANT_PARSE_ERROR_INVALID_CHARACTER", "invalid-character" },
-      { G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, "G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING", "invalid-format-string" },
-      { G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, "G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH", "invalid-object-path" },
-      { G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, "G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE", "invalid-signature" },
-      { G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, "G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING", "invalid-type-string" },
-      { G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, "G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE", "no-common-type" },
-      { G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, "G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE", "number-out-of-range" },
-      { G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, "G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG", "number-too-big" },
-      { G_VARIANT_PARSE_ERROR_TYPE_ERROR, "G_VARIANT_PARSE_ERROR_TYPE_ERROR", "type-error" },
-      { G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, "G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN", "unexpected-token" },
-      { G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, "G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD", "unknown-keyword" },
-      { G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, "G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT", "unterminated-string-constant" },
-      { G_VARIANT_PARSE_ERROR_VALUE_EXPECTED, "G_VARIANT_PARSE_ERROR_VALUE_EXPECTED", "value-expected" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GVariantParseError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gspawn.h" */
-GType
-g_spawn_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_SPAWN_ERROR_FORK, "G_SPAWN_ERROR_FORK", "fork" },
-      { G_SPAWN_ERROR_READ, "G_SPAWN_ERROR_READ", "read" },
-      { G_SPAWN_ERROR_CHDIR, "G_SPAWN_ERROR_CHDIR", "chdir" },
-      { G_SPAWN_ERROR_ACCES, "G_SPAWN_ERROR_ACCES", "acces" },
-      { G_SPAWN_ERROR_PERM, "G_SPAWN_ERROR_PERM", "perm" },
-      { G_SPAWN_ERROR_TOO_BIG, "G_SPAWN_ERROR_TOO_BIG", "too-big" },
-      { G_SPAWN_ERROR_2BIG, "G_SPAWN_ERROR_2BIG", "2big" },
-      { G_SPAWN_ERROR_NOEXEC, "G_SPAWN_ERROR_NOEXEC", "noexec" },
-      { G_SPAWN_ERROR_NAMETOOLONG, "G_SPAWN_ERROR_NAMETOOLONG", "nametoolong" },
-      { G_SPAWN_ERROR_NOENT, "G_SPAWN_ERROR_NOENT", "noent" },
-      { G_SPAWN_ERROR_NOMEM, "G_SPAWN_ERROR_NOMEM", "nomem" },
-      { G_SPAWN_ERROR_NOTDIR, "G_SPAWN_ERROR_NOTDIR", "notdir" },
-      { G_SPAWN_ERROR_LOOP, "G_SPAWN_ERROR_LOOP", "loop" },
-      { G_SPAWN_ERROR_TXTBUSY, "G_SPAWN_ERROR_TXTBUSY", "txtbusy" },
-      { G_SPAWN_ERROR_IO, "G_SPAWN_ERROR_IO", "io" },
-      { G_SPAWN_ERROR_NFILE, "G_SPAWN_ERROR_NFILE", "nfile" },
-      { G_SPAWN_ERROR_MFILE, "G_SPAWN_ERROR_MFILE", "mfile" },
-      { G_SPAWN_ERROR_INVAL, "G_SPAWN_ERROR_INVAL", "inval" },
-      { G_SPAWN_ERROR_ISDIR, "G_SPAWN_ERROR_ISDIR", "isdir" },
-      { G_SPAWN_ERROR_LIBBAD, "G_SPAWN_ERROR_LIBBAD", "libbad" },
-      { G_SPAWN_ERROR_FAILED, "G_SPAWN_ERROR_FAILED", "failed" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GSpawnError", values);
-  }
-  return etype;
-}
-
-GType
-g_spawn_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_SPAWN_DEFAULT, "G_SPAWN_DEFAULT", "default" },
-      { G_SPAWN_LEAVE_DESCRIPTORS_OPEN, "G_SPAWN_LEAVE_DESCRIPTORS_OPEN", "leave-descriptors-open" },
-      { G_SPAWN_DO_NOT_REAP_CHILD, "G_SPAWN_DO_NOT_REAP_CHILD", "do-not-reap-child" },
-      { G_SPAWN_SEARCH_PATH, "G_SPAWN_SEARCH_PATH", "search-path" },
-      { G_SPAWN_STDOUT_TO_DEV_NULL, "G_SPAWN_STDOUT_TO_DEV_NULL", "stdout-to-dev-null" },
-      { G_SPAWN_STDERR_TO_DEV_NULL, "G_SPAWN_STDERR_TO_DEV_NULL", "stderr-to-dev-null" },
-      { G_SPAWN_CHILD_INHERITS_STDIN, "G_SPAWN_CHILD_INHERITS_STDIN", "child-inherits-stdin" },
-      { G_SPAWN_FILE_AND_ARGV_ZERO, "G_SPAWN_FILE_AND_ARGV_ZERO", "file-and-argv-zero" },
-      { G_SPAWN_SEARCH_PATH_FROM_ENVP, "G_SPAWN_SEARCH_PATH_FROM_ENVP", "search-path-from-envp" },
-      { G_SPAWN_CLOEXEC_PIPES, "G_SPAWN_CLOEXEC_PIPES", "cloexec-pipes" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GSpawnFlags", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gkeyfile.h" */
-GType
-g_key_file_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_KEY_FILE_ERROR_UNKNOWN_ENCODING, "G_KEY_FILE_ERROR_UNKNOWN_ENCODING", "unknown-encoding" },
-      { G_KEY_FILE_ERROR_PARSE, "G_KEY_FILE_ERROR_PARSE", "parse" },
-      { G_KEY_FILE_ERROR_NOT_FOUND, "G_KEY_FILE_ERROR_NOT_FOUND", "not-found" },
-      { G_KEY_FILE_ERROR_KEY_NOT_FOUND, "G_KEY_FILE_ERROR_KEY_NOT_FOUND", "key-not-found" },
-      { G_KEY_FILE_ERROR_GROUP_NOT_FOUND, "G_KEY_FILE_ERROR_GROUP_NOT_FOUND", "group-not-found" },
-      { G_KEY_FILE_ERROR_INVALID_VALUE, "G_KEY_FILE_ERROR_INVALID_VALUE", "invalid-value" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GKeyFileError", values);
-  }
-  return etype;
-}
-
-GType
-g_key_file_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_KEY_FILE_NONE, "G_KEY_FILE_NONE", "none" },
-      { G_KEY_FILE_KEEP_COMMENTS, "G_KEY_FILE_KEEP_COMMENTS", "keep-comments" },
-      { G_KEY_FILE_KEEP_TRANSLATIONS, "G_KEY_FILE_KEEP_TRANSLATIONS", "keep-translations" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GKeyFileFlags", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gnode.h" */
-GType
-g_traverse_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_TRAVERSE_LEAVES, "G_TRAVERSE_LEAVES", "leaves" },
-      { G_TRAVERSE_NON_LEAVES, "G_TRAVERSE_NON_LEAVES", "non-leaves" },
-      { G_TRAVERSE_ALL, "G_TRAVERSE_ALL", "all" },
-      { G_TRAVERSE_MASK, "G_TRAVERSE_MASK", "mask" },
-      { G_TRAVERSE_LEAFS, "G_TRAVERSE_LEAFS", "leafs" },
-      { G_TRAVERSE_NON_LEAFS, "G_TRAVERSE_NON_LEAFS", "non-leafs" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GTraverseFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_traverse_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_IN_ORDER, "G_IN_ORDER", "in-order" },
-      { G_PRE_ORDER, "G_PRE_ORDER", "pre-order" },
-      { G_POST_ORDER, "G_POST_ORDER", "post-order" },
-      { G_LEVEL_ORDER, "G_LEVEL_ORDER", "level-order" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GTraverseType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gshell.h" */
-GType
-g_shell_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_SHELL_ERROR_BAD_QUOTING, "G_SHELL_ERROR_BAD_QUOTING", "bad-quoting" },
-      { G_SHELL_ERROR_EMPTY_STRING, "G_SHELL_ERROR_EMPTY_STRING", "empty-string" },
-      { G_SHELL_ERROR_FAILED, "G_SHELL_ERROR_FAILED", "failed" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GShellError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gslice.h" */
-GType
-g_slice_config_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_SLICE_CONFIG_ALWAYS_MALLOC, "G_SLICE_CONFIG_ALWAYS_MALLOC", "always-malloc" },
-      { G_SLICE_CONFIG_BYPASS_MAGAZINES, "G_SLICE_CONFIG_BYPASS_MAGAZINES", "bypass-magazines" },
-      { G_SLICE_CONFIG_WORKING_SET_MSECS, "G_SLICE_CONFIG_WORKING_SET_MSECS", "working-set-msecs" },
-      { G_SLICE_CONFIG_COLOR_INCREMENT, "G_SLICE_CONFIG_COLOR_INCREMENT", "color-increment" },
-      { G_SLICE_CONFIG_CHUNK_SIZES, "G_SLICE_CONFIG_CHUNK_SIZES", "chunk-sizes" },
-      { G_SLICE_CONFIG_CONTENTION_COUNTER, "G_SLICE_CONFIG_CONTENTION_COUNTER", "contention-counter" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GSliceConfig", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gregex.h" */
-GType
-g_regex_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_REGEX_ERROR_COMPILE, "G_REGEX_ERROR_COMPILE", "compile" },
-      { G_REGEX_ERROR_OPTIMIZE, "G_REGEX_ERROR_OPTIMIZE", "optimize" },
-      { G_REGEX_ERROR_REPLACE, "G_REGEX_ERROR_REPLACE", "replace" },
-      { G_REGEX_ERROR_MATCH, "G_REGEX_ERROR_MATCH", "match" },
-      { G_REGEX_ERROR_INTERNAL, "G_REGEX_ERROR_INTERNAL", "internal" },
-      { G_REGEX_ERROR_STRAY_BACKSLASH, "G_REGEX_ERROR_STRAY_BACKSLASH", "stray-backslash" },
-      { G_REGEX_ERROR_MISSING_CONTROL_CHAR, "G_REGEX_ERROR_MISSING_CONTROL_CHAR", "missing-control-char" },
-      { G_REGEX_ERROR_UNRECOGNIZED_ESCAPE, "G_REGEX_ERROR_UNRECOGNIZED_ESCAPE", "unrecognized-escape" },
-      { G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER, "G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER", "quantifiers-out-of-order" },
-      { G_REGEX_ERROR_QUANTIFIER_TOO_BIG, "G_REGEX_ERROR_QUANTIFIER_TOO_BIG", "quantifier-too-big" },
-      { G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS, "G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS", "unterminated-character-class" },
-      { G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS, "G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS", "invalid-escape-in-character-class" },
-      { G_REGEX_ERROR_RANGE_OUT_OF_ORDER, "G_REGEX_ERROR_RANGE_OUT_OF_ORDER", "range-out-of-order" },
-      { G_REGEX_ERROR_NOTHING_TO_REPEAT, "G_REGEX_ERROR_NOTHING_TO_REPEAT", "nothing-to-repeat" },
-      { G_REGEX_ERROR_UNRECOGNIZED_CHARACTER, "G_REGEX_ERROR_UNRECOGNIZED_CHARACTER", "unrecognized-character" },
-      { G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS, "G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS", "posix-named-class-outside-class" },
-      { G_REGEX_ERROR_UNMATCHED_PARENTHESIS, "G_REGEX_ERROR_UNMATCHED_PARENTHESIS", "unmatched-parenthesis" },
-      { G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE, "G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE", "inexistent-subpattern-reference" },
-      { G_REGEX_ERROR_UNTERMINATED_COMMENT, "G_REGEX_ERROR_UNTERMINATED_COMMENT", "unterminated-comment" },
-      { G_REGEX_ERROR_EXPRESSION_TOO_LARGE, "G_REGEX_ERROR_EXPRESSION_TOO_LARGE", "expression-too-large" },
-      { G_REGEX_ERROR_MEMORY_ERROR, "G_REGEX_ERROR_MEMORY_ERROR", "memory-error" },
-      { G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND, "G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND", "variable-length-lookbehind" },
-      { G_REGEX_ERROR_MALFORMED_CONDITION, "G_REGEX_ERROR_MALFORMED_CONDITION", "malformed-condition" },
-      { G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES, "G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES", "too-many-conditional-branches" },
-      { G_REGEX_ERROR_ASSERTION_EXPECTED, "G_REGEX_ERROR_ASSERTION_EXPECTED", "assertion-expected" },
-      { G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME, "G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME", "unknown-posix-class-name" },
-      { G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED, "G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED", "posix-collating-elements-not-supported" },
-      { G_REGEX_ERROR_HEX_CODE_TOO_LARGE, "G_REGEX_ERROR_HEX_CODE_TOO_LARGE", "hex-code-too-large" },
-      { G_REGEX_ERROR_INVALID_CONDITION, "G_REGEX_ERROR_INVALID_CONDITION", "invalid-condition" },
-      { G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND, "G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND", "single-byte-match-in-lookbehind" },
-      { G_REGEX_ERROR_INFINITE_LOOP, "G_REGEX_ERROR_INFINITE_LOOP", "infinite-loop" },
-      { G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR, "G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR", "missing-subpattern-name-terminator" },
-      { G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME, "G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME", "duplicate-subpattern-name" },
-      { G_REGEX_ERROR_MALFORMED_PROPERTY, "G_REGEX_ERROR_MALFORMED_PROPERTY", "malformed-property" },
-      { G_REGEX_ERROR_UNKNOWN_PROPERTY, "G_REGEX_ERROR_UNKNOWN_PROPERTY", "unknown-property" },
-      { G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG, "G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG", "subpattern-name-too-long" },
-      { G_REGEX_ERROR_TOO_MANY_SUBPATTERNS, "G_REGEX_ERROR_TOO_MANY_SUBPATTERNS", "too-many-subpatterns" },
-      { G_REGEX_ERROR_INVALID_OCTAL_VALUE, "G_REGEX_ERROR_INVALID_OCTAL_VALUE", "invalid-octal-value" },
-      { G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE, "G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE", "too-many-branches-in-define" },
-      { G_REGEX_ERROR_DEFINE_REPETION, "G_REGEX_ERROR_DEFINE_REPETION", "define-repetion" },
-      { G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS, "G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS", "inconsistent-newline-options" },
-      { G_REGEX_ERROR_MISSING_BACK_REFERENCE, "G_REGEX_ERROR_MISSING_BACK_REFERENCE", "missing-back-reference" },
-      { G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE, "G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE", "invalid-relative-reference" },
-      { G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN, "G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN", "backtracking-control-verb-argument-forbidden" },
-      { G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB, "G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB", "unknown-backtracking-control-verb" },
-      { G_REGEX_ERROR_NUMBER_TOO_BIG, "G_REGEX_ERROR_NUMBER_TOO_BIG", "number-too-big" },
-      { G_REGEX_ERROR_MISSING_SUBPATTERN_NAME, "G_REGEX_ERROR_MISSING_SUBPATTERN_NAME", "missing-subpattern-name" },
-      { G_REGEX_ERROR_MISSING_DIGIT, "G_REGEX_ERROR_MISSING_DIGIT", "missing-digit" },
-      { G_REGEX_ERROR_INVALID_DATA_CHARACTER, "G_REGEX_ERROR_INVALID_DATA_CHARACTER", "invalid-data-character" },
-      { G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME, "G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME", "extra-subpattern-name" },
-      { G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED, "G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED", "backtracking-control-verb-argument-required" },
-      { G_REGEX_ERROR_INVALID_CONTROL_CHAR, "G_REGEX_ERROR_INVALID_CONTROL_CHAR", "invalid-control-char" },
-      { G_REGEX_ERROR_MISSING_NAME, "G_REGEX_ERROR_MISSING_NAME", "missing-name" },
-      { G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS, "G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS", "not-supported-in-class" },
-      { G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES, "G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES", "too-many-forward-references" },
-      { G_REGEX_ERROR_NAME_TOO_LONG, "G_REGEX_ERROR_NAME_TOO_LONG", "name-too-long" },
-      { G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE, "G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE", "character-value-too-large" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GRegexError", values);
-  }
-  return etype;
-}
-
-GType
-g_regex_compile_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_REGEX_CASELESS, "G_REGEX_CASELESS", "caseless" },
-      { G_REGEX_MULTILINE, "G_REGEX_MULTILINE", "multiline" },
-      { G_REGEX_DOTALL, "G_REGEX_DOTALL", "dotall" },
-      { G_REGEX_EXTENDED, "G_REGEX_EXTENDED", "extended" },
-      { G_REGEX_ANCHORED, "G_REGEX_ANCHORED", "anchored" },
-      { G_REGEX_DOLLAR_ENDONLY, "G_REGEX_DOLLAR_ENDONLY", "dollar-endonly" },
-      { G_REGEX_UNGREEDY, "G_REGEX_UNGREEDY", "ungreedy" },
-      { G_REGEX_RAW, "G_REGEX_RAW", "raw" },
-      { G_REGEX_NO_AUTO_CAPTURE, "G_REGEX_NO_AUTO_CAPTURE", "no-auto-capture" },
-      { G_REGEX_OPTIMIZE, "G_REGEX_OPTIMIZE", "optimize" },
-      { G_REGEX_FIRSTLINE, "G_REGEX_FIRSTLINE", "firstline" },
-      { G_REGEX_DUPNAMES, "G_REGEX_DUPNAMES", "dupnames" },
-      { G_REGEX_NEWLINE_CR, "G_REGEX_NEWLINE_CR", "newline-cr" },
-      { G_REGEX_NEWLINE_LF, "G_REGEX_NEWLINE_LF", "newline-lf" },
-      { G_REGEX_NEWLINE_CRLF, "G_REGEX_NEWLINE_CRLF", "newline-crlf" },
-      { G_REGEX_NEWLINE_ANYCRLF, "G_REGEX_NEWLINE_ANYCRLF", "newline-anycrlf" },
-      { G_REGEX_BSR_ANYCRLF, "G_REGEX_BSR_ANYCRLF", "bsr-anycrlf" },
-      { G_REGEX_JAVASCRIPT_COMPAT, "G_REGEX_JAVASCRIPT_COMPAT", "javascript-compat" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GRegexCompileFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_regex_match_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_REGEX_MATCH_ANCHORED, "G_REGEX_MATCH_ANCHORED", "anchored" },
-      { G_REGEX_MATCH_NOTBOL, "G_REGEX_MATCH_NOTBOL", "notbol" },
-      { G_REGEX_MATCH_NOTEOL, "G_REGEX_MATCH_NOTEOL", "noteol" },
-      { G_REGEX_MATCH_NOTEMPTY, "G_REGEX_MATCH_NOTEMPTY", "notempty" },
-      { G_REGEX_MATCH_PARTIAL, "G_REGEX_MATCH_PARTIAL", "partial" },
-      { G_REGEX_MATCH_NEWLINE_CR, "G_REGEX_MATCH_NEWLINE_CR", "newline-cr" },
-      { G_REGEX_MATCH_NEWLINE_LF, "G_REGEX_MATCH_NEWLINE_LF", "newline-lf" },
-      { G_REGEX_MATCH_NEWLINE_CRLF, "G_REGEX_MATCH_NEWLINE_CRLF", "newline-crlf" },
-      { G_REGEX_MATCH_NEWLINE_ANY, "G_REGEX_MATCH_NEWLINE_ANY", "newline-any" },
-      { G_REGEX_MATCH_NEWLINE_ANYCRLF, "G_REGEX_MATCH_NEWLINE_ANYCRLF", "newline-anycrlf" },
-      { G_REGEX_MATCH_BSR_ANYCRLF, "G_REGEX_MATCH_BSR_ANYCRLF", "bsr-anycrlf" },
-      { G_REGEX_MATCH_BSR_ANY, "G_REGEX_MATCH_BSR_ANY", "bsr-any" },
-      { G_REGEX_MATCH_PARTIAL_SOFT, "G_REGEX_MATCH_PARTIAL_SOFT", "partial-soft" },
-      { G_REGEX_MATCH_PARTIAL_HARD, "G_REGEX_MATCH_PARTIAL_HARD", "partial-hard" },
-      { G_REGEX_MATCH_NOTEMPTY_ATSTART, "G_REGEX_MATCH_NOTEMPTY_ATSTART", "notempty-atstart" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GRegexMatchFlags", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gmarkup.h" */
-GType
-g_markup_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_MARKUP_ERROR_BAD_UTF8, "G_MARKUP_ERROR_BAD_UTF8", "bad-utf8" },
-      { G_MARKUP_ERROR_EMPTY, "G_MARKUP_ERROR_EMPTY", "empty" },
-      { G_MARKUP_ERROR_PARSE, "G_MARKUP_ERROR_PARSE", "parse" },
-      { G_MARKUP_ERROR_UNKNOWN_ELEMENT, "G_MARKUP_ERROR_UNKNOWN_ELEMENT", "unknown-element" },
-      { G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, "G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE", "unknown-attribute" },
-      { G_MARKUP_ERROR_INVALID_CONTENT, "G_MARKUP_ERROR_INVALID_CONTENT", "invalid-content" },
-      { G_MARKUP_ERROR_MISSING_ATTRIBUTE, "G_MARKUP_ERROR_MISSING_ATTRIBUTE", "missing-attribute" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GMarkupError", values);
-  }
-  return etype;
-}
-
-GType
-g_markup_parse_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG, "G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG", "do-not-use-this-unsupported-flag" },
-      { G_MARKUP_TREAT_CDATA_AS_TEXT, "G_MARKUP_TREAT_CDATA_AS_TEXT", "treat-cdata-as-text" },
-      { G_MARKUP_PREFIX_ERROR_POSITION, "G_MARKUP_PREFIX_ERROR_POSITION", "prefix-error-position" },
-      { G_MARKUP_IGNORE_QUALIFIED, "G_MARKUP_IGNORE_QUALIFIED", "ignore-qualified" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GMarkupParseFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_markup_collect_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_MARKUP_COLLECT_INVALID, "G_MARKUP_COLLECT_INVALID", "invalid" },
-      { G_MARKUP_COLLECT_STRING, "G_MARKUP_COLLECT_STRING", "string" },
-      { G_MARKUP_COLLECT_STRDUP, "G_MARKUP_COLLECT_STRDUP", "strdup" },
-      { G_MARKUP_COLLECT_BOOLEAN, "G_MARKUP_COLLECT_BOOLEAN", "boolean" },
-      { G_MARKUP_COLLECT_TRISTATE, "G_MARKUP_COLLECT_TRISTATE", "tristate" },
-      { G_MARKUP_COLLECT_OPTIONAL, "G_MARKUP_COLLECT_OPTIONAL", "optional" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GMarkupCollectType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gtestutils.h" */
-GType
-g_test_trap_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_TEST_TRAP_SILENCE_STDOUT, "G_TEST_TRAP_SILENCE_STDOUT", "silence-stdout" },
-      { G_TEST_TRAP_SILENCE_STDERR, "G_TEST_TRAP_SILENCE_STDERR", "silence-stderr" },
-      { G_TEST_TRAP_INHERIT_STDIN, "G_TEST_TRAP_INHERIT_STDIN", "inherit-stdin" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GTestTrapFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_test_subprocess_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_TEST_SUBPROCESS_INHERIT_STDIN, "G_TEST_SUBPROCESS_INHERIT_STDIN", "in" },
-      { G_TEST_SUBPROCESS_INHERIT_STDOUT, "G_TEST_SUBPROCESS_INHERIT_STDOUT", "out" },
-      { G_TEST_SUBPROCESS_INHERIT_STDERR, "G_TEST_SUBPROCESS_INHERIT_STDERR", "err" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GTestSubprocessFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_test_log_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_TEST_LOG_NONE, "G_TEST_LOG_NONE", "none" },
-      { G_TEST_LOG_ERROR, "G_TEST_LOG_ERROR", "error" },
-      { G_TEST_LOG_START_BINARY, "G_TEST_LOG_START_BINARY", "start-binary" },
-      { G_TEST_LOG_LIST_CASE, "G_TEST_LOG_LIST_CASE", "list-case" },
-      { G_TEST_LOG_SKIP_CASE, "G_TEST_LOG_SKIP_CASE", "skip-case" },
-      { G_TEST_LOG_START_CASE, "G_TEST_LOG_START_CASE", "start-case" },
-      { G_TEST_LOG_STOP_CASE, "G_TEST_LOG_STOP_CASE", "stop-case" },
-      { G_TEST_LOG_MIN_RESULT, "G_TEST_LOG_MIN_RESULT", "min-result" },
-      { G_TEST_LOG_MAX_RESULT, "G_TEST_LOG_MAX_RESULT", "max-result" },
-      { G_TEST_LOG_MESSAGE, "G_TEST_LOG_MESSAGE", "message" },
-      { G_TEST_LOG_START_SUITE, "G_TEST_LOG_START_SUITE", "start-suite" },
-      { G_TEST_LOG_STOP_SUITE, "G_TEST_LOG_STOP_SUITE", "stop-suite" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GTestLogType", values);
-  }
-  return etype;
-}
-
-GType
-g_test_file_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_TEST_DIST, "G_TEST_DIST", "dist" },
-      { G_TEST_BUILT, "G_TEST_BUILT", "built" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GTestFileType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gfileutils.h" */
-GType
-g_file_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_FILE_ERROR_EXIST, "G_FILE_ERROR_EXIST", "exist" },
-      { G_FILE_ERROR_ISDIR, "G_FILE_ERROR_ISDIR", "isdir" },
-      { G_FILE_ERROR_ACCES, "G_FILE_ERROR_ACCES", "acces" },
-      { G_FILE_ERROR_NAMETOOLONG, "G_FILE_ERROR_NAMETOOLONG", "nametoolong" },
-      { G_FILE_ERROR_NOENT, "G_FILE_ERROR_NOENT", "noent" },
-      { G_FILE_ERROR_NOTDIR, "G_FILE_ERROR_NOTDIR", "notdir" },
-      { G_FILE_ERROR_NXIO, "G_FILE_ERROR_NXIO", "nxio" },
-      { G_FILE_ERROR_NODEV, "G_FILE_ERROR_NODEV", "nodev" },
-      { G_FILE_ERROR_ROFS, "G_FILE_ERROR_ROFS", "rofs" },
-      { G_FILE_ERROR_TXTBSY, "G_FILE_ERROR_TXTBSY", "txtbsy" },
-      { G_FILE_ERROR_FAULT, "G_FILE_ERROR_FAULT", "fault" },
-      { G_FILE_ERROR_LOOP, "G_FILE_ERROR_LOOP", "loop" },
-      { G_FILE_ERROR_NOSPC, "G_FILE_ERROR_NOSPC", "nospc" },
-      { G_FILE_ERROR_NOMEM, "G_FILE_ERROR_NOMEM", "nomem" },
-      { G_FILE_ERROR_MFILE, "G_FILE_ERROR_MFILE", "mfile" },
-      { G_FILE_ERROR_NFILE, "G_FILE_ERROR_NFILE", "nfile" },
-      { G_FILE_ERROR_BADF, "G_FILE_ERROR_BADF", "badf" },
-      { G_FILE_ERROR_INVAL, "G_FILE_ERROR_INVAL", "inval" },
-      { G_FILE_ERROR_PIPE, "G_FILE_ERROR_PIPE", "pipe" },
-      { G_FILE_ERROR_AGAIN, "G_FILE_ERROR_AGAIN", "again" },
-      { G_FILE_ERROR_INTR, "G_FILE_ERROR_INTR", "intr" },
-      { G_FILE_ERROR_IO, "G_FILE_ERROR_IO", "io" },
-      { G_FILE_ERROR_PERM, "G_FILE_ERROR_PERM", "perm" },
-      { G_FILE_ERROR_NOSYS, "G_FILE_ERROR_NOSYS", "nosys" },
-      { G_FILE_ERROR_FAILED, "G_FILE_ERROR_FAILED", "failed" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GFileError", values);
-  }
-  return etype;
-}
-
-GType
-g_file_test_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_FILE_TEST_IS_REGULAR, "G_FILE_TEST_IS_REGULAR", "is-regular" },
-      { G_FILE_TEST_IS_SYMLINK, "G_FILE_TEST_IS_SYMLINK", "is-symlink" },
-      { G_FILE_TEST_IS_DIR, "G_FILE_TEST_IS_DIR", "is-dir" },
-      { G_FILE_TEST_IS_EXECUTABLE, "G_FILE_TEST_IS_EXECUTABLE", "is-executable" },
-      { G_FILE_TEST_EXISTS, "G_FILE_TEST_EXISTS", "exists" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GFileTest", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gtimezone.h" */
-GType
-g_time_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_TIME_TYPE_STANDARD, "G_TIME_TYPE_STANDARD", "standard" },
-      { G_TIME_TYPE_DAYLIGHT, "G_TIME_TYPE_DAYLIGHT", "daylight" },
-      { G_TIME_TYPE_UNIVERSAL, "G_TIME_TYPE_UNIVERSAL", "universal" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GTimeType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gdate.h" */
-GType
-g_date_dm_y_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_DATE_DAY, "G_DATE_DAY", "day" },
-      { G_DATE_MONTH, "G_DATE_MONTH", "month" },
-      { G_DATE_YEAR, "G_DATE_YEAR", "year" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GDateDMY", values);
-  }
-  return etype;
-}
-
-GType
-g_date_weekday_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_DATE_BAD_WEEKDAY, "G_DATE_BAD_WEEKDAY", "bad-weekday" },
-      { G_DATE_MONDAY, "G_DATE_MONDAY", "monday" },
-      { G_DATE_TUESDAY, "G_DATE_TUESDAY", "tuesday" },
-      { G_DATE_WEDNESDAY, "G_DATE_WEDNESDAY", "wednesday" },
-      { G_DATE_THURSDAY, "G_DATE_THURSDAY", "thursday" },
-      { G_DATE_FRIDAY, "G_DATE_FRIDAY", "friday" },
-      { G_DATE_SATURDAY, "G_DATE_SATURDAY", "saturday" },
-      { G_DATE_SUNDAY, "G_DATE_SUNDAY", "sunday" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GDateWeekday", values);
-  }
-  return etype;
-}
-
-GType
-g_date_month_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_DATE_BAD_MONTH, "G_DATE_BAD_MONTH", "bad-month" },
-      { G_DATE_JANUARY, "G_DATE_JANUARY", "january" },
-      { G_DATE_FEBRUARY, "G_DATE_FEBRUARY", "february" },
-      { G_DATE_MARCH, "G_DATE_MARCH", "march" },
-      { G_DATE_APRIL, "G_DATE_APRIL", "april" },
-      { G_DATE_MAY, "G_DATE_MAY", "may" },
-      { G_DATE_JUNE, "G_DATE_JUNE", "june" },
-      { G_DATE_JULY, "G_DATE_JULY", "july" },
-      { G_DATE_AUGUST, "G_DATE_AUGUST", "august" },
-      { G_DATE_SEPTEMBER, "G_DATE_SEPTEMBER", "september" },
-      { G_DATE_OCTOBER, "G_DATE_OCTOBER", "october" },
-      { G_DATE_NOVEMBER, "G_DATE_NOVEMBER", "november" },
-      { G_DATE_DECEMBER, "G_DATE_DECEMBER", "december" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GDateMonth", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gunicode.h" */
-GType
-g_unicode_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_UNICODE_CONTROL, "G_UNICODE_CONTROL", "control" },
-      { G_UNICODE_FORMAT, "G_UNICODE_FORMAT", "format" },
-      { G_UNICODE_UNASSIGNED, "G_UNICODE_UNASSIGNED", "unassigned" },
-      { G_UNICODE_PRIVATE_USE, "G_UNICODE_PRIVATE_USE", "private-use" },
-      { G_UNICODE_SURROGATE, "G_UNICODE_SURROGATE", "surrogate" },
-      { G_UNICODE_LOWERCASE_LETTER, "G_UNICODE_LOWERCASE_LETTER", "lowercase-letter" },
-      { G_UNICODE_MODIFIER_LETTER, "G_UNICODE_MODIFIER_LETTER", "modifier-letter" },
-      { G_UNICODE_OTHER_LETTER, "G_UNICODE_OTHER_LETTER", "other-letter" },
-      { G_UNICODE_TITLECASE_LETTER, "G_UNICODE_TITLECASE_LETTER", "titlecase-letter" },
-      { G_UNICODE_UPPERCASE_LETTER, "G_UNICODE_UPPERCASE_LETTER", "uppercase-letter" },
-      { G_UNICODE_SPACING_MARK, "G_UNICODE_SPACING_MARK", "spacing-mark" },
-      { G_UNICODE_ENCLOSING_MARK, "G_UNICODE_ENCLOSING_MARK", "enclosing-mark" },
-      { G_UNICODE_NON_SPACING_MARK, "G_UNICODE_NON_SPACING_MARK", "non-spacing-mark" },
-      { G_UNICODE_DECIMAL_NUMBER, "G_UNICODE_DECIMAL_NUMBER", "decimal-number" },
-      { G_UNICODE_LETTER_NUMBER, "G_UNICODE_LETTER_NUMBER", "letter-number" },
-      { G_UNICODE_OTHER_NUMBER, "G_UNICODE_OTHER_NUMBER", "other-number" },
-      { G_UNICODE_CONNECT_PUNCTUATION, "G_UNICODE_CONNECT_PUNCTUATION", "connect-punctuation" },
-      { G_UNICODE_DASH_PUNCTUATION, "G_UNICODE_DASH_PUNCTUATION", "dash-punctuation" },
-      { G_UNICODE_CLOSE_PUNCTUATION, "G_UNICODE_CLOSE_PUNCTUATION", "close-punctuation" },
-      { G_UNICODE_FINAL_PUNCTUATION, "G_UNICODE_FINAL_PUNCTUATION", "final-punctuation" },
-      { G_UNICODE_INITIAL_PUNCTUATION, "G_UNICODE_INITIAL_PUNCTUATION", "initial-punctuation" },
-      { G_UNICODE_OTHER_PUNCTUATION, "G_UNICODE_OTHER_PUNCTUATION", "other-punctuation" },
-      { G_UNICODE_OPEN_PUNCTUATION, "G_UNICODE_OPEN_PUNCTUATION", "open-punctuation" },
-      { G_UNICODE_CURRENCY_SYMBOL, "G_UNICODE_CURRENCY_SYMBOL", "currency-symbol" },
-      { G_UNICODE_MODIFIER_SYMBOL, "G_UNICODE_MODIFIER_SYMBOL", "modifier-symbol" },
-      { G_UNICODE_MATH_SYMBOL, "G_UNICODE_MATH_SYMBOL", "math-symbol" },
-      { G_UNICODE_OTHER_SYMBOL, "G_UNICODE_OTHER_SYMBOL", "other-symbol" },
-      { G_UNICODE_LINE_SEPARATOR, "G_UNICODE_LINE_SEPARATOR", "line-separator" },
-      { G_UNICODE_PARAGRAPH_SEPARATOR, "G_UNICODE_PARAGRAPH_SEPARATOR", "paragraph-separator" },
-      { G_UNICODE_SPACE_SEPARATOR, "G_UNICODE_SPACE_SEPARATOR", "space-separator" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GUnicodeType", values);
-  }
-  return etype;
-}
-
-GType
-g_unicode_break_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_UNICODE_BREAK_MANDATORY, "G_UNICODE_BREAK_MANDATORY", "mandatory" },
-      { G_UNICODE_BREAK_CARRIAGE_RETURN, "G_UNICODE_BREAK_CARRIAGE_RETURN", "carriage-return" },
-      { G_UNICODE_BREAK_LINE_FEED, "G_UNICODE_BREAK_LINE_FEED", "line-feed" },
-      { G_UNICODE_BREAK_COMBINING_MARK, "G_UNICODE_BREAK_COMBINING_MARK", "combining-mark" },
-      { G_UNICODE_BREAK_SURROGATE, "G_UNICODE_BREAK_SURROGATE", "surrogate" },
-      { G_UNICODE_BREAK_ZERO_WIDTH_SPACE, "G_UNICODE_BREAK_ZERO_WIDTH_SPACE", "zero-width-space" },
-      { G_UNICODE_BREAK_INSEPARABLE, "G_UNICODE_BREAK_INSEPARABLE", "inseparable" },
-      { G_UNICODE_BREAK_NON_BREAKING_GLUE, "G_UNICODE_BREAK_NON_BREAKING_GLUE", "non-breaking-glue" },
-      { G_UNICODE_BREAK_CONTINGENT, "G_UNICODE_BREAK_CONTINGENT", "contingent" },
-      { G_UNICODE_BREAK_SPACE, "G_UNICODE_BREAK_SPACE", "space" },
-      { G_UNICODE_BREAK_AFTER, "G_UNICODE_BREAK_AFTER", "after" },
-      { G_UNICODE_BREAK_BEFORE, "G_UNICODE_BREAK_BEFORE", "before" },
-      { G_UNICODE_BREAK_BEFORE_AND_AFTER, "G_UNICODE_BREAK_BEFORE_AND_AFTER", "before-and-after" },
-      { G_UNICODE_BREAK_HYPHEN, "G_UNICODE_BREAK_HYPHEN", "hyphen" },
-      { G_UNICODE_BREAK_NON_STARTER, "G_UNICODE_BREAK_NON_STARTER", "non-starter" },
-      { G_UNICODE_BREAK_OPEN_PUNCTUATION, "G_UNICODE_BREAK_OPEN_PUNCTUATION", "open-punctuation" },
-      { G_UNICODE_BREAK_CLOSE_PUNCTUATION, "G_UNICODE_BREAK_CLOSE_PUNCTUATION", "close-punctuation" },
-      { G_UNICODE_BREAK_QUOTATION, "G_UNICODE_BREAK_QUOTATION", "quotation" },
-      { G_UNICODE_BREAK_EXCLAMATION, "G_UNICODE_BREAK_EXCLAMATION", "exclamation" },
-      { G_UNICODE_BREAK_IDEOGRAPHIC, "G_UNICODE_BREAK_IDEOGRAPHIC", "ideographic" },
-      { G_UNICODE_BREAK_NUMERIC, "G_UNICODE_BREAK_NUMERIC", "numeric" },
-      { G_UNICODE_BREAK_INFIX_SEPARATOR, "G_UNICODE_BREAK_INFIX_SEPARATOR", "infix-separator" },
-      { G_UNICODE_BREAK_SYMBOL, "G_UNICODE_BREAK_SYMBOL", "symbol" },
-      { G_UNICODE_BREAK_ALPHABETIC, "G_UNICODE_BREAK_ALPHABETIC", "alphabetic" },
-      { G_UNICODE_BREAK_PREFIX, "G_UNICODE_BREAK_PREFIX", "prefix" },
-      { G_UNICODE_BREAK_POSTFIX, "G_UNICODE_BREAK_POSTFIX", "postfix" },
-      { G_UNICODE_BREAK_COMPLEX_CONTEXT, "G_UNICODE_BREAK_COMPLEX_CONTEXT", "complex-context" },
-      { G_UNICODE_BREAK_AMBIGUOUS, "G_UNICODE_BREAK_AMBIGUOUS", "ambiguous" },
-      { G_UNICODE_BREAK_UNKNOWN, "G_UNICODE_BREAK_UNKNOWN", "unknown" },
-      { G_UNICODE_BREAK_NEXT_LINE, "G_UNICODE_BREAK_NEXT_LINE", "next-line" },
-      { G_UNICODE_BREAK_WORD_JOINER, "G_UNICODE_BREAK_WORD_JOINER", "word-joiner" },
-      { G_UNICODE_BREAK_HANGUL_L_JAMO, "G_UNICODE_BREAK_HANGUL_L_JAMO", "hangul-l-jamo" },
-      { G_UNICODE_BREAK_HANGUL_V_JAMO, "G_UNICODE_BREAK_HANGUL_V_JAMO", "hangul-v-jamo" },
-      { G_UNICODE_BREAK_HANGUL_T_JAMO, "G_UNICODE_BREAK_HANGUL_T_JAMO", "hangul-t-jamo" },
-      { G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, "G_UNICODE_BREAK_HANGUL_LV_SYLLABLE", "hangul-lv-syllable" },
-      { G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, "G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE", "hangul-lvt-syllable" },
-      { G_UNICODE_BREAK_CLOSE_PARANTHESIS, "G_UNICODE_BREAK_CLOSE_PARANTHESIS", "close-paranthesis" },
-      { G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER", "conditional-japanese-starter" },
-      { G_UNICODE_BREAK_HEBREW_LETTER, "G_UNICODE_BREAK_HEBREW_LETTER", "hebrew-letter" },
-      { G_UNICODE_BREAK_REGIONAL_INDICATOR, "G_UNICODE_BREAK_REGIONAL_INDICATOR", "regional-indicator" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GUnicodeBreakType", values);
-  }
-  return etype;
-}
-
-GType
-g_unicode_script_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_UNICODE_SCRIPT_INVALID_CODE, "G_UNICODE_SCRIPT_INVALID_CODE", "invalid-code" },
-      { G_UNICODE_SCRIPT_COMMON, "G_UNICODE_SCRIPT_COMMON", "common" },
-      { G_UNICODE_SCRIPT_INHERITED, "G_UNICODE_SCRIPT_INHERITED", "inherited" },
-      { G_UNICODE_SCRIPT_ARABIC, "G_UNICODE_SCRIPT_ARABIC", "arabic" },
-      { G_UNICODE_SCRIPT_ARMENIAN, "G_UNICODE_SCRIPT_ARMENIAN", "armenian" },
-      { G_UNICODE_SCRIPT_BENGALI, "G_UNICODE_SCRIPT_BENGALI", "bengali" },
-      { G_UNICODE_SCRIPT_BOPOMOFO, "G_UNICODE_SCRIPT_BOPOMOFO", "bopomofo" },
-      { G_UNICODE_SCRIPT_CHEROKEE, "G_UNICODE_SCRIPT_CHEROKEE", "cherokee" },
-      { G_UNICODE_SCRIPT_COPTIC, "G_UNICODE_SCRIPT_COPTIC", "coptic" },
-      { G_UNICODE_SCRIPT_CYRILLIC, "G_UNICODE_SCRIPT_CYRILLIC", "cyrillic" },
-      { G_UNICODE_SCRIPT_DESERET, "G_UNICODE_SCRIPT_DESERET", "deseret" },
-      { G_UNICODE_SCRIPT_DEVANAGARI, "G_UNICODE_SCRIPT_DEVANAGARI", "devanagari" },
-      { G_UNICODE_SCRIPT_ETHIOPIC, "G_UNICODE_SCRIPT_ETHIOPIC", "ethiopic" },
-      { G_UNICODE_SCRIPT_GEORGIAN, "G_UNICODE_SCRIPT_GEORGIAN", "georgian" },
-      { G_UNICODE_SCRIPT_GOTHIC, "G_UNICODE_SCRIPT_GOTHIC", "gothic" },
-      { G_UNICODE_SCRIPT_GREEK, "G_UNICODE_SCRIPT_GREEK", "greek" },
-      { G_UNICODE_SCRIPT_GUJARATI, "G_UNICODE_SCRIPT_GUJARATI", "gujarati" },
-      { G_UNICODE_SCRIPT_GURMUKHI, "G_UNICODE_SCRIPT_GURMUKHI", "gurmukhi" },
-      { G_UNICODE_SCRIPT_HAN, "G_UNICODE_SCRIPT_HAN", "han" },
-      { G_UNICODE_SCRIPT_HANGUL, "G_UNICODE_SCRIPT_HANGUL", "hangul" },
-      { G_UNICODE_SCRIPT_HEBREW, "G_UNICODE_SCRIPT_HEBREW", "hebrew" },
-      { G_UNICODE_SCRIPT_HIRAGANA, "G_UNICODE_SCRIPT_HIRAGANA", "hiragana" },
-      { G_UNICODE_SCRIPT_KANNADA, "G_UNICODE_SCRIPT_KANNADA", "kannada" },
-      { G_UNICODE_SCRIPT_KATAKANA, "G_UNICODE_SCRIPT_KATAKANA", "katakana" },
-      { G_UNICODE_SCRIPT_KHMER, "G_UNICODE_SCRIPT_KHMER", "khmer" },
-      { G_UNICODE_SCRIPT_LAO, "G_UNICODE_SCRIPT_LAO", "lao" },
-      { G_UNICODE_SCRIPT_LATIN, "G_UNICODE_SCRIPT_LATIN", "latin" },
-      { G_UNICODE_SCRIPT_MALAYALAM, "G_UNICODE_SCRIPT_MALAYALAM", "malayalam" },
-      { G_UNICODE_SCRIPT_MONGOLIAN, "G_UNICODE_SCRIPT_MONGOLIAN", "mongolian" },
-      { G_UNICODE_SCRIPT_MYANMAR, "G_UNICODE_SCRIPT_MYANMAR", "myanmar" },
-      { G_UNICODE_SCRIPT_OGHAM, "G_UNICODE_SCRIPT_OGHAM", "ogham" },
-      { G_UNICODE_SCRIPT_OLD_ITALIC, "G_UNICODE_SCRIPT_OLD_ITALIC", "old-italic" },
-      { G_UNICODE_SCRIPT_ORIYA, "G_UNICODE_SCRIPT_ORIYA", "oriya" },
-      { G_UNICODE_SCRIPT_RUNIC, "G_UNICODE_SCRIPT_RUNIC", "runic" },
-      { G_UNICODE_SCRIPT_SINHALA, "G_UNICODE_SCRIPT_SINHALA", "sinhala" },
-      { G_UNICODE_SCRIPT_SYRIAC, "G_UNICODE_SCRIPT_SYRIAC", "syriac" },
-      { G_UNICODE_SCRIPT_TAMIL, "G_UNICODE_SCRIPT_TAMIL", "tamil" },
-      { G_UNICODE_SCRIPT_TELUGU, "G_UNICODE_SCRIPT_TELUGU", "telugu" },
-      { G_UNICODE_SCRIPT_THAANA, "G_UNICODE_SCRIPT_THAANA", "thaana" },
-      { G_UNICODE_SCRIPT_THAI, "G_UNICODE_SCRIPT_THAI", "thai" },
-      { G_UNICODE_SCRIPT_TIBETAN, "G_UNICODE_SCRIPT_TIBETAN", "tibetan" },
-      { G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL", "canadian-aboriginal" },
-      { G_UNICODE_SCRIPT_YI, "G_UNICODE_SCRIPT_YI", "yi" },
-      { G_UNICODE_SCRIPT_TAGALOG, "G_UNICODE_SCRIPT_TAGALOG", "tagalog" },
-      { G_UNICODE_SCRIPT_HANUNOO, "G_UNICODE_SCRIPT_HANUNOO", "hanunoo" },
-      { G_UNICODE_SCRIPT_BUHID, "G_UNICODE_SCRIPT_BUHID", "buhid" },
-      { G_UNICODE_SCRIPT_TAGBANWA, "G_UNICODE_SCRIPT_TAGBANWA", "tagbanwa" },
-      { G_UNICODE_SCRIPT_BRAILLE, "G_UNICODE_SCRIPT_BRAILLE", "braille" },
-      { G_UNICODE_SCRIPT_CYPRIOT, "G_UNICODE_SCRIPT_CYPRIOT", "cypriot" },
-      { G_UNICODE_SCRIPT_LIMBU, "G_UNICODE_SCRIPT_LIMBU", "limbu" },
-      { G_UNICODE_SCRIPT_OSMANYA, "G_UNICODE_SCRIPT_OSMANYA", "osmanya" },
-      { G_UNICODE_SCRIPT_SHAVIAN, "G_UNICODE_SCRIPT_SHAVIAN", "shavian" },
-      { G_UNICODE_SCRIPT_LINEAR_B, "G_UNICODE_SCRIPT_LINEAR_B", "linear-b" },
-      { G_UNICODE_SCRIPT_TAI_LE, "G_UNICODE_SCRIPT_TAI_LE", "tai-le" },
-      { G_UNICODE_SCRIPT_UGARITIC, "G_UNICODE_SCRIPT_UGARITIC", "ugaritic" },
-      { G_UNICODE_SCRIPT_NEW_TAI_LUE, "G_UNICODE_SCRIPT_NEW_TAI_LUE", "new-tai-lue" },
-      { G_UNICODE_SCRIPT_BUGINESE, "G_UNICODE_SCRIPT_BUGINESE", "buginese" },
-      { G_UNICODE_SCRIPT_GLAGOLITIC, "G_UNICODE_SCRIPT_GLAGOLITIC", "glagolitic" },
-      { G_UNICODE_SCRIPT_TIFINAGH, "G_UNICODE_SCRIPT_TIFINAGH", "tifinagh" },
-      { G_UNICODE_SCRIPT_SYLOTI_NAGRI, "G_UNICODE_SCRIPT_SYLOTI_NAGRI", "syloti-nagri" },
-      { G_UNICODE_SCRIPT_OLD_PERSIAN, "G_UNICODE_SCRIPT_OLD_PERSIAN", "old-persian" },
-      { G_UNICODE_SCRIPT_KHAROSHTHI, "G_UNICODE_SCRIPT_KHAROSHTHI", "kharoshthi" },
-      { G_UNICODE_SCRIPT_UNKNOWN, "G_UNICODE_SCRIPT_UNKNOWN", "unknown" },
-      { G_UNICODE_SCRIPT_BALINESE, "G_UNICODE_SCRIPT_BALINESE", "balinese" },
-      { G_UNICODE_SCRIPT_CUNEIFORM, "G_UNICODE_SCRIPT_CUNEIFORM", "cuneiform" },
-      { G_UNICODE_SCRIPT_PHOENICIAN, "G_UNICODE_SCRIPT_PHOENICIAN", "phoenician" },
-      { G_UNICODE_SCRIPT_PHAGS_PA, "G_UNICODE_SCRIPT_PHAGS_PA", "phags-pa" },
-      { G_UNICODE_SCRIPT_NKO, "G_UNICODE_SCRIPT_NKO", "nko" },
-      { G_UNICODE_SCRIPT_KAYAH_LI, "G_UNICODE_SCRIPT_KAYAH_LI", "kayah-li" },
-      { G_UNICODE_SCRIPT_LEPCHA, "G_UNICODE_SCRIPT_LEPCHA", "lepcha" },
-      { G_UNICODE_SCRIPT_REJANG, "G_UNICODE_SCRIPT_REJANG", "rejang" },
-      { G_UNICODE_SCRIPT_SUNDANESE, "G_UNICODE_SCRIPT_SUNDANESE", "sundanese" },
-      { G_UNICODE_SCRIPT_SAURASHTRA, "G_UNICODE_SCRIPT_SAURASHTRA", "saurashtra" },
-      { G_UNICODE_SCRIPT_CHAM, "G_UNICODE_SCRIPT_CHAM", "cham" },
-      { G_UNICODE_SCRIPT_OL_CHIKI, "G_UNICODE_SCRIPT_OL_CHIKI", "ol-chiki" },
-      { G_UNICODE_SCRIPT_VAI, "G_UNICODE_SCRIPT_VAI", "vai" },
-      { G_UNICODE_SCRIPT_CARIAN, "G_UNICODE_SCRIPT_CARIAN", "carian" },
-      { G_UNICODE_SCRIPT_LYCIAN, "G_UNICODE_SCRIPT_LYCIAN", "lycian" },
-      { G_UNICODE_SCRIPT_LYDIAN, "G_UNICODE_SCRIPT_LYDIAN", "lydian" },
-      { G_UNICODE_SCRIPT_AVESTAN, "G_UNICODE_SCRIPT_AVESTAN", "avestan" },
-      { G_UNICODE_SCRIPT_BAMUM, "G_UNICODE_SCRIPT_BAMUM", "bamum" },
-      { G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, "G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS", "egyptian-hieroglyphs" },
-      { G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, "G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC", "imperial-aramaic" },
-      { G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, "G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI", "inscriptional-pahlavi" },
-      { G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, "G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN", "inscriptional-parthian" },
-      { G_UNICODE_SCRIPT_JAVANESE, "G_UNICODE_SCRIPT_JAVANESE", "javanese" },
-      { G_UNICODE_SCRIPT_KAITHI, "G_UNICODE_SCRIPT_KAITHI", "kaithi" },
-      { G_UNICODE_SCRIPT_LISU, "G_UNICODE_SCRIPT_LISU", "lisu" },
-      { G_UNICODE_SCRIPT_MEETEI_MAYEK, "G_UNICODE_SCRIPT_MEETEI_MAYEK", "meetei-mayek" },
-      { G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, "G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN", "old-south-arabian" },
-      { G_UNICODE_SCRIPT_OLD_TURKIC, "G_UNICODE_SCRIPT_OLD_TURKIC", "old-turkic" },
-      { G_UNICODE_SCRIPT_SAMARITAN, "G_UNICODE_SCRIPT_SAMARITAN", "samaritan" },
-      { G_UNICODE_SCRIPT_TAI_THAM, "G_UNICODE_SCRIPT_TAI_THAM", "tai-tham" },
-      { G_UNICODE_SCRIPT_TAI_VIET, "G_UNICODE_SCRIPT_TAI_VIET", "tai-viet" },
-      { G_UNICODE_SCRIPT_BATAK, "G_UNICODE_SCRIPT_BATAK", "batak" },
-      { G_UNICODE_SCRIPT_BRAHMI, "G_UNICODE_SCRIPT_BRAHMI", "brahmi" },
-      { G_UNICODE_SCRIPT_MANDAIC, "G_UNICODE_SCRIPT_MANDAIC", "mandaic" },
-      { G_UNICODE_SCRIPT_CHAKMA, "G_UNICODE_SCRIPT_CHAKMA", "chakma" },
-      { G_UNICODE_SCRIPT_MEROITIC_CURSIVE, "G_UNICODE_SCRIPT_MEROITIC_CURSIVE", "meroitic-cursive" },
-      { G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, "G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS", "meroitic-hieroglyphs" },
-      { G_UNICODE_SCRIPT_MIAO, "G_UNICODE_SCRIPT_MIAO", "miao" },
-      { G_UNICODE_SCRIPT_SHARADA, "G_UNICODE_SCRIPT_SHARADA", "sharada" },
-      { G_UNICODE_SCRIPT_SORA_SOMPENG, "G_UNICODE_SCRIPT_SORA_SOMPENG", "sora-sompeng" },
-      { G_UNICODE_SCRIPT_TAKRI, "G_UNICODE_SCRIPT_TAKRI", "takri" },
-      { G_UNICODE_SCRIPT_BASSA_VAH, "G_UNICODE_SCRIPT_BASSA_VAH", "bassa-vah" },
-      { G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, "G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN", "caucasian-albanian" },
-      { G_UNICODE_SCRIPT_DUPLOYAN, "G_UNICODE_SCRIPT_DUPLOYAN", "duployan" },
-      { G_UNICODE_SCRIPT_ELBASAN, "G_UNICODE_SCRIPT_ELBASAN", "elbasan" },
-      { G_UNICODE_SCRIPT_GRANTHA, "G_UNICODE_SCRIPT_GRANTHA", "grantha" },
-      { G_UNICODE_SCRIPT_KHOJKI, "G_UNICODE_SCRIPT_KHOJKI", "khojki" },
-      { G_UNICODE_SCRIPT_KHUDAWADI, "G_UNICODE_SCRIPT_KHUDAWADI", "khudawadi" },
-      { G_UNICODE_SCRIPT_LINEAR_A, "G_UNICODE_SCRIPT_LINEAR_A", "linear-a" },
-      { G_UNICODE_SCRIPT_MAHAJANI, "G_UNICODE_SCRIPT_MAHAJANI", "mahajani" },
-      { G_UNICODE_SCRIPT_MANICHAEAN, "G_UNICODE_SCRIPT_MANICHAEAN", "manichaean" },
-      { G_UNICODE_SCRIPT_MENDE_KIKAKUI, "G_UNICODE_SCRIPT_MENDE_KIKAKUI", "mende-kikakui" },
-      { G_UNICODE_SCRIPT_MODI, "G_UNICODE_SCRIPT_MODI", "modi" },
-      { G_UNICODE_SCRIPT_MRO, "G_UNICODE_SCRIPT_MRO", "mro" },
-      { G_UNICODE_SCRIPT_NABATAEAN, "G_UNICODE_SCRIPT_NABATAEAN", "nabataean" },
-      { G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, "G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN", "old-north-arabian" },
-      { G_UNICODE_SCRIPT_OLD_PERMIC, "G_UNICODE_SCRIPT_OLD_PERMIC", "old-permic" },
-      { G_UNICODE_SCRIPT_PAHAWH_HMONG, "G_UNICODE_SCRIPT_PAHAWH_HMONG", "pahawh-hmong" },
-      { G_UNICODE_SCRIPT_PALMYRENE, "G_UNICODE_SCRIPT_PALMYRENE", "palmyrene" },
-      { G_UNICODE_SCRIPT_PAU_CIN_HAU, "G_UNICODE_SCRIPT_PAU_CIN_HAU", "pau-cin-hau" },
-      { G_UNICODE_SCRIPT_PSALTER_PAHLAVI, "G_UNICODE_SCRIPT_PSALTER_PAHLAVI", "psalter-pahlavi" },
-      { G_UNICODE_SCRIPT_SIDDHAM, "G_UNICODE_SCRIPT_SIDDHAM", "siddham" },
-      { G_UNICODE_SCRIPT_TIRHUTA, "G_UNICODE_SCRIPT_TIRHUTA", "tirhuta" },
-      { G_UNICODE_SCRIPT_WARANG_CITI, "G_UNICODE_SCRIPT_WARANG_CITI", "warang-citi" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GUnicodeScript", values);
-  }
-  return etype;
-}
-
-GType
-g_normalize_mode_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_NORMALIZE_DEFAULT, "G_NORMALIZE_DEFAULT", "default" },
-      { G_NORMALIZE_NFD, "G_NORMALIZE_NFD", "nfd" },
-      { G_NORMALIZE_DEFAULT_COMPOSE, "G_NORMALIZE_DEFAULT_COMPOSE", "default-compose" },
-      { G_NORMALIZE_NFC, "G_NORMALIZE_NFC", "nfc" },
-      { G_NORMALIZE_ALL, "G_NORMALIZE_ALL", "all" },
-      { G_NORMALIZE_NFKD, "G_NORMALIZE_NFKD", "nfkd" },
-      { G_NORMALIZE_ALL_COMPOSE, "G_NORMALIZE_ALL_COMPOSE", "all-compose" },
-      { G_NORMALIZE_NFKC, "G_NORMALIZE_NFKC", "nfkc" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GNormalizeMode", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/ghook.h" */
-GType
-g_hook_flag_mask_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_HOOK_FLAG_ACTIVE, "G_HOOK_FLAG_ACTIVE", "active" },
-      { G_HOOK_FLAG_IN_CALL, "G_HOOK_FLAG_IN_CALL", "in-call" },
-      { G_HOOK_FLAG_MASK, "G_HOOK_FLAG_MASK", "mask" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GHookFlagMask", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gthread.h" */
-GType
-g_thread_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_THREAD_ERROR_AGAIN, "G_THREAD_ERROR_AGAIN", "again" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GThreadError", values);
-  }
-  return etype;
-}
-
-GType
-g_once_status_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_ONCE_STATUS_NOTCALLED, "G_ONCE_STATUS_NOTCALLED", "notcalled" },
-      { G_ONCE_STATUS_PROGRESS, "G_ONCE_STATUS_PROGRESS", "progress" },
-      { G_ONCE_STATUS_READY, "G_ONCE_STATUS_READY", "ready" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GOnceStatus", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gstrfuncs.h" */
-GType
-g_ascii_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_ASCII_ALNUM, "G_ASCII_ALNUM", "alnum" },
-      { G_ASCII_ALPHA, "G_ASCII_ALPHA", "alpha" },
-      { G_ASCII_CNTRL, "G_ASCII_CNTRL", "cntrl" },
-      { G_ASCII_DIGIT, "G_ASCII_DIGIT", "digit" },
-      { G_ASCII_GRAPH, "G_ASCII_GRAPH", "graph" },
-      { G_ASCII_LOWER, "G_ASCII_LOWER", "lower" },
-      { G_ASCII_PRINT, "G_ASCII_PRINT", "print" },
-      { G_ASCII_PUNCT, "G_ASCII_PUNCT", "punct" },
-      { G_ASCII_SPACE, "G_ASCII_SPACE", "space" },
-      { G_ASCII_UPPER, "G_ASCII_UPPER", "upper" },
-      { G_ASCII_XDIGIT, "G_ASCII_XDIGIT", "xdigit" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GAsciiType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gmessages.h" */
-GType
-g_log_level_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_LOG_FLAG_RECURSION, "G_LOG_FLAG_RECURSION", "flag-recursion" },
-      { G_LOG_FLAG_FATAL, "G_LOG_FLAG_FATAL", "flag-fatal" },
-      { G_LOG_LEVEL_ERROR, "G_LOG_LEVEL_ERROR", "level-error" },
-      { G_LOG_LEVEL_CRITICAL, "G_LOG_LEVEL_CRITICAL", "level-critical" },
-      { G_LOG_LEVEL_WARNING, "G_LOG_LEVEL_WARNING", "level-warning" },
-      { G_LOG_LEVEL_MESSAGE, "G_LOG_LEVEL_MESSAGE", "level-message" },
-      { G_LOG_LEVEL_INFO, "G_LOG_LEVEL_INFO", "level-info" },
-      { G_LOG_LEVEL_DEBUG, "G_LOG_LEVEL_DEBUG", "level-debug" },
-      { G_LOG_LEVEL_MASK, "G_LOG_LEVEL_MASK", "level-mask" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GLogLevelFlags", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gchecksum.h" */
-GType
-g_checksum_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_CHECKSUM_MD5, "G_CHECKSUM_MD5", "md5" },
-      { G_CHECKSUM_SHA1, "G_CHECKSUM_SHA1", "sha1" },
-      { G_CHECKSUM_SHA256, "G_CHECKSUM_SHA256", "sha256" },
-      { G_CHECKSUM_SHA512, "G_CHECKSUM_SHA512", "sha512" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GChecksumType", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gutils.h" */
-GType
-g_user_directory_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_USER_DIRECTORY_DESKTOP, "G_USER_DIRECTORY_DESKTOP", "directory-desktop" },
-      { G_USER_DIRECTORY_DOCUMENTS, "G_USER_DIRECTORY_DOCUMENTS", "directory-documents" },
-      { G_USER_DIRECTORY_DOWNLOAD, "G_USER_DIRECTORY_DOWNLOAD", "directory-download" },
-      { G_USER_DIRECTORY_MUSIC, "G_USER_DIRECTORY_MUSIC", "directory-music" },
-      { G_USER_DIRECTORY_PICTURES, "G_USER_DIRECTORY_PICTURES", "directory-pictures" },
-      { G_USER_DIRECTORY_PUBLIC_SHARE, "G_USER_DIRECTORY_PUBLIC_SHARE", "directory-public-share" },
-      { G_USER_DIRECTORY_TEMPLATES, "G_USER_DIRECTORY_TEMPLATES", "directory-templates" },
-      { G_USER_DIRECTORY_VIDEOS, "G_USER_DIRECTORY_VIDEOS", "directory-videos" },
-      { G_USER_N_DIRECTORIES, "G_USER_N_DIRECTORIES", "n-directories" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GUserDirectory", values);
-  }
-  return etype;
-}
-
-GType
-g_format_size_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_FORMAT_SIZE_DEFAULT, "G_FORMAT_SIZE_DEFAULT", "default" },
-      { G_FORMAT_SIZE_LONG_FORMAT, "G_FORMAT_SIZE_LONG_FORMAT", "long-format" },
-      { G_FORMAT_SIZE_IEC_UNITS, "G_FORMAT_SIZE_IEC_UNITS", "iec-units" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GFormatSizeFlags", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/goption.h" */
-GType
-g_option_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_OPTION_FLAG_NONE, "G_OPTION_FLAG_NONE", "none" },
-      { G_OPTION_FLAG_HIDDEN, "G_OPTION_FLAG_HIDDEN", "hidden" },
-      { G_OPTION_FLAG_IN_MAIN, "G_OPTION_FLAG_IN_MAIN", "in-main" },
-      { G_OPTION_FLAG_REVERSE, "G_OPTION_FLAG_REVERSE", "reverse" },
-      { G_OPTION_FLAG_NO_ARG, "G_OPTION_FLAG_NO_ARG", "no-arg" },
-      { G_OPTION_FLAG_FILENAME, "G_OPTION_FLAG_FILENAME", "filename" },
-      { G_OPTION_FLAG_OPTIONAL_ARG, "G_OPTION_FLAG_OPTIONAL_ARG", "optional-arg" },
-      { G_OPTION_FLAG_NOALIAS, "G_OPTION_FLAG_NOALIAS", "noalias" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GOptionFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_option_arg_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_OPTION_ARG_NONE, "G_OPTION_ARG_NONE", "none" },
-      { G_OPTION_ARG_STRING, "G_OPTION_ARG_STRING", "string" },
-      { G_OPTION_ARG_INT, "G_OPTION_ARG_INT", "int" },
-      { G_OPTION_ARG_CALLBACK, "G_OPTION_ARG_CALLBACK", "callback" },
-      { G_OPTION_ARG_FILENAME, "G_OPTION_ARG_FILENAME", "filename" },
-      { G_OPTION_ARG_STRING_ARRAY, "G_OPTION_ARG_STRING_ARRAY", "string-array" },
-      { G_OPTION_ARG_FILENAME_ARRAY, "G_OPTION_ARG_FILENAME_ARRAY", "filename-array" },
-      { G_OPTION_ARG_DOUBLE, "G_OPTION_ARG_DOUBLE", "double" },
-      { G_OPTION_ARG_INT64, "G_OPTION_ARG_INT64", "int64" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GOptionArg", values);
-  }
-  return etype;
-}
-
-GType
-g_option_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_OPTION_ERROR_UNKNOWN_OPTION, "G_OPTION_ERROR_UNKNOWN_OPTION", "unknown-option" },
-      { G_OPTION_ERROR_BAD_VALUE, "G_OPTION_ERROR_BAD_VALUE", "bad-value" },
-      { G_OPTION_ERROR_FAILED, "G_OPTION_ERROR_FAILED", "failed" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GOptionError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gconvert.h" */
-GType
-g_convert_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_CONVERT_ERROR_NO_CONVERSION, "G_CONVERT_ERROR_NO_CONVERSION", "no-conversion" },
-      { G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "G_CONVERT_ERROR_ILLEGAL_SEQUENCE", "illegal-sequence" },
-      { G_CONVERT_ERROR_FAILED, "G_CONVERT_ERROR_FAILED", "failed" },
-      { G_CONVERT_ERROR_PARTIAL_INPUT, "G_CONVERT_ERROR_PARTIAL_INPUT", "partial-input" },
-      { G_CONVERT_ERROR_BAD_URI, "G_CONVERT_ERROR_BAD_URI", "bad-uri" },
-      { G_CONVERT_ERROR_NOT_ABSOLUTE_PATH, "G_CONVERT_ERROR_NOT_ABSOLUTE_PATH", "not-absolute-path" },
-      { G_CONVERT_ERROR_NO_MEMORY, "G_CONVERT_ERROR_NO_MEMORY", "no-memory" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GConvertError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/glib/gbookmarkfile.h" */
-GType
-g_bookmark_file_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_BOOKMARK_FILE_ERROR_INVALID_URI, "G_BOOKMARK_FILE_ERROR_INVALID_URI", "invalid-uri" },
-      { G_BOOKMARK_FILE_ERROR_INVALID_VALUE, "G_BOOKMARK_FILE_ERROR_INVALID_VALUE", "invalid-value" },
-      { G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, "G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED", "app-not-registered" },
-      { G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, "G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND", "uri-not-found" },
-      { G_BOOKMARK_FILE_ERROR_READ, "G_BOOKMARK_FILE_ERROR_READ", "read" },
-      { G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, "G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING", "unknown-encoding" },
-      { G_BOOKMARK_FILE_ERROR_WRITE, "G_BOOKMARK_FILE_ERROR_WRITE", "write" },
-      { G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND, "G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND", "file-not-found" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GBookmarkFileError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/glib-2.0/gobject/gsignal.h" */
-GType
-g_signal_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_SIGNAL_RUN_FIRST, "G_SIGNAL_RUN_FIRST", "run-first" },
-      { G_SIGNAL_RUN_LAST, "G_SIGNAL_RUN_LAST", "run-last" },
-      { G_SIGNAL_RUN_CLEANUP, "G_SIGNAL_RUN_CLEANUP", "run-cleanup" },
-      { G_SIGNAL_NO_RECURSE, "G_SIGNAL_NO_RECURSE", "no-recurse" },
-      { G_SIGNAL_DETAILED, "G_SIGNAL_DETAILED", "detailed" },
-      { G_SIGNAL_ACTION, "G_SIGNAL_ACTION", "action" },
-      { G_SIGNAL_NO_HOOKS, "G_SIGNAL_NO_HOOKS", "no-hooks" },
-      { G_SIGNAL_MUST_COLLECT, "G_SIGNAL_MUST_COLLECT", "must-collect" },
-      { G_SIGNAL_DEPRECATED, "G_SIGNAL_DEPRECATED", "deprecated" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GSignalFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_connect_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_CONNECT_AFTER, "G_CONNECT_AFTER", "after" },
-      { G_CONNECT_SWAPPED, "G_CONNECT_SWAPPED", "swapped" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GConnectFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_signal_match_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_SIGNAL_MATCH_ID, "G_SIGNAL_MATCH_ID", "id" },
-      { G_SIGNAL_MATCH_DETAIL, "G_SIGNAL_MATCH_DETAIL", "detail" },
-      { G_SIGNAL_MATCH_CLOSURE, "G_SIGNAL_MATCH_CLOSURE", "closure" },
-      { G_SIGNAL_MATCH_FUNC, "G_SIGNAL_MATCH_FUNC", "func" },
-      { G_SIGNAL_MATCH_DATA, "G_SIGNAL_MATCH_DATA", "data" },
-      { G_SIGNAL_MATCH_UNBLOCKED, "G_SIGNAL_MATCH_UNBLOCKED", "unblocked" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GSignalMatchType", values);
-  }
-  return etype;
-}
-
-
-/* Generated data ends here */
-
diff --git a/glib2/ext/glib2/glib-enum-types.h b/glib2/ext/glib2/glib-enum-types.h
deleted file mode 100644
index bacd0c0..0000000
--- a/glib2/ext/glib2/glib-enum-types.h
+++ /dev/null
@@ -1,154 +0,0 @@
-
-/* Generated by glib-mkenums.rb ($Id$) */ 
-
-#ifndef __GLIB_ENUM_TYPES_H__
-#define __GLIB_ENUM_TYPES_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* enumerations from "/usr/include/glib-2.0/glib/gvariant.h" */
-GType g_variant_class_get_type (void);
-#define G_TYPE_VARIANT_CLASS (g_variant_class_get_type())
-GType g_variant_parse_error_get_type (void);
-#define G_TYPE_VARIANT_PARSE_ERROR (g_variant_parse_error_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gspawn.h" */
-GType g_spawn_error_get_type (void);
-#define G_TYPE_SPAWN_ERROR (g_spawn_error_get_type())
-GType g_spawn_flags_get_type (void);
-#define G_TYPE_SPAWN_FLAGS (g_spawn_flags_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gkeyfile.h" */
-GType g_key_file_error_get_type (void);
-#define G_TYPE_KEY_FILE_ERROR (g_key_file_error_get_type())
-GType g_key_file_flags_get_type (void);
-#define G_TYPE_KEY_FILE_FLAGS (g_key_file_flags_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gnode.h" */
-GType g_traverse_flags_get_type (void);
-#define G_TYPE_TRAVERSE_FLAGS (g_traverse_flags_get_type())
-GType g_traverse_type_get_type (void);
-#define G_TYPE_TRAVERSE_TYPE (g_traverse_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gshell.h" */
-GType g_shell_error_get_type (void);
-#define G_TYPE_SHELL_ERROR (g_shell_error_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gslice.h" */
-GType g_slice_config_get_type (void);
-#define G_TYPE_SLICE_CONFIG (g_slice_config_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gregex.h" */
-GType g_regex_error_get_type (void);
-#define G_TYPE_REGEX_ERROR (g_regex_error_get_type())
-GType g_regex_compile_flags_get_type (void);
-#define G_TYPE_REGEX_COMPILE_FLAGS (g_regex_compile_flags_get_type())
-GType g_regex_match_flags_get_type (void);
-#define G_TYPE_REGEX_MATCH_FLAGS (g_regex_match_flags_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gmarkup.h" */
-GType g_markup_error_get_type (void);
-#define G_TYPE_MARKUP_ERROR (g_markup_error_get_type())
-GType g_markup_parse_flags_get_type (void);
-#define G_TYPE_MARKUP_PARSE_FLAGS (g_markup_parse_flags_get_type())
-GType g_markup_collect_type_get_type (void);
-#define G_TYPE_MARKUP_COLLECT_TYPE (g_markup_collect_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gtestutils.h" */
-GType g_test_trap_flags_get_type (void);
-#define G_TYPE_TEST_TRAP_FLAGS (g_test_trap_flags_get_type())
-GType g_test_subprocess_flags_get_type (void);
-#define G_TYPE_TEST_SUBPROCESS_FLAGS (g_test_subprocess_flags_get_type())
-GType g_test_log_type_get_type (void);
-#define G_TYPE_TEST_LOG_TYPE (g_test_log_type_get_type())
-GType g_test_file_type_get_type (void);
-#define G_TYPE_TEST_FILE_TYPE (g_test_file_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gfileutils.h" */
-GType g_file_error_get_type (void);
-#define G_TYPE_FILE_ERROR (g_file_error_get_type())
-GType g_file_test_get_type (void);
-#define G_TYPE_FILE_TEST (g_file_test_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gtimezone.h" */
-GType g_time_type_get_type (void);
-#define G_TYPE_TIME_TYPE (g_time_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gdate.h" */
-GType g_date_dm_y_get_type (void);
-#define G_TYPE_DATE_DM_Y (g_date_dm_y_get_type())
-GType g_date_weekday_get_type (void);
-#define G_TYPE_DATE_WEEKDAY (g_date_weekday_get_type())
-GType g_date_month_get_type (void);
-#define G_TYPE_DATE_MONTH (g_date_month_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gunicode.h" */
-GType g_unicode_type_get_type (void);
-#define G_TYPE_UNICODE_TYPE (g_unicode_type_get_type())
-GType g_unicode_break_type_get_type (void);
-#define G_TYPE_UNICODE_BREAK_TYPE (g_unicode_break_type_get_type())
-GType g_unicode_script_get_type (void);
-#define G_TYPE_UNICODE_SCRIPT (g_unicode_script_get_type())
-GType g_normalize_mode_get_type (void);
-#define G_TYPE_NORMALIZE_MODE (g_normalize_mode_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/ghook.h" */
-GType g_hook_flag_mask_get_type (void);
-#define G_TYPE_HOOK_FLAG_MASK (g_hook_flag_mask_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gthread.h" */
-GType g_thread_error_get_type (void);
-#define G_TYPE_THREAD_ERROR (g_thread_error_get_type())
-GType g_once_status_get_type (void);
-#define G_TYPE_ONCE_STATUS (g_once_status_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gstrfuncs.h" */
-GType g_ascii_type_get_type (void);
-#define G_TYPE_ASCII_TYPE (g_ascii_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gmessages.h" */
-GType g_log_level_flags_get_type (void);
-#define G_TYPE_LOG_LEVEL_FLAGS (g_log_level_flags_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gchecksum.h" */
-GType g_checksum_type_get_type (void);
-#define G_TYPE_CHECKSUM_TYPE (g_checksum_type_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gutils.h" */
-GType g_user_directory_get_type (void);
-#define G_TYPE_USER_DIRECTORY (g_user_directory_get_type())
-GType g_format_size_flags_get_type (void);
-#define G_TYPE_FORMAT_SIZE_FLAGS (g_format_size_flags_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/goption.h" */
-GType g_option_flags_get_type (void);
-#define G_TYPE_OPTION_FLAGS (g_option_flags_get_type())
-GType g_option_arg_get_type (void);
-#define G_TYPE_OPTION_ARG (g_option_arg_get_type())
-GType g_option_error_get_type (void);
-#define G_TYPE_OPTION_ERROR (g_option_error_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gconvert.h" */
-GType g_convert_error_get_type (void);
-#define G_TYPE_CONVERT_ERROR (g_convert_error_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/glib/gbookmarkfile.h" */
-GType g_bookmark_file_error_get_type (void);
-#define G_TYPE_BOOKMARK_FILE_ERROR (g_bookmark_file_error_get_type())
-
-/* enumerations from "/usr/include/glib-2.0/gobject/gsignal.h" */
-GType g_signal_flags_get_type (void);
-#define G_TYPE_SIGNAL_FLAGS (g_signal_flags_get_type())
-GType g_connect_flags_get_type (void);
-#define G_TYPE_CONNECT_FLAGS (g_connect_flags_get_type())
-GType g_signal_match_type_get_type (void);
-#define G_TYPE_SIGNAL_MATCH_TYPE (g_signal_match_type_get_type())
-
-G_END_DECLS
-
-#endif /* __GLIB_ENUM_TYPES_H__ */
-
-/* Generated data ends here */
-
diff --git a/glib2/ext/glib2/glib2.def b/glib2/ext/glib2/glib2.def
index 4c9660c..263e3ec 100644
--- a/glib2/ext/glib2/glib2.def
+++ b/glib2/ext/glib2/glib2.def
@@ -52,6 +52,8 @@ EXPORTS
 	rbgobj_register_class
 	rbgobj_register_property_getter
 	rbgobj_register_property_setter
+	rbgobj_class_init_func
+	rbgobj_register_type
 	rbgobj_set_signal_func
 	rbgobj_get_signal_func
 	rbgobj_add_constants
@@ -67,6 +69,7 @@ EXPORTS
 	rbg_rval_inspect
 	rbg_string_value_ptr
 	rbg_rval2cstr
+	rbg_rval2cstr_ptr
 	rbg_rval2cstr_accept_nil
 	rbg_rval2cstr_accept_symbol
 	rbg_rval2cstr_accept_symbol_accept_nil
@@ -101,6 +104,8 @@ EXPORTS
         rbg_gslist2rval
         rbg_glist2rval_with_type
         rbg_gslist2rval_with_type
+	rbg_rval2glist
+	rbg_rval2gslist
 	rbg_define_method
 	rbg_define_singleton_method
 	rbg_to_array
@@ -110,6 +115,7 @@ EXPORTS
 	rbg_scan_options
 	rbg_inspect
 	rbg_interrupt_source_new
+	rbg_name_to_nick
 	rbgutil_id_module_eval		DATA
 	rbgutil_def_setters
 	rbgutil_glist2ary
@@ -140,6 +146,8 @@ EXPORTS
 	rbglib_uint64_to_num
 	rbglib_num_to_int64
 	rbglib_int64_to_num
+	rbg_variant_to_ruby
+	rbg_variant_from_ruby
 
 	g_source_get_type
 	g_connect_flags_get_type
diff --git a/glib2/ext/glib2/rbglib-variant-type.c b/glib2/ext/glib2/rbglib-variant-type.c
new file mode 100644
index 0000000..70e7979
--- /dev/null
+++ b/glib2/ext/glib2/rbglib-variant-type.c
@@ -0,0 +1,296 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgprivate.h"
+
+#define RG_TARGET_NAMESPACE cVariantType
+
+#define _SELF(s) (RVAL2GVARIANTTYPE(s))
+
+static VALUE RG_TARGET_NAMESPACE;
+
+static VALUE
+rg_s_valid_p(G_GNUC_UNUSED VALUE klass, VALUE rb_string)
+{
+    gboolean is_valid;
+
+    is_valid = g_variant_type_string_is_valid(StringValueCStr(rb_string));
+
+    return CBOOL2RVAL(is_valid);
+}
+
+static VALUE
+rg_s_scan(G_GNUC_UNUSED VALUE klass, VALUE rb_string)
+{
+    gboolean found;
+    const gchar *string;
+    const gchar *end;
+
+    string = StringValueCStr(rb_string);
+    found = g_variant_type_string_scan(string, NULL, &end);
+
+    if (!found) {
+        return Qnil;
+    }
+
+    return CSTR2RVAL(end);
+}
+
+static VALUE
+rg_initialize(VALUE self, VALUE rb_string)
+{
+    GVariantType *variant_type;
+    const gchar *string;
+
+    string = StringValueCStr(rb_string);
+    if (!g_variant_type_string_is_valid(string)) {
+        rb_raise(rb_eArgError,
+                 "invalid type string: %s", rbg_inspect(rb_string));
+    }
+
+    variant_type = g_variant_type_new(string);
+    G_INITIALIZE(self, variant_type);
+
+    return Qnil;
+}
+
+static VALUE
+rg_to_s(VALUE self)
+{
+    GVariantType *variant_type;
+    const gchar *string;
+    gsize string_length;
+
+    variant_type = _SELF(self);
+    string = g_variant_type_peek_string(variant_type);
+    string_length = g_variant_type_get_string_length(variant_type);
+
+    return CSTR2RVAL_LEN(string, string_length);
+}
+
+static VALUE
+rg_definite_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_definite(variant_type));
+}
+
+static VALUE
+rg_container_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_container(variant_type));
+}
+
+static VALUE
+rg_basic_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_basic(variant_type));
+}
+
+static VALUE
+rg_maybe_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_maybe(variant_type));
+}
+
+static VALUE
+rg_array_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_array(variant_type));
+}
+
+static VALUE
+rg_tuple_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_tuple(variant_type));
+}
+
+static VALUE
+rg_dict_entry_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_dict_entry(variant_type));
+}
+
+static VALUE
+rg_variant_p(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return CBOOL2RVAL(g_variant_type_is_variant(variant_type));
+}
+
+static VALUE
+rg_operator_eq(VALUE self, VALUE other)
+{
+    GVariantType *variant_type1;
+    GVariantType *variant_type2;
+
+    if (!RVAL2CBOOL(rb_obj_is_kind_of(other, RG_TARGET_NAMESPACE)))
+        return Qfalse;
+
+    variant_type1 = _SELF(self);
+    variant_type2 = _SELF(other);
+    return CBOOL2RVAL(g_variant_type_equal(variant_type1, variant_type2));
+}
+
+static VALUE
+rg_hash(VALUE self)
+{
+    GVariantType *variant_type;
+
+    variant_type = _SELF(self);
+    return UINT2NUM(g_variant_type_hash(variant_type));
+}
+
+static VALUE
+rg_is_subtype_of_p(VALUE self, VALUE rb_subtype)
+{
+    GVariantType *variant_type;
+    GVariantType *sub_variant_type;
+
+    if (!RVAL2CBOOL(rb_obj_is_kind_of(rb_subtype, RG_TARGET_NAMESPACE)))
+        return Qfalse;
+
+    variant_type = _SELF(self);
+    sub_variant_type = _SELF(rb_subtype);
+    return CBOOL2RVAL(g_variant_type_is_subtype_of(variant_type,
+                                                   sub_variant_type));
+}
+
+static VALUE
+rg_element(VALUE self)
+{
+    GVariantType *variant_type;
+    const GVariantType *element;
+
+    variant_type = _SELF(self);
+    if (!(g_variant_type_is_array(variant_type) ||
+          g_variant_type_is_maybe(variant_type))) {
+        rb_raise(rb_eArgError,
+                 "must be array or maybe type: <%.*s>",
+                 (int)g_variant_type_get_string_length(variant_type),
+                 g_variant_type_peek_string(variant_type));
+    }
+
+    element = g_variant_type_element(variant_type);
+    return GVARIANTTYPE2RVAL((GVariantType *)element);
+}
+
+void
+Init_glib_variant_type(void)
+{
+    RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_VARIANT_TYPE, "VariantType", mGLib);
+
+    RG_DEF_SMETHOD_P(valid, 1);
+    RG_DEF_SMETHOD(scan, 1);
+
+    RG_DEF_METHOD(initialize, 1);
+    RG_DEF_METHOD(to_s, 0);
+
+    RG_DEF_METHOD_P(definite, 0);
+    RG_DEF_METHOD_P(container, 0);
+    RG_DEF_METHOD_P(basic, 0);
+    RG_DEF_METHOD_P(maybe, 0);
+    RG_DEF_METHOD_P(array, 0);
+    RG_DEF_METHOD_P(tuple, 0);
+    RG_DEF_METHOD_P(dict_entry, 0);
+    RG_DEF_METHOD_P(variant, 0);
+
+    RG_DEF_METHOD_OPERATOR("==", eq, 1);
+
+    RG_DEF_METHOD(hash, 0);
+    RG_DEF_ALIAS("eql?", "==");
+
+    RG_DEF_METHOD_P(is_subtype_of, 1);
+
+    RG_DEF_METHOD(element, 0);
+
+    {
+        ID id_new;
+
+        CONST_ID(id_new, "new");
+
+#define DEF_TYPE(name) do {                                             \
+            const GVariantType *type = G_VARIANT_TYPE_ ## name;         \
+            const gchar *type_string;                                   \
+            gsize type_string_length;                                   \
+            VALUE rb_type_string;                                       \
+                                                                        \
+            type_string = g_variant_type_peek_string(type);             \
+            type_string_length = g_variant_type_get_string_length(type); \
+            rb_type_string = rb_str_new(type_string,                    \
+                                        type_string_length);            \
+            rb_define_const(RG_TARGET_NAMESPACE, G_STRINGIFY(name),     \
+                            rb_funcall(RG_TARGET_NAMESPACE, id_new, 1,  \
+                                       rb_type_string));                \
+        } while (0)
+
+        DEF_TYPE(BOOLEAN);
+        DEF_TYPE(BYTE);
+        DEF_TYPE(INT16);
+        DEF_TYPE(UINT16);
+        DEF_TYPE(INT32);
+        DEF_TYPE(UINT32);
+        DEF_TYPE(INT64);
+        DEF_TYPE(UINT64);
+        DEF_TYPE(HANDLE);
+        DEF_TYPE(DOUBLE);
+        DEF_TYPE(STRING);
+        DEF_TYPE(OBJECT_PATH);
+        DEF_TYPE(SIGNATURE);
+        DEF_TYPE(VARIANT);
+        DEF_TYPE(ANY);
+        DEF_TYPE(BASIC);
+        DEF_TYPE(MAYBE);
+        DEF_TYPE(ARRAY);
+        DEF_TYPE(TUPLE);
+        DEF_TYPE(UNIT);
+        DEF_TYPE(DICT_ENTRY);
+        DEF_TYPE(DICTIONARY);
+        DEF_TYPE(STRING_ARRAY);
+        DEF_TYPE(OBJECT_PATH_ARRAY);
+        DEF_TYPE(BYTESTRING);
+        DEF_TYPE(BYTESTRING_ARRAY);
+        DEF_TYPE(VARDICT);
+
+#undef DEF_TYPE
+    }
+}
diff --git a/glib2/ext/glib2/rbglib-variant.c b/glib2/ext/glib2/rbglib-variant.c
new file mode 100644
index 0000000..e4c7530
--- /dev/null
+++ b/glib2/ext/glib2/rbglib-variant.c
@@ -0,0 +1,132 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgprivate.h"
+
+#define RG_TARGET_NAMESPACE cVariant
+
+#define _SELF(s) (DATA_PTR(s))
+
+static VALUE RG_TARGET_NAMESPACE;
+
+VALUE
+rbg_variant_to_ruby(GVariant *variant)
+{
+    const GVariantType *type;
+
+    if (!variant) {
+        return Qnil;
+    }
+
+    type = g_variant_get_type(variant);
+
+    if (g_variant_type_equal(type, G_VARIANT_TYPE_BOOLEAN)) {
+        return CBOOL2RVAL(g_variant_get_boolean(variant));
+    } else if (g_variant_type_equal(type, G_VARIANT_TYPE_STRING)) {
+        const gchar *string;
+        gsize string_length;
+        string = g_variant_get_string(variant, &string_length);
+        return CSTR2RVAL_LEN(string, string_length);
+    } else {
+        rb_raise(rb_eNotImpError,
+                 "TODO: GVariant(%.*s) -> Ruby",
+                 (int)g_variant_type_get_string_length(type),
+                 g_variant_type_peek_string(type));
+    }
+
+    return Qnil;
+}
+
+GVariant *
+rbg_variant_from_ruby(VALUE rb_variant)
+{
+    if (NIL_P(rb_variant)) {
+        return NULL;
+    } else {
+        return _SELF(rb_variant);
+    }
+}
+
+static void
+rg_variant_free(gpointer object)
+{
+    GVariant *variant = object;
+
+    g_variant_unref(variant);
+}
+
+static VALUE
+rg_variant_allocate(VALUE klass)
+{
+    return Data_Wrap_Struct(klass, NULL, rg_variant_free, NULL);
+}
+
+static VALUE
+rg_initialize(VALUE self, VALUE rb_value)
+{
+    GVariant *variant;
+
+    switch (rb_type(rb_value)) {
+      case RUBY_T_STRING:
+        variant = g_variant_new_string(RVAL2CSTR(rb_value));
+        break;
+      default:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GVariant: %s",
+                 RBG_INSPECT(rb_value));
+        break;
+    }
+    g_variant_ref_sink(variant);
+    DATA_PTR(self) = variant;
+
+    return Qnil;
+}
+
+static VALUE
+rg_value(VALUE self)
+{
+    GVariant *variant;
+
+    variant = _SELF(self);
+
+    return rbg_variant_to_ruby(variant);
+}
+
+static VALUE
+rg_type(VALUE self)
+{
+    GVariant *variant;
+
+    variant = _SELF(self);
+
+    return GVARIANTTYPE2RVAL((GVariantType *)g_variant_get_type(variant));
+}
+
+void
+Init_glib_variant(void)
+{
+    RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_VARIANT, "Variant", mGLib);
+
+    rb_define_alloc_func(RG_TARGET_NAMESPACE, rg_variant_allocate);
+
+    RG_DEF_METHOD(initialize, 1);
+    RG_DEF_METHOD(value, 0);
+    RG_DEF_METHOD(type, 0);
+}
diff --git a/glib2/ext/glib2/rbglib.c b/glib2/ext/glib2/rbglib.c
index 5cfc3a3..d456223 100644
--- a/glib2/ext/glib2/rbglib.c
+++ b/glib2/ext/glib2/rbglib.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002,2003  Masahiro Sakai
  *
  *  This library is free software; you can redistribute it and/or
@@ -39,6 +39,19 @@ rbg_rval2cstr(VALUE *str)
         *str = rb_str_export_to_enc(*str, rb_utf8_encoding());
 #endif
 
+    return StringValueCStr(*str);
+}
+
+const gchar *
+rbg_rval2cstr_ptr(VALUE *str)
+{
+    StringValue(*str);
+
+#ifdef HAVE_RUBY_ENCODING_H
+    if (rb_enc_get(*str) != rb_utf8_encoding())
+        *str = rb_str_export_to_enc(*str, rb_utf8_encoding());
+#endif
+
     return RSTRING_PTR(*str);
 }
 
@@ -1155,4 +1168,6 @@ union       GDoubleIEEE754;
     Init_glib_unichar();
     Init_glib_keyfile();
     Init_glib_bookmark_file();
+    Init_glib_variant_type();
+    Init_glib_variant();
 }
diff --git a/glib2/ext/glib2/rbglib.h b/glib2/ext/glib2/rbglib.h
index d822663..c6e51b0 100644
--- a/glib2/ext/glib2/rbglib.h
+++ b/glib2/ext/glib2/rbglib.h
@@ -1,7 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011-2014  Ruby-GNOME2 Project Team
- *  Copyright (C) 2002-2005  Ruby-GNOME2 Project
+ *  Copyright (C) 2002-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002,2003  Masahiro Sakai
  *
  *  This library is free software; you can redistribute it and/or
@@ -21,6 +20,7 @@
  */
 
 #include <glib-object.h>
+#include "glib-enum-types.h"
 
 #include "ruby.h"
 
@@ -34,9 +34,9 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#define RBGLIB_MAJOR_VERSION 2
-#define RBGLIB_MINOR_VERSION 2
-#define RBGLIB_MICRO_VERSION 5
+#define RBGLIB_MAJOR_VERSION 3
+#define RBGLIB_MINOR_VERSION 0
+#define RBGLIB_MICRO_VERSION 0
 
 #ifndef RSTRING_PTR
 #  define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -44,8 +44,12 @@ extern "C" {
 #endif
 
 #ifndef RARRAY_PTR
-#  define RARRAY_PTR(s) (RARRAY(s)->ptr)
-#  define RARRAY_LEN(s) (RARRAY(s)->len)
+#  define RARRAY_PTR(a) (RARRAY(a)->ptr)
+#  define RARRAY_LEN(a) (RARRAY(a)->len)
+#endif
+
+#ifndef RARRAY_CONST_PTR
+#  define RARRAY_CONST_PTR(a) RARRAY_PTR(a)
 #endif
 
 #ifndef DBL2NUM
@@ -67,6 +71,7 @@ extern "C" {
 #define RBG_INSPECT(object) (rbg_rval_inspect(object))
 
 #define RVAL2CSTR(v) (rbg_rval2cstr(&(v)))
+#define RVAL2CSTR_PTR(v) (rbg_rval2cstr_ptr(&(v)))
 #define RVAL2CSTR_ACCEPT_NIL(v) (rbg_rval2cstr_accept_nil(&(v)))
 #define RVAL2CSTR2(v) (RVAL2CSTR_ACCEPT_NIL(v))
 #define RVAL2CSTR_ACCEPT_SYMBOL(v) (rbg_rval2cstr_accept_symbol(&(v)))
@@ -142,6 +147,7 @@ extern const gchar *rbg_rval_inspect(VALUE object);
 
 extern gchar* rbg_string_value_ptr(volatile VALUE* ptr); /* no longer used */
 extern const gchar *rbg_rval2cstr(VALUE *str);
+extern const gchar *rbg_rval2cstr_ptr(VALUE *str);
 extern const gchar *rbg_rval2cstr_accept_nil(VALUE *str);
 extern const gchar *rbg_rval2cstr_accept_symbol(volatile VALUE *value);
 extern const gchar *rbg_rval2cstr_accept_symbol_accept_nil(volatile VALUE *value);
@@ -195,6 +201,11 @@ extern VALUE rbglib_uint64_to_num(guint64 val);
 extern gint64 rbglib_num_to_int64(VALUE val);
 extern guint64 rbglib_num_to_uint64(VALUE val);
 
+
+extern VALUE rbg_variant_to_ruby(GVariant *variant);
+extern GVariant *rbg_variant_from_ruby(VALUE rb_variant);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
diff --git a/glib2/ext/glib2/rbglib2conversions.h b/glib2/ext/glib2/rbglib2conversions.h
index 94f0605..489f2f8 100644
--- a/glib2/ext/glib2/rbglib2conversions.h
+++ b/glib2/ext/glib2/rbglib2conversions.h
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -41,6 +41,8 @@
 #define GTIMER2RVAL(o)                     (BOXED2RVAL(o, G_TYPE_TIMER))
 #define RVAL2GVALUE(o)                     ((GValue*)RVAL2BOXED(o, G_TYPE_VALUE))
 #define GVALUE2RVAL(o)                     (BOXED2RVAL(o, G_TYPE_VALUE))
+#define RVAL2GVARIANTTYPE(o)               ((GVariantType *)RVAL2BOXED(o, G_TYPE_VARIANT_TYPE))
+#define GVARIANTTYPE2RVAL(o)               (BOXED2RVAL(o, G_TYPE_VARIANT_TYPE))
 
 #define RVAL2GIOCONDITION(o)               (RVAL2GFLAGS(o, G_TYPE_IO_CONDITION))
 #define GIOCONDITION2RVAL(o)               (GFLAGS2RVAL(o, G_TYPE_IO_CONDITION))
@@ -54,4 +56,7 @@
 
 #define RVAL2GFORMATSIZEFLAGS(o)           (RVAL2GFLAGS(o, G_TYPE_FORMAT_SIZE_FLAGS))
 #define GFORMATSIZEFLAGS2RVAL(o)           (GFLAGS2RVAL(o, G_TYPE_FORMAT_SIZE_FLAGS))
+
+#define RVAL2GBINDINGFLAGS(o)              (RVAL2GFLAGS(o, G_TYPE_BINDING_FLAGS))
+#define GBINDINGFLAGS2RVAL(o)              (GFLAGS2RVAL(o, G_TYPE_BINDING_FLAGS))
 #endif /* __GLIB2CONVERSIONS_H__ */
diff --git a/glib2/ext/glib2/rbglib_fileutils.c b/glib2/ext/glib2/rbglib_fileutils.c
index a583f6e..d96a21f 100644
--- a/glib2/ext/glib2/rbglib_fileutils.c
+++ b/glib2/ext/glib2/rbglib_fileutils.c
@@ -53,7 +53,7 @@ void        g_dir_close                     (GDir *dir);
 static VALUE
 rbglib_m_format_size_for_display(G_GNUC_UNUSED VALUE self, VALUE size)
 {
-    return CSTR2RVAL_FREE(g_format_size_for_display(NUM2INT(size)));
+    return CSTR2RVAL_FREE(g_format_size_for_display(NUM2ULONG(size)));
 }
 #endif
 
@@ -65,14 +65,14 @@ rbglib_m_format_size(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
 
     rb_scan_args(argc, argv, "11", &rb_size, &rb_options);
     if (NIL_P(rb_options)) {
-      return CSTR2RVAL_FREE(g_format_size(NUM2UINT(rb_size)));
+      return CSTR2RVAL_FREE(g_format_size(NUM2ULONG(rb_size)));
     } else {
       VALUE rb_flags;
       rbg_scan_options(rb_options,
                        "flags", &rb_flags,
                        NULL);
 
-      return CSTR2RVAL_FREE(g_format_size_full(NUM2UINT(rb_size),
+      return CSTR2RVAL_FREE(g_format_size_full(NUM2ULONG(rb_size),
                                                RVAL2GFORMATSIZEFLAGS(rb_flags)));
     }
 }
diff --git a/glib2/ext/glib2/rbglib_maincontext.c b/glib2/ext/glib2/rbglib_maincontext.c
index 246f03b..814563d 100644
--- a/glib2/ext/glib2/rbglib_maincontext.c
+++ b/glib2/ext/glib2/rbglib_maincontext.c
@@ -21,6 +21,10 @@
 
 #include "rbgprivate.h"
 
+#ifdef HAVE_RUBY_THREAD_H
+#  include <ruby/thread.h>
+#endif
+
 GStaticPrivate rg_polling_key = G_STATIC_PRIVATE_INIT;
 
 /*
@@ -32,6 +36,8 @@ static VALUE mGLibSource;
 static ID id__callbacks__;
 static GHashTable *callbacks_table;
 
+static GThread *main_thread;
+
 typedef struct _callback_info_t
 {
     VALUE callback;
@@ -49,15 +55,29 @@ typedef struct _PollInfo
     gint result;
 } PollInfo;
 
+static void
+rg_poll_in_blocking_raw(PollInfo *info)
+{
+    info->result = default_poll_func(info->ufds, info->nfsd, info->timeout);
+}
+
+#ifdef HAVE_RB_THREAD_CALL_WITHOUT_GVL
+static void *
+rg_poll_in_blocking(void *data)
+{
+    PollInfo *info = data;
+    rg_poll_in_blocking_raw(info);
+    return NULL;
+}
+#else
 static VALUE
 rg_poll_in_blocking(void *data)
 {
     PollInfo *info = data;
-
-    info->result = default_poll_func(info->ufds, info->nfsd, info->timeout);
-
+    rg_poll_in_blocking_raw(info);
     return Qnil;
 }
+#endif
 
 static gint
 rg_poll(GPollFD *ufds, guint nfsd, gint timeout)
@@ -70,11 +90,17 @@ rg_poll(GPollFD *ufds, guint nfsd, gint timeout)
     info.result = 0;
 
     g_static_private_set(&rg_polling_key, GINT_TO_POINTER(TRUE), NULL);
+    if (g_thread_self() == main_thread) {
 #ifdef HAVE_RB_THREAD_CALL_WITHOUT_GVL
-    rb_thread_call_without_gvl(rg_poll_in_blocking, &info, RUBY_UBF_IO, NULL);
+        rb_thread_call_without_gvl(rg_poll_in_blocking, &info,
+                                   RUBY_UBF_IO, NULL);
 #else
-    rb_thread_blocking_region(rg_poll_in_blocking, &info, RUBY_UBF_IO, NULL);
+        rb_thread_blocking_region(rg_poll_in_blocking, &info,
+                                  RUBY_UBF_IO, NULL);
 #endif
+    } else {
+        rg_poll_in_blocking_raw(&info);
+    }
     g_static_private_set(&rg_polling_key, GINT_TO_POINTER(FALSE), NULL);
 
     return info.result;
@@ -512,6 +538,10 @@ Init_glib_main_context(void)
     id__callbacks__ = rb_intern("__callbacks__");
     callbacks_table = g_hash_table_new(NULL, NULL);
 
+    g_static_private_set(&rg_polling_key, GINT_TO_POINTER(FALSE), NULL);
+
+    main_thread = g_thread_self();
+
     rbg_define_singleton_method(mGLib, "set_ruby_thread_priority",
                                ruby_source_set_priority, 1);
 
diff --git a/glib2/ext/glib2/rbgobj_binding.c b/glib2/ext/glib2/rbgobj_binding.c
new file mode 100644
index 0000000..2ef82bc
--- /dev/null
+++ b/glib2/ext/glib2/rbgobj_binding.c
@@ -0,0 +1,48 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbgprivate.h"
+
+#define RG_TARGET_NAMESPACE cBinding
+
+#define _SELF(object) G_BINDING(RVAL2GOBJ(self))
+
+#if GLIB_CHECK_VERSION(2, 38, 0)
+static VALUE
+rg_unbind(VALUE self)
+{
+    g_binding_unbind(_SELF(self));
+    return self;
+}
+#endif
+
+void
+Init_gobject_gbinding(void)
+{
+#if GLIB_CHECK_VERSION(2, 26, 0)
+    VALUE RG_TARGET_NAMESPACE;
+
+    RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_BINDING, "Binding", mGLib);
+#endif
+
+#if GLIB_CHECK_VERSION(2, 38, 0)
+    RG_DEF_METHOD(unbind, 0);
+#endif
+}
diff --git a/glib2/ext/glib2/rbgobj_boxed.c b/glib2/ext/glib2/rbgobj_boxed.c
index 68425f0..643081c 100644
--- a/glib2/ext/glib2/rbgobj_boxed.c
+++ b/glib2/ext/glib2/rbgobj_boxed.c
@@ -75,14 +75,18 @@ static VALUE
 rg_initialize(VALUE self)
 {
     VALUE rb_class;
+    gsize instance_size = 0;
 
     rb_class = CLASS_OF(self);
     if (RVAL2CBOOL(rb_ivar_defined(rb_class, rb_intern("@size")))) {
+        instance_size = NUM2UINT(rb_iv_get(rb_class, "@size"));
+    }
+
+    if (instance_size > 0) {
         const RGObjClassInfo *cinfo;
         gpointer instance;
-        gsize instance_size;
+
         cinfo = rbgobj_lookup_class(rb_class);
-        instance_size = NUM2UINT(rb_iv_get(rb_class, "@size"));
         instance = alloca(instance_size);
         memset(instance, 0, instance_size);
         G_INITIALIZE(self, g_boxed_copy(cinfo->gtype, instance));
diff --git a/glib2/ext/glib2/rbgobj_enums.c b/glib2/ext/glib2/rbgobj_enums.c
index 8f293c5..cf15f4c 100644
--- a/glib2/ext/glib2/rbgobj_enums.c
+++ b/glib2/ext/glib2/rbgobj_enums.c
@@ -29,6 +29,7 @@ VALUE RG_TARGET_NAMESPACE;
 
 static ID id_new;
 static ID id_to_s;
+static ID id_to_i;
 
 /**********************************************************************/
 
@@ -270,20 +271,61 @@ enum_s_allocate(VALUE self)
 }
 
 static VALUE
-rg_initialize(VALUE self, VALUE arg)
+rg_initialize(int argc, VALUE *argv, VALUE self)
 {
     enum_holder* p = enum_get_holder(self);
+    VALUE rb_value;
+    VALUE klass;
 
-    if (rb_respond_to(arg, rb_intern("to_str"))) {
-        const char* str = StringValuePtr(arg);
-        p->info = g_enum_get_value_by_name(p->gclass, str);
-        if (! p->info)
-            p->info = g_enum_get_value_by_nick(p->gclass, str);
-        if (! p->info)
-            rb_raise(rb_eArgError, "invalid argument");
-    } else {
-        p->value = NUM2INT(arg);
-        p->info  = g_enum_get_value(p->gclass, p->value);
+    rb_scan_args(argc, argv, "01", &rb_value);
+
+    klass = CLASS_OF(self);
+
+    switch (TYPE(rb_value)) {
+    case RUBY_T_NIL:
+        p->value = 0;
+        break;
+    case RUBY_T_FIXNUM:
+        p->value = NUM2UINT(rb_value);
+        break;
+    case RUBY_T_STRING:
+    case RUBY_T_SYMBOL:
+    {
+        const gchar *name;
+
+        name = RVAL2CSTR_ACCEPT_SYMBOL(rb_value);
+        p->info = g_enum_get_value_by_name(p->gclass, name);
+        if (!p->info) {
+            gchar *nick;
+            nick = rbg_name_to_nick(name);
+            p->info = g_enum_get_value_by_nick(p->gclass, name);
+            g_free(nick);
+        }
+        if (!p->info) {
+            rb_raise(rb_eArgError, "unknown enum name: <%s>(%s)",
+                     name,
+                     g_type_name(G_TYPE_FROM_CLASS(p->gclass)));
+        }
+        p->value = p->info->value;
+        break;
+    }
+    default:
+        if (RVAL2CBOOL(rb_obj_is_kind_of(rb_value, klass))) {
+            p->value = NUM2INT(rb_funcall(rb_value, id_to_i, 0));
+        } else {
+            rb_raise(rb_eArgError,
+                     "enum value must be one of "
+                     "nil, Fixnum, String, Symbol o %s: "
+                     "<%s>(%s)",
+                     RBG_INSPECT(klass),
+                     RBG_INSPECT(rb_value),
+                     g_type_name(G_TYPE_FROM_CLASS(p->gclass)));
+        }
+        break;
+    }
+
+    if (!p->info) {
+        p->info = g_enum_get_value(p->gclass, p->value);
     }
 
     return Qnil;
@@ -374,6 +416,7 @@ Init_gobject_genums(void)
 {
     id_new = rb_intern("new");
     id_to_s = rb_intern("to_s");
+    id_to_i = rb_intern("to_i");
 
     RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_ENUM, "Enum", mGLib);
 
@@ -385,7 +428,7 @@ Init_gobject_genums(void)
 
     rb_define_alloc_func(RG_TARGET_NAMESPACE, enum_s_allocate);
 
-    RG_DEF_METHOD(initialize, 1);
+    RG_DEF_METHOD(initialize, -1);
     RG_DEF_METHOD(to_i, 0);
     RG_DEF_METHOD(name, 0);
     RG_DEF_METHOD(nick, 0);
diff --git a/glib2/ext/glib2/rbgobj_flags.c b/glib2/ext/glib2/rbgobj_flags.c
index dedc0f9..49ad720 100644
--- a/glib2/ext/glib2/rbgobj_flags.c
+++ b/glib2/ext/glib2/rbgobj_flags.c
@@ -1,7 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
- *  Copyright (C) 2004-2006  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2004-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002,2003  Masahiro Sakai
  *
  *  This library is free software; you can redistribute it and/or
@@ -30,33 +29,10 @@ VALUE RG_TARGET_NAMESPACE;
 static ID id_new;
 static ID id_module_eval;
 static ID id_or;
+static ID id_to_i;
 
 /**********************************************************************/
 
-static VALUE
-resolve_flags_value(VALUE klass, VALUE nick_or_nicks)
-{
-    int i, len;
-    VALUE flags_value;
-
-    if (!RVAL2CBOOL(rb_obj_is_kind_of(nick_or_nicks, rb_cArray)))
-        return rg_enum_resolve_value(klass, nick_or_nicks);
-
-    len = RARRAY_LEN(nick_or_nicks);
-    flags_value = rb_funcall(klass, id_new, 0);
-    for (i = 0; i < len; i++) {
-        VALUE value;
-
-        value = rg_enum_resolve_value(klass, RARRAY_PTR(nick_or_nicks)[i]);
-        if (NIL_P(value))
-            return Qnil;
-
-        flags_value = rb_funcall(flags_value, id_or, 1, value);
-    }
-
-    return flags_value;
-}
-
 void
 rg_flags_add_constants(VALUE mod, GType flags_type, const gchar *strip_prefix)
 {
@@ -127,25 +103,13 @@ rbgobj_get_flags(VALUE obj, GType gtype)
         rb_raise(rb_eTypeError, "%s is not a %s",
                  g_type_name(gtype), g_type_name(G_TYPE_FLAGS));
 
-    /* for compatibility */
-    if (rb_obj_is_kind_of(obj, rb_cInteger))
-        obj = rbgobj_make_flags(NUM2UINT(obj), gtype);
-
     klass = GTYPE2CLASS(gtype);
 
-    if (!rb_obj_is_kind_of(obj, klass)) {
-        VALUE flags_value = Qnil;
-
-        flags_value = resolve_flags_value(klass, obj);
-        if (!NIL_P(flags_value))
-            obj = flags_value;
+    if (!RVAL2CBOOL(rb_obj_is_kind_of(obj, klass))) {
+        obj = rb_funcall(klass, id_new, 1, obj);
     }
 
-    if (rb_obj_is_kind_of(obj, klass))
-        return flags_get_holder(obj)->value;
-    else
-        rb_raise(rb_eTypeError, "not a %s: %s",
-                 rb_class2name(klass), RBG_INSPECT(obj));
+    return flags_get_holder(obj)->value;
 }
 
 /**********************************************************************/
@@ -251,29 +215,79 @@ flags_s_allocate(VALUE self)
     }
 }
 
+static guint
+resolve_flags_value(VALUE klass, GFlagsClass *gclass, VALUE flag_or_flags)
+{
+    guint value = 0;
+
+    switch (TYPE(flag_or_flags)) {
+    case RUBY_T_NIL:
+        value = 0;
+        break;
+    case RUBY_T_FIXNUM:
+        value = NUM2UINT(flag_or_flags);
+        break;
+    case RUBY_T_STRING:
+    case RUBY_T_SYMBOL:
+    {
+        const gchar *name;
+        GFlagsValue *info;
+
+        name = RVAL2CSTR_ACCEPT_SYMBOL(flag_or_flags);
+        info = g_flags_get_value_by_name(gclass, name);
+        if (!info) {
+            gchar *nick;
+            nick = rbg_name_to_nick(name);
+            info = g_flags_get_value_by_nick(gclass, nick);
+            g_free(nick);
+        }
+        if (!info) {
+            rb_raise(rb_eArgError,
+                     "unknown flag name: <%s>(%s)",
+                     name,
+                     g_type_name(G_TYPE_FROM_CLASS(gclass)));
+        }
+        value = info->value;
+        break;
+    }
+    case RUBY_T_ARRAY:
+    {
+        int i, n;
+        n = RARRAY_LEN(flag_or_flags);
+        for (i = 0; i < n; i++) {
+            value |= resolve_flags_value(klass,
+                                         gclass,
+                                         RARRAY_PTR(flag_or_flags)[i]);
+        }
+        break;
+    }
+    default:
+        if (RVAL2CBOOL(rb_obj_is_kind_of(flag_or_flags, klass))) {
+            value = NUM2UINT(rb_funcall(flag_or_flags, id_to_i, 0));
+        } else {
+            rb_raise(rb_eArgError,
+                     "flag value must be one of "
+                     "nil, Fixnum, String, Symbol, %s or Array of them: "
+                     "<%s>(%s)",
+                     RBG_INSPECT(klass),
+                     RBG_INSPECT(flag_or_flags),
+                     g_type_name(G_TYPE_FROM_CLASS(gclass)));
+        }
+        break;
+    }
+
+    return value;
+}
+
 static VALUE
 rg_initialize(int argc, VALUE* argv, VALUE self)
 {
     flags_holder* p = flags_get_holder(self);
-    VALUE arg;
+    VALUE flag_or_flags;
 
-    rb_scan_args(argc, argv, "01", &arg);
+    rb_scan_args(argc, argv, "01", &flag_or_flags);
 
-    if (argc == 0) {
-        p->value = 0;
-    } else {
-        if (rb_respond_to(arg, rb_intern("to_str"))) {
-            const char* str = StringValuePtr(arg);
-            p->info = g_flags_get_value_by_name(p->gclass, str);
-            if (!p->info)
-                p->info = g_flags_get_value_by_nick(p->gclass, str);
-            if (!p->info)
-                rb_raise(rb_eArgError, "invalid argument");
-            p->value = p->info->value;
-        } else {
-            p->value = NUM2UINT(arg);
-        }
-    }
+    p->value = resolve_flags_value(CLASS_OF(self), p->gclass, flag_or_flags);
 
     if (!p->info) {
         guint i;
@@ -316,27 +330,56 @@ rg_nick(VALUE self)
 #define FLAGS_COMP_ELSE         -2
 #define FLAGS_COMP_INCOMPARABLE -3
 
+typedef struct {
+    GType gtype;
+    VALUE rb_value;
+    guint value;
+    gboolean compatible;
+} compare_data;
+
+static VALUE
+flags_compare_get_flags_body(VALUE user_data)
+{
+    compare_data *data = (compare_data *)user_data;
+
+    data->value = rbgobj_get_flags(data->rb_value, data->gtype);
+    data->compatible = TRUE;
+
+    return Qnil;
+}
+
+static VALUE
+flags_compare_get_flags_rescue(VALUE user_data)
+{
+    compare_data *data = (compare_data *)user_data;
+
+    data->compatible = FALSE;
+
+    return Qnil;
+}
+
 static gint
 flags_compare(VALUE self, VALUE rhs)
 {
     flags_holder* p = flags_get_holder(self);
-    GType gtype = G_TYPE_FROM_CLASS(p->gclass);
-    VALUE klass = GTYPE2CLASS(gtype);
-    guint rhs_val;
+    compare_data data;
 
-    if (!rb_obj_is_kind_of(rhs, rb_cInteger)) {
-        rhs = resolve_flags_value(klass, rhs);
-        if (CLASS_OF(rhs) != CLASS_OF(self))
-            return FLAGS_COMP_INCOMPARABLE;
-    }
+    data.gtype = G_TYPE_FROM_CLASS(p->gclass);
+    data.rb_value = rhs;
+    data.value = 0;
+    data.compatible = TRUE;
 
-    rhs_val = rbgobj_get_flags(rhs, gtype);
+    rb_rescue(flags_compare_get_flags_body, (VALUE)&data,
+              flags_compare_get_flags_rescue, (VALUE)&data);
+    if (!data.compatible) {
+        return FLAGS_COMP_INCOMPARABLE;
+    }
 
-    if (p->value == rhs_val)
+    if (p->value == data.value)
         return FLAGS_COMP_EQUAL;
-    else if ((p->value & rhs_val) == rhs_val)
+    else if ((p->value & data.value) == data.value)
         return FLAGS_COMP_GREATER;
-    else if ((p->value & rhs_val) == p->value)
+    else if ((p->value & data.value) == p->value)
         return FLAGS_COMP_LESS;
     else
         return FLAGS_COMP_ELSE;
@@ -476,6 +519,7 @@ Init_gobject_gflags(void)
     id_module_eval = rb_intern("module_eval");
     id_new = rb_intern("new");
     id_or = rb_intern("|");
+    id_to_i = rb_intern("to_i");
 
     RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FLAGS, "Flags", mGLib);
 
diff --git a/glib2/ext/glib2/rbgobj_object.c b/glib2/ext/glib2/rbgobj_object.c
index 06e834c..bcef0b1 100644
--- a/glib2/ext/glib2/rbgobj_object.c
+++ b/glib2/ext/glib2/rbgobj_object.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002-2004  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002-2003  Masahiro Sakai
  *  Copyright (C) 1998-2000 Yukihiro Matsumoto,
@@ -170,15 +170,6 @@ rbgobj_init_object_class(VALUE klass)
 
 /**********************************************************************/
 
-static gboolean
-is_gtkobject(GObject *gobj)
-{
-    static GType gtype_gtkobject = G_TYPE_INVALID;
-    if (!gtype_gtkobject)
-        gtype_gtkobject = g_type_from_name("GtkObject");
-    return gtype_gtkobject && g_type_is_a(G_OBJECT_TYPE(gobj), gtype_gtkobject);
-}
-
 static void
 gobj_mark(gpointer ptr)
 {
@@ -227,15 +218,7 @@ rg_s_new_bang(int argc, VALUE *argv, VALUE self)
 
     gobj = rbgobj_gobject_new(cinfo->gtype, params_hash);
     result = GOBJ2RVAL(gobj);
-
-    // XXX: Ughhhhh
-    if (is_gtkobject(gobj)){
-        // We can't call gtk_object_sink() here.
-        // But hopefully someone will call it in the future.
-        //gtk_object_sink(gobj);
-    } else {
-        g_object_unref(gobj);
-    }
+    g_object_unref(gobj);
 
     return result;
 }
@@ -637,6 +620,35 @@ rg_type_name(VALUE self)
     return CSTR2RVAL(G_OBJECT_TYPE_NAME(RVAL2GOBJ(self)));
 }
 
+#if GLIB_CHECK_VERSION(2, 26, 0)
+static VALUE
+rg_bind_property(VALUE self,
+                 VALUE rb_source_property,
+                 VALUE rb_target,
+                 VALUE rb_target_property,
+                 VALUE rb_flags)
+{
+    gpointer source;
+    const gchar *source_property;
+    gpointer target;
+    const gchar *target_property;
+    GBindingFlags flags;
+    GBinding *binding;
+
+    source = RVAL2GOBJ(self);
+    source_property = RVAL2CSTR(rb_source_property);
+    target = RVAL2GOBJ(rb_target);
+    target_property = RVAL2CSTR(rb_target_property);
+    flags = RVAL2GBINDINGFLAGS(rb_flags);
+
+    binding = g_object_bind_property(source, source_property,
+                                     target, target_property,
+                                     flags);
+
+    return GOBJ2RVAL(binding);
+}
+#endif
+
 static VALUE
 rg_initialize(int argc, VALUE *argv, VALUE self)
 {
@@ -658,13 +670,6 @@ rg_initialize(int argc, VALUE *argv, VALUE self)
 
     gobj = rbgobj_gobject_new(RVAL2GTYPE(self), params_hash);
 
-    if (is_gtkobject(gobj)){
-        gobj = g_object_ref(gobj);
-        // We can't call gtk_object_sink() here.
-        // But hopefully someone will call it in the future.
-        //gtk_object_sink(gobj);
-    }
-
     G_INITIALIZE(self, gobj);
     return Qnil;
 }
@@ -679,7 +684,6 @@ gobj_ref_count(VALUE self)
 
 /**********************************************************************/
 
-static VALUE proc_mod_eval;
 static GQuark q_ruby_setter;
 static GQuark q_ruby_getter;
 
@@ -732,55 +736,51 @@ set_prop_func(GObject* object,
     rb_funcall(GOBJ2RVAL(object), ruby_setter, 1, GVAL2RVAL(value));
 }
 
-// FIXME: use rb_protect
-static void
-class_init_func(gpointer g_class_, G_GNUC_UNUSED gpointer class_data)
+void
+rbgobj_class_init_func(gpointer g_class, G_GNUC_UNUSED gpointer class_data)
 {
-    GObjectClass* g_class = G_OBJECT_CLASS(g_class_);
+    GObjectClass* g_object_class = G_OBJECT_CLASS(g_class);
 
-    g_class->set_property = set_prop_func;
-    g_class->get_property = get_prop_func;
-
-#if 0
-    VALUE class_init_proc = (VALUE)class_data;
-    rb_funcall(proc_mod_eval, rb_intern("call"), 2,
-               GTYPE2CLASS(G_TYPE_FROM_CLASS(g_class)), class_init_proc);
-#endif
+    g_object_class->set_property = set_prop_func;
+    g_object_class->get_property = get_prop_func;
 }
 
-static VALUE
-rg_s_type_register(int argc, VALUE* argv, VALUE self)
+void
+rbgobj_register_type(VALUE klass, VALUE type_name, GClassInitFunc class_init)
 {
-    VALUE type_name, flags;
-    volatile VALUE class_init_proc = Qnil;
     GType parent_type;
-    GTypeInfo* info;
-
-    rb_scan_args(argc, argv, "03", &type_name, &info, &flags);
+    GTypeInfo *info;
 
     {
-        const RGObjClassInfo* cinfo = rbgobj_lookup_class(self);
-        if (cinfo->klass == self)
-            rb_raise(rb_eTypeError, "already registered");
+        const RGObjClassInfo *cinfo = rbgobj_lookup_class(klass);
+        if (cinfo->klass == klass)
+            rb_raise(rb_eTypeError,
+                     "already registered class: <%s>",
+                     RBG_INSPECT(klass));
     }
 
     {
-        VALUE superclass = rb_funcall(self, rb_intern("superclass"), 0);
-        const RGObjClassInfo* cinfo = rbgobj_lookup_class(superclass);
+        VALUE superclass = rb_funcall(klass, rb_intern("superclass"), 0);
+        const RGObjClassInfo *cinfo = rbgobj_lookup_class(superclass);
         if (cinfo->klass != superclass)
-            rb_raise(rb_eTypeError, "super class must be registered to GLib");
+            rb_raise(rb_eTypeError,
+                     "super class must be registered to GLib: <%s>",
+                     RBG_INSPECT(superclass));
         parent_type = cinfo->gtype;
     }
 
     if (NIL_P(type_name)) {
-        VALUE s = rb_funcall(self, rb_intern("name"), 0);
+        VALUE klass_name = rb_funcall(klass, rb_intern("name"), 0);
 
-        if (strlen(StringValuePtr(s)) == 0)
-            rb_raise(rb_eTypeError, "can't determine type name");
+        if (strlen(StringValueCStr(klass_name)) == 0)
+            rb_raise(rb_eTypeError,
+                     "can't determine type name: <%s>",
+                     RBG_INSPECT(klass));
 
-        type_name = rb_funcall(
-            rb_eval_string("lambda{|x| x.gsub(/::/,'') }"),
-            rb_intern("call"), 1, s);
+        type_name = rb_funcall(klass_name, rb_intern("gsub"),
+                               2,
+                               rb_str_new_cstr("::"),
+                               rb_str_new_cstr(""));
     }
 
     {
@@ -793,9 +793,9 @@ rg_s_type_register(int argc, VALUE* argv, VALUE self)
         info->class_size     = query.class_size;
         info->base_init      = NULL;
         info->base_finalize  = NULL;
-        info->class_init     = class_init_func;
+        info->class_init     = class_init;
         info->class_finalize = NULL;
-        info->class_data     = (gpointer)class_init_proc;
+        info->class_data     = NULL;
         info->instance_size  = query.instance_size;
         info->n_preallocs    = 0;
         info->instance_init  = NULL;
@@ -804,37 +804,49 @@ rg_s_type_register(int argc, VALUE* argv, VALUE self)
 
     {
         GType type = g_type_register_static(parent_type,
-                                            StringValuePtr(type_name),
+                                            StringValueCStr(type_name),
                                             info,
-                                            NIL_P(flags) ? 0 : NUM2INT(flags));
-        G_RELATIVE(self, class_init_proc);
+                                            0);
 
-        rbgobj_register_class(self, type, TRUE, TRUE);
+        rbgobj_register_class(klass, type, TRUE, TRUE);
 
         {
-            RGObjClassInfo* cinfo = (RGObjClassInfo*)rbgobj_lookup_class(self);
+            RGObjClassInfo *cinfo = (RGObjClassInfo *)rbgobj_lookup_class(klass);
             cinfo->flags |= RBGOBJ_DEFINED_BY_RUBY;
         }
 
         {
             GType parent = g_type_parent(type);
-            const RGObjClassInfo* cinfo =  GTYPE2CINFO(parent);
-            VALUE m = rb_define_module_under(self, RubyGObjectHookModule);
-
-            if (! (cinfo->flags & RBGOBJ_DEFINED_BY_RUBY)) {
-                rbg_define_method(m, "initialize", rg_initialize, -1);
+            const RGObjClassInfo *cinfo =  GTYPE2CINFO(parent);
+            VALUE initialize_module;
+
+            initialize_module = rb_define_module_under(klass,
+                                                       RubyGObjectHookModule);
+            if (!(cinfo->flags & RBGOBJ_DEFINED_BY_RUBY)) {
+                rbg_define_method(initialize_module,
+                                  "initialize", rg_initialize, -1);
             }
 
-            rb_include_module(self, m);
+            rb_include_module(klass, initialize_module);
         }
-
-        return Qnil;
     }
 }
 
+static VALUE
+rg_s_type_register(int argc, VALUE *argv, VALUE self)
+{
+    VALUE type_name;
+
+    rb_scan_args(argc, argv, "01", &type_name);
+
+    rbgobj_register_type(self, type_name, rbgobj_class_init_func);
+
+    return Qnil;
+}
+
 /**********************************************************************/
 
-void 
+void
 Init_gobject_gobject(void)
 {
     RG_TARGET_NAMESPACE = G_DEF_CLASS_WITH_GC_FUNC(G_TYPE_OBJECT, "Object", mGLib,
@@ -869,6 +881,11 @@ Init_gobject_gobject(void)
     RG_DEF_METHOD(inspect, 0);
     RG_DEF_METHOD(type_name, 0);
 
+#if GLIB_CHECK_VERSION(2, 26, 0)
+    RG_DEF_METHOD(bind_property, 4);
+    G_DEF_CLASS(G_TYPE_BINDING_FLAGS, "BindingFlags", mGLib);
+#endif
+
     eNoPropertyError = rb_define_class_under(mGLib, "NoPropertyError",
                                              rb_eNameError);
 
@@ -879,7 +896,4 @@ Init_gobject_gobject(void)
 
     /* subclass */
     RG_DEF_SMETHOD(type_register, -1);
-
-    rb_global_variable(&proc_mod_eval);
-    proc_mod_eval = rb_eval_string("lambda{|obj,proc| obj.module_eval(&proc)}");
 }
diff --git a/glib2/ext/glib2/rbgobj_type.c b/glib2/ext/glib2/rbgobj_type.c
index 8ee147f..81e89d4 100644
--- a/glib2/ext/glib2/rbgobj_type.c
+++ b/glib2/ext/glib2/rbgobj_type.c
@@ -468,7 +468,7 @@ rg_initialize(VALUE self, VALUE type)
     }
 
     if (G_TYPE_INVALID == gtype)
-        rb_raise(rb_eArgError, "invalid type");
+        rb_raise(rb_eArgError, "invalid GType");
 
     rb_ivar_set(self, id_gtype, ULONG2NUM(gtype));
 
diff --git a/glib2/ext/glib2/rbgobj_typeinstance.c b/glib2/ext/glib2/rbgobj_typeinstance.c
index 794f8bd..2ac0795 100644
--- a/glib2/ext/glib2/rbgobj_typeinstance.c
+++ b/glib2/ext/glib2/rbgobj_typeinstance.c
@@ -106,11 +106,17 @@ rbgobj_instance_call_cinfo_free(gpointer instance)
     each_cinfo(instance, call_cinfo_free, NULL);
 }
 
-void
+gboolean
 rbgobj_gc_mark_instance(gpointer instance)
 {
     VALUE obj = rbgobj_ruby_object_from_instance2(instance, FALSE);
+
+    if (NIL_P(obj)) {
+        return FALSE;
+    }
+
     rb_gc_mark(obj);
+    return TRUE;
 }
 
 /**********************************************************************/
@@ -125,4 +131,4 @@ Init_gobject_typeinstance(void)
     rb_define_alloc_func(RG_TARGET_NAMESPACE, (VALUE(*)_((VALUE)))instantiatable_s_allocate);
     RG_DEF_METHOD(gtype, 0);
     RG_DEF_METHOD(clone, 0);
-}
\ No newline at end of file
+}
diff --git a/glib2/ext/glib2/rbgobj_value.c b/glib2/ext/glib2/rbgobj_value.c
index eb14f50..52fae52 100644
--- a/glib2/ext/glib2/rbgobj_value.c
+++ b/glib2/ext/glib2/rbgobj_value.c
@@ -122,6 +122,12 @@ rbgobj_gvalue_to_rvalue(const GValue* value)
                 return func(value);
             }
         }
+      case G_TYPE_VARIANT:
+        {
+            GVariant *variant = g_value_peek_pointer(value);
+            rvalue = rbg_variant_to_ruby(variant);
+            return rvalue;
+        }
       default:
         if (!rbgobj_convert_gvalue2rvalue(fundamental_type, value, &rvalue)) {
             GValueToRValueFunc func;
@@ -191,18 +197,14 @@ rbgobj_initialize_gvalue(GValue *result, VALUE value)
 	    if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cEnum))) {
 		type = G_TYPE_ENUM;
 	    }
-	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cFlags))) {
-		type = G_TYPE_FLAGS;
-	    }
-	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cBoxed))) {
-		type = G_TYPE_BOXED;
+	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cFlags)) ||
+                     RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cBoxed)) ||
+                     RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cObject))) {
+		type = RVAL2GTYPE(value);
 	    }
 	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cParam))) {
 		type = G_TYPE_PARAM;
 	    }
-	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_cObject))) {
-		type = G_TYPE_OBJECT;
-	    }
 	    else if (RVAL2CBOOL(rb_obj_is_kind_of(value, rbgobj_mInterface))) {
 		/* should use rbgobj_mMetaInterface? */
 		type = G_TYPE_INTERFACE;
@@ -335,12 +337,18 @@ rbgobj_gc_mark_gvalue(GValue* value)
 /**********************************************************************/
 
 static VALUE
-rg_initialize(VALUE self, VALUE rb_gtype, VALUE rb_value)
+rg_initialize(int argc, VALUE *argv, VALUE self)
 {
     GValue value = G_VALUE_INIT;
+    VALUE rb_gtype;
+    VALUE rb_value;
+
+    rb_scan_args(argc, argv, "11", &rb_gtype, &rb_value);
 
-    g_value_init(&value, NUM2INT(rb_to_int(rb_gtype)));
-    rbgobj_rvalue_to_gvalue(rb_value, &value);
+    g_value_init(&value, NUM2ULONG(rb_to_int(rb_gtype)));
+    if (argc == 2) {
+        rbgobj_rvalue_to_gvalue(rb_value, &value);
+    }
     G_INITIALIZE(self, g_boxed_copy(G_TYPE_VALUE, &value));
     g_value_unset(&value);
 
@@ -388,7 +396,7 @@ Init_gobject_gvalue(void)
     qGValueToRValueFunc = g_quark_from_static_string("__ruby_g2r_func__");
 
     RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_VALUE, "Value", mGLib);
-    RG_DEF_METHOD(initialize, 2);
+    RG_DEF_METHOD(initialize, -1);
     RG_DEF_METHOD(type, 0);
     RG_DEF_METHOD(value, 0);
     RG_DEF_METHOD(to_s, 0);
diff --git a/glib2/ext/glib2/rbgobject.c b/glib2/ext/glib2/rbgobject.c
index 66f60f9..e5a6c96 100644
--- a/glib2/ext/glib2/rbgobject.c
+++ b/glib2/ext/glib2/rbgobject.c
@@ -384,4 +384,6 @@ Init_gobject(void)
 
     Init_gobject_gtypeplugin();
     Init_gobject_gtypemodule();
+
+    Init_gobject_gbinding();
 }
diff --git a/glib2/ext/glib2/rbgobject.h b/glib2/ext/glib2/rbgobject.h
index 803ed2f..8b41a38 100644
--- a/glib2/ext/glib2/rbgobject.h
+++ b/glib2/ext/glib2/rbgobject.h
@@ -166,7 +166,7 @@ extern void rbgobj_gobject_initialize(VALUE obj, gpointer cobj);
 extern void rbgobj_add_abstract_but_create_instance_class(GType gtype);
 
 /* rbgobj_typeinstance.c */
-extern void rbgobj_gc_mark_instance(gpointer instance);
+extern gboolean rbgobj_gc_mark_instance(gpointer instance);
 
 
 /* rbgobj_type.c */
@@ -229,6 +229,8 @@ extern void g_value_set_ruby_value(GValue* value, VALUE ruby);
 /* rbgobj_object.c */
 extern void rbgobj_register_property_setter(GType gtype, const char* prop_name, RValueToGValueFunc func);
 extern void rbgobj_register_property_getter(GType gtype, const char* prop_name, GValueToRValueFunc func);
+extern void rbgobj_class_init_func(gpointer g_class, gpointer class_data);
+extern void rbgobj_register_type(VALUE klass, VALUE type_name, GClassInitFunc class_init);
 
 /* rbgobj_boxed.c */
 extern VALUE rbgobj_boxed_create(VALUE klass); /* deprecated */
@@ -284,7 +286,7 @@ typedef struct {
     void (*type_init_hook)(VALUE klass, gpointer user_data);
     void (*rvalue2gvalue)(VALUE value, GValue *result, gpointer user_data);
     VALUE (*gvalue2rvalue)(const GValue *value, gpointer user_data);
-    void (*initialize)(VALUE rb_instance, gpointer insntance, gpointer user_data);
+    void (*initialize)(VALUE rb_instance, gpointer instance, gpointer user_data);
     gpointer (*robj2instance)(VALUE rb_instance, gpointer user_data);
     VALUE (*instance2robj)(gpointer instance, gpointer user_data);
     void (*unref)(gpointer instance, gpointer user_data);
diff --git a/glib2/ext/glib2/rbgprivate.h b/glib2/ext/glib2/rbgprivate.h
index 6255143..2ee9ac8 100644
--- a/glib2/ext/glib2/rbgprivate.h
+++ b/glib2/ext/glib2/rbgprivate.h
@@ -1,7 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011-2013  Ruby-GNOME2 Project Team
- *  Copyright (C) 2007  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2007-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -23,7 +22,6 @@
 #define __RBGPRIVATE_H__
 
 #include "rbgobject.h"
-#include "glib-enum-types.h"
 
 #ifndef HAVE_RB_ERRINFO
 #  define rb_errinfo() (ruby_errinfo)
@@ -152,6 +150,8 @@ G_GNUC_INTERNAL void Init_glib_ucs4(void);
 G_GNUC_INTERNAL void Init_glib_unichar(void);
 G_GNUC_INTERNAL void Init_glib_keyfile(void);
 G_GNUC_INTERNAL void Init_glib_bookmark_file(void);
+G_GNUC_INTERNAL void Init_glib_variant_type(void);
+G_GNUC_INTERNAL void Init_glib_variant(void);
 
 G_GNUC_INTERNAL void Init_gobject_convert(void);
 G_GNUC_INTERNAL void Init_gobject_gtype(void);
@@ -172,6 +172,7 @@ G_GNUC_INTERNAL void Init_gobject_gobject(void);
 G_GNUC_INTERNAL void Init_gobject_gsignal(void);
 G_GNUC_INTERNAL void Init_gobject_gtypeplugin(void);
 G_GNUC_INTERNAL void Init_gobject_gtypemodule(void);
+G_GNUC_INTERNAL void Init_gobject_gbinding(void);
 
 G_END_DECLS
 
diff --git a/glib2/ext/glib2/rbgutil.c b/glib2/ext/glib2/rbgutil.c
index 44111a4..856f6d5 100644
--- a/glib2/ext/glib2/rbgutil.c
+++ b/glib2/ext/glib2/rbgutil.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002-2004 Masao Mutoh
  *
  *  This library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
 
 #include "rbgprivate.h"
 
+#include <string.h>
+
 ID rbgutil_id_module_eval;
 
 static ID id_add_one_arg_setter;
@@ -135,7 +137,7 @@ rbgutil_key_equal(VALUE rb_key, const char *key)
 
 static gboolean
 rbg_interrupt_prepare (G_GNUC_UNUSED GSource *soruce,
-                      G_GNUC_UNUSED gint *timouet)
+                      G_GNUC_UNUSED gint *timeout)
 {
     return rb_thread_interrupted(rb_thread_current());
 }
@@ -158,12 +160,15 @@ rbg_interrupt_dispatch (G_GNUC_UNUSED GSource *soruce,
     }
 }
 
-static GSourceFuncs rbg_interrupt_funcs = {
-    rbg_interrupt_prepare,
-    rbg_interrupt_check,
-    rbg_interrupt_dispatch,
-    NULL
-};
+static GSourceFuncs rbg_interrupt_funcs;
+static void
+rbg_interrupt_funcs_init(void)
+{
+    memset(&rbg_interrupt_funcs, 0, sizeof(GSourceFuncs));
+    rbg_interrupt_funcs.prepare  = rbg_interrupt_prepare;
+    rbg_interrupt_funcs.check    = rbg_interrupt_check;
+    rbg_interrupt_funcs.dispatch = rbg_interrupt_dispatch;
+}
 
 GSource *
 rbg_interrupt_source_new(void)
@@ -171,6 +176,27 @@ rbg_interrupt_source_new(void)
     return g_source_new(&rbg_interrupt_funcs, sizeof(GSource));
 }
 
+gchar *
+rbg_name_to_nick(const gchar *name)
+{
+    gchar *nick, *current;
+
+    nick = g_strdup(name);
+    for (current = nick; *current; current++) {
+        switch (*current) {
+        case '_':
+        case ' ':
+            *current = '-';
+            break;
+        default:
+            *current = g_ascii_tolower(*current);
+            break;
+        }
+    }
+
+    return nick;
+}
+
 void
 Init_gutil(void)
 {
@@ -180,4 +206,6 @@ Init_gutil(void)
     id_add_one_arg_setter = rb_intern("__add_one_arg_setter");
     id_allocate = rb_intern("allocate");
     id_equal = rb_intern("==");
+
+    rbg_interrupt_funcs_init();
 }
diff --git a/glib2/ext/glib2/rbgutil.h b/glib2/ext/glib2/rbgutil.h
index 040b47e..b6a82bd 100644
--- a/glib2/ext/glib2/rbgutil.h
+++ b/glib2/ext/glib2/rbgutil.h
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002,2003 Masao Mutoh
  *
  *  This library is free software; you can redistribute it and/or
@@ -107,6 +107,8 @@ extern gboolean rbgutil_key_equal(VALUE rb_string, const char *key);
 extern const gchar *rbg_inspect(VALUE object);
 extern GSource *rbg_interrupt_source_new(void);
 
+extern gchar *rbg_name_to_nick(const gchar *name);
+
 /*< protected >*/
 RUBY_GLIB2_VAR ID rbgutil_id_module_eval;
 extern void rbgutil_glibid_r2g_func(VALUE from, GValue* to);
diff --git a/glib2/ext/glib2/rbgutil_list.c b/glib2/ext/glib2/rbgutil_list.c
index c82f887..f3dc34a 100644
--- a/glib2/ext/glib2/rbgutil_list.c
+++ b/glib2/ext/glib2/rbgutil_list.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -171,3 +171,99 @@ rbg_gslist2rval_with_type(GSList *const list, RBGRValueFuncWithType conv, GType
                      gslist2rval_ensure, (VALUE)&args);
 }
 
+struct rval2glist_args {
+    GList *list;
+    VALUE rb_array;
+};
+
+static VALUE
+rval2glist_body(VALUE data)
+{
+    struct rval2glist_args *args = (struct rval2glist_args *)data;
+    VALUE rb_array;
+    int i, n;
+
+    rb_array = rbg_to_array(args->rb_array);
+    n = RARRAY_LEN(rb_array);
+    for (i = 0; i < n; i++) {
+        VALUE rb_element = RARRAY_CONST_PTR(rb_array)[i];
+        args->list = g_list_append(args->list, RVAL2GOBJ(rb_element));
+    }
+
+    return Qnil;
+}
+
+static VALUE
+rval2glist_rescue(VALUE data, VALUE e)
+{
+    struct rval2glist_args *args = (struct rval2glist_args *)data;
+
+    g_list_free(args->list);
+    args->list = NULL;
+
+    rb_exc_raise(e);
+
+    return Qnil;
+}
+
+GList *
+rbg_rval2glist(VALUE rb_array)
+{
+    struct rval2glist_args args;
+    args.list = NULL;
+    args.rb_array = rb_array;
+
+    rb_rescue(rval2glist_body, (VALUE)&args,
+              rval2glist_rescue, (VALUE)&args);
+
+    return args.list;
+}
+
+struct rval2gslist_args {
+    GSList *list;
+    VALUE rb_array;
+};
+
+static VALUE
+rval2gslist_body(VALUE data)
+{
+    struct rval2gslist_args *args = (struct rval2gslist_args *)data;
+    VALUE rb_array;
+    int i, n;
+
+    rb_array = rbg_to_array(args->rb_array);
+    n = RARRAY_LEN(rb_array);
+    for (i = 0; i < n; i++) {
+        VALUE rb_element = RARRAY_CONST_PTR(rb_array)[i];
+        args->list = g_slist_append(args->list, RVAL2GOBJ(rb_element));
+    }
+
+    return Qnil;
+}
+
+static VALUE
+rval2gslist_rescue(VALUE data, VALUE e)
+{
+    struct rval2gslist_args *args = (struct rval2gslist_args *)data;
+
+    g_slist_free(args->list);
+    args->list = NULL;
+
+    rb_exc_raise(e);
+
+    return Qnil;
+}
+
+GSList *
+rbg_rval2gslist(VALUE rb_array)
+{
+    struct rval2gslist_args args;
+    args.list = NULL;
+    args.rb_array = rb_array;
+
+    rb_rescue(rval2gslist_body, (VALUE)&args,
+              rval2gslist_rescue, (VALUE)&args);
+
+    return args.list;
+}
+
diff --git a/glib2/ext/glib2/rbgutil_list.h b/glib2/ext/glib2/rbgutil_list.h
index ac4a78b..21aa083 100644
--- a/glib2/ext/glib2/rbgutil_list.h
+++ b/glib2/ext/glib2/rbgutil_list.h
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -67,6 +67,12 @@ G_BEGIN_DECLS
         rbg_gslist2rval_with_type(list, (RBGRValueFuncWithType)rbgobj_make_boxed, gtype, \
                                   (GFreeFunc)free_list, (GFreeFunc)free_elem)
 
+#define RVAL2GOBJGLIST(rb_array)                \
+    rbg_rval2glist(rb_array)
+#define RVAL2GOBJGSLIST(rb_array)               \
+    rbg_rval2gslist(rb_array)
+
+
 typedef VALUE (*RBGRValueFunc)(gpointer obj);
 typedef VALUE (*RBGRValueFuncWithType)(gpointer obj, GType gtype);
 
@@ -79,6 +85,9 @@ extern VALUE rbg_glist2rval_with_type(GList *const list, RBGRValueFuncWithType c
 extern VALUE rbg_gslist2rval_with_type(GSList *const list, RBGRValueFuncWithType conv, GType gtype,
                                        GFreeFunc free_list, GFreeFunc free_elem);
 
+extern GList *rbg_rval2glist(VALUE rb_array);
+extern GSList *rbg_rval2gslist(VALUE rb_array);
+
 G_END_DECLS
 
 #endif /* __RBGUTIL_LIST_H__ */
diff --git a/glib2/ext/glib2/ruby-glib2.pc b/glib2/ext/glib2/ruby-glib2.pc
deleted file mode 100644
index b5804ee..0000000
--- a/glib2/ext/glib2/ruby-glib2.pc
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: Ruby/GLib2
-Description: Ruby bindings for GLib Type, Object, Parameter and Signal Library
-Version: 2.2.4
\ No newline at end of file
diff --git a/glib2/lib/glib2/deprecatable.rb b/glib2/lib/glib2/deprecatable.rb
index c4a9089..0d25ec0 100644
--- a/glib2/lib/glib2/deprecatable.rb
+++ b/glib2/lib/glib2/deprecatable.rb
@@ -14,7 +14,7 @@ module GLib
     end
 
     def define_deprecated_enums(enums, prefix = nil)
-      enums = module_eval(enums.to_s) rescue return
+      enums = resolve_constant_name(enums.to_s)
       enums.constants.each do |const|
         deprecated_const = prefix ? "#{prefix}_#{const}" : const
         new_const = [enums, const].join('::')
@@ -33,7 +33,7 @@ module GLib
 
     def define_deprecated_method_by_hash_args(deprecated_method, old_args, new_args, req_argc = 0, &block)
       klass = self
-      alias_name = "__deprecatable_#{deprecated_method}__"
+      alias_name = "__deprecatable_#{object_id}_#{deprecated_method}__"
       alias_method alias_name, deprecated_method
       private alias_name
 
@@ -99,7 +99,7 @@ module GLib
       msg = "#{caller[0]}: '#{[name, deprecated_const].join('::')}' has been deprecated."
       case new_const
       when String, Symbol
-        new_const_val = constant_get(new_const)
+        new_const_val = resolve_constant_name(new_const)
         case new_const_val
         when GLib::Enum, GLib::Flags
           alt = " or ':#{new_const_val.nick.gsub('-', '_')}'"
@@ -120,8 +120,23 @@ module GLib
       end
     end
 
-    def constant_get(const)
-      const.split('::').inject(Object){|r, c| r.const_get(c)}
+    def resolve_constant_name(name)
+      name.to_s.split("::").inject(nil) do |context, local_name|
+        if context.nil?
+          candidates = []
+          candidate_context = ::Object
+          self.to_s.split("::").each do |candidate_name|
+            candidate = candidate_context.const_get(candidate_name)
+            candidates.unshift(candidate)
+            candidate_context = candidate
+          end
+          context = candidates.find do |candidate|
+            candidate.const_defined?(local_name)
+          end
+          context ||= ::Object
+        end
+        context.const_get(local_name)
+      end
     end
 
     def __define_deprecated_method__(type, deprecated_method, new_method = {}, &block)
diff --git a/glib2/lib/gnome2/rake/native-binary-build-task.rb b/glib2/lib/gnome2/rake/native-binary-build-task.rb
index 7732c0a..1b3c847 100644
--- a/glib2/lib/gnome2/rake/native-binary-build-task.rb
+++ b/glib2/lib/gnome2/rake/native-binary-build-task.rb
@@ -64,7 +64,7 @@ module GNOME2
                 task :build => built_file.to_s
               else
                 task :build => [download_task] do
-                  build_patckage_task_body(package)
+                  build_package_task_body(package)
                 end
               end
             end
diff --git a/glib2/lib/gnome2/rake/windows-binary-build-task.rb b/glib2/lib/gnome2/rake/windows-binary-build-task.rb
index 1de6664..a084df6 100644
--- a/glib2/lib/gnome2/rake/windows-binary-build-task.rb
+++ b/glib2/lib/gnome2/rake/windows-binary-build-task.rb
@@ -163,23 +163,13 @@ class GNOME2WindowsBinaryBuildTask
   end
 
   def cmake(package)
-    toolchain_cmake_path = "toolchain.cmake"
-    File.open(toolchain_cmake_path, "w") do |toolchain|
-      toolchain.puts(<<-CMAKE)
-SET(CMAKE_SYSTEM_NAME Windows)
-SET(MSVC_CXX_ARCHITECTURE_ID #{@package.windows.build_architecture})
-SET(CMAKE_SYSTEM_PROCESSOR #{@package.windows.build_architecture})
-
-SET(CMAKE_C_COMPILER #{@package.windows.build_host}-gcc)
-SET(CMAKE_CXX_COMPILER #{@package.windows.build_host}-g++)
-SET(CMAKE_RC_COMPILER #{@package.windows.build_host}-windres)
-
-SET(CMAKE_FIND_ROOT_PATH #{cmake_root_paths.join(" ")})
-      CMAKE
-    end
     sh("cmake",
        ".",
-       "-DCMAKE_TOOLCHAIN_FILE=#{toolchain_cmake_path}",
+       "-DCMAKE_INSTALL_PREFIX=#{dist_dir}",
+       "-DCMAKE_SYSTEM_NAME=Windows",
+       "-DCMAKE_SYSTEM_PROCESSOR=#{@package.windows.build_architecture}",
+       "-DCMAKE_C_COMPILER=#{cc(package)}",
+       "-DCMAKE_CXX_COMPILER=#{cxx(package)}",
        *package.windows.cmake_args) or exit(false)
   end
 
@@ -244,6 +234,13 @@ SET(CMAKE_FIND_ROOT_PATH #{cmake_root_paths.join(" ")})
     cc_command_line.compact.join(" ")
   end
 
+  def cxx(package)
+    cxx_command_line = [
+      "#{@package.windows.build_host}-g++",
+    ]
+    cxx_command_line.compact.join(" ")
+  end
+
   def cppflags(package)
     include_paths = package.windows.include_paths
     if @package.windows.build_dependencies.include?("glib2")
diff --git a/glib2/lib/mkmf-gnome2.rb b/glib2/lib/mkmf-gnome2.rb
index 6340838..aeb6d5e 100644
--- a/glib2/lib/mkmf-gnome2.rb
+++ b/glib2/lib/mkmf-gnome2.rb
@@ -30,7 +30,7 @@ end
 
 def enable_debug_build_flag(flags)
   if gcc?
-    debug_option_pattern = /(^|\s)?-g\d?(\s|$)?/
+    debug_option_pattern = /(^|\s)-g\d?(\s|$)/
     if debug_option_pattern =~ flags
       flags.gsub(debug_option_pattern, '\\1-g3\\2')
     else
@@ -109,10 +109,13 @@ if ENV['GTK_BASEPATH'] and /cygwin/ !~ RUBY_PLATFORM
   $CFLAGS += " -I#{include_path} "
 end
 
+def windows_platform?
+  /cygwin|mingw|mswin/ === RUBY_PLATFORM
+end
+
 def setup_windows(target_name, base_dir=nil)
   checking_for(checking_message("Windows")) do
-    case RUBY_PLATFORM
-    when /cygwin|mingw|mswin/
+    if windows_platform?
       import_library_name = "libruby-#{target_name}.a"
       $DLDFLAGS << " -Wl,--out-implib=#{import_library_name}"
       $cleanfiles << import_library_name
@@ -189,8 +192,7 @@ def add_depend_package_path(target_name, target_source_dir, target_build_dir)
     $INCFLAGS = "-I#{target_source_dir} #{$INCFLAGS}"
   end
 
-  case RUBY_PLATFORM
-  when /cygwin|mingw|mswin/
+  if windows_platform?
     target_base_dir = Pathname.new(target_source_dir).parent.parent
     target_binary_base_dir = target_base_dir + "vendor" + "local"
     if target_binary_base_dir.exist?
@@ -205,8 +207,7 @@ def add_depend_package_path(target_name, target_source_dir, target_build_dir)
     $INCFLAGS = "-I#{target_build_dir} #{$INCFLAGS}"
   end
 
-  case RUBY_PLATFORM
-  when /cygwin|mingw|mswin/
+  if windows_platform?
     library_base_name = "ruby-#{target_name.gsub(/-/, '_')}"
     case RUBY_PLATFORM
     when /cygwin|mingw/
@@ -450,12 +451,10 @@ def glib_mkenums(prefix, files, g_type_prefix, include_files, options={})
 end
 
 def check_cairo(options={})
-  is_windows = (/mingw|cygwin|mswin/ === RUBY_PLATFORM)
-
   rcairo_source_dir = options[:rcairo_source_dir]
   if rcairo_source_dir.nil?
     suffix = nil
-    if is_windows
+    if windows_platform?
       case RUBY_PLATFORM
       when /\Ax86-mingw/
         suffix = "win32"
@@ -480,7 +479,7 @@ def check_cairo(options={})
   end
 
   unless rcairo_source_dir.nil?
-    if is_windows
+    if windows_platform?
       options = {}
       build_dir = "tmp/#{RUBY_PLATFORM}/cairo/#{RUBY_VERSION}"
       if File.exist?(File.join(rcairo_source_dir, build_dir))
diff --git a/glib2/patches/guile-2.0.11-remove-needless-mkstemp-check.diff b/glib2/patches/guile-2.0.11-remove-needless-mkstemp-check.diff
new file mode 100644
index 0000000..1225b0a
--- /dev/null
+++ b/glib2/patches/guile-2.0.11-remove-needless-mkstemp-check.diff
@@ -0,0 +1,12 @@
+diff -ru guile-2.0.11.orig/configure.ac guile-2.0.11/configure.ac
+--- guile-2.0.11.orig/configure.ac	2014-03-12 22:36:02.000000000 +0900
++++ guile-2.0.11/configure.ac	2015-09-06 15:42:11.103807090 +0900
+@@ -1129,7 +1129,7 @@
+    AC_DEFINE([ENABLE_REGEX], 1, [Define when regex support is enabled.])
+ fi
+ 
+-AC_REPLACE_FUNCS([strerror memmove mkstemp])
++AC_REPLACE_FUNCS([strerror memmove])
+ 
+ # Reasons for testing:
+ #   asinh, acosh, atanh, trunc - C99 standard, generally not available on
diff --git a/glib2/test/test-binding.rb b/glib2/test/test-binding.rb
new file mode 100644
index 0000000..60b9edc
--- /dev/null
+++ b/glib2/test/test-binding.rb
@@ -0,0 +1,97 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGLibBinding < Test::Unit::TestCase
+  include GLibTestUtils
+
+  class DataObject < GLib::Object
+    type_register
+
+    install_property(GLib::Param::Int.new("source", # name
+                                          "Source", # nick
+                                          "The source data", # blurb
+                                          0,     # min
+                                          100,   # max
+                                          0,     # default
+                                          GLib::Param::READABLE |
+                                          GLib::Param::WRITABLE))
+    install_property(GLib::Param::Int.new("target", # name
+                                          "Target", # nick
+                                          "The target data", # blurb
+                                          0,     # min
+                                          100,   # max
+                                          0,     # default
+                                          GLib::Param::READABLE |
+                                          GLib::Param::WRITABLE))
+
+    attr_reader :source, :target
+    def initialize
+      @source = 0
+      @target = 0
+      super
+    end
+
+    def source=(value)
+      @source = value
+      notify("source")
+    end
+
+    def target=(value)
+      @target = value
+      notify("target")
+    end
+  end
+
+  setup do
+    only_glib_version(2, 26, 0)
+  end
+
+  setup do
+    @source = DataObject.new
+    @target = DataObject.new
+    @binding = @source.bind_property("source", @target, "target", :default)
+  end
+
+  test "#source" do
+    assert_equal(@source, @binding.source)
+  end
+
+  test "#source_property" do
+    assert_equal("source", @binding.source_property)
+  end
+
+  test "#target" do
+    assert_equal(@target, @binding.target)
+  end
+
+  test "#target_property" do
+    assert_equal("target", @binding.target_property)
+  end
+
+  test "#flags" do
+    assert_equal(GLib::BindingFlags::DEFAULT, @binding.flags)
+  end
+
+  test "#unbind" do
+    only_glib_version(2, 38, 0)
+    assert_equal(0, @target.target)
+    @source.source = 10
+    assert_equal(10, @target.target)
+    @binding.unbind
+    @source.source = 20
+    assert_equal(10, @target.target)
+  end
+end
diff --git a/glib2/test/test-variant-type.rb b/glib2/test/test-variant-type.rb
new file mode 100644
index 0000000..bd4d9eb
--- /dev/null
+++ b/glib2/test/test-variant-type.rb
@@ -0,0 +1,357 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGLibVariantType < Test::Unit::TestCase
+  include GLibTestUtils
+
+  sub_test_case "constants" do
+    test "BOOLEAN" do
+      assert_equal("b", GLib::VariantType::BOOLEAN.to_s)
+    end
+
+    test "BYTE" do
+      assert_equal("y", GLib::VariantType::BYTE.to_s)
+    end
+
+    test "INT16" do
+      assert_equal("n", GLib::VariantType::INT16.to_s)
+    end
+
+    test "UINT16" do
+      assert_equal("q", GLib::VariantType::UINT16.to_s)
+    end
+
+    test "INT32" do
+      assert_equal("i", GLib::VariantType::INT32.to_s)
+    end
+
+    test "UINT32" do
+      assert_equal("u", GLib::VariantType::UINT32.to_s)
+    end
+
+    test "INT64" do
+      assert_equal("x", GLib::VariantType::INT64.to_s)
+    end
+
+    test "UINT64" do
+      assert_equal("t", GLib::VariantType::UINT64.to_s)
+    end
+
+    test "HANDLE" do
+      assert_equal("h", GLib::VariantType::HANDLE.to_s)
+    end
+
+    test "DOUBLE" do
+      assert_equal("d", GLib::VariantType::DOUBLE.to_s)
+    end
+
+    test "STRING" do
+      assert_equal("s", GLib::VariantType::STRING.to_s)
+    end
+
+    test "OBJECT_PATH" do
+      assert_equal("o", GLib::VariantType::OBJECT_PATH.to_s)
+    end
+
+    test "SIGNATURE" do
+      assert_equal("g", GLib::VariantType::SIGNATURE.to_s)
+    end
+
+    test "VARIANT" do
+      assert_equal("v", GLib::VariantType::VARIANT.to_s)
+    end
+
+    test "ANY" do
+      assert_equal("*", GLib::VariantType::ANY.to_s)
+    end
+
+    test "BASIC" do
+      assert_equal("?", GLib::VariantType::BASIC.to_s)
+    end
+
+    test "MAYBE" do
+      assert_equal("m*", GLib::VariantType::MAYBE.to_s)
+    end
+
+    test "ARRAY" do
+      assert_equal("a*", GLib::VariantType::ARRAY.to_s)
+    end
+
+    test "TUPLE" do
+      assert_equal("r", GLib::VariantType::TUPLE.to_s)
+    end
+
+    test "UNIT" do
+      assert_equal("()", GLib::VariantType::UNIT.to_s)
+    end
+
+    test "DICT_ENTRY" do
+      assert_equal("{?*}", GLib::VariantType::DICT_ENTRY.to_s)
+    end
+
+    test "DICTIONARY" do
+      assert_equal("a{?*}", GLib::VariantType::DICTIONARY.to_s)
+    end
+
+    test "STRING_ARRAY" do
+      assert_equal("as", GLib::VariantType::STRING_ARRAY.to_s)
+    end
+
+    test "OBJECT_PATH_ARRAY" do
+      assert_equal("ao", GLib::VariantType::OBJECT_PATH_ARRAY.to_s)
+    end
+
+    test "BYTESTRING" do
+      assert_equal("ay", GLib::VariantType::BYTESTRING.to_s)
+    end
+
+    test "BYTESTRING_ARRAY" do
+      assert_equal("aay", GLib::VariantType::BYTESTRING_ARRAY.to_s)
+    end
+
+    test "VARDICT" do
+      assert_equal("a{sv}", GLib::VariantType::VARDICT.to_s)
+    end
+  end
+
+  sub_test_case ".valid?" do
+    test "valid" do
+      assert do
+        GLib::VariantType.valid?("s")
+      end
+    end
+
+    test "invalid" do
+      assert do
+        !GLib::VariantType.valid?("X")
+      end
+    end
+  end
+
+  sub_test_case ".scan" do
+    test "found" do
+      assert_equal("X", GLib::VariantType.scan("sX"))
+    end
+
+    test "not found" do
+      assert_nil(GLib::VariantType.scan("X"))
+    end
+  end
+
+  sub_test_case "#initialize" do
+    test "invalid" do
+      assert_raise(ArgumentError.new("invalid type string: \"X\"")) do
+        GLib::VariantType.new("X")
+      end
+    end
+  end
+
+  test "#to_s" do
+    variant_type = GLib::VariantType.new("s")
+    assert_equal("s", variant_type.to_s)
+  end
+
+  sub_test_case "#definite?" do
+    test "definite" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        variant_type.definite?
+      end
+    end
+
+    test "not definite" do
+      variant_type = GLib::VariantType.new("?")
+      assert do
+        !variant_type.definite?
+      end
+    end
+  end
+
+  sub_test_case "#container?" do
+    test "container" do
+      variant_type = GLib::VariantType.new("a*")
+      assert do
+        variant_type.container?
+      end
+    end
+
+    test "not container" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.container?
+      end
+    end
+  end
+
+  sub_test_case "#basic?" do
+    test "basic" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        variant_type.basic?
+      end
+    end
+
+    test "not basic" do
+      variant_type = GLib::VariantType.new("as")
+      assert do
+        !variant_type.basic?
+      end
+    end
+  end
+
+  sub_test_case "#maybe?" do
+    test "maybe" do
+      variant_type = GLib::VariantType.new("ms")
+      assert do
+        variant_type.maybe?
+      end
+    end
+
+    test "not maybe" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.maybe?
+      end
+    end
+  end
+
+  sub_test_case "#array?" do
+    test "array" do
+      variant_type = GLib::VariantType.new("as")
+      assert do
+        variant_type.array?
+      end
+    end
+
+    test "not array" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.array?
+      end
+    end
+  end
+
+  sub_test_case "#tuple?" do
+    test "tuple" do
+      variant_type = GLib::VariantType.new("(s)")
+      assert do
+        variant_type.tuple?
+      end
+    end
+
+    test "not tuple" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.tuple?
+      end
+    end
+  end
+
+  sub_test_case "#dict_entry?" do
+    test "dictionary entry" do
+      variant_type = GLib::VariantType.new("{ss}")
+      assert do
+        variant_type.dict_entry?
+      end
+    end
+
+    test "not dictionary entry" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.dict_entry?
+      end
+    end
+  end
+
+  sub_test_case "#variant?" do
+    test "variant" do
+      variant_type = GLib::VariantType.new("v")
+      assert do
+        variant_type.variant?
+      end
+    end
+
+    test "not variant" do
+      variant_type = GLib::VariantType.new("s")
+      assert do
+        !variant_type.variant?
+      end
+    end
+  end
+
+  sub_test_case "#==" do
+    test "same" do
+      variant_type = GLib::VariantType.new("s")
+      assert_equal(variant_type,
+                   variant_type)
+    end
+
+    test "equivalence" do
+      assert_equal(GLib::VariantType.new("s"),
+                   GLib::VariantType.new("s"))
+    end
+
+    test "not VariantType" do
+      assert_not_equal(GLib::VariantType.new("s"),
+                       "s")
+    end
+  end
+
+  sub_test_case "#hash and #eql?" do
+    test "Hash key" do
+      hash = {
+        GLib::VariantType.new("s") => :s,
+      }
+      assert_equal(:s, hash[GLib::VariantType.new("s")])
+    end
+  end
+
+  sub_test_case "#is_subtype_of?" do
+    test "subtype" do
+      string = GLib::VariantType.new("s")
+      basic = GLib::VariantType.new("?")
+      assert do
+        string.is_subtype_of?(basic)
+      end
+    end
+
+    test "not subtype" do
+      string = GLib::VariantType.new("s")
+      int32 = GLib::VariantType.new("i")
+      assert do
+        !string.is_subtype_of?(int32)
+      end
+    end
+  end
+
+  sub_test_case "#element" do
+    test "array" do
+      assert_equal(GLib::VariantType.new("s"),
+                   GLib::VariantType.new("as").element)
+    end
+
+    test "maybe" do
+      assert_equal(GLib::VariantType.new("s"),
+                   GLib::VariantType.new("ms").element)
+    end
+
+    test "unexpected" do
+      assert_raise(ArgumentError.new("must be array or maybe type: <s>")) do
+        GLib::VariantType.new("s").element
+      end
+    end
+  end
+end
diff --git a/glib2/test/test_enum.rb b/glib2/test/test_enum.rb
index 78520ff..89dc416 100644
--- a/glib2/test/test_enum.rb
+++ b/glib2/test/test_enum.rb
@@ -36,11 +36,11 @@ class TestEnum < Test::Unit::TestCase
     assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS, "KEEP_COMMENTS")
     assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS, "keep COMMENTS")
 
-    assert_raise(TypeError) do
+    assert_raise(ArgumentError) do
       assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS, :unknown)
     end
 
-    assert_raise(TypeError) do
+    assert_raise(ArgumentError) do
       assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS, "UNKNOWN")
     end
   end
@@ -58,12 +58,9 @@ class TestEnum < Test::Unit::TestCase
     assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS |
                          GLib::KeyFile::KEEP_TRANSLATIONS,
                          [:keep_comments, GLib::KeyFile::KEEP_TRANSLATIONS])
-
-    assert_raise(TypeError) do
-      assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS |
-                           GLib::KeyFile::KEEP_TRANSLATIONS,
-                           [:keep_comments, nil, :keep_translations])
-    end
+    assert_key_file_load(GLib::KeyFile::KEEP_COMMENTS |
+                         GLib::KeyFile::KEEP_TRANSLATIONS,
+                         [:keep_comments, nil, :keep_translations])
   end
 
   def test_flags_or
diff --git a/glib2/test/test_file_utils.rb b/glib2/test/test_file_utils.rb
index ebc9e41..32e4592 100644
--- a/glib2/test/test_file_utils.rb
+++ b/glib2/test/test_file_utils.rb
@@ -3,14 +3,31 @@
 class TestGLibFileUtils < Test::Unit::TestCase
   include GLibTestUtils
 
-  def test_format_size_for_display
-    only_glib_version(2, 16, 0)
-
-    assert_equal("1.0 KB", GLib.format_size_for_display(1024))
-    assert_equal("10.0 KB", GLib.format_size_for_display(1024 * 10))
-    assert_equal("1.0 MB", GLib.format_size_for_display(1024 * 1024))
-    assert_equal("1.5 MB", GLib.format_size_for_display(1024 * 1024 * 1.5))
-    assert_equal("1.0 GB", GLib.format_size_for_display(1024 * 1024 * 1024))
+  sub_test_case "#format_size_for_display" do
+    def setup
+      only_glib_version(2, 16, 0)
+    end
+
+    def test_kb
+      assert_equal("1.0 KB", GLib.format_size_for_display(1024))
+    end
+
+    def test_10kb
+      assert_equal("10.0 KB", GLib.format_size_for_display(1024 * 10))
+    end
+
+    def test_mb
+      assert_equal("1.0 MB", GLib.format_size_for_display(1024 * 1024))
+    end
+
+    def test_gb
+      assert_equal("1.0 GB", GLib.format_size_for_display(1024 * 1024 * 1024))
+    end
+
+    def test_over_guint32_value
+      guint32_max = 2 ** 32 - 1
+      assert_equal("4.0 GB", GLib.format_size_for_display(guint32_max + 1))
+    end
   end
 
   sub_test_case "#format_size" do
@@ -30,6 +47,11 @@ class TestGLibFileUtils < Test::Unit::TestCase
       assert_equal("1.0 GB", GLib.format_size(1000 * 1000 * 1000))
     end
 
+    def test_over_guint32_value
+      guint32_max = 2 ** 32 - 1
+      assert_equal("4.3 GB", GLib.format_size(guint32_max + 1))
+    end
+
     sub_test_case "flags" do
       sub_test_case ":iec_units" do
         def format_size(size)
diff --git a/glib2/test/test_source.rb b/glib2/test/test_source.rb
index 1432851..04f786b 100644
--- a/glib2/test/test_source.rb
+++ b/glib2/test/test_source.rb
@@ -32,12 +32,23 @@ class TestGLibSource < Test::Unit::TestCase
   end
 
   def test_destroy
+    # only_glib_version(2, 35, 4)
+    # GMainContext may be freed before GSource by Ruby's GC.
+    # If GMainContext is freed before GSource, GLib 2.35.3 or earlier is
+    # crashed.
+    #
+    # See also:
+    #   * https://bugzilla.gnome.org/show_bug.cgi?id=661767
+    #   * https://git.gnome.org/browse/glib/commit/?id=26056558be4656ee6e891a4fae5d4198de7519cf
+
     context = GLib::MainContext.new
     source = GLib::Idle.source_new
     id = source.attach(context)
     assert_not_nil(context.find_source(id))
     source.destroy
     assert_nil(context.find_source(id))
+    source = nil
+    GC.start
   end
 
   def test_name
diff --git a/glib2/test/test_value.rb b/glib2/test/test_value.rb
index dd23bbc..f843217 100644
--- a/glib2/test/test_value.rb
+++ b/glib2/test/test_value.rb
@@ -28,4 +28,9 @@ class TestGLibValue < Test::Unit::TestCase
     value = GLib::Value.new(GLib::Type::UINT, 29)
     assert_equal(29, value.value)
   end
+
+  def test_no_value
+    value = GLib::Value.new(GLib::Type::UINT)
+    assert_equal(0, value.value)
+  end
 end
diff --git a/gobject-introspection/Makefile b/gobject-introspection/Makefile
deleted file mode 100644
index 0cfd172..0000000
--- a/gobject-introspection/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all:
-	(cd ext/gobject-introspection && $(MAKE))
-	$(MAKE) -f Makefile.lib
-
-install:
-	(cd ext/gobject-introspection && $(MAKE) install)
-	$(MAKE) -f Makefile.lib install
-
-site-install:
-	(cd ext/gobject-introspection && $(MAKE) site-install)
-	$(MAKE) -f Makefile.lib site-install
-
-clean:
-	(cd ext/gobject-introspection && $(MAKE) clean)
-	$(MAKE) -f Makefile.lib clean
-
-distclean:
-	(cd ext/gobject-introspection && $(MAKE) distclean)
-	$(MAKE) -f Makefile.lib distclean
-	@rm -f Makefile.lib
diff --git a/gobject-introspection/Makefile.lib b/gobject-introspection/Makefile.lib
deleted file mode 100644
index eb0a491..0000000
--- a/gobject-introspection/Makefile.lib
+++ /dev/null
@@ -1,232 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
-DEFS     = 
-CPPFLAGS =  -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = 
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = 
-SRCS = $(ORIG_SRCS) 
-OBJS = 
-HDRS = 
-TARGET = 
-TARGET_NAME = 
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = 
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    Makefile
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: Makefile
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection.rb
-$(RUBYLIBDIR)/gobject-introspection.rb: $(srcdir)/lib/gobject-introspection.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection.rb $(@D)
-pre-install-rb-default: $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/struct-info.rb
-$(RUBYLIBDIR)/gobject-introspection/struct-info.rb: $(srcdir)/lib/gobject-introspection/struct-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/struct-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/union-info.rb
-$(RUBYLIBDIR)/gobject-introspection/union-info.rb: $(srcdir)/lib/gobject-introspection/union-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/union-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/callable-info.rb
-$(RUBYLIBDIR)/gobject-introspection/callable-info.rb: $(srcdir)/lib/gobject-introspection/callable-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/callable-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/collection-reader.rb
-$(RUBYLIBDIR)/gobject-introspection/collection-reader.rb: $(srcdir)/lib/gobject-introspection/collection-reader.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/collection-reader.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/boxed-info.rb
-$(RUBYLIBDIR)/gobject-introspection/boxed-info.rb: $(srcdir)/lib/gobject-introspection/boxed-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/boxed-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/object-info.rb
-$(RUBYLIBDIR)/gobject-introspection/object-info.rb: $(srcdir)/lib/gobject-introspection/object-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/object-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/interface-info.rb
-$(RUBYLIBDIR)/gobject-introspection/interface-info.rb: $(srcdir)/lib/gobject-introspection/interface-info.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/interface-info.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/repository.rb
-$(RUBYLIBDIR)/gobject-introspection/repository.rb: $(srcdir)/lib/gobject-introspection/repository.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/repository.rb $(@D)
-install-rb-default: $(RUBYLIBDIR)/gobject-introspection/loader.rb
-$(RUBYLIBDIR)/gobject-introspection/loader.rb: $(srcdir)/lib/gobject-introspection/loader.rb $(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time
-	$(Q) $(INSTALL_DATA) $(srcdir)/lib/gobject-introspection/loader.rb $(@D)
-pre-install-rb-default:
-	$(ECHO) installing default  libraries
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)
-	$(Q) $(TOUCH) $@
-$(TIMESTAMP_DIR)/.RUBYLIBDIR.-.gobject-introspection.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYLIBDIR)/gobject-introspection
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
diff --git a/gobject-introspection/Rakefile b/gobject-introspection/Rakefile
index e5ecd22..d040b82 100644
--- a/gobject-introspection/Rakefile
+++ b/gobject-introspection/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -32,7 +32,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "glib",
       :download_site => :gnome,
       :label => "GLib",
-      :version => "2.42.1",
+      :version => "2.44.1",
       :compression_method => "xz",
       :windows => {
         :build => false,
@@ -47,7 +47,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gobject-introspection",
       :download_site => :gnome,
       :label => "gobject-introspection",
-      :version => "1.42.0",
+      :version => "1.44.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/gobject-introspection/ext/gobject-introspection/Makefile b/gobject-introspection/ext/gobject-introspection/Makefile
deleted file mode 100644
index 975c432..0000000
--- a/gobject-introspection/ext/gobject-introspection/Makefile
+++ /dev/null
@@ -1,248 +0,0 @@
-
-SHELL = /bin/sh
-
-# V=0 quiet, V=1 verbose.  other values don't work.
-V = 0
-Q1 = $(V:1=)
-Q = $(Q1:0=@)
-ECHO1 = $(V:1=@:)
-ECHO = $(ECHO1:0=@echo)
-
-#### Start of system configuration section. ####
-
-srcdir = /home/kou/work/ruby/ruby-gnome2.clean/gobject-introspection/ext/gobject-introspection
-topdir = /usr/include/ruby-2.1.0
-hdrdir = $(topdir)
-arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-2.1.0
-PATH_SEPARATOR = :
-VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
-prefix = $(DESTDIR)/usr
-rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
-rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
-rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
-exec_prefix = $(prefix)
-vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
-sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
-rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
-vendorhdrdir = $(rubyhdrdir)/vendor_ruby
-sitehdrdir = $(rubyhdrdir)/site_ruby
-rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
-vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
-vendorlibdir = $(vendordir)/$(ruby_version)
-vendordir = $(rubylibprefix)/vendor_ruby
-sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
-sitelibdir = $(sitedir)/$(ruby_version)
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-rubyarchdir = $(rubyarchprefix)/$(ruby_version)
-rubylibdir = $(rubylibprefix)/$(ruby_version)
-sitearchincludedir = $(includedir)/$(sitearch)
-archincludedir = $(includedir)/$(arch)
-sitearchlibdir = $(libdir)/$(sitearch)
-archlibdir = $(libdir)/$(arch)
-ridir = $(datarootdir)/$(RI_BASE_NAME)
-mandir = $(prefix)/share/man
-localedir = $(datarootdir)/locale
-libdir = $(exec_prefix)/lib
-psdir = $(docdir)
-pdfdir = $(docdir)
-dvidir = $(docdir)
-htmldir = $(docdir)
-infodir = $(prefix)/share/info
-docdir = $(datarootdir)/doc/$(PACKAGE)
-oldincludedir = $(DESTDIR)/usr/include
-includedir = $(prefix)/include
-localstatedir = $(DESTDIR)/var
-sharedstatedir = $(prefix)/com
-sysconfdir = $(DESTDIR)/etc
-datadir = $(datarootdir)
-datarootdir = $(prefix)/share
-libexecdir = $(prefix)/lib/ruby2.1
-sbindir = $(exec_prefix)/sbin
-bindir = $(exec_prefix)/bin
-archdir = $(rubyarchdir)
-
-
-CC = gcc
-CXX = g++
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-empty =
-OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-
-RUBY_EXTCONF_H = 
-cflags   =  $(optflags) $(debugflags) $(warnflags)
-optflags = -O3 -fno-fast-math
-debugflags = -ggdb3
-warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
-CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wall -Waggregate-return -Wcast-align -Wextra -Wformat=2 -Winit-self -Wlarger-than-65500 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wp,-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wswitch-default -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings -pthread -I/usr/include [...]
-INCFLAGS = -I. -I/home/kou/work/ruby/ruby-gnome2.clean/glib2/ext/glib2 -I/home/kou/work/ruby/ruby-gnome2.clean/glib2/ext/glib2 -I/home/kou/work/ruby/ruby-gnome2.clean/glib2/ext/glib2 -I/home/kou/work/ruby/ruby-gnome2.clean/glib2/ext/glib2 -I/var/lib/gems/2.1.0/gems/glib2-2.2.3/ext/glib2 -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -I$(vendorarchdir) 
-DEFS     = 
-CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_G_INTERFACE_INFO_FIND_SIGNAL -DRUBY_GOBJECT_INTROSPECTION_COMPILATION -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
-CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat -Werror=format-security $(ARCH_FLAG)
-ldflags  = -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/lib/x86_64-linux-gnu
-dldflags =  
-ARCH_FLAG = 
-DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
-LDSHARED = $(CC) -shared
-LDSHAREDXX = $(CXX) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby2.1
-RUBY_SO_NAME = ruby-2.1
-RUBYW_INSTALL_NAME = 
-RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
-RUBYW_BASE_NAME = rubyw
-RUBY_BASE_NAME = ruby
-
-arch = x86_64-linux-gnu
-sitearch = $(arch)
-ruby_version = 2.1.0
-ruby = $(bindir)/ruby2.1
-RUBY = $(ruby)
-ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
-
-RM = rm -f
-RM_RF = $(RUBY) -run -e rm -- -rf
-RMDIRS = rmdir --ignore-fail-on-non-empty -p
-MAKEDIRS = /bin/mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-TOUCH = exit >
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(archlibdir)
-LIBPATH =  -L. -L$(archlibdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = rbgiversion.h gobject-introspection-enum-types.h gobject-introspection-enum-types.c ruby-gobject-introspection.pc
-DISTCLEANDIRS = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lgirepository-1.0 -lglib-2.0 -lgobject-2.0 -lpthread -lgmp -ldl -lcrypt -lm   -lc
-ORIG_SRCS = rb-gi-method-info.c rb-gi-constructor-info.c rb-gi-field-info.c rb-gi-callback-info.c rb-gi-registered-type-info.c rb-gi-type-tag.c rb-gi-object-info.c rb-gobject-introspection.c gobject-introspection-enum-types.c rb-gi-boxed-info.c rb-gi-vfunc-info.c rb-gi-signal-info.c rb-gi-constant-info.c rb-gi-flags-info.c rb-gi-property-info.c rb-gi-value-info.c rb-gi-enum-info.c rb-gi-loader.c rb-gi-interface-info.c rb-gi-argument.c rb-gi-arg-info.c rb-gi-repository.c rb-gi-type-info.c [...]
-SRCS = $(ORIG_SRCS) rb-gi-method-info.c rb-gi-constructor-info.c rb-gi-field-info.c rb-gi-callback-info.c rb-gi-registered-type-info.c rb-gi-type-tag.c rb-gi-object-info.c rb-gobject-introspection.c gobject-introspection-enum-types.c rb-gi-boxed-info.c rb-gi-vfunc-info.c rb-gi-signal-info.c rb-gi-constant-info.c rb-gi-flags-info.c rb-gi-property-info.c rb-gi-value-info.c rb-gi-enum-info.c rb-gi-loader.c rb-gi-interface-info.c rb-gi-argument.c rb-gi-arg-info.c rb-gi-repository.c rb-gi-typ [...]
-OBJS = rb-gi-method-info.o rb-gi-constructor-info.o rb-gi-field-info.o rb-gi-callback-info.o rb-gi-registered-type-info.o rb-gi-type-tag.o rb-gi-object-info.o rb-gobject-introspection.o gobject-introspection-enum-types.o rb-gi-boxed-info.o rb-gi-vfunc-info.o rb-gi-signal-info.o rb-gi-constant-info.o rb-gi-flags-info.o rb-gi-property-info.o rb-gi-value-info.o rb-gi-enum-info.o rb-gi-loader.o rb-gi-interface-info.o rb-gi-argument.o rb-gi-arg-info.o rb-gi-repository.o rb-gi-type-info.o rb-g [...]
-HDRS = $(srcdir)/gobject-introspection-enum-types.h $(srcdir)/rb-gi-types.h $(srcdir)/rb-gobject-introspection.h $(srcdir)/rbgiversion.h $(srcdir)/rb-gi-private.h $(srcdir)/rb-gi-conversions.h
-TARGET = gobject_introspection
-TARGET_NAME = gobject_introspection
-TARGET_ENTRY = Init_$(TARGET_NAME)
-DLLIB = $(TARGET).so
-EXTSTATIC = 
-STATIC_LIB = 
-
-TIMESTAMP_DIR = .
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-HDRDIR        = $(rubyhdrdir)/ruby$(target_prefix)
-ARCHHDRDIR    = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so 
-CLEANOBJS     = *.o  *.bak
-
-all:    $(DLLIB)
-static: $(STATIC_LIB)
-.PHONY: all install static install-so install-rb
-.PHONY: clean clean-so clean-static clean-rb
-
-clean-static::
-clean-rb-default::
-clean-rb::
-clean-so::
-clean: clean-so clean-static clean-rb-default clean-rb
-		-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
-
-distclean-rb-default::
-distclean-rb::
-distclean-so::
-distclean-static::
-distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
-
-realclean: distclean
-install: install-so install-rb
-
-install-so: $(DLLIB) $(TIMESTAMP_DIR)/.RUBYARCHDIR.time
-	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
-clean-static::
-	-$(Q)$(RM) $(STATIC_LIB)
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-pre-install-rb-default:
-	$(ECHO) installing default gobject_introspection libraries
-$(TIMESTAMP_DIR)/.RUBYARCHDIR.time:
-	$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
-	$(Q) $(TOUCH) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
-.SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
-
-.cc.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.mm.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cxx.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.cpp.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.C.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
-
-.c.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-.m.o:
-	$(ECHO) compiling $(<)
-	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
-
-$(DLLIB): $(OBJS) Makefile
-	$(ECHO) linking shared-object $(DLLIB)
-	-$(Q)$(RM) $(@)
-	$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
-
-
-
-###
-install-so: install-headers
-install-headers:
-	$(INSTALL_DATA) $(srcdir)/rb-gobject-introspection.h $(RUBYARCHDIR)
-
-install: install-pc
-install-pc:
-	if test -n "$(pkgconfigdir)"; then				\
-	  $(MAKEDIRS) $(pkgconfigdir);					\
-	  $(INSTALL_DATA) ruby-gobject-introspection.pc $(pkgconfigdir);\
-	fi
diff --git a/gobject-introspection/ext/gobject-introspection/extconf.rb b/gobject-introspection/ext/gobject-introspection/extconf.rb
index ab69323..2da022b 100755
--- a/gobject-introspection/ext/gobject-introspection/extconf.rb
+++ b/gobject-introspection/ext/gobject-introspection/extconf.rb
@@ -58,7 +58,7 @@ setup_windows(module_name, base_dir)
 
 unless required_pkg_config_package(package_id,
                                    :debian => "libgirepository1.0-dev",
-                                   :fedora => "gobject-introspection-devel",
+                                   :redhat => "gobject-introspection-devel",
                                    :homebrew => "gobject-introspection",
                                    :macports => "gobject-introspection")
   exit(false)
diff --git a/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.c b/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.c
deleted file mode 100644
index 9881ce8..0000000
--- a/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.c
+++ /dev/null
@@ -1,230 +0,0 @@
-
-/* Generated by glib-mkenums.rb ($Id$) */ 
-
-#include "gobject-introspection-enum-types.h"
-#include <girepository.h>
-
-
-
-/* enumerations from "/usr/include/gobject-introspection-1.0/girepository.h" */
-GType
-g_i_repository_load_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { G_IREPOSITORY_LOAD_FLAG_LAZY, "G_IREPOSITORY_LOAD_FLAG_LAZY", "g-irepository-load-flag-lazy" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GIRepositoryLoadFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_i_repository_error_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND, "G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND", "typelib-not-found" },
-      { G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH, "G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH", "namespace-mismatch" },
-      { G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT, "G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT", "namespace-version-conflict" },
-      { G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND, "G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND", "library-not-found" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GIRepositoryError", values);
-  }
-  return etype;
-}
-
-
-/* enumerations from "/usr/include/gobject-introspection-1.0/gitypes.h" */
-GType
-g_i_info_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_INFO_TYPE_INVALID, "GI_INFO_TYPE_INVALID", "invalid" },
-      { GI_INFO_TYPE_FUNCTION, "GI_INFO_TYPE_FUNCTION", "function" },
-      { GI_INFO_TYPE_CALLBACK, "GI_INFO_TYPE_CALLBACK", "callback" },
-      { GI_INFO_TYPE_STRUCT, "GI_INFO_TYPE_STRUCT", "struct" },
-      { GI_INFO_TYPE_BOXED, "GI_INFO_TYPE_BOXED", "boxed" },
-      { GI_INFO_TYPE_ENUM, "GI_INFO_TYPE_ENUM", "enum" },
-      { GI_INFO_TYPE_FLAGS, "GI_INFO_TYPE_FLAGS", "flags" },
-      { GI_INFO_TYPE_OBJECT, "GI_INFO_TYPE_OBJECT", "object" },
-      { GI_INFO_TYPE_INTERFACE, "GI_INFO_TYPE_INTERFACE", "interface" },
-      { GI_INFO_TYPE_CONSTANT, "GI_INFO_TYPE_CONSTANT", "constant" },
-      { GI_INFO_TYPE_INVALID_0, "GI_INFO_TYPE_INVALID_0", "invalid-0" },
-      { GI_INFO_TYPE_UNION, "GI_INFO_TYPE_UNION", "union" },
-      { GI_INFO_TYPE_VALUE, "GI_INFO_TYPE_VALUE", "value" },
-      { GI_INFO_TYPE_SIGNAL, "GI_INFO_TYPE_SIGNAL", "signal" },
-      { GI_INFO_TYPE_VFUNC, "GI_INFO_TYPE_VFUNC", "vfunc" },
-      { GI_INFO_TYPE_PROPERTY, "GI_INFO_TYPE_PROPERTY", "property" },
-      { GI_INFO_TYPE_FIELD, "GI_INFO_TYPE_FIELD", "field" },
-      { GI_INFO_TYPE_ARG, "GI_INFO_TYPE_ARG", "arg" },
-      { GI_INFO_TYPE_TYPE, "GI_INFO_TYPE_TYPE", "type" },
-      { GI_INFO_TYPE_UNRESOLVED, "GI_INFO_TYPE_UNRESOLVED", "unresolved" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GIInfoType", values);
-  }
-  return etype;
-}
-
-GType
-g_i_transfer_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_TRANSFER_NOTHING, "GI_TRANSFER_NOTHING", "nothing" },
-      { GI_TRANSFER_CONTAINER, "GI_TRANSFER_CONTAINER", "container" },
-      { GI_TRANSFER_EVERYTHING, "GI_TRANSFER_EVERYTHING", "everything" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GITransfer", values);
-  }
-  return etype;
-}
-
-GType
-g_i_direction_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_DIRECTION_IN, "GI_DIRECTION_IN", "in" },
-      { GI_DIRECTION_OUT, "GI_DIRECTION_OUT", "out" },
-      { GI_DIRECTION_INOUT, "GI_DIRECTION_INOUT", "inout" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GIDirection", values);
-  }
-  return etype;
-}
-
-GType
-g_i_scope_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_SCOPE_TYPE_INVALID, "GI_SCOPE_TYPE_INVALID", "invalid" },
-      { GI_SCOPE_TYPE_CALL, "GI_SCOPE_TYPE_CALL", "call" },
-      { GI_SCOPE_TYPE_ASYNC, "GI_SCOPE_TYPE_ASYNC", "async" },
-      { GI_SCOPE_TYPE_NOTIFIED, "GI_SCOPE_TYPE_NOTIFIED", "notified" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GIScopeType", values);
-  }
-  return etype;
-}
-
-GType
-g_i_type_tag_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_TYPE_TAG_VOID, "GI_TYPE_TAG_VOID", "void" },
-      { GI_TYPE_TAG_BOOLEAN, "GI_TYPE_TAG_BOOLEAN", "boolean" },
-      { GI_TYPE_TAG_INT8, "GI_TYPE_TAG_INT8", "int8" },
-      { GI_TYPE_TAG_UINT8, "GI_TYPE_TAG_UINT8", "uint8" },
-      { GI_TYPE_TAG_INT16, "GI_TYPE_TAG_INT16", "int16" },
-      { GI_TYPE_TAG_UINT16, "GI_TYPE_TAG_UINT16", "uint16" },
-      { GI_TYPE_TAG_INT32, "GI_TYPE_TAG_INT32", "int32" },
-      { GI_TYPE_TAG_UINT32, "GI_TYPE_TAG_UINT32", "uint32" },
-      { GI_TYPE_TAG_INT64, "GI_TYPE_TAG_INT64", "int64" },
-      { GI_TYPE_TAG_UINT64, "GI_TYPE_TAG_UINT64", "uint64" },
-      { GI_TYPE_TAG_FLOAT, "GI_TYPE_TAG_FLOAT", "float" },
-      { GI_TYPE_TAG_DOUBLE, "GI_TYPE_TAG_DOUBLE", "double" },
-      { GI_TYPE_TAG_GTYPE, "GI_TYPE_TAG_GTYPE", "gtype" },
-      { GI_TYPE_TAG_UTF8, "GI_TYPE_TAG_UTF8", "utf8" },
-      { GI_TYPE_TAG_FILENAME, "GI_TYPE_TAG_FILENAME", "filename" },
-      { GI_TYPE_TAG_ARRAY, "GI_TYPE_TAG_ARRAY", "array" },
-      { GI_TYPE_TAG_INTERFACE, "GI_TYPE_TAG_INTERFACE", "interface" },
-      { GI_TYPE_TAG_GLIST, "GI_TYPE_TAG_GLIST", "glist" },
-      { GI_TYPE_TAG_GSLIST, "GI_TYPE_TAG_GSLIST", "gslist" },
-      { GI_TYPE_TAG_GHASH, "GI_TYPE_TAG_GHASH", "ghash" },
-      { GI_TYPE_TAG_ERROR, "GI_TYPE_TAG_ERROR", "error" },
-      { GI_TYPE_TAG_UNICHAR, "GI_TYPE_TAG_UNICHAR", "unichar" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GITypeTag", values);
-  }
-  return etype;
-}
-
-GType
-g_i_array_type_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      { GI_ARRAY_TYPE_C, "GI_ARRAY_TYPE_C", "c" },
-      { GI_ARRAY_TYPE_ARRAY, "GI_ARRAY_TYPE_ARRAY", "array" },
-      { GI_ARRAY_TYPE_PTR_ARRAY, "GI_ARRAY_TYPE_PTR_ARRAY", "ptr-array" },
-      { GI_ARRAY_TYPE_BYTE_ARRAY, "GI_ARRAY_TYPE_BYTE_ARRAY", "byte-array" },
-      { 0, NULL, NULL }
-    };
-    etype = g_enum_register_static ("GIArrayType", values);
-  }
-  return etype;
-}
-
-GType
-g_i_field_info_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { GI_FIELD_IS_READABLE, "GI_FIELD_IS_READABLE", "readable" },
-      { GI_FIELD_IS_WRITABLE, "GI_FIELD_IS_WRITABLE", "writable" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GIFieldInfoFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_iv_func_info_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { GI_VFUNC_MUST_CHAIN_UP, "GI_VFUNC_MUST_CHAIN_UP", "must-chain-up" },
-      { GI_VFUNC_MUST_OVERRIDE, "GI_VFUNC_MUST_OVERRIDE", "must-override" },
-      { GI_VFUNC_MUST_NOT_OVERRIDE, "GI_VFUNC_MUST_NOT_OVERRIDE", "must-not-override" },
-      { GI_VFUNC_THROWS, "GI_VFUNC_THROWS", "throws" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GIVFuncInfoFlags", values);
-  }
-  return etype;
-}
-
-GType
-g_i_function_info_flags_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      { GI_FUNCTION_IS_METHOD, "GI_FUNCTION_IS_METHOD", "is-method" },
-      { GI_FUNCTION_IS_CONSTRUCTOR, "GI_FUNCTION_IS_CONSTRUCTOR", "is-constructor" },
-      { GI_FUNCTION_IS_GETTER, "GI_FUNCTION_IS_GETTER", "is-getter" },
-      { GI_FUNCTION_IS_SETTER, "GI_FUNCTION_IS_SETTER", "is-setter" },
-      { GI_FUNCTION_WRAPS_VFUNC, "GI_FUNCTION_WRAPS_VFUNC", "wraps-vfunc" },
-      { GI_FUNCTION_THROWS, "GI_FUNCTION_THROWS", "throws" },
-      { 0, NULL, NULL }
-    };
-    etype = g_flags_register_static ("GIFunctionInfoFlags", values);
-  }
-  return etype;
-}
-
-
-/* Generated data ends here */
-
diff --git a/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.h b/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.h
deleted file mode 100644
index 3489c81..0000000
--- a/gobject-introspection/ext/gobject-introspection/gobject-introspection-enum-types.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-/* Generated by glib-mkenums.rb ($Id$) */ 
-
-#ifndef __GOBJECT_INTROSPECTION_ENUM_TYPES_H__
-#define __GOBJECT_INTROSPECTION_ENUM_TYPES_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* enumerations from "/usr/include/gobject-introspection-1.0/girepository.h" */
-GType g_i_repository_load_flags_get_type (void);
-#define G_TYPE_I_REPOSITORY_LOAD_FLAGS (g_i_repository_load_flags_get_type())
-GType g_i_repository_error_get_type (void);
-#define G_TYPE_I_REPOSITORY_ERROR (g_i_repository_error_get_type())
-
-/* enumerations from "/usr/include/gobject-introspection-1.0/gitypes.h" */
-GType g_i_info_type_get_type (void);
-#define G_TYPE_I_INFO_TYPE (g_i_info_type_get_type())
-GType g_i_transfer_get_type (void);
-#define G_TYPE_I_TRANSFER (g_i_transfer_get_type())
-GType g_i_direction_get_type (void);
-#define G_TYPE_I_DIRECTION (g_i_direction_get_type())
-GType g_i_scope_type_get_type (void);
-#define G_TYPE_I_SCOPE_TYPE (g_i_scope_type_get_type())
-GType g_i_type_tag_get_type (void);
-#define G_TYPE_I_TYPE_TAG (g_i_type_tag_get_type())
-GType g_i_array_type_get_type (void);
-#define G_TYPE_I_ARRAY_TYPE (g_i_array_type_get_type())
-GType g_i_field_info_flags_get_type (void);
-#define G_TYPE_I_FIELD_INFO_FLAGS (g_i_field_info_flags_get_type())
-GType g_iv_func_info_flags_get_type (void);
-#define G_TYPE_IV_FUNC_INFO_FLAGS (g_iv_func_info_flags_get_type())
-GType g_i_function_info_flags_get_type (void);
-#define G_TYPE_I_FUNCTION_INFO_FLAGS (g_i_function_info_flags_get_type())
-
-G_END_DECLS
-
-#endif /* __GOBJECT_INTROSPECTION_ENUM_TYPES_H__ */
-
-/* Generated data ends here */
-
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c b/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
index 358fb0e..117b550 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -22,12 +22,235 @@
 
 static VALUE rb_cGLibValue = Qnil;
 
+static VALUE
+interface_struct_to_ruby(gpointer object,
+                         gboolean duplicate,
+                         G_GNUC_UNUSED GITypeInfo *type_info,
+                         GIBaseInfo *interface_info)
+{
+    const char *namespace;
+    const char *name;
+    VALUE rb_module;
+    VALUE rb_class;
+    gpointer target_object = object;
+    RUBY_DATA_FUNC free_func = NULL;
+
+    namespace = g_base_info_get_namespace(interface_info);
+    name = g_base_info_get_name(interface_info);
+    rb_module = rb_const_get(rb_cObject, rb_intern(namespace));
+    rb_class = rb_const_get(rb_module, rb_intern(name));
+    if (duplicate) {
+        size_t object_size;
+        object_size = g_struct_info_get_size(interface_info);
+        target_object = xmalloc(object_size);
+        memcpy(target_object, object, object_size);
+        free_func = xfree;
+    }
+    return Data_Wrap_Struct(rb_class, NULL, free_func, target_object);
+}
+
+static gpointer
+interface_struct_from_ruby(VALUE rb_object)
+{
+    return DATA_PTR(rb_object);
+}
+
+static void
+array_c_to_ruby_sized_interface(gconstpointer *elements,
+                                gint64 n_elements,
+                                GITypeInfo *element_type_info,
+                                VALUE rb_array)
+{
+    gint64 i;
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    GType gtype;
+    const char *interface_name;
+
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+        if (gtype == G_TYPE_NONE) {
+            for (i = 0; i < n_elements; i++) {
+                rb_ary_push(rb_array,
+                            interface_struct_to_ruby((gpointer)elements[i],
+                                                     FALSE,
+                                                     element_type_info,
+                                                     interface_info));
+            }
+            g_base_info_unref(interface_info);
+            g_base_info_unref(element_type_info);
+        } else {
+            interface_name = g_info_type_to_string(interface_type);
+            g_base_info_unref(interface_info);
+            g_base_info_unref(element_type_info);
+            rb_raise(rb_eNotImpError,
+                     "TODO: GIArgument(array)[c][interface(%s)](%s) -> Ruby",
+                     interface_name,
+                     g_type_name(gtype));
+        }
+        break;
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_OBJECT:
+        for (i = 0; i < n_elements; i++) {
+            rb_ary_push(rb_array, GOBJ2RVAL((GObject *)(elements[i])));
+        }
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        break;
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+array_c_to_ruby_sized(gconstpointer *elements,
+                      gint64 n_elements,
+                      GITypeInfo *type_info,
+                      VALUE rb_array)
+{
+    gint64 i;
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UINT8:
+        g_base_info_unref(element_type_info);
+        {
+            const guint8 *numbers = (const guint8 *)elements;
+            for (i = 0; i < n_elements; i++) {
+                rb_ary_push(rb_array, UINT2NUM(numbers[i]));
+            }
+        }
+        break;
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INT32:
+        g_base_info_unref(element_type_info);
+        {
+            const gint8 *numbers = (const gint8 *)elements;
+            for (i = 0; i < n_elements; i++) {
+                rb_ary_push(rb_array, INT2NUM(numbers[i]));
+            }
+        }
+        break;
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UTF8:
+        g_base_info_unref(element_type_info);
+        {
+            const gchar **strings = (const gchar **)elements;
+            for (i = 0; i < n_elements; i++) {
+                rb_ary_push(rb_array, CSTR2RVAL(strings[i]));
+            }
+        }
+        break;
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        array_c_to_ruby_sized_interface(elements, n_elements, element_type_info,
+                                        rb_array);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[c][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+}
+
 static void
 array_c_to_ruby(GIArgument *array, GITypeInfo *type_info, gint64 n_elements,
                 VALUE rb_array)
 {
-    const gchar **elements;
-    gboolean fixed_size_p;
+    gconstpointer *elements;
+    gint fixed_size;
     gboolean zero_terminated_p;
 
     elements = array->v_pointer;
@@ -35,29 +258,181 @@ array_c_to_ruby(GIArgument *array, GITypeInfo *type_info, gint64 n_elements,
         return;
     }
 
-    fixed_size_p = g_type_info_get_array_fixed_size(type_info);
+    fixed_size = g_type_info_get_array_fixed_size(type_info);
     zero_terminated_p = g_type_info_is_zero_terminated(type_info);
+
     if (n_elements != -1) {
-        gint64 i;
-        for (i = 0; i < n_elements; i++) {
-            rb_ary_push(rb_array, CSTR2RVAL(elements[i]));
-        }
+        array_c_to_ruby_sized(elements, n_elements, type_info, rb_array);
     } else if (zero_terminated_p) {
-        for (; *elements; elements++) {
-            rb_ary_push(rb_array, CSTR2RVAL(*elements));
+        const gchar **strings = (const gchar **)elements;
+        for (; *strings; strings++) {
+            rb_ary_push(rb_array, CSTR2RVAL(*strings));
         }
     } else {
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(array)[c] -> Ruby: "
                  "zero-terminated: %s "
-                 "fixed-size: %s "
+                 "fixed-size: %d "
                  "length: %" G_GINT64_FORMAT,
                  zero_terminated_p ? "true" : "false",
-                 fixed_size_p ? "true" : "false",
+                 fixed_size,
                  n_elements);
     }
 }
 
+static void
+array_array_interface_to_ruby(GIArgument *array,
+                              G_GNUC_UNUSED GITypeInfo *array_type_info,
+                              GITypeInfo *element_type_info,
+                              VALUE rb_array)
+{
+    GArray *elements;
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    GType gtype;
+    const char *interface_name;
+
+    elements = array->v_pointer;
+
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+        if (gtype == G_TYPE_NONE) {
+            guint i;
+            guint element_size;
+
+            element_size = g_array_get_element_size(elements);
+            for (i = 0; i < elements->len; i++) {
+                gpointer element;
+                element = elements->data + (element_size * i);
+                rb_ary_push(rb_array,
+                            interface_struct_to_ruby(element,
+                                                     TRUE,
+                                                     element_type_info,
+                                                     interface_info));
+            }
+        } else {
+            interface_name = g_info_type_to_string(interface_type);
+            g_base_info_unref(interface_info);
+            g_base_info_unref(element_type_info);
+            rb_raise(rb_eNotImpError,
+                     "TODO: GIArgument(array)[array][interface(%s)](%s) -> Ruby",
+                     interface_name,
+                     g_type_name(gtype));
+        }
+        break;
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+
+    g_base_info_unref(interface_info);
+}
+
+static void
+array_array_to_ruby(GIArgument *array,
+                    GITypeInfo *array_type_info,
+                    VALUE rb_array)
+{
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+    GArray *elements;
+
+    elements = array->v_pointer;
+    if (!elements) {
+        return;
+    }
+
+    element_type_info = g_type_info_get_param_type(array_type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        array_array_interface_to_ruby(array,
+                                      array_type_info,
+                                      element_type_info,
+                                      rb_array);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+
+    g_base_info_unref(element_type_info);
+}
+
 static gint64
 get_array_length(GIArgument *argument, GITypeInfo *type_info)
 {
@@ -70,53 +445,53 @@ get_array_length(GIArgument *argument, GITypeInfo *type_info)
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
         rb_raise(rb_eNotImpError,
                  "TODO: invalid array length argument?: <%s>",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         length = argument->v_int8;
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         length = argument->v_uint8;
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         length = argument->v_int16;
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         length = argument->v_uint16;
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         length = argument->v_int32;
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         length = argument->v_uint32;
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         length = argument->v_int64;
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         length = argument->v_uint64;
         break;
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: invalid array length argument?: <%s>",
                  g_type_tag_to_string(type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -124,7 +499,7 @@ get_array_length(GIArgument *argument, GITypeInfo *type_info)
     return length;
 }
 
-VALUE
+static VALUE
 rb_gi_array_argument_to_ruby(GIArgument *array_argument,
                              GIArgument *length_argument,
                              GITypeInfo *array_type_info,
@@ -142,19 +517,19 @@ rb_gi_array_argument_to_ruby(GIArgument *array_argument,
         rb_array = rb_ary_new2(n_elements);
     }
     switch (array_type) {
-      case GI_ARRAY_TYPE_C:
+    case GI_ARRAY_TYPE_C:
         array_c_to_ruby(array_argument, array_type_info, n_elements, rb_array);
         break;
-      case GI_ARRAY_TYPE_ARRAY:
-        rb_raise(rb_eNotImpError, "TODO: GIArgument(array)[array] -> Ruby");
+    case GI_ARRAY_TYPE_ARRAY:
+        array_array_to_ruby(array_argument, array_type_info, rb_array);
         break;
-      case GI_ARRAY_TYPE_PTR_ARRAY:
+    case GI_ARRAY_TYPE_PTR_ARRAY:
         rb_raise(rb_eNotImpError, "TODO: GIArgument(array)[ptr-array] -> Ruby");
         break;
-      case GI_ARRAY_TYPE_BYTE_ARRAY:
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
         rb_raise(rb_eNotImpError, "TODO: GIArgument(array)[byte-array] -> Ruby");
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -163,7 +538,30 @@ rb_gi_array_argument_to_ruby(GIArgument *array_argument,
 }
 
 static VALUE
-interface_to_ruby(GIArgument *argument, GITypeInfo *type_info)
+interface_variant_to_ruby(GVariant *variant)
+{
+    VALUE rb_value = Qnil;
+    const GVariantType *type;
+
+    type = g_variant_get_type(variant);
+    if (g_variant_type_equal(type, G_VARIANT_TYPE_STRING)) {
+        const char *value;
+        g_variant_get(variant, "s", &value);
+        rb_value = CSTR2RVAL(value);
+    } else {
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(interface)[GVariant][%.*s] -> Ruby",
+                 (int)g_variant_type_get_string_length(type),
+                 g_variant_type_peek_string(type));
+    }
+
+    return rb_value;
+}
+
+static VALUE
+interface_to_ruby(GIArgument *argument,
+                  gboolean duplicate,
+                  GITypeInfo *type_info)
 {
     VALUE rb_interface;
     GIBaseInfo *interface_info;
@@ -175,96 +573,104 @@ interface_to_ruby(GIArgument *argument, GITypeInfo *type_info)
 
     gtype = g_registered_type_info_get_g_type(interface_info);
     switch (interface_type) {
-      case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_INVALID:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[invalid] -> Ruby");
         break;
-      case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_FUNCTION:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[function] -> Ruby");
         break;
-      case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_CALLBACK:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[callback] -> Ruby");
         break;
-      case GI_INFO_TYPE_STRUCT:
-        if (gtype == G_TYPE_BYTES) {
+    case GI_INFO_TYPE_STRUCT:
+        if (gtype == G_TYPE_NONE) {
+            rb_interface = interface_struct_to_ruby(argument->v_pointer,
+                                                    duplicate,
+                                                    type_info,
+                                                    interface_info);
+        } else if (gtype == G_TYPE_BYTES) {
             GBytes *bytes = argument->v_pointer;
             gconstpointer data;
             gsize size;
             data = g_bytes_get_data(bytes, &size);
             rb_interface = rb_enc_str_new(data, size, rb_ascii8bit_encoding());
+        } else if (gtype == G_TYPE_VARIANT) {
+            GVariant *variant = argument->v_pointer;
+            rb_interface = interface_variant_to_ruby(variant);
         } else {
             rb_interface = BOXED2RVAL(argument->v_pointer, gtype);
         }
         break;
-      case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_BOXED:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[boxed] -> Ruby");
         break;
-      case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_ENUM:
         if (gtype == G_TYPE_NONE) {
             rb_interface = INT2NUM(argument->v_int32);
         } else {
             rb_interface = GENUM2RVAL(argument->v_int32, gtype);
         }
         break;
-      case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_FLAGS:
         if (gtype == G_TYPE_NONE) {
             rb_interface = INT2NUM(argument->v_int32);
         } else {
             rb_interface = GFLAGS2RVAL(argument->v_int32, gtype);
         }
         break;
-      case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_OBJECT:
         rb_interface = GOBJ2RVAL(argument->v_pointer);
         break;
-      case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_INTERFACE:
         rb_interface = GOBJ2RVAL(argument->v_pointer);
         break;
-      case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_CONSTANT:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[constant] -> Ruby");
         break;
-      case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_INVALID_0:
         g_assert_not_reached();
         break;
-      case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_UNION:
         rb_interface = BOXED2RVAL(argument->v_pointer, gtype);
         break;
-      case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_VALUE:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[value] -> Ruby");
         break;
-      case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_SIGNAL:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[signal] -> Ruby");
         break;
-      case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_VFUNC:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[vfunc] -> Ruby");
         break;
-      case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_PROPERTY:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[property] -> Ruby");
         break;
-      case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_FIELD:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[field] -> Ruby");
         break;
-      case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_ARG:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[arg] -> Ruby");
         break;
-      case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_TYPE:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[type] -> Ruby");
         break;
-      case GI_INFO_TYPE_UNRESOLVED:
+    case GI_INFO_TYPE_UNRESOLVED:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(interface)[unresolved] -> Ruby");
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -274,57 +680,264 @@ interface_to_ruby(GIArgument *argument, GITypeInfo *type_info)
     return rb_interface;
 }
 
-static VALUE
-rb_gi_argument_to_ruby_glist(GIArgument *argument, GITypeInfo *type_info)
+static void
+normalize_out_array_length(GIArgument *normalized_argument,
+                           GIArgument *argument,
+                           GITypeInfo *type_info)
 {
-    VALUE rb_argument;
-    GITypeInfo *element_type_info;
-    GITypeTag element_type_tag;
-
-    element_type_info = g_type_info_get_param_type(type_info, 0);
-    element_type_tag = g_type_info_get_tag(element_type_info);
-    g_base_info_unref(element_type_info);
+    GITypeTag type_tag;
 
-    switch (element_type_tag) {
+    type_tag = g_type_info_get_tag(type_info);
+    switch (type_tag) {
     case GI_TYPE_TAG_VOID:
     case GI_TYPE_TAG_BOOLEAN:
+        rb_raise(rb_eNotImpError,
+                 "TODO: invalid out array length argument?: <%s>",
+                 g_type_tag_to_string(type_tag));
+        break;
     case GI_TYPE_TAG_INT8:
+        normalized_argument->v_int8 = *((gint8 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_UINT8:
+        normalized_argument->v_uint8 = *((guint8 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_INT16:
+        normalized_argument->v_int16 = *((gint16 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_UINT16:
+        normalized_argument->v_uint16 = *((guint16 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_INT32:
+        normalized_argument->v_int32 = *((gint32 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_UINT32:
+        normalized_argument->v_uint32 = *((guint32 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_INT64:
+        normalized_argument->v_int64 = *((gint64 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_UINT64:
+        normalized_argument->v_uint64 = *((guint64 *)argument->v_pointer);
+        break;
     case GI_TYPE_TAG_FLOAT:
     case GI_TYPE_TAG_DOUBLE:
     case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: invalid out array length argument?: <%s>",
+                 g_type_tag_to_string(type_tag));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static VALUE
+rb_gi_argument_to_ruby_array(GIArgument *array_argument,
+                             GITypeInfo *array_type_info,
+                             GArray *in_args,
+                             GArray *out_args,
+                             GPtrArray *args_metadata)
+{
+    VALUE rb_array;
+    gint length_index;
+    GIArgument *length_argument = NULL;
+    GIArgument normalized_length_argument;
+    GITypeInfo raw_length_type_info;
+    GITypeInfo *length_type_info = NULL;
+
+    length_index = g_type_info_get_array_length(array_type_info);
+    if (length_index != -1) {
+        RBGIArgMetadata *length_metadata;
+        GIArgInfo *length_arg_info = NULL;
+        GIArgument *raw_length_argument = NULL;
+
+        length_metadata = g_ptr_array_index(args_metadata, length_index);
+        length_arg_info = &(length_metadata->arg_info);
+
+        g_arg_info_load_type(length_arg_info, &raw_length_type_info);
+        length_type_info = &raw_length_type_info;
+
+        if (length_metadata->direction == GI_DIRECTION_OUT) {
+            raw_length_argument = &g_array_index(out_args, GIArgument,
+                                                 length_metadata->out_arg_index);
+        } else if (length_metadata->direction == GI_DIRECTION_INOUT) {
+            raw_length_argument = &g_array_index(in_args, GIArgument,
+                                                 length_metadata->in_arg_index);
+        }
+
+        if (raw_length_argument) {
+            normalize_out_array_length(&normalized_length_argument,
+                                       raw_length_argument,
+                                       length_type_info);
+            length_argument = &normalized_length_argument;
+        } else {
+            length_argument = &g_array_index(in_args, GIArgument,
+                                             length_metadata->in_arg_index);
+        }
+    }
+
+    rb_array = rb_gi_array_argument_to_ruby(array_argument,
+                                            length_argument,
+                                            array_type_info,
+                                            length_type_info);
+
+    return rb_array;
+}
+
+static VALUE
+rb_gi_argument_to_ruby_glist_interface(GIArgument *argument,
+                                       G_GNUC_UNUSED GITypeInfo *type_info,
+                                       GITypeInfo *element_type_info)
+{
+    VALUE rb_argument = Qnil;
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    const gchar *interface_name;
+    GType gtype;
+
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    interface_name = g_info_type_to_string(interface_type);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GList)[interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+        if (gtype == G_TYPE_NONE) {
+            GList *node;
+            rb_argument = rb_ary_new();
+            for (node = argument->v_pointer; node; node = g_list_next(node)) {
+                rb_ary_push(rb_argument,
+                            interface_struct_to_ruby(node->data,
+                                                     FALSE,
+                                                     element_type_info,
+                                                     interface_info));
+            }
+        } else {
+            rb_argument = BOXEDGLIST2RVAL(argument->v_pointer, gtype);
+        }
+        break;
+    case GI_INFO_TYPE_BOXED:
+        rb_argument = BOXEDGLIST2RVAL(argument->v_pointer, gtype);
+        break;
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GList)[interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+        rb_argument = GOBJGLIST2RVAL(argument->v_pointer);
+        break;
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GList)[interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+
+    g_base_info_unref(interface_info);
+    g_base_info_unref(element_type_info);
+
+    return rb_argument;
+}
+
+static VALUE
+rb_gi_argument_to_ruby_glist(GIArgument *argument, GITypeInfo *type_info)
+{
+    VALUE rb_argument;
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(GList)[%s] -> Ruby",
                  g_type_tag_to_string(element_type_tag));
         break;
     case GI_TYPE_TAG_UTF8:
+        g_base_info_unref(element_type_info);
         rb_argument = CSTRGLIST2RVAL(argument->v_pointer);
         break;
     case GI_TYPE_TAG_FILENAME:
     case GI_TYPE_TAG_ARRAY:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(GList)[%s] -> Ruby",
                  g_type_tag_to_string(element_type_tag));
         break;
     case GI_TYPE_TAG_INTERFACE:
-        GOBJGLIST2RVAL(argument->v_pointer);
+        rb_argument = rb_gi_argument_to_ruby_glist_interface(argument,
+                                                             type_info,
+                                                             element_type_info);
         break;
     case GI_TYPE_TAG_GLIST:
     case GI_TYPE_TAG_GSLIST:
     case GI_TYPE_TAG_GHASH:
     case GI_TYPE_TAG_ERROR:
     case GI_TYPE_TAG_UNICHAR:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(GList)[%s] -> Ruby",
                  g_type_tag_to_string(element_type_tag));
         break;
     default:
+        g_base_info_unref(element_type_info);
         g_assert_not_reached();
         break;
     }
@@ -332,90 +945,177 @@ rb_gi_argument_to_ruby_glist(GIArgument *argument, GITypeInfo *type_info)
     return rb_argument;
 }
 
+static VALUE
+rb_gi_argument_to_ruby_gslist(GIArgument *argument, GITypeInfo *type_info)
+{
+    VALUE rb_argument;
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+    g_base_info_unref(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GSList)[%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UTF8:
+        rb_argument = CSTRGSLIST2RVAL(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GSList)[%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        rb_argument = GOBJGSLIST2RVAL(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(GSList)[%s] -> Ruby",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+
+    return rb_argument;
+}
+
+static VALUE
+rb_gi_argument_to_ruby_unichar(GIArgument *argument)
+{
+    VALUE rb_argument;
+    gunichar ucs4_character;
+    gchar *utf8_string;
+    GError *error = NULL;
+
+    ucs4_character = argument->v_uint32;
+    utf8_string = g_ucs4_to_utf8(&ucs4_character, 1, NULL, NULL, &error);
+    if (error) {
+        RG_RAISE_ERROR(error);
+    }
+    rb_argument = CSTR2RVAL_FREE(utf8_string);
+
+    return rb_argument;
+}
 
 VALUE
-rb_gi_argument_to_ruby(GIArgument *argument, GITypeInfo *type_info)
+rb_gi_argument_to_ruby(GIArgument *argument,
+                       gboolean duplicate,
+                       GITypeInfo *type_info,
+                       GArray *in_args,
+                       GArray *out_args,
+                       GPtrArray *args_metadata)
 {
     VALUE rb_argument = Qnil;
     GITypeTag type_tag;
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         if (g_type_info_is_pointer(type_info)) {
             rb_argument = ULONG2NUM(GPOINTER_TO_UINT(argument->v_pointer));
         } else {
             rb_argument = Qnil;
         }
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         rb_argument = CBOOL2RVAL(argument->v_boolean);
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         rb_argument = INT2NUM(argument->v_int8);
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         rb_argument = UINT2NUM(argument->v_uint8);
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         rb_argument = INT2NUM(argument->v_int16);
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         rb_argument = UINT2NUM(argument->v_uint16);
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         rb_argument = INT2NUM(argument->v_int32);
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         rb_argument = UINT2NUM(argument->v_uint32);
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         rb_argument = LONG2NUM(argument->v_int64);
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         rb_argument = ULONG2NUM(argument->v_uint64);
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         rb_argument = DBL2NUM(argument->v_float);
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         rb_argument = DBL2NUM(argument->v_double);
         break;
-      case GI_TYPE_TAG_GTYPE:
-        rb_argument = rbgobj_gtype_new(argument->v_size);
+    case GI_TYPE_TAG_GTYPE:
+        if (argument->v_size == G_TYPE_INVALID) {
+            rb_argument = Qnil;
+        } else {
+            rb_argument = rbgobj_gtype_new(argument->v_size);
+        }
         break;
-      case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_UTF8:
         rb_argument = CSTR2RVAL(argument->v_string);
         break;
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_FILENAME:
         /* TODO: set encoding */
         rb_argument = CSTR2RVAL(argument->v_string);
         break;
-      case GI_TYPE_TAG_ARRAY:
-        rb_argument = rb_gi_array_argument_to_ruby(argument, NULL,
-                                                   type_info, NULL);
+    case GI_TYPE_TAG_ARRAY:
+        rb_argument = rb_gi_argument_to_ruby_array(argument,
+                                                   type_info,
+                                                   in_args,
+                                                   out_args,
+                                                   args_metadata);
         break;
-      case GI_TYPE_TAG_INTERFACE:
-        rb_argument = interface_to_ruby(argument, type_info);
+    case GI_TYPE_TAG_INTERFACE:
+        rb_argument = interface_to_ruby(argument, duplicate, type_info);
         break;
-      case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GLIST:
         rb_argument = rb_gi_argument_to_ruby_glist(argument, type_info);
         break;
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_GSLIST:
+        rb_argument = rb_gi_argument_to_ruby_gslist(argument, type_info);
+        break;
+    case GI_TYPE_TAG_GHASH:
         rb_raise(rb_eNotImpError,
                  "TODO: GIArgument(%s) -> Ruby",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_ERROR:
         rb_argument = GERROR2RVAL(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_UNICHAR:
-        rb_raise(rb_eNotImpError,
-                 "TODO: GIArgument(%s) -> Ruby",
-                 g_type_tag_to_string(type_tag));
+    case GI_TYPE_TAG_UNICHAR:
+        rb_argument = rb_gi_argument_to_ruby_unichar(argument);
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -424,6 +1124,178 @@ rb_gi_argument_to_ruby(GIArgument *argument, GITypeInfo *type_info)
 }
 
 static void
+rb_gi_out_argument_init_array_array_interface(GIArgument *argument,
+                                              G_GNUC_UNUSED GIArgInfo *arg_info,
+                                              GITypeInfo *array_type_info,
+                                              GITypeInfo *element_type_info)
+{
+    gboolean zero_terminated_p;
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    GType gtype;
+    const char *interface_name;
+
+    zero_terminated_p = g_type_info_is_zero_terminated(array_type_info);
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+    {
+        gsize struct_size;
+
+        struct_size = g_struct_info_get_size(interface_info);
+        argument->v_pointer = g_array_new(zero_terminated_p,
+                                          TRUE,
+                                          struct_size);
+        break;
+    }
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: GIArgument(array)[array][interface(%s)](%s) -> Ruby",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
+        g_base_info_unref(interface_info);
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+
+    g_base_info_unref(interface_info);
+}
+
+static void
+rb_gi_out_argument_init_array_array(GIArgument *argument,
+                                    GIArgInfo *arg_info,
+                                    GITypeInfo *array_type_info,
+                                    GITypeInfo *element_type_info)
+{
+    GITypeTag element_type_tag;
+
+    element_type_tag = g_type_info_get_tag(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: allocates GIArgument(array)[array][%s] for output",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        rb_gi_out_argument_init_array_array_interface(argument,
+                                                      arg_info,
+                                                      array_type_info,
+                                                      element_type_info);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: allocates GIArgument(array)[array][%s] for output",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+rb_gi_out_argument_init_array(GIArgument *argument, GIArgInfo *arg_info,
+                              GITypeInfo *array_type_info)
+{
+    GIArrayType array_type;
+    GITypeInfo *element_type_info;
+
+    array_type = g_type_info_get_array_type(array_type_info);
+    element_type_info = g_type_info_get_param_type(array_type_info, 0);
+
+    switch (array_type) {
+    case GI_ARRAY_TYPE_C:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: allocates GIArgument(array)[c][%s] for output",
+                 g_type_tag_to_string(g_type_info_get_tag(element_type_info)));
+        break;
+    case GI_ARRAY_TYPE_ARRAY:
+        rb_gi_out_argument_init_array_array(argument,
+                                            arg_info,
+                                            array_type_info,
+                                            element_type_info);
+        break;
+    case GI_ARRAY_TYPE_PTR_ARRAY:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: allocates GIArgument(array)[ptr-array][%s] for output",
+                 g_type_tag_to_string(g_type_info_get_tag(element_type_info)));
+        break;
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
+        g_base_info_unref(element_type_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: allocates GIArgument(array)[byte-array][%s] for output",
+                 g_type_tag_to_string(g_type_info_get_tag(element_type_info)));
+        break;
+    default:
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+
+    g_base_info_unref(element_type_info);
+}
+
+static void
 rb_gi_out_argument_init_interface(GIArgument *argument, GIArgInfo *arg_info,
                                   GITypeInfo *type_info)
 {
@@ -439,43 +1311,43 @@ rb_gi_out_argument_init_interface(GIArgument *argument, GIArgInfo *arg_info,
     interface_type = g_base_info_get_type(interface_info);
 
     switch (interface_type) {
-      case GI_INFO_TYPE_INVALID:
-      case GI_INFO_TYPE_FUNCTION:
-      case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
         rb_raise(rb_eNotImpError,
                  "TODO: allocates GIArgument(interface)[%s] for output",
                  g_info_type_to_string(interface_type));
         break;
-      case GI_INFO_TYPE_STRUCT:
-        {
-            gsize struct_size;
+    case GI_INFO_TYPE_STRUCT:
+    {
+        gsize struct_size;
 
-            struct_size = g_struct_info_get_size(interface_info);
-            argument->v_pointer = xmalloc(struct_size);
-            memset(argument->v_pointer, 0, struct_size);
-        }
-        break;
-      case GI_INFO_TYPE_BOXED:
-      case GI_INFO_TYPE_ENUM:
-      case GI_INFO_TYPE_FLAGS:
-      case GI_INFO_TYPE_OBJECT:
-      case GI_INFO_TYPE_INTERFACE:
-      case GI_INFO_TYPE_CONSTANT:
-      case GI_INFO_TYPE_INVALID_0:
-      case GI_INFO_TYPE_UNION:
-      case GI_INFO_TYPE_VALUE:
-      case GI_INFO_TYPE_SIGNAL:
-      case GI_INFO_TYPE_VFUNC:
-      case GI_INFO_TYPE_PROPERTY:
-      case GI_INFO_TYPE_FIELD:
-      case GI_INFO_TYPE_ARG:
-      case GI_INFO_TYPE_TYPE:
-      case GI_INFO_TYPE_UNRESOLVED:
+        struct_size = g_struct_info_get_size(interface_info);
+        argument->v_pointer = xmalloc(struct_size);
+        memset(argument->v_pointer, 0, struct_size);
+    }
+    break;
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
         rb_raise(rb_eNotImpError,
                  "TODO: allocates GIArgument(interface)[%s] for output",
                  g_info_type_to_string(interface_type));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -494,270 +1366,353 @@ rb_gi_out_argument_init(GIArgument *argument, GIArgInfo *arg_info)
     g_arg_info_load_type(arg_info, &type_info);
     type_tag = g_type_info_get_tag(&type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         argument->v_pointer = ALLOC(gboolean);
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         argument->v_pointer = ALLOC(gint8);
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         argument->v_pointer = ALLOC(guint8);
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         argument->v_pointer = ALLOC(gint16);
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         argument->v_pointer = ALLOC(guint16);
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         argument->v_pointer = ALLOC(gint32);
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         argument->v_pointer = ALLOC(guint32);
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         argument->v_pointer = ALLOC(gint64);
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         argument->v_pointer = ALLOC(guint64);
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         argument->v_pointer = ALLOC(gfloat);
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         argument->v_pointer = ALLOC(gdouble);
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
         argument->v_pointer = ALLOC(GType);
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
         argument->v_pointer = ALLOC(gchar *);
         break;
-      case GI_TYPE_TAG_ARRAY:
-        argument->v_pointer = ALLOC(gpointer);
+    case GI_TYPE_TAG_ARRAY:
+        rb_gi_out_argument_init_array(argument, arg_info, &type_info);
         break;
-      case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_INTERFACE:
         rb_gi_out_argument_init_interface(argument, arg_info, &type_info);
         break;
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
         argument->v_pointer = ALLOC(gpointer);
         break;
-      case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_ERROR:
         argument->v_pointer = ALLOC(GError *);
         memset(argument->v_pointer, 0, sizeof(GError *));
         break;
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_UNICHAR:
         argument->v_pointer = ALLOC(gunichar);
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 }
 
 VALUE
-rb_gi_out_argument_to_ruby(GIArgument *argument, GIArgInfo *arg_info)
+rb_gi_out_argument_to_ruby(GIArgument *argument,
+                           GIArgInfo *arg_info,
+                           GArray *in_args,
+                           GArray *out_args,
+                           GPtrArray *args_metadata)
 {
     GIArgument normalized_argument;
     GITypeInfo type_info;
     GITypeTag type_tag;
+    gboolean duplicate = FALSE;
 
     memset(&normalized_argument, 0, sizeof(GIArgument));
     g_arg_info_load_type(arg_info, &type_info);
     type_tag = g_type_info_get_tag(&type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         normalized_argument.v_boolean = *((gboolean *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         normalized_argument.v_int8 = *((gint8 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         normalized_argument.v_uint8 = *((guint8 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         normalized_argument.v_int16 = *((gint16 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         normalized_argument.v_uint16 = *((guint16 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         normalized_argument.v_int32 = *((gint32 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         normalized_argument.v_uint32 = *((guint32 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         normalized_argument.v_int64 = *((gint64 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         normalized_argument.v_uint64 = *((guint64 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         normalized_argument.v_float = *((gfloat *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         normalized_argument.v_double = *((gdouble *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
         normalized_argument.v_size = *((GType *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
         normalized_argument.v_string = *((gchar **)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
         if (g_arg_info_is_caller_allocates(arg_info)) {
+            duplicate = TRUE;
             normalized_argument.v_pointer = argument->v_pointer;
         } else {
             normalized_argument.v_pointer = *((gpointer *)(argument->v_pointer));
         }
         break;
-      case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_ERROR:
         normalized_argument.v_pointer = *((GError **)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_UNICHAR:
         normalized_argument.v_uint32 = *((guint32 *)(argument->v_pointer));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 
-    return rb_gi_argument_to_ruby(&normalized_argument, &type_info);
+    return rb_gi_argument_to_ruby(&normalized_argument,
+                                  duplicate,
+                                  &type_info,
+                                  in_args,
+                                  out_args,
+                                  args_metadata);
 }
 
 static void
-normalize_out_array_length(GIArgument *normalized_argument,
-                           GIArgument *argument,
-                           GITypeInfo *type_info)
+rb_gi_out_argument_fin_array(GIArgument *argument,
+                             G_GNUC_UNUSED GIArgInfo *arg_info,
+                             GITypeInfo *array_type_info)
 {
+    GIArrayType array_type;
+
+    array_type = g_type_info_get_array_type(array_type_info);
+
+    switch (array_type) {
+    case GI_ARRAY_TYPE_C:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free out GIArgument(array)[c]");
+        break;
+    case GI_ARRAY_TYPE_ARRAY:
+        g_array_free(argument->v_pointer, TRUE);
+        break;
+    case GI_ARRAY_TYPE_PTR_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free out GIArgument(array)[ptr-array]");
+        break;
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free out GIArgument(array)[byte-array]");
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
+void
+rb_gi_out_argument_fin(GIArgument *argument, GIArgInfo *arg_info)
+{
+    GITypeInfo type_info;
     GITypeTag type_tag;
 
-    type_tag = g_type_info_get_tag(type_info);
+    if (g_arg_info_get_direction(arg_info) != GI_DIRECTION_OUT) {
+        return;
+    }
+
+    g_arg_info_load_type(arg_info, &type_info);
+    type_tag = g_type_info_get_tag(&type_info);
+
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+        xfree(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_FILENAME:
         rb_raise(rb_eNotImpError,
-                 "TODO: invalid out array length argument?: <%s>",
+                 "TODO: free out GIArgument(%s)",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INT8:
-        normalized_argument->v_int8 = *((gint8 *)argument->v_pointer);
+    case GI_TYPE_TAG_ARRAY:
+        rb_gi_out_argument_fin_array(argument, arg_info, &type_info);
         break;
-      case GI_TYPE_TAG_UINT8:
-        normalized_argument->v_uint8 = *((guint8 *)argument->v_pointer);
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        xfree(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_INT16:
-        normalized_argument->v_int16 = *((gint16 *)argument->v_pointer);
+    default:
+        g_assert_not_reached();
         break;
-      case GI_TYPE_TAG_UINT16:
-        normalized_argument->v_uint16 = *((guint16 *)argument->v_pointer);
+    }
+}
+
+static void
+rb_gi_return_argument_free_container(GIArgument *argument,
+                                     GITypeInfo *type_info)
+{
+    GITypeTag type_tag;
+
+    type_tag = g_type_info_get_tag(type_info);
+
+    switch (type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(%s) as container",
+                 g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INT32:
-        normalized_argument->v_int32 = *((gint32 *)argument->v_pointer);
+    case GI_TYPE_TAG_ARRAY:
+        g_free(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_UINT32:
-        normalized_argument->v_uint32 = *((guint32 *)argument->v_pointer);
+    case GI_TYPE_TAG_INTERFACE:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(%s) as container",
+                 g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INT64:
-        normalized_argument->v_int64 = *((gint64 *)argument->v_pointer);
+    case GI_TYPE_TAG_GLIST:
+        g_list_free(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_UINT64:
-        normalized_argument->v_uint64 = *((guint64 *)argument->v_pointer);
+    case GI_TYPE_TAG_GSLIST:
+        g_slist_free(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
-                 "TODO: invalid out array length argument?: <%s>",
+                 "TODO: free GIArgument(%s) as container",
                  g_type_tag_to_string(type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 }
 
-VALUE
-rb_gi_out_array_argument_to_ruby(GIArgument *array_argument,
-                                 GIArgument *length_argument,
-                                 GIArgInfo *array_arg_info,
-                                 GIArgInfo *length_arg_info)
+static void
+rb_gi_return_argument_free_everything_array_c(GIArgument *argument,
+                                              GITypeInfo *type_info)
 {
-    VALUE rb_array;
-    GIArgument normalized_array_argument;
-    GITypeInfo array_type_info;
-
-    normalized_array_argument.v_pointer =
-        *((gpointer *)(array_argument->v_pointer));
-    g_arg_info_load_type(array_arg_info, &array_type_info);
-    if (length_argument) {
-        GITypeInfo length_type_info;
-        GIArgument normalized_length_argument;
-
-        g_arg_info_load_type(length_arg_info, &length_type_info);
-        normalize_out_array_length(&normalized_length_argument,
-                                   length_argument,
-                                   &length_type_info);
-        rb_array = rb_gi_array_argument_to_ruby(&normalized_array_argument,
-                                                &normalized_length_argument,
-                                                &array_type_info,
-                                                &length_type_info);
-    } else {
-        rb_array = rb_gi_array_argument_to_ruby(&normalized_array_argument,
-                                                NULL,
-                                                &array_type_info,
-                                                NULL);
-    }
-
-    return rb_array;
-}
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
 
-void
-rb_gi_out_argument_fin(GIArgument *argument, GIArgInfo *arg_info)
-{
-    GITypeInfo type_info;
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+    g_base_info_unref(element_type_info);
 
-    if (g_arg_info_get_direction(arg_info) != GI_DIRECTION_OUT) {
-        return;
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(array)[c][%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UINT8:
+        g_free(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(array)[c][%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UTF8:
+        g_strfreev(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(array)[c][%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
     }
-
-    g_arg_info_load_type(arg_info, &type_info);
-    xfree(argument->v_pointer);
-}
-
-static void
-rb_gi_return_argument_free_container(G_GNUC_UNUSED GIArgument *argument,
-                                     GITypeInfo *type_info)
-{
-    GITypeTag type_tag;
-
-    type_tag = g_type_info_get_tag(type_info);
-
-    rb_raise(rb_eNotImpError,
-             "TODO: free GIArgument(%s) as container",
-             g_type_tag_to_string(type_tag));
 }
 
 static void
@@ -765,19 +1720,19 @@ rb_gi_return_argument_free_everything_array(GIArgument *argument,
                                             GITypeInfo *type_info)
 {
     switch (g_type_info_get_array_type(type_info)) {
-      case GI_ARRAY_TYPE_C:
-        g_strfreev(argument->v_pointer);
+    case GI_ARRAY_TYPE_C:
+        rb_gi_return_argument_free_everything_array_c(argument, type_info);
         break;
-      case GI_ARRAY_TYPE_ARRAY:
+    case GI_ARRAY_TYPE_ARRAY:
         g_array_free(argument->v_pointer, TRUE);
         break;
-      case GI_ARRAY_TYPE_PTR_ARRAY:
+    case GI_ARRAY_TYPE_PTR_ARRAY:
         g_ptr_array_free(argument->v_pointer, TRUE);
         break;
-      case GI_ARRAY_TYPE_BYTE_ARRAY:
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
         g_ptr_array_free(argument->v_pointer, TRUE);
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -816,87 +1771,173 @@ rb_gi_return_argument_free_everything_interface(GIArgument *argument,
     g_base_info_unref(interface_info);
 
     switch (interface_type) {
-      case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_INVALID:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[invalid] everything");
         break;
-      case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_FUNCTION:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[function] everything");
         break;
-      case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_CALLBACK:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[callback] everything");
         break;
-      case GI_INFO_TYPE_STRUCT:
+    case GI_INFO_TYPE_STRUCT:
         rb_gi_return_argument_free_everything_interface_struct(argument, gtype);
         break;
-      case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_BOXED:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[boxed] everything");
         break;
-      case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_ENUM:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[enum] everything");
         break;
-      case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_FLAGS:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[flags] everything");
         break;
-      case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_OBJECT:
         if (argument->v_pointer) {
             g_object_unref(argument->v_pointer);
         }
         break;
-      case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_INTERFACE:
         if (argument->v_pointer) {
             g_object_unref(argument->v_pointer);
         }
         break;
-      case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_CONSTANT:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[constant] everything");
         break;
-      case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_INVALID_0:
         g_assert_not_reached();
         break;
-      case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_UNION:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[union] everything");
         break;
-      case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_VALUE:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[value] everything");
         break;
-      case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_SIGNAL:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[signal] everything");
         break;
-      case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_VFUNC:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[vfunc] everything");
         break;
-      case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_PROPERTY:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[property] everything");
         break;
-      case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_FIELD:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[field] everything");
         break;
-      case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_ARG:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[arg] everything");
         break;
-      case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_TYPE:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[type] everything");
         break;
-      case GI_INFO_TYPE_UNRESOLVED:
+    case GI_INFO_TYPE_UNRESOLVED:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(interface)[unresolved] everything");
         break;
-      default:
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+rb_gi_boxed_free_callback(gpointer boxed, gpointer user_data)
+{
+    GType *gtype = user_data;
+
+    g_boxed_free(*gtype, boxed);
+}
+
+
+static void
+rb_gi_return_argument_free_everything_glist_interface(GIArgument *argument,
+                                                      G_GNUC_UNUSED GITypeInfo *type_info,
+                                                      GITypeInfo *element_type_info)
+{
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    const gchar *interface_name;
+    GType gtype;
+
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    interface_name = g_info_type_to_string(interface_type);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+    g_base_info_unref(interface_info);
+    g_base_info_unref(element_type_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GList)[interface(%s)](%s) everything",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+        if (gtype == G_TYPE_NONE) {
+            rb_raise(rb_eNotImpError,
+                     "TODO: free GIArgument(GList)[interface(%s)](%s) everything",
+                     interface_name,
+                     g_type_name(gtype));
+        } else {
+            g_list_foreach(argument->v_pointer,
+                           rb_gi_boxed_free_callback,
+                           &gtype);
+            g_list_free(argument->v_pointer);
+        }
+        break;
+    case GI_INFO_TYPE_BOXED:
+        g_list_foreach(argument->v_pointer, rb_gi_boxed_free_callback, &gtype);
+        g_list_free(argument->v_pointer);
+        break;
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GList)[interface(%s)](%s) everything",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+        g_list_foreach(argument->v_pointer, (GFunc)g_object_unref, NULL);
+        g_list_free(argument->v_pointer);
+        break;
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GList)[interface(%s)](%s) everything",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
         g_assert_not_reached();
         break;
     }
@@ -911,7 +1952,6 @@ rb_gi_return_argument_free_everything_glist(GIArgument *argument,
 
     element_type_info = g_type_info_get_param_type(type_info, 0);
     element_type_tag = g_type_info_get_tag(element_type_info);
-    g_base_info_unref(element_type_info);
 
     switch (element_type_tag) {
     case GI_TYPE_TAG_VOID:
@@ -927,34 +1967,98 @@ rb_gi_return_argument_free_everything_glist(GIArgument *argument,
     case GI_TYPE_TAG_FLOAT:
     case GI_TYPE_TAG_DOUBLE:
     case GI_TYPE_TAG_GTYPE:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(GList)[%s] everything",
                  g_type_tag_to_string(element_type_tag));
         break;
     case GI_TYPE_TAG_UTF8:
+        g_base_info_unref(element_type_info);
         g_list_foreach(argument->v_pointer, (GFunc)g_free, NULL);
         g_list_free(argument->v_pointer);
         break;
     case GI_TYPE_TAG_FILENAME:
     case GI_TYPE_TAG_ARRAY:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(GList)[%s] everything",
                  g_type_tag_to_string(element_type_tag));
         break;
     case GI_TYPE_TAG_INTERFACE:
-        g_list_foreach(argument->v_pointer, (GFunc)g_object_unref, NULL);
-        g_list_free(argument->v_pointer);
+        rb_gi_return_argument_free_everything_glist_interface(argument,
+                                                              type_info,
+                                                              element_type_info);
         break;
     case GI_TYPE_TAG_GLIST:
     case GI_TYPE_TAG_GSLIST:
     case GI_TYPE_TAG_GHASH:
     case GI_TYPE_TAG_ERROR:
     case GI_TYPE_TAG_UNICHAR:
+        g_base_info_unref(element_type_info);
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(GList)[%s] everything",
                  g_type_tag_to_string(element_type_tag));
         break;
     default:
+        g_base_info_unref(element_type_info);
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+rb_gi_return_argument_free_everything_gslist(GIArgument *argument,
+                                             GITypeInfo *type_info)
+{
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+    g_base_info_unref(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GSList)[%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_UTF8:
+        g_slist_foreach(argument->v_pointer, (GFunc)g_free, NULL);
+        g_slist_free(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GSList)[%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        g_slist_foreach(argument->v_pointer, (GFunc)g_object_unref, NULL);
+        g_slist_free(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: free GIArgument(GSList)[%s] everything",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
         g_assert_not_reached();
         break;
     }
@@ -968,57 +2072,60 @@ rb_gi_return_argument_free_everything(GIArgument *argument,
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
-      case GI_TYPE_TAG_INT8:
-      case GI_TYPE_TAG_UINT8:
-      case GI_TYPE_TAG_INT16:
-      case GI_TYPE_TAG_UINT16:
-      case GI_TYPE_TAG_INT32:
-      case GI_TYPE_TAG_UINT32:
-      case GI_TYPE_TAG_INT64:
-      case GI_TYPE_TAG_UINT64:
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(%s) everything",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_UTF8:
         g_free(argument->v_string);
         break;
-      case GI_TYPE_TAG_FILENAME:
-        rb_raise(rb_eNotImpError,
-                 "TODO: free GIArgument(%s) everything",
-                 g_type_tag_to_string(type_tag));
+    case GI_TYPE_TAG_FILENAME:
+        g_free(argument->v_string);
         break;
-      case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_ARRAY:
         rb_gi_return_argument_free_everything_array(argument, type_info);
         break;
-      case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_INTERFACE:
         rb_gi_return_argument_free_everything_interface(argument, type_info);
         break;
-      case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GLIST:
         rb_gi_return_argument_free_everything_glist(argument, type_info);
         break;
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GSLIST:
+        rb_gi_return_argument_free_everything_gslist(argument, type_info);
+        break;
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(%s) everything",
                  g_type_tag_to_string(type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 }
 
 VALUE
-rb_gi_return_argument_to_ruby(GIArgument *argument,
-                              GICallableInfo *callable_info)
+rb_gi_return_argument_to_ruby(GICallableInfo *callable_info,
+                              GIArgument *argument,
+                              GArray *in_args,
+                              GArray *out_args,
+                              GPtrArray *args_metadata)
 {
     VALUE rb_argument;
     gboolean may_return_null;
@@ -1030,17 +2137,18 @@ rb_gi_return_argument_to_ruby(GIArgument *argument,
     }
 
     g_callable_info_load_return_type(callable_info, &return_value_info);
-    rb_argument = rb_gi_argument_to_ruby(argument, &return_value_info);
+    rb_argument = rb_gi_argument_to_ruby(argument, FALSE, &return_value_info,
+                                         in_args, out_args, args_metadata);
     switch (g_callable_info_get_caller_owns(callable_info)) {
-      case GI_TRANSFER_NOTHING:
+    case GI_TRANSFER_NOTHING:
         break;
-      case GI_TRANSFER_CONTAINER:
+    case GI_TRANSFER_CONTAINER:
         rb_gi_return_argument_free_container(argument, &return_value_info);
         break;
-      case GI_TRANSFER_EVERYTHING:
+    case GI_TRANSFER_EVERYTHING:
         rb_gi_return_argument_free_everything(argument, &return_value_info);
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1048,8 +2156,10 @@ rb_gi_return_argument_to_ruby(GIArgument *argument,
 }
 
 static void
-rb_gi_argument_from_ruby_interface(GIArgument *argument, GITypeInfo *type_info,
-                                   VALUE rb_argument)
+rb_gi_value_argument_from_ruby_interface(GIArgument *argument,
+                                         GITypeInfo *type_info,
+                                         VALUE rb_argument,
+                                         VALUE self)
 {
     GIBaseInfo *interface_info;
     GIInfoType interface_type;
@@ -1058,87 +2168,217 @@ rb_gi_argument_from_ruby_interface(GIArgument *argument, GITypeInfo *type_info,
     interface_info = g_type_info_get_interface(type_info);
     interface_type = g_base_info_get_type(interface_info);
 
-    gtype = g_registered_type_info_get_g_type(interface_info);
     switch (interface_type) {
-      case GI_INFO_TYPE_INVALID:
-      case GI_INFO_TYPE_FUNCTION:
-      case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
         rb_raise(rb_eNotImpError,
                  "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
                  g_info_type_to_string(interface_type),
                  g_base_info_get_name(interface_info));
         break;
-      case GI_INFO_TYPE_STRUCT:
+    case GI_INFO_TYPE_STRUCT:
+        gtype = g_registered_type_info_get_g_type(interface_info);
         if (gtype == G_TYPE_NONE) {
             argument->v_pointer = DATA_PTR(rb_argument);
         } else if (gtype == G_TYPE_VALUE) {
             GValue *gvalue;
-            gvalue = ALLOC(GValue);
-            memset(gvalue, 0, sizeof(GValue));
-            if (rb_obj_is_kind_of(rb_argument, rb_cGLibValue)) {
-                GValue *source_gvalue;
-                source_gvalue = RVAL2BOXED(rb_argument, G_TYPE_VALUE);
-                g_value_init(gvalue, source_gvalue->g_type);
-                g_value_copy(source_gvalue, gvalue);
+            if (RVAL2CBOOL(rb_obj_is_kind_of(rb_argument, rb_cGLibValue))) {
+                gvalue = RVAL2BOXED(rb_argument, G_TYPE_VALUE);
             } else {
+                gvalue = ALLOC(GValue);
+                memset(gvalue, 0, sizeof(GValue));
                 rbgobj_initialize_gvalue(gvalue, rb_argument);
             }
             argument->v_pointer = gvalue;
+        } else if (gtype == G_TYPE_BYTES) {
+            VALUE rb_string;
+            GBytes *gbytes;
+
+            rb_string = StringValue(rb_argument);
+            gbytes = g_bytes_new(RSTRING_PTR(rb_string),
+                                 RSTRING_LEN(rb_string));
+            argument->v_pointer = gbytes;
+        } else if (gtype == G_TYPE_CLOSURE) {
+            GClosure *rclosure = NULL;
+
+            rclosure = g_rclosure_new(rb_argument, Qnil, NULL);
+            g_rclosure_attach(rclosure, self);
+            argument->v_pointer = rclosure;
+        } else if (gtype == G_TYPE_VARIANT) {
+            argument->v_pointer = rbg_variant_from_ruby(rb_argument);
+        } else {
+            argument->v_pointer = RVAL2BOXED(rb_argument, gtype);
+        }
+        break;
+    case GI_INFO_TYPE_BOXED:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
+                 g_info_type_to_string(interface_type),
+                 g_base_info_get_name(interface_info));
+        break;
+    case GI_INFO_TYPE_ENUM:
+        gtype = g_registered_type_info_get_g_type(interface_info);
+        if (gtype == G_TYPE_NONE) {
+            argument->v_int32 = NUM2INT(rb_argument);
+        } else {
+            argument->v_int32 = RVAL2GENUM(rb_argument, gtype);
+        }
+        break;
+    case GI_INFO_TYPE_FLAGS:
+        gtype = g_registered_type_info_get_g_type(interface_info);
+        if (gtype == G_TYPE_NONE) {
+            argument->v_int32 = NUM2INT(rb_argument);
+        } else {
+            argument->v_int32 = RVAL2GFLAGS(rb_argument, gtype);
+        }
+        break;
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+        argument->v_pointer = RVAL2GOBJ(rb_argument);
+        break;
+    case GI_INFO_TYPE_CONSTANT:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
+                 g_info_type_to_string(interface_type),
+                 g_base_info_get_name(interface_info));
+        break;
+    case GI_INFO_TYPE_INVALID_0:
+        g_assert_not_reached();
+        break;
+    case GI_INFO_TYPE_UNION:
+        gtype = g_registered_type_info_get_g_type(interface_info);
+        if (gtype == G_TYPE_NONE) {
+            rb_raise(rb_eNotImpError,
+                     "TODO: Ruby -> GIArgument(interface)[%s]: <%s>"
+                     "(G_TYPE_NONE)",
+                     g_info_type_to_string(interface_type),
+                     g_base_info_get_name(interface_info));
         } else {
             argument->v_pointer = RVAL2BOXED(rb_argument, gtype);
         }
         break;
-      case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+    default:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
+                 g_info_type_to_string(interface_type),
+                 g_base_info_get_name(interface_info));
+        break;
+    }
+
+    g_base_info_unref(interface_info);
+}
+
+static void
+rb_gi_value_argument_from_ruby_glist(GIArgument *argument,
+                                     GITypeInfo *type_info,
+                                     VALUE rb_argument,
+                                     G_GNUC_UNUSED VALUE self)
+{
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+    g_base_info_unref(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(GList)[%s]",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        argument->v_pointer = RVAL2GOBJGLIST(rb_argument);
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(GList)[%s]",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+rb_gi_value_argument_from_ruby_gslist(GIArgument *argument,
+                                      GITypeInfo *type_info,
+                                      VALUE rb_argument,
+                                      G_GNUC_UNUSED VALUE self)
+{
+    GITypeInfo *element_type_info;
+    GITypeTag element_type_tag;
+
+    element_type_info = g_type_info_get_param_type(type_info, 0);
+    element_type_tag = g_type_info_get_tag(element_type_info);
+    g_base_info_unref(element_type_info);
+
+    switch (element_type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
         rb_raise(rb_eNotImpError,
-                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
-                 g_info_type_to_string(interface_type),
-                 g_base_info_get_name(interface_info));
-        break;
-      case GI_INFO_TYPE_ENUM:
-        if (gtype == G_TYPE_NONE) {
-            argument->v_int32 = NUM2INT(rb_argument);
-        } else {
-            argument->v_int32 = RVAL2GENUM(rb_argument, gtype);
-        }
-        break;
-      case GI_INFO_TYPE_FLAGS:
-        if (gtype == G_TYPE_NONE) {
-            argument->v_int32 = NUM2INT(rb_argument);
-        } else {
-            argument->v_int32 = RVAL2GFLAGS(rb_argument, gtype);
-        }
+                 "TODO: Ruby -> GIArgument(GSList)[%s]",
+                 g_type_tag_to_string(element_type_tag));
         break;
-      case GI_INFO_TYPE_OBJECT:
-      case GI_INFO_TYPE_INTERFACE:
-        argument->v_pointer = RVAL2GOBJ(rb_argument);
+    case GI_TYPE_TAG_INTERFACE:
+        argument->v_pointer = RVAL2GOBJGSLIST(rb_argument);
         break;
-      case GI_INFO_TYPE_CONSTANT:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
-                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
-                 g_info_type_to_string(interface_type),
-                 g_base_info_get_name(interface_info));
+                 "TODO: Ruby -> GIArgument(GSList)[%s]",
+                 g_type_tag_to_string(element_type_tag));
         break;
-      case GI_INFO_TYPE_INVALID_0:
+    default:
         g_assert_not_reached();
         break;
-      case GI_INFO_TYPE_UNION:
-      case GI_INFO_TYPE_VALUE:
-      case GI_INFO_TYPE_SIGNAL:
-      case GI_INFO_TYPE_VFUNC:
-      case GI_INFO_TYPE_PROPERTY:
-      case GI_INFO_TYPE_FIELD:
-      case GI_INFO_TYPE_ARG:
-      case GI_INFO_TYPE_TYPE:
-      case GI_INFO_TYPE_UNRESOLVED:
-      default:
-        rb_raise(rb_eNotImpError,
-                 "TODO: Ruby -> GIArgument(interface)[%s]: <%s>",
-                 g_info_type_to_string(interface_type),
-                 g_base_info_get_name(interface_info));
-        break;
     }
-
-    g_base_info_unref(interface_info);
 }
 
 static void
@@ -1158,7 +2398,7 @@ rb_gi_value_argument_from_ruby_void(GIArgument *argument, GITypeInfo *type_info,
 
 GIArgument *
 rb_gi_value_argument_from_ruby(GIArgument *argument, GITypeInfo *type_info,
-                               VALUE rb_argument)
+                               VALUE rb_argument, VALUE self)
 {
     GITypeTag type_tag;
 
@@ -1166,71 +2406,78 @@ rb_gi_value_argument_from_ruby(GIArgument *argument, GITypeInfo *type_info,
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         rb_gi_value_argument_from_ruby_void(argument, type_info, rb_argument);
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         argument->v_boolean = RVAL2CBOOL(rb_argument);
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         argument->v_int8 = NUM2INT(rb_argument);
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         argument->v_uint8 = NUM2UINT(rb_argument);
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         argument->v_int16 = NUM2INT(rb_argument);
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         argument->v_uint16 = NUM2UINT(rb_argument);
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         argument->v_int32 = NUM2INT(rb_argument);
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         argument->v_uint32 = NUM2UINT(rb_argument);
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         argument->v_int64 = NUM2LONG(rb_argument);
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         argument->v_uint64 = NUM2ULONG(rb_argument);
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         argument->v_float = NUM2DBL(rb_argument);
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         argument->v_double = NUM2DBL(rb_argument);
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
         /* TODO: support GLib::Type and String as GType name. */
         argument->v_size = NUM2ULONG(rb_argument);
         break;
-      case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_UTF8:
         /* TODO: support UTF-8 convert like rb_argument.encode("UTF-8"). */
-        argument->v_string = (gchar *)RVAL2CSTR(rb_argument);
+        argument->v_string = (gchar *)RVAL2CSTR_ACCEPT_SYMBOL(rb_argument);
         break;
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_FILENAME:
         argument->v_string = (gchar *)RVAL2CSTR(rb_argument);
         break;
-      case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_ARRAY:
         rb_raise(rb_eNotImpError,
                  "should not be reached: Ruby -> GIArgument(%s)",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INTERFACE:
-        rb_gi_argument_from_ruby_interface(argument, type_info, rb_argument);
+    case GI_TYPE_TAG_INTERFACE:
+        rb_gi_value_argument_from_ruby_interface(argument, type_info,
+                                                 rb_argument, self);
+        break;
+    case GI_TYPE_TAG_GLIST:
+        rb_gi_value_argument_from_ruby_glist(argument, type_info,
+                                             rb_argument, self);
+        break;
+    case GI_TYPE_TAG_GSLIST:
+        rb_gi_value_argument_from_ruby_gslist(argument, type_info,
+                                              rb_argument, self);
         break;
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: Ruby -> GIArgument(%s)",
                  g_type_tag_to_string(type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1241,91 +2488,93 @@ rb_gi_value_argument_from_ruby(GIArgument *argument, GITypeInfo *type_info,
 static void
 rb_gi_inout_argument_from_ruby(GIArgument *argument,
                                G_GNUC_UNUSED GIArgInfo *arg_info,
-                               GITypeInfo *type_info, VALUE rb_argument)
+                               GITypeInfo *type_info,
+                               VALUE rb_argument,
+                               VALUE self)
 {
     GIArgument in_argument;
     GITypeTag type_tag;
 
-    rb_gi_value_argument_from_ruby(&in_argument, type_info, rb_argument);
+    rb_gi_value_argument_from_ruby(&in_argument, type_info, rb_argument, self);
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         argument->v_pointer = ALLOC(gboolean);
         *((gboolean *)argument->v_pointer) = in_argument.v_boolean;
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         argument->v_pointer = ALLOC(gint8);
         *((gint8 *)argument->v_pointer) = in_argument.v_int8;
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         argument->v_pointer = ALLOC(guint8);
         *((guint8 *)argument->v_pointer) = in_argument.v_uint8;
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         argument->v_pointer = ALLOC(gint16);
         *((gint16 *)argument->v_pointer) = in_argument.v_int16;
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         argument->v_pointer = ALLOC(guint16);
         *((guint16 *)argument->v_pointer) = in_argument.v_uint16;
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         argument->v_pointer = ALLOC(gint32);
         *((gint32 *)argument->v_pointer) = in_argument.v_int32;
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         argument->v_pointer = ALLOC(guint32);
         *((guint32 *)argument->v_pointer) = in_argument.v_uint32;
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         argument->v_pointer = ALLOC(gint64);
         *((gint64 *)argument->v_pointer) = in_argument.v_int64;
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         argument->v_pointer = ALLOC(guint64);
         *((guint64 *)argument->v_pointer) = in_argument.v_uint64;
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         argument->v_pointer = ALLOC(gfloat);
         *((gfloat *)argument->v_pointer) = in_argument.v_float;
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         argument->v_pointer = ALLOC(gdouble);
         *((gdouble *)argument->v_pointer) = in_argument.v_double;
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
         argument->v_pointer = ALLOC(gsize);
         *((gsize *)argument->v_pointer) = in_argument.v_size;
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
         argument->v_pointer = ALLOC(gchar *);
         *((gchar **)argument->v_pointer) = in_argument.v_string;
         break;
-      case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_ARRAY:
         rb_raise(rb_eNotImpError,
                  "should not be reached: Ruby -> GIArgument(%s)",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
         argument->v_pointer = ALLOC(gpointer);
         *((gpointer *)argument->v_pointer) = in_argument.v_pointer;
         break;
-      case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_ERROR:
         argument->v_pointer = ALLOC(GError *);
         *((GError **)argument->v_pointer) = in_argument.v_pointer;
         break;
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_UNICHAR:
         argument->v_pointer = ALLOC(gunichar);
         *((gunichar *)argument->v_pointer) = in_argument.v_uint32;
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1347,49 +2596,49 @@ rb_gi_in_argument_transfer_interface(GIArgument *argument,
     g_base_info_unref(interface_info);
 
     switch (interface_type) {
-      case GI_INFO_TYPE_INVALID:
-      case GI_INFO_TYPE_FUNCTION:
-      case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (interface) [%s]",
                  g_info_type_to_string(interface_type));
         break;
-      case GI_INFO_TYPE_STRUCT:
+    case GI_INFO_TYPE_STRUCT:
         rbgobj_boxed_unown(rb_argument);
         break;
-      case GI_INFO_TYPE_BOXED:
-      case GI_INFO_TYPE_ENUM:
-      case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (interface) [%s]",
                  g_info_type_to_string(interface_type));
         break;
-      case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_OBJECT:
         g_object_ref(argument->v_pointer);
         break;
-      case GI_INFO_TYPE_INTERFACE:
-      case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (interface) [%s]",
                  g_info_type_to_string(interface_type));
         break;
-      case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_INVALID_0:
         g_assert_not_reached();
         break;
-      case GI_INFO_TYPE_UNION:
-      case GI_INFO_TYPE_VALUE:
-      case GI_INFO_TYPE_SIGNAL:
-      case GI_INFO_TYPE_VFUNC:
-      case GI_INFO_TYPE_PROPERTY:
-      case GI_INFO_TYPE_FIELD:
-      case GI_INFO_TYPE_ARG:
-      case GI_INFO_TYPE_TYPE:
-      case GI_INFO_TYPE_UNRESOLVED:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (interface) [%s]",
                  g_info_type_to_string(interface_type));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1407,40 +2656,40 @@ rb_gi_in_argument_transfer(GIArgument *argument, GITransfer transfer,
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
-      case GI_TYPE_TAG_INT8:
-      case GI_TYPE_TAG_UINT8:
-      case GI_TYPE_TAG_INT16:
-      case GI_TYPE_TAG_UINT16:
-      case GI_TYPE_TAG_INT32:
-      case GI_TYPE_TAG_UINT32:
-      case GI_TYPE_TAG_INT64:
-      case GI_TYPE_TAG_UINT64:
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-        break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-      case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        break;
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (%s)",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_INTERFACE:
         rb_gi_in_argument_transfer_interface(argument, transfer,
                                              type_info, rb_argument);
         break;
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: in transfer (%s)",
                  g_type_tag_to_string(type_tag));
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1448,93 +2697,221 @@ rb_gi_in_argument_transfer(GIArgument *argument, GITransfer transfer,
 
 GIArgument *
 rb_gi_in_argument_from_ruby(GIArgument *argument, GIArgInfo *arg_info,
-                            VALUE rb_argument)
+                            VALUE rb_argument, VALUE self)
 {
     GITypeInfo type_info;
 
-    if (g_arg_info_may_be_null(arg_info) && NIL_P(rb_argument)) {
-        memset(argument, 0, sizeof(GIArgument));
-        return argument;
+    if (g_arg_info_may_be_null(arg_info) && NIL_P(rb_argument)) {
+        memset(argument, 0, sizeof(GIArgument));
+        return argument;
+    }
+
+    g_arg_info_load_type(arg_info, &type_info);
+    if (g_arg_info_get_direction(arg_info) == GI_DIRECTION_INOUT) {
+        rb_gi_inout_argument_from_ruby(argument, arg_info, &type_info,
+                                       rb_argument, self);
+    } else {
+        rb_gi_value_argument_from_ruby(argument, &type_info, rb_argument, self);
+        rb_gi_in_argument_transfer(argument,
+                                   g_arg_info_get_ownership_transfer(arg_info),
+                                   &type_info,
+                                   rb_argument);
+    }
+
+    return argument;
+}
+
+static void
+set_in_array_length_argument(GIArgument *argument,
+                             GITypeInfo *type_info,
+                             gint64 length)
+{
+    GITypeTag type_tag;
+
+    if (!argument) {
+        return;
+    }
+
+    type_tag = g_type_info_get_tag(type_info);
+    switch (type_tag) {
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+        rb_raise(rb_eNotImpError,
+                 "TODO: invalid argument?: length[%s]",
+                 g_type_tag_to_string(type_tag));
+        break;
+    case GI_TYPE_TAG_INT8:
+        argument->v_int8 = length;
+        break;
+    case GI_TYPE_TAG_UINT8:
+        argument->v_uint8 = length;
+        break;
+    case GI_TYPE_TAG_INT16:
+        argument->v_int16 = length;
+        break;
+    case GI_TYPE_TAG_UINT16:
+        argument->v_uint16 = length;
+        break;
+    case GI_TYPE_TAG_INT32:
+        argument->v_int32 = length;
+        break;
+    case GI_TYPE_TAG_UINT32:
+        argument->v_uint32 = length;
+        break;
+    case GI_TYPE_TAG_INT64:
+        argument->v_int64 = length;
+        break;
+    case GI_TYPE_TAG_UINT64:
+        argument->v_uint64 = length;
+        break;
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
+        rb_raise(rb_eNotImpError,
+                 "TODO: invalid argument?: length[%s]",
+                 g_type_tag_to_string(type_tag));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
+static void
+set_in_array_int16_arguments_from_ruby(GIArgument *array_argument,
+                                       VALUE rb_number_array)
+{
+    gint16 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(gint16, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2INT(RARRAY_PTR(rb_number_array)[i]);
+    }
+
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_uint16_arguments_from_ruby(GIArgument *array_argument,
+                                        VALUE rb_number_array)
+{
+    guint16 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(guint16, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2UINT(RARRAY_PTR(rb_number_array)[i]);
+    }
+
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_int32_arguments_from_ruby(GIArgument *array_argument,
+                                       VALUE rb_number_array)
+{
+    gint32 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(gint32, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2INT(RARRAY_PTR(rb_number_array)[i]);
+    }
+
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_uint32_arguments_from_ruby(GIArgument *array_argument,
+                                        VALUE rb_number_array)
+{
+    guint32 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(guint32, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2UINT(RARRAY_PTR(rb_number_array)[i]);
+    }
+
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_int64_arguments_from_ruby(GIArgument *array_argument,
+                                       VALUE rb_number_array)
+{
+    gint64 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(gint64, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2LONG(RARRAY_PTR(rb_number_array)[i]);
+    }
+
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_uint64_arguments_from_ruby(GIArgument *array_argument,
+                                        VALUE rb_number_array)
+{
+    guint64 *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(guint64, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2ULONG(RARRAY_PTR(rb_number_array)[i]);
     }
 
-    g_arg_info_load_type(arg_info, &type_info);
-    if (g_arg_info_get_direction(arg_info) == GI_DIRECTION_INOUT) {
-        rb_gi_inout_argument_from_ruby(argument, arg_info, &type_info,
-                                       rb_argument);
-    } else {
-        rb_gi_value_argument_from_ruby(argument, &type_info, rb_argument);
-        rb_gi_in_argument_transfer(argument,
-                                   g_arg_info_get_ownership_transfer(arg_info),
-                                   &type_info,
-                                   rb_argument);
+    array_argument->v_pointer = numbers;
+}
+
+static void
+set_in_array_float_arguments_from_ruby(GIArgument *array_argument,
+                                       VALUE rb_number_array)
+{
+    gfloat *numbers;
+    gint i, n_args;
+
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(gfloat, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2DBL(RARRAY_PTR(rb_number_array)[i]);
     }
 
-    return argument;
+    array_argument->v_pointer = numbers;
 }
 
 static void
-set_in_array_length_argument(GIArgument *argument,
-                             GITypeInfo *type_info,
-                             gint64 length)
+set_in_array_double_arguments_from_ruby(GIArgument *array_argument,
+                                        VALUE rb_number_array)
 {
-    GITypeTag type_tag;
+    gdouble *numbers;
+    gint i, n_args;
 
-    if (!argument) {
-        return;
+    n_args = RARRAY_LEN(rb_number_array);
+    numbers = ALLOC_N(gdouble, n_args);
+    for (i = 0; i < n_args; i++) {
+        numbers[i] = NUM2DBL(RARRAY_PTR(rb_number_array)[i]);
     }
 
-    type_tag = g_type_info_get_tag(type_info);
-    switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
-        rb_raise(rb_eNotImpError,
-                 "TODO: invalid argument?: length[%s]",
-                 g_type_tag_to_string(type_tag));
-        break;
-      case GI_TYPE_TAG_INT8:
-        argument->v_int8 = length;
-        break;
-      case GI_TYPE_TAG_UINT8:
-        argument->v_uint8 = length;
-        break;
-      case GI_TYPE_TAG_INT16:
-        argument->v_int16 = length;
-        break;
-      case GI_TYPE_TAG_UINT16:
-        argument->v_uint16 = length;
-        break;
-      case GI_TYPE_TAG_INT32:
-        argument->v_int32 = length;
-        break;
-      case GI_TYPE_TAG_UINT32:
-        argument->v_uint32 = length;
-        break;
-      case GI_TYPE_TAG_INT64:
-        argument->v_int64 = length;
-        break;
-      case GI_TYPE_TAG_UINT64:
-        argument->v_uint64 = length;
-        break;
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
-        rb_raise(rb_eNotImpError,
-                 "TODO: invalid argument?: length[%s]",
-                 g_type_tag_to_string(type_tag));
-        break;
-      default:
-        g_assert_not_reached();
-        break;
-    }
+    array_argument->v_pointer = numbers;
 }
 
 static void
@@ -1553,6 +2930,134 @@ set_in_array_gtype_arguments_from_ruby(GIArgument *array_argument,
     array_argument->v_pointer = types;
 }
 
+typedef struct {
+    GType element_gtype;
+    gsize element_size;
+    VALUE rb_argument;
+    gint n_args;
+    gchar *values;
+} ArrayInterfaceStructFromRubyData;
+
+static VALUE
+set_in_array_interface_struct_arguments_from_ruby_body(VALUE value)
+{
+    ArrayInterfaceStructFromRubyData *data;
+    gint i;
+
+    data = (ArrayInterfaceStructFromRubyData *)value;
+
+    for (i = 0; i < data->n_args; i++) {
+        VALUE rb_element;
+        gpointer element;
+
+        rb_element = RARRAY_PTR(data->rb_argument)[i];
+        if (data->element_gtype == G_TYPE_NONE) {
+            element = interface_struct_from_ruby(rb_element);
+        } else {
+            element = RVAL2BOXED(rb_element, data->element_gtype);
+        }
+        memcpy(data->values + (data->element_size * i),
+               element,
+               data->element_size);
+    }
+
+    return Qnil;
+}
+
+static G_GNUC_NORETURN VALUE
+set_in_array_interface_struct_arguments_from_ruby_rescue(VALUE value)
+{
+    ArrayInterfaceStructFromRubyData *data;
+
+    data = (ArrayInterfaceStructFromRubyData *)value;
+    xfree(data->values);
+
+    rb_exc_raise(rb_errinfo());
+}
+
+static void
+set_in_array_interface_struct_arguments_from_ruby(GIArgument *array_argument,
+                                                  GType element_gtype,
+                                                  gsize element_size,
+                                                  VALUE rb_argument)
+{
+    ArrayInterfaceStructFromRubyData data;
+
+    data.element_gtype = element_gtype;
+    data.element_size = element_size;
+    data.rb_argument = rb_argument;
+    data.n_args = RARRAY_LEN(rb_argument);
+    data.values = xmalloc(data.element_size * data.n_args);
+    rb_rescue(set_in_array_interface_struct_arguments_from_ruby_body,
+              (VALUE)&data,
+              set_in_array_interface_struct_arguments_from_ruby_rescue,
+              (VALUE)&data);
+    array_argument->v_pointer = data.values;
+}
+
+static void
+set_in_array_interface_arguments_from_ruby(GIArgument *array_argument,
+                                           GITypeInfo *element_type_info,
+                                           VALUE rb_argument)
+{
+    GIBaseInfo *interface_info;
+    GIInfoType interface_type;
+    GType gtype;
+    const char *interface_name;
+    gsize size;
+
+    interface_info = g_type_info_get_interface(element_type_info);
+    interface_type = g_base_info_get_type(interface_info);
+    gtype = g_registered_type_info_get_g_type(interface_info);
+
+    switch (interface_type) {
+    case GI_INFO_TYPE_INVALID:
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(array)[interface(%s)](%s)",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    case GI_INFO_TYPE_STRUCT:
+        size = g_struct_info_get_size(interface_info);
+        g_base_info_unref(interface_info);
+        set_in_array_interface_struct_arguments_from_ruby(array_argument,
+                                                          gtype,
+                                                          size,
+                                                          rb_argument);
+        break;
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+    case GI_INFO_TYPE_VALUE:
+    case GI_INFO_TYPE_SIGNAL:
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_PROPERTY:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    case GI_INFO_TYPE_UNRESOLVED:
+        interface_name = g_info_type_to_string(interface_type);
+        g_base_info_unref(interface_info);
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(array)[interface(%s)](%s)",
+                 interface_name,
+                 g_type_name(gtype));
+        break;
+    default:
+        g_assert_not_reached();
+        break;
+    }
+}
+
 static void
 in_array_c_argument_from_ruby(GIArgument *array_argument,
                               GIArgument *length_argument,
@@ -1565,54 +3070,103 @@ in_array_c_argument_from_ruby(GIArgument *array_argument,
 
     element_type_tag = g_type_info_get_tag(element_type_info);
     switch (element_type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
         rb_raise(rb_eNotImpError,
                  "TODO: Ruby -> GIArgument(array)[%s]",
                  g_type_tag_to_string(element_type_tag));
         break;
-      case GI_TYPE_TAG_INT8:
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
         array_argument->v_pointer = RSTRING_PTR(rb_argument);
         set_in_array_length_argument(length_argument, length_type_info,
                                      RSTRING_LEN(rb_argument));
         break;
-      case GI_TYPE_TAG_INT16:
-      case GI_TYPE_TAG_UINT16:
-      case GI_TYPE_TAG_INT32:
-      case GI_TYPE_TAG_UINT32:
-      case GI_TYPE_TAG_INT64:
-      case GI_TYPE_TAG_UINT64:
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-        rb_raise(rb_eNotImpError,
-                 "TODO: Ruby -> GIArgument(array)[%s]",
-                 g_type_tag_to_string(element_type_tag));
+    case GI_TYPE_TAG_INT16:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_int16_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_UINT16:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_uint16_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_INT32:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_int32_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_UINT32:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_uint32_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_INT64:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_int64_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_UINT64:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_uint64_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_FLOAT:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_float_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_DOUBLE:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_double_arguments_from_ruby(array_argument, rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
+        rb_argument = rbg_to_array(rb_argument);
         set_in_array_gtype_arguments_from_ruby(array_argument,
                                                rb_argument);
         set_in_array_length_argument(length_argument, length_type_info,
                                      RARRAY_LEN(rb_argument));
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+        rb_argument = rbg_to_array(rb_argument);
         array_argument->v_pointer = RVAL2STRV(rb_argument);
         set_in_array_length_argument(length_argument, length_type_info,
                                      RARRAY_LEN(rb_argument));
         break;
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_ARRAY:
+        rb_raise(rb_eNotImpError,
+                 "TODO: Ruby -> GIArgument(array)[%s]",
+                 g_type_tag_to_string(element_type_tag));
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        rb_argument = rbg_to_array(rb_argument);
+        set_in_array_interface_arguments_from_ruby(array_argument,
+                                                   element_type_info,
+                                                   rb_argument);
+        set_in_array_length_argument(length_argument, length_type_info,
+                                     RARRAY_LEN(rb_argument));
+        break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: Ruby -> GIArgument(array)[%s]",
                  g_type_tag_to_string(element_type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1631,7 +3185,7 @@ in_array_argument_from_ruby(GIArgument *array_argument,
     array_type = g_type_info_get_array_type(array_type_info);
     element_type_info = g_type_info_get_param_type(array_type_info, 0);
     switch (array_type) {
-      case GI_ARRAY_TYPE_C:
+    case GI_ARRAY_TYPE_C:
         in_array_c_argument_from_ruby(array_argument,
                                       length_argument,
                                       array_type_info,
@@ -1639,14 +3193,14 @@ in_array_argument_from_ruby(GIArgument *array_argument,
                                       element_type_info,
                                       rb_argument);
         break;
-      case GI_ARRAY_TYPE_ARRAY:
-      case GI_ARRAY_TYPE_PTR_ARRAY:
-      case GI_ARRAY_TYPE_BYTE_ARRAY:
+    case GI_ARRAY_TYPE_ARRAY:
+    case GI_ARRAY_TYPE_PTR_ARRAY:
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
         rb_raise(rb_eNotImpError,
                  "TODO: Ruby -> GIArgument(array)[%s]",
                  g_type_tag_to_string(g_type_info_get_tag(element_type_info)));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1666,61 +3220,61 @@ set_inout_array_length_argument(GIArgument *argument,
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
         rb_raise(rb_eNotImpError,
                  "TODO: invalid argument?: length[%s]",
                  g_type_tag_to_string(type_tag));
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         argument->v_pointer = ALLOC(gint8);
         *((gint8 *)argument->v_pointer) = length->v_int8;
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         argument->v_pointer = ALLOC(guint8);
         *((guint8 *)argument->v_pointer) = length->v_uint8;
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         argument->v_pointer = ALLOC(gint16);
         *((gint16 *)argument->v_pointer) = length->v_int16;
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         argument->v_pointer = ALLOC(guint16);
         *((guint16 *)argument->v_pointer) = length->v_uint16;
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         argument->v_pointer = ALLOC(gint32);
         *((gint32 *)argument->v_pointer) = length->v_int32;
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         argument->v_pointer = ALLOC(guint32);
         *((guint32 *)argument->v_pointer) = length->v_uint32;
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         argument->v_pointer = ALLOC(gint64);
         *((gint64 *)argument->v_pointer) = length->v_int64;
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         argument->v_pointer = ALLOC(guint64);
         *((guint64 *)argument->v_pointer) = length->v_uint64;
         break;
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: invalid argument?: length[%s]",
                  g_type_tag_to_string(type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1806,47 +3360,48 @@ rb_gi_value_argument_free_array_c(GIArgument *argument,
 
     element_type_tag = g_type_info_get_tag(element_type_info);
     switch (element_type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(array)[%s]",
                  g_type_tag_to_string(element_type_tag));
         break;
-      case GI_TYPE_TAG_INT8:
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
         /* Do nothing */
         break;
-      case GI_TYPE_TAG_INT16:
-      case GI_TYPE_TAG_UINT16:
-      case GI_TYPE_TAG_INT32:
-      case GI_TYPE_TAG_UINT32:
-      case GI_TYPE_TAG_INT64:
-      case GI_TYPE_TAG_UINT64:
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+        xfree(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+        g_free(argument->v_pointer);
+        break;
+    case GI_TYPE_TAG_ARRAY:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(array)[%s]",
                  g_type_tag_to_string(element_type_tag));
-        break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_INTERFACE:
         xfree(argument->v_pointer);
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-        g_free(argument->v_pointer);
-        break;
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         rb_raise(rb_eNotImpError,
                  "TODO: free GIArgument(array)[%s]",
                  g_type_tag_to_string(element_type_tag));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1861,16 +3416,16 @@ rb_gi_value_argument_free_array(GIArgument *argument, GITypeInfo *type_info)
     array_type = g_type_info_get_array_type(type_info);
     element_type_info = g_type_info_get_param_type(type_info, 0);
     switch (array_type) {
-      case GI_ARRAY_TYPE_C:
+    case GI_ARRAY_TYPE_C:
         rb_gi_value_argument_free_array_c(argument,
                                           type_info,
                                           element_type_info);
         break;
-      case GI_ARRAY_TYPE_ARRAY:
-      case GI_ARRAY_TYPE_PTR_ARRAY:
-      case GI_ARRAY_TYPE_BYTE_ARRAY:
+    case GI_ARRAY_TYPE_ARRAY:
+    case GI_ARRAY_TYPE_PTR_ARRAY:
+    case GI_ARRAY_TYPE_BYTE_ARRAY:
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
@@ -1878,7 +3433,9 @@ rb_gi_value_argument_free_array(GIArgument *argument, GITypeInfo *type_info)
 }
 
 static void
-rb_gi_value_argument_free_interface(GIArgument *argument, GITypeInfo *type_info)
+rb_gi_value_argument_free_interface(VALUE rb_argument,
+                                    GIArgument *argument,
+                                    GITypeInfo *type_info)
 {
     GIBaseInfo *interface_info;
     GIInfoType interface_type;
@@ -1891,9 +3448,13 @@ rb_gi_value_argument_free_interface(GIArgument *argument, GITypeInfo *type_info)
         gtype = g_registered_type_info_get_g_type(interface_info);
 
         if (gtype == G_TYPE_VALUE) {
-            GValue *gvalue = argument->v_pointer;
-            g_value_unset(gvalue);
-            xfree(argument->v_pointer);
+            if (!RVAL2CBOOL(rb_obj_is_kind_of(rb_argument, rb_cGLibValue))) {
+                GValue *gvalue = argument->v_pointer;
+                g_value_unset(gvalue);
+                xfree(argument->v_pointer);
+            }
+        } else if (gtype == G_TYPE_BYTES) {
+            g_bytes_unref(argument->v_pointer);
         }
     }
 
@@ -1901,48 +3462,52 @@ rb_gi_value_argument_free_interface(GIArgument *argument, GITypeInfo *type_info)
 }
 
 void
-rb_gi_value_argument_free(GIArgument *argument, GITypeInfo *type_info)
+rb_gi_value_argument_free(VALUE rb_argument,
+                          GIArgument *argument,
+                          GITypeInfo *type_info)
 {
     GITypeTag type_tag;
 
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
-      case GI_TYPE_TAG_BOOLEAN:
-      case GI_TYPE_TAG_INT8:
-      case GI_TYPE_TAG_UINT8:
-      case GI_TYPE_TAG_INT16:
-      case GI_TYPE_TAG_UINT16:
-      case GI_TYPE_TAG_INT32:
-      case GI_TYPE_TAG_UINT32:
-      case GI_TYPE_TAG_INT64:
-      case GI_TYPE_TAG_UINT64:
-      case GI_TYPE_TAG_FLOAT:
-      case GI_TYPE_TAG_DOUBLE:
-      case GI_TYPE_TAG_GTYPE:
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
-        break;
-      case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+        break;
+    case GI_TYPE_TAG_ARRAY:
         rb_gi_value_argument_free_array(argument, type_info);
         break;
-      case GI_TYPE_TAG_INTERFACE:
-        rb_gi_value_argument_free_interface(argument, type_info);
+    case GI_TYPE_TAG_INTERFACE:
+        rb_gi_value_argument_free_interface(rb_argument, argument, type_info);
         break;
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
-      case GI_TYPE_TAG_ERROR:
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_UNICHAR:
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 }
 
 static void
-rb_gi_inout_argument_free(GIArgument *argument, GITypeInfo *type_info)
+rb_gi_inout_argument_free(VALUE rb_argument,
+                          GIArgument *argument,
+                          GITypeInfo *type_info)
 {
     GIArgument in_argument;
     GITypeTag type_tag;
@@ -1950,99 +3515,101 @@ rb_gi_inout_argument_free(GIArgument *argument, GITypeInfo *type_info)
     memset(&in_argument, 0, sizeof(GIArgument));
     type_tag = g_type_info_get_tag(type_info);
     switch (type_tag) {
-      case GI_TYPE_TAG_VOID:
+    case GI_TYPE_TAG_VOID:
         break;
-      case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_BOOLEAN:
         in_argument.v_boolean = *((gboolean *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_INT8:
         in_argument.v_int8 = *((gint8 *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UINT8:
+    case GI_TYPE_TAG_UINT8:
         /* TODO!!! */
         in_argument.v_uint8 = *((guint8 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(guint8);
         *((guint8 *)argument->v_pointer) = in_argument.v_uint8;
         break;
-      case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_INT16:
         in_argument.v_int16 = *((gint16 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(gint16);
         *((gint16 *)argument->v_pointer) = in_argument.v_int16;
         break;
-      case GI_TYPE_TAG_UINT16:
+    case GI_TYPE_TAG_UINT16:
         in_argument.v_uint16 = *((guint16 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(guint16);
         *((guint16 *)argument->v_pointer) = in_argument.v_uint16;
         break;
-      case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_INT32:
         in_argument.v_int32 = *((gint32 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(gint32);
         *((gint32 *)argument->v_pointer) = in_argument.v_int32;
         break;
-      case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UINT32:
         in_argument.v_uint32 = *((guint32 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(guint32);
         *((guint32 *)argument->v_pointer) = in_argument.v_uint32;
         break;
-      case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_INT64:
         in_argument.v_int64 = *((gint64 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(gint64);
         *((gint64 *)argument->v_pointer) = in_argument.v_int64;
         break;
-      case GI_TYPE_TAG_UINT64:
+    case GI_TYPE_TAG_UINT64:
         in_argument.v_uint64 = *((guint64 *)(argument->v_pointer));
         argument->v_pointer = ALLOC(guint64);
         *((guint64 *)argument->v_pointer) = in_argument.v_uint64;
         break;
-      case GI_TYPE_TAG_FLOAT:
+    case GI_TYPE_TAG_FLOAT:
         in_argument.v_float = *((gfloat *)(argument->v_pointer));
         argument->v_pointer = ALLOC(gfloat);
         *((gfloat *)argument->v_pointer) = in_argument.v_float;
         break;
-      case GI_TYPE_TAG_DOUBLE:
+    case GI_TYPE_TAG_DOUBLE:
         in_argument.v_double = *((gdouble *)(argument->v_pointer));
         argument->v_pointer = ALLOC(gdouble);
         *((gdouble *)argument->v_pointer) = in_argument.v_double;
         break;
-      case GI_TYPE_TAG_GTYPE:
+    case GI_TYPE_TAG_GTYPE:
         in_argument.v_size = *((gsize *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UTF8:
-      case GI_TYPE_TAG_FILENAME:
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
         in_argument.v_string = *((gchar **)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_ARRAY:
-      case GI_TYPE_TAG_INTERFACE:
-      case GI_TYPE_TAG_GLIST:
-      case GI_TYPE_TAG_GSLIST:
-      case GI_TYPE_TAG_GHASH:
+    case GI_TYPE_TAG_ARRAY:
+    case GI_TYPE_TAG_INTERFACE:
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+    case GI_TYPE_TAG_GHASH:
         in_argument.v_pointer = *((gpointer *)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_ERROR:
+    case GI_TYPE_TAG_ERROR:
         in_argument.v_pointer = *((GError **)(argument->v_pointer));
         break;
-      case GI_TYPE_TAG_UNICHAR:
+    case GI_TYPE_TAG_UNICHAR:
         in_argument.v_uint32 = *((gunichar *)(argument->v_pointer));
         break;
-      default:
+    default:
         g_assert_not_reached();
         break;
     }
 
-    rb_gi_value_argument_free(&in_argument, type_info);
+    rb_gi_value_argument_free(rb_argument, &in_argument, type_info);
     xfree(argument->v_pointer);
 }
 
 void
-rb_gi_in_argument_free(GIArgument *argument, GIArgInfo *arg_info)
+rb_gi_in_argument_free(VALUE rb_argument,
+                       GIArgument *argument,
+                       GIArgInfo *arg_info)
 {
     GITypeInfo type_info;
 
     g_arg_info_load_type(arg_info, &type_info);
     if (g_arg_info_get_direction(arg_info) == GI_DIRECTION_INOUT) {
-        rb_gi_inout_argument_free(argument, &type_info);
+        rb_gi_inout_argument_free(rb_argument, argument, &type_info);
     } else {
-        rb_gi_value_argument_free(argument, &type_info);
+        rb_gi_value_argument_free(rb_argument, argument, &type_info);
     }
 }
 
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-constant-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-constant-info.c
index 8c0c7c5..b1cf7c2 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-constant-info.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-constant-info.c
@@ -56,7 +56,7 @@ rg_value(VALUE self)
     info = SELF(self);
     type_info = g_constant_info_get_type(info);
     value_size = g_constant_info_get_value(info, &value);
-    rb_value = GI_ARGUMENT2RVAL(&value, type_info);
+    rb_value = GI_ARGUMENT2RVAL(&value, FALSE, type_info, NULL, NULL, NULL);
     g_base_info_unref(type_info);
     g_constant_info_free_value(info, &value);
 
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c
index c2387b0..21a71d9 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c
@@ -50,7 +50,6 @@ initialize_receiver(VALUE receiver, GITypeInfo *info, GIArgument *value)
     g_base_info_unref(interface_info);
     switch (interface_type) {
       case GI_INFO_TYPE_OBJECT:
-        g_object_ref_sink(value->v_pointer);
         G_INITIALIZE(receiver, value->v_pointer);
         break;
       case GI_INFO_TYPE_STRUCT:
@@ -111,7 +110,8 @@ rg_invoke(VALUE self, VALUE rb_options)
     /* TODO: use rb_protect */
     rb_gi_function_info_invoke_raw(info,
                                    rb_options,
-                                   &return_value);
+                                   &return_value,
+                                   NULL);
 
     g_callable_info_load_return_type(callable_info, &return_value_info);
     initialize_receiver(receiver, &return_value_info, &return_value);
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-conversions.h b/gobject-introspection/ext/gobject-introspection/rb-gi-conversions.h
index cf8381f..ab2eab4 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-conversions.h
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-conversions.h
@@ -31,26 +31,24 @@
     (rb_gi_base_info_to_ruby_with_unref((GIBaseInfo *)(info)))
 #define RVAL2GI_BASE_INFO(rb_object) (rb_gi_base_info_from_ruby(rb_object))
 
-#define GI_ARGUMENT2RVAL(argument, type_info)           \
-    (rb_gi_argument_to_ruby((argument), (type_info)))
-#define GI_ARRAY_ARGUMENT2RVAL(array_argument, length_argument,         \
-                               array_type_info, length_type_info)       \
-    (rb_gi_array_argument_to_ruby((array_argument),                     \
-                                  (length_argument),                    \
-                                  (array_type_info),                    \
-                                  (length_type_info)))
-#define GI_OUT_ARGUMENT2RVAL(argument, arg_info)                \
-    (rb_gi_out_argument_to_ruby((argument), (arg_info)))
-#define GI_OUT_ARRAY_ARGUMENT2RVAL(array_argument, length_argument,     \
-                                   array_arg_info, length_arg_info)     \
-    (rb_gi_out_array_argument_to_ruby((array_argument), (length_argument), \
-                                      (array_arg_info), (length_arg_info)))
-#define GI_RETURN_ARGUMENT2RVAL(argument, callable_info)                \
-    (rb_gi_return_argument_to_ruby((argument), (callable_info)))
-#define RVAL2GI_VALUE_ARGUMENT(argument, type_info, rb_argument)        \
-    (rb_gi_value_argument_from_ruby((argument), (type_info), (rb_argument)))
-#define RVAL2GI_IN_ARGUMENT(argument, arg_info, rb_argument)            \
-    (rb_gi_in_argument_from_ruby((argument), (arg_info), (rb_argument)))
+#define GI_ARGUMENT2RVAL(argument, duplicate, type_info,                \
+                         in_args, out_args, args_metadata)              \
+    (rb_gi_argument_to_ruby((argument), (duplicate), (type_info),       \
+                            (in_args), (out_args), (args_metadata)))
+#define GI_OUT_ARGUMENT2RVAL(argument, arg_info,                        \
+                             in_args, out_args, args_metadata)          \
+    (rb_gi_out_argument_to_ruby((argument), (arg_info),                 \
+                                (in_args), (out_args), (args_metadata)))
+#define GI_RETURN_ARGUMENT2RVAL(callable_info, argument,                \
+                                in_args, out_args, args_metadata)       \
+    (rb_gi_return_argument_to_ruby((callable_info), (argument),         \
+                                   (in_args), (out_args), (args_metadata)))
+#define RVAL2GI_VALUE_ARGUMENT(argument, type_info, rb_argument, self)  \
+    (rb_gi_value_argument_from_ruby((argument), (type_info),            \
+                                    (rb_argument), (self)))
+#define RVAL2GI_IN_ARGUMENT(argument, arg_info, rb_argument, self)      \
+    (rb_gi_in_argument_from_ruby((argument), (arg_info),                \
+                                 (rb_argument), (self)))
 #define RVAL2GI_IN_ARRAY_ARGUMENT(array_argument, length_argument,      \
                                   array_arg_info, length_arg_info,      \
                                   rb_argument)                          \
@@ -106,37 +104,43 @@ VALUE       rb_gi_base_info_to_ruby_with_unref(GIBaseInfo *info);
 GIBaseInfo *rb_gi_base_info_from_ruby         (VALUE rb_info);
 
 VALUE       rb_gi_argument_to_ruby            (GIArgument     *argument,
-                                               GITypeInfo     *type_info);
-VALUE       rb_gi_array_argument_to_ruby      (GIArgument     *array_argument,
-                                               GIArgument     *length_argument,
-                                               GITypeInfo     *array_type_info,
-                                               GITypeInfo     *length_type_info);
+                                               gboolean        duplicate,
+                                               GITypeInfo     *type_info,
+                                               GArray         *in_args,
+                                               GArray         *out_args,
+                                               GPtrArray      *args_metadata);
 void        rb_gi_out_argument_init           (GIArgument     *argument,
                                                GIArgInfo      *arg_info);
 VALUE       rb_gi_out_argument_to_ruby        (GIArgument     *argument,
-                                               GIArgInfo      *arg_info);
-VALUE       rb_gi_out_array_argument_to_ruby  (GIArgument     *array_argument,
-                                               GIArgument     *length_argument,
-                                               GIArgInfo      *array_arg_info,
-                                               GIArgInfo      *length_arg_info);
+                                               GIArgInfo      *arg_info,
+                                               GArray         *in_args,
+                                               GArray         *out_args,
+                                               GPtrArray      *args_metadata);
 void        rb_gi_out_argument_fin            (GIArgument     *argument,
                                                GIArgInfo      *arg_info);
-VALUE       rb_gi_return_argument_to_ruby     (GIArgument     *argument,
-                                               GICallableInfo *callable_info);
+VALUE       rb_gi_return_argument_to_ruby     (GICallableInfo *callable_info,
+                                               GIArgument     *argument,
+                                               GArray         *in_args,
+                                               GArray         *out_args,
+                                               GPtrArray      *args_metadata);
 GIArgument *rb_gi_value_argument_from_ruby    (GIArgument     *argument,
                                                GITypeInfo     *type_info,
-                                               VALUE           rb_argument);
+                                               VALUE           rb_argument,
+                                               VALUE           self);
 GIArgument *rb_gi_in_argument_from_ruby       (GIArgument     *argument,
                                                GIArgInfo      *arg_info,
-                                               VALUE           rb_argument);
+                                               VALUE           rb_argument,
+                                               VALUE           self);
 GIArgument *rb_gi_in_array_argument_from_ruby (GIArgument     *array_argument,
                                                GIArgument     *length_argument,
                                                GIArgInfo      *array_arg_info,
                                                GIArgInfo      *length_arg_info,
                                                VALUE           rb_argument);
-void        rb_gi_value_argument_free         (GIArgument     *argument,
+void        rb_gi_value_argument_free         (VALUE           rb_argument,
+                                               GIArgument     *argument,
                                                GITypeInfo     *type_info);
-void        rb_gi_in_argument_free            (GIArgument     *argument,
+void        rb_gi_in_argument_free            (VALUE           rb_argument,
+                                               GIArgument     *argument,
                                                GIArgInfo      *arg_info);
 
 VALUE       rb_gi_array_type_to_ruby          (GIArrayType type);
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-field-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-field-info.c
index ae7e43d..4c747ed 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-field-info.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-field-info.c
@@ -76,14 +76,27 @@ rb_gi_field_info_get_field_raw(GIFieldInfo *info, gpointer memory)
 {
     GIArgument argument;
     GITypeInfo *type_info;
+    GITypeTag type_tag;
     VALUE rb_field_value;
 
+    type_info = g_field_info_get_type(info);
+    type_tag = g_type_info_get_tag(type_info);
+
     if (!g_field_info_get_field(info, memory, &argument)) {
-        rb_raise(rb_eArgError, "failed to get field value");
+        g_base_info_unref(type_info);
+        rb_raise(rb_eArgError, "failed to get field value: %s[%s]",
+                 g_base_info_get_name(info),
+                 g_type_tag_to_string(type_tag));
     }
 
-    type_info = g_field_info_get_type(info);
-    rb_field_value = GI_ARGUMENT2RVAL(&argument, type_info);
+    if (type_tag == GI_TYPE_TAG_UTF8) {
+        int offset;
+        offset = g_field_info_get_offset(info);
+        argument.v_string = G_STRUCT_MEMBER(gchar *, memory, offset);
+    }
+
+    rb_field_value = GI_ARGUMENT2RVAL(&argument, FALSE, type_info,
+                                      NULL, NULL, NULL);
     g_base_info_unref(type_info);
 
     return rb_field_value;
@@ -95,17 +108,30 @@ rb_gi_field_info_set_field_raw(GIFieldInfo *info, gpointer memory,
 {
     GIArgument field_value;
     GITypeInfo *type_info;
+    GITypeTag type_tag;
     gboolean succeeded;
 
     type_info = g_field_info_get_type(info);
-    RVAL2GI_VALUE_ARGUMENT(&field_value, type_info, rb_field_value);
+    type_tag = g_type_info_get_tag(type_info);
+    RVAL2GI_VALUE_ARGUMENT(&field_value, type_info, rb_field_value, Qnil);
 
     succeeded = g_field_info_set_field(info, memory, &field_value);
-    rb_gi_value_argument_free(&field_value, type_info);
+    if (!succeeded) {
+        if (type_tag == GI_TYPE_TAG_UTF8) {
+            int offset;
+            offset = g_field_info_get_offset(info);
+            G_STRUCT_MEMBER(gchar *, memory, offset) = field_value.v_string;
+            succeeded = TRUE;
+        }
+    }
+    rb_gi_value_argument_free(rb_field_value, &field_value, type_info);
     g_base_info_unref(type_info);
 
     if (!succeeded) {
-        rb_raise(rb_eArgError, "failed to set field value");
+        rb_raise(rb_eArgError,
+                 "failed to set field value: %s[%s]",
+                 g_base_info_get_name(info),
+                 g_type_tag_to_string(type_tag));
     }
 }
 
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-function-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-function-info.c
index 7225976..881501e 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-function-info.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-function-info.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -220,6 +220,10 @@ fill_metadata_rb_arg_index(GPtrArray *args_metadata)
 
         metadata = g_ptr_array_index(args_metadata, i);
 
+        if (metadata->callback_p) {
+            continue;
+        }
+
         if (metadata->closure_p) {
             continue;
         }
@@ -382,8 +386,36 @@ in_callback_argument_from_ruby(RBGIArgMetadata *metadata, GArray *in_args)
     gpointer callback;
     GIArgInfo *arg_info;
     GIArgument *callback_argument;
+    GIArgument *closure_argument = NULL;
+    GIArgument *destroy_argument = NULL;
 
     arg_info = &(metadata->arg_info);
+
+    callback_argument = &(g_array_index(in_args,
+                                        GIArgument,
+                                        metadata->in_arg_index));
+    if (metadata->closure_in_arg_index != -1) {
+        closure_argument = &(g_array_index(in_args,
+                                           GIArgument,
+                                           metadata->closure_in_arg_index));
+    }
+    if (metadata->destroy_in_arg_index != -1) {
+        destroy_argument = &(g_array_index(in_args,
+                                           GIArgument,
+                                           metadata->destroy_in_arg_index));
+    }
+
+    if (!rb_block_given_p() && g_arg_info_may_be_null(arg_info)) {
+        callback_argument->v_pointer = NULL;
+        if (closure_argument) {
+            closure_argument->v_pointer = NULL;
+        }
+        if (destroy_argument) {
+            destroy_argument->v_pointer = NULL;
+        }
+        return;
+    }
+
     callback = find_callback_function(arg_info);
     if (!callback) {
         GITypeInfo type_info;
@@ -398,46 +430,38 @@ in_callback_argument_from_ruby(RBGIArgMetadata *metadata, GArray *in_args)
                  RVAL2CSTR(rb_type_name),
                  g_base_info_get_name(arg_info));
     }
-
-    callback_argument = &(g_array_index(in_args,
-                                        GIArgument,
-                                        metadata->in_arg_index));
     callback_argument->v_pointer = callback;
 
-    if (metadata->closure_in_arg_index != -1) {
+    if (closure_argument) {
         RBGICallbackData *callback_data;
-        GIArgument *closure_argument;
 
         callback_data = ALLOC(RBGICallbackData);
         callback_data->metadata = metadata;
         callback_data->rb_callback = rb_block_proc();
         callback_data_guard_from_gc(callback_data);
-        closure_argument = &(g_array_index(in_args,
-                                           GIArgument,
-                                           metadata->closure_in_arg_index));
         closure_argument->v_pointer = callback_data;
     }
 
-    if (metadata->destroy_in_arg_index != -1) {
-        GIArgument *destroy_argument;
-        destroy_argument = &(g_array_index(in_args,
-                                           GIArgument,
-                                           metadata->destroy_in_arg_index));
+    if (destroy_argument) {
         destroy_argument->v_pointer = destroy_notify;
     }
 }
 
 static void
 in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
-                      GArray *in_args, GPtrArray *args_metadata)
+                      GArray *in_args, GPtrArray *args_metadata,
+                      VALUE self)
 {
+    if (metadata->callback_p && !metadata->destroy_p) {
+        in_callback_argument_from_ruby(metadata, in_args);
+        return;
+    }
+
     if (metadata->rb_arg_index == -1) {
         return;
     }
 
-    if (metadata->callback_p) {
-        in_callback_argument_from_ruby(metadata, in_args);
-    } else if (metadata->array_p) {
+    if (metadata->array_p) {
         GIArgument *array_argument;
         GIArgument *length_argument = NULL;
         GIArgInfo *length_arg_info = NULL;
@@ -475,7 +499,8 @@ in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
         argument = &(g_array_index(in_args, GIArgument, metadata->in_arg_index));
         RVAL2GI_IN_ARGUMENT(argument,
                             &(metadata->arg_info),
-                            rb_argument);
+                            rb_argument,
+                            self);
     }
 }
 
@@ -500,7 +525,7 @@ arg_metadata_free(gpointer data)
 }
 
 static void
-arguments_from_ruby(GICallableInfo *info, VALUE rb_arguments,
+arguments_from_ruby(GICallableInfo *info, VALUE self, VALUE rb_arguments,
                     GArray *in_args, GArray *out_args,
                     GPtrArray *args_metadata)
 {
@@ -516,7 +541,7 @@ arguments_from_ruby(GICallableInfo *info, VALUE rb_arguments,
         metadata = g_ptr_array_index(args_metadata, i);
         if (metadata->in_arg_index != -1) {
             in_argument_from_ruby(metadata, rb_arguments,
-                                  in_args, args_metadata);
+                                  in_args, args_metadata, self);
         } else {
             out_argument_from_ruby(metadata, out_args);
         }
@@ -563,33 +588,11 @@ out_arguments_to_ruby(GICallableInfo *callable_info,
             continue;
         }
 
-        if (metadata->array_p) {
-            GIArgument *length_argument = NULL;
-            GIArgInfo *length_arg_info = NULL;
-
-            if (metadata->array_length_in_arg_index != -1) {
-                RBGIArgMetadata *length_metadata;
-                length_metadata =
-                    g_ptr_array_index(args_metadata,
-                                      metadata->array_length_arg_index);
-                if (length_metadata->direction == GI_DIRECTION_OUT) {
-                    length_argument =
-                        &g_array_index(in_args, GIArgument,
-                                       length_metadata->out_arg_index);
-                } else {
-                    length_argument =
-                        &g_array_index(in_args, GIArgument,
-                                       length_metadata->in_arg_index);
-                }
-                length_arg_info = &(length_metadata->arg_info);
-            }
-            rb_argument = GI_OUT_ARRAY_ARGUMENT2RVAL(argument,
-                                                     length_argument,
-                                                     &(metadata->arg_info),
-                                                     length_arg_info);
-        } else {
-            rb_argument = GI_OUT_ARGUMENT2RVAL(argument, &(metadata->arg_info));
-        }
+        rb_argument = GI_OUT_ARGUMENT2RVAL(argument,
+                                           &(metadata->arg_info),
+                                           in_args,
+                                           out_args,
+                                           args_metadata);
         rb_ary_push(rb_out_args, rb_argument);
     }
 
@@ -609,7 +612,8 @@ arguments_init(GArray **in_args, GArray **out_args, GPtrArray **args_metadata)
 }
 
 static void
-arguments_free(GArray *in_args, GArray *out_args, GPtrArray *args_metadata)
+arguments_free(VALUE rb_arguments,
+               GArray *in_args, GArray *out_args, GPtrArray *args_metadata)
 {
     guint i;
 
@@ -622,9 +626,18 @@ arguments_free(GArray *in_args, GArray *out_args, GPtrArray *args_metadata)
             metadata->direction == GI_DIRECTION_INOUT) {
             in_arg_index = metadata->in_arg_index;
             if (in_arg_index != -1) {
+                gint rb_arg_index;
+                VALUE rb_argument = Qnil;
                 GIArgument *argument;
+
+                rb_arg_index = metadata->rb_arg_index;
+                if (rb_arg_index > 0) {
+                    rb_argument = RARRAY_PTR(rb_arguments)[rb_arg_index];
+                }
                 argument = &(g_array_index(in_args, GIArgument, in_arg_index));
-                rb_gi_in_argument_free(argument, &(metadata->arg_info));
+                rb_gi_in_argument_free(rb_argument,
+                                       argument,
+                                       &(metadata->arg_info));
             }
         } else {
             GIArgument *argument;
@@ -643,7 +656,7 @@ typedef struct {
     GIFunctionInfo *info;
     GArray *in_args;
     GArray *out_args;
-    GIArgument *return_value;
+    GIArgument return_value;
     GError **error;
     gboolean succeeded;
 } InvokeData;
@@ -657,7 +670,7 @@ rb_gi_function_info_invoke_raw_call(InvokeData *data)
                                data->in_args->len,
                                (GIArgument *)((void *)(data->out_args->data)),
                                data->out_args->len,
-                               data->return_value,
+                               &(data->return_value),
                                data->error);
 }
 
@@ -692,7 +705,7 @@ gobject_based_p(GIBaseInfo *info)
 
 VALUE
 rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
-                               GIArgument *return_value)
+                               GIArgument *return_value, VALUE *rb_return_value)
 {
     GICallableInfo *callable_info;
     GIArgument receiver;
@@ -703,6 +716,7 @@ rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
     GError *error = NULL;
     gboolean unlock_gvl = FALSE;
     VALUE rb_receiver, rb_arguments, rb_unlock_gvl;
+    gboolean rb_receiver_is_class = FALSE;
 
     if (RB_TYPE_P(rb_options, RUBY_T_ARRAY)) {
         rb_receiver = Qnil;
@@ -726,6 +740,12 @@ rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
     } else {
         if (gobject_based_p((GIBaseInfo *)info)) {
             receiver.v_pointer = RVAL2GOBJ(rb_receiver);
+        } else if (RVAL2CBOOL(rb_obj_is_kind_of(rb_receiver, rb_cClass)) &&
+                   rb_respond_to(rb_receiver, rb_intern("gtype"))) {
+            GObjectClass *object_class;
+            rb_receiver_is_class = TRUE;
+            object_class = g_type_class_ref(CLASS2GTYPE(rb_receiver));
+            receiver.v_pointer = object_class;
         } else {
             receiver.v_pointer = DATA_PTR(rb_receiver);
         }
@@ -740,14 +760,13 @@ rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
     if (receiver.v_pointer) {
         g_array_append_val(in_args, receiver);
     }
-    arguments_from_ruby(callable_info, rb_arguments,
+    arguments_from_ruby(callable_info, rb_receiver, rb_arguments,
                         in_args, out_args, args_metadata);
     {
         InvokeData data;
         data.info = info;
         data.in_args = in_args;
         data.out_args = out_args;
-        data.return_value = return_value;
         data.error = &error;
         if (unlock_gvl) {
             rb_thread_call_without_gvl(
@@ -757,6 +776,25 @@ rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
             rb_gi_function_info_invoke_raw_call(&data);
         }
         succeeded = data.succeeded;
+
+        if (rb_receiver_is_class) {
+            g_type_class_unref(receiver.v_pointer);
+        }
+
+        if (return_value) {
+            *return_value = data.return_value;
+        }
+        if (rb_return_value) {
+            if (succeeded) {
+                *rb_return_value = GI_RETURN_ARGUMENT2RVAL(callable_info,
+                                                           &(data.return_value),
+                                                           in_args,
+                                                           out_args,
+                                                           args_metadata);
+            } else {
+                *rb_return_value = Qnil;
+            }
+        }
     }
 
     if (succeeded) {
@@ -764,7 +802,7 @@ rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
                                             in_args, out_args,
                                             args_metadata);
     }
-    arguments_free(in_args, out_args, args_metadata);
+    arguments_free(rb_arguments, in_args, out_args, args_metadata);
     if (!succeeded) {
         RG_RAISE_ERROR(error);
     }
@@ -784,8 +822,6 @@ static VALUE
 rg_invoke(VALUE self, VALUE rb_options)
 {
     GIFunctionInfo *info;
-    GICallableInfo *callable_info;
-    GIArgument return_value;
     VALUE rb_out_args;
     VALUE rb_return_value;
 
@@ -793,14 +829,13 @@ rg_invoke(VALUE self, VALUE rb_options)
     /* TODO: use rb_protect() */
     rb_out_args = rb_gi_function_info_invoke_raw(info,
                                                  rb_options,
-                                                 &return_value);
-
-    callable_info = (GICallableInfo *)info;
-    rb_return_value = GI_RETURN_ARGUMENT2RVAL(&return_value, callable_info);
+                                                 NULL,
+                                                 &rb_return_value);
 
     if (NIL_P(rb_out_args)) {
         return rb_return_value;
     } else {
+        GICallableInfo *callable_info = (GICallableInfo *)info;
         GITypeInfo return_value_info;
         g_callable_info_load_return_type(callable_info, &return_value_info);
         if (g_type_info_get_tag(&return_value_info) != GI_TYPE_TAG_VOID) {
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-loader.c b/gobject-introspection/ext/gobject-introspection/rb-gi-loader.c
index 6009777..ffdd2b0 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-loader.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-loader.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2012-2014  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -205,6 +205,37 @@ rg_s_start_callback_dispatch_thread(G_GNUC_UNUSED VALUE klass)
     return Qnil;
 }
 
+static VALUE
+rg_s_reference_gobject(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass)
+{
+    VALUE rb_gobject;
+    VALUE rb_options, rb_sink;
+    gpointer gobject;
+    gboolean sink;
+
+    rb_scan_args(argc, argv, "11",
+                 &rb_gobject, &rb_options);
+    rbg_scan_options(rb_options,
+                     "sink", &rb_sink,
+                     NULL);
+
+    gobject = RVAL2GOBJ(rb_gobject);
+
+    if (NIL_P(rb_sink)) {
+        sink = FALSE;
+    } else {
+        sink = RVAL2CBOOL(rb_sink);
+    }
+
+    if (sink) {
+        g_object_ref_sink(gobject);
+    } else {
+        g_object_ref(gobject);
+    }
+
+    return Qnil;
+}
+
 void
 rb_gi_loader_init(VALUE rb_mGI)
 {
@@ -221,4 +252,5 @@ rb_gi_loader_init(VALUE rb_mGI)
     RG_DEF_SMETHOD(register_boxed_class_converter, 1);
     RG_DEF_SMETHOD(register_constant_rename_map, 2);
     RG_DEF_SMETHOD(start_callback_dispatch_thread, 0);
+    RG_DEF_SMETHOD(reference_gobject, -1);
 }
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-method-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-method-info.c
index 7e80524..a8f69d4 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-method-info.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-method-info.c
@@ -39,8 +39,6 @@ static VALUE
 rg_invoke(VALUE self, VALUE rb_options)
 {
     GIFunctionInfo *info;
-    GICallableInfo *callable_info;
-    GIArgument return_value;
     VALUE rb_out_args;
     VALUE rb_return_value;
 
@@ -49,14 +47,13 @@ rg_invoke(VALUE self, VALUE rb_options)
     /* TODO: use rb_protect */
     rb_out_args = rb_gi_function_info_invoke_raw(info,
                                                  rb_options,
-                                                 &return_value);
-
-    callable_info = (GICallableInfo *)info;
-    rb_return_value = GI_RETURN_ARGUMENT2RVAL(&return_value, callable_info);
+                                                 NULL,
+                                                 &rb_return_value);
 
     if (NIL_P(rb_out_args)) {
         return rb_return_value;
     } else {
+        GICallableInfo *callable_info = (GICallableInfo *)info;
         GITypeInfo return_value_info;
         g_callable_info_load_return_type(callable_info, &return_value_info);
         if (g_type_info_get_tag(&return_value_info) != GI_TYPE_TAG_VOID) {
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-private.h b/gobject-introspection/ext/gobject-introspection/rb-gi-private.h
index b8c2479..8fd1b1f 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-private.h
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-private.h
@@ -94,7 +94,8 @@ void rb_gi_loader_init               (VALUE rb_mGI);
 
 VALUE rb_gi_function_info_invoke_raw (GIFunctionInfo *info,
                                       VALUE rb_options,
-                                      GIArgument *return_value);
+                                      GIArgument *return_value,
+                                      VALUE *rb_return_value);
 
 VALUE rb_gi_field_info_get_field_raw (GIFieldInfo *info,
                                       gpointer     memory);
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-repository.c b/gobject-introspection/ext/gobject-introspection/rb-gi-repository.c
index a4f57a8..b007dde 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-repository.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-repository.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -51,7 +51,7 @@ rg_s_default(G_GNUC_UNUSED VALUE klass)
  * loaded, this function will search for a ".typelib" file using the repository
  * search path. In addition, a version of namespace may be specified. If version
  * is not specified, the latest will be used.
- * 
+ *
  * @param [String] namespace The namespace to load
  * @param [String, nil] version An optional version
  */
@@ -68,12 +68,12 @@ rg_require(int argc, VALUE *argv, VALUE self)
     namespace_ = RVAL2CSTR(rb_namespace);
     version = RVAL2CSTR_ACCEPT_NIL(rb_version);
     if (!NIL_P(rb_flags)) {
-	flags = RVAL2GI_REPOSITORY_LOAD_FLAGS(rb_flags);
+        flags = RVAL2GI_REPOSITORY_LOAD_FLAGS(rb_flags);
     }
 
     g_irepository_require(SELF(self), namespace_, version, flags, &error);
     if (error) {
-	RG_RAISE_ERROR(error);
+        RG_RAISE_ERROR(error);
     }
 
     return Qnil;
@@ -84,9 +84,9 @@ rg_require(int argc, VALUE *argv, VALUE self)
  * Returned strings are of the form "namespace-version".
  * Note: namespace must have already been loaded using a function such as
  * GObjectIntrospection::Repository.require() before calling this method.
- * 
+ *
  * @param [String] namespace The namespace to get the dependencies for.
- * 
+ *
  * @return [Array<String>] The dependencies.
  */
 static VALUE
@@ -112,7 +112,7 @@ rg_get_dependencies(VALUE self, VALUE rb_namespace)
 
 
 /* Return the list of currently loaded namespaces.
- * 
+ *
  * @return [Array<String>] The loaded namespaces.
  */
 static VALUE
@@ -137,9 +137,9 @@ rg_loaded_namespaces(VALUE self)
 
 /* This method returns the number of metadata entries in given namespace. The
  * namespace must have already been loaded before calling this function.
- * 
+ *
  * @param [String] namespace The namespace to fetch the entries from.
- * 
+ *
  * @return [Integer] The number of metadata entries.
  */
 static VALUE
@@ -159,10 +159,10 @@ rg_get_n_infos(VALUE self, VALUE rb_namespace)
  *  namespace must have already been loaded before calling this function. See
  *  GObjectIntrospection::Repository#get_n_infos() to find the maximum number
  *  of entries.
- * 
+ *
  * @param [String] namespace The namespace to fetch the metadata entry from.
  * @param [Fixnum] index The index of the entry.
- * 
+ *
  * @return [GObjectIntrospection::BaseInfo] The metadata entry.
  */
 static VALUE
@@ -185,20 +185,20 @@ rg_get_info(VALUE self, VALUE rb_namespace, VALUE rb_n)
  * given, it is interpreted as a gtype and all loaded namespaces are searched
  * for it. If two arguments are given the first is a particular namespace and
  * the second the name of an entry to search for.
- * 
+ *
  * @overload find(type)
  *
  * @param [String] type The type to search for.
- * 
+ *
  * @return [GObjectIntrospection::BaseInfo] The metadata entry.
- * 
- * 
+ *
+ *
  * @overload find(namespace, type)
- * 
+ *
  * @param [String] namespace The namespace to search in.
- * 
+ *
  * @param [String] type The type to search for.
- * 
+ *
  * @return [GObjectIntrospection::BaseInfo] The metadata entry.
  */
 
@@ -208,19 +208,19 @@ rg_find(int argc, VALUE *argv, VALUE self)
     GIBaseInfo *info;
 
     if (argc == 1) {
-	VALUE rb_gtype;
-	GType gtype;
-	rb_gtype = argv[0];
-	gtype = NUM2UINT(rb_gtype);
-	info = g_irepository_find_by_gtype(SELF(self), gtype);
+        VALUE rb_gtype;
+        GType gtype;
+        rb_gtype = argv[0];
+        gtype = NUM2UINT(rb_gtype);
+        info = g_irepository_find_by_gtype(SELF(self), gtype);
     } else {
-	VALUE rb_namespace, rb_name;
-	const gchar *namespace_, *name;
+        VALUE rb_namespace, rb_name;
+        const gchar *namespace_, *name;
 
-	rb_scan_args(argc, argv, "2", &rb_namespace, &rb_name);
-	namespace_ = RVAL2CSTR(rb_namespace);
-	name = RVAL2CSTR(rb_name);
-	info = g_irepository_find_by_name(SELF(self), namespace_, name);
+        rb_scan_args(argc, argv, "2", &rb_namespace, &rb_name);
+        namespace_ = RVAL2CSTR(rb_namespace);
+        name = RVAL2CSTR(rb_name);
+        info = g_irepository_find_by_name(SELF(self), namespace_, name);
     }
 
     return GI_BASE_INFO2RVAL(info);
diff --git a/gobject-introspection/ext/gobject-introspection/rbgiversion.h b/gobject-introspection/ext/gobject-introspection/rbgiversion.h
deleted file mode 100644
index 295fc92..0000000
--- a/gobject-introspection/ext/gobject-introspection/rbgiversion.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
-/************************************************
-
-  rbgiversion.h -
-
-  This file was generated by mkmf-gnome2.rb.
-
-************************************************/
-
-#ifndef __RBGI_VERSION_H__
-#define __RBGI_VERSION_H__
-
-#define GI_MAJOR_VERSION (1)
-#define GI_MINOR_VERSION (42)
-#define GI_MICRO_VERSION (0)
-
-#define GI_CHECK_VERSION(major,minor,micro)    \
-    (GI_MAJOR_VERSION > (major) || \
-     (GI_MAJOR_VERSION == (major) && GI_MINOR_VERSION > (minor)) || \
-     (GI_MAJOR_VERSION == (major) && GI_MINOR_VERSION == (minor) && \
-      GI_MICRO_VERSION >= (micro)))
-
-
-#endif /* __RBGI_VERSION_H__ */
diff --git a/gobject-introspection/ext/gobject-introspection/ruby-gobject-introspection.pc b/gobject-introspection/ext/gobject-introspection/ruby-gobject-introspection.pc
deleted file mode 100644
index f6b240c..0000000
--- a/gobject-introspection/ext/gobject-introspection/ruby-gobject-introspection.pc
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: Ruby/GObjectIntrospection
-Description: Ruby bindings for GObject Introspection
-Version: 2.2.4
\ No newline at end of file
diff --git a/gobject-introspection/lib/gobject-introspection.rb b/gobject-introspection/lib/gobject-introspection.rb
index 3685b54..9e77abb 100644
--- a/gobject-introspection/lib/gobject-introspection.rb
+++ b/gobject-introspection/lib/gobject-introspection.rb
@@ -44,6 +44,7 @@ end
 GLib::Log.set_log_domain(GObjectIntrospection::LOG_DOMAIN)
 
 require "gobject-introspection/repository"
+require "gobject-introspection/arg-info"
 require "gobject-introspection/callable-info"
 require "gobject-introspection/object-info"
 require "gobject-introspection/interface-info"
diff --git a/gobject-introspection/lib/gobject-introspection/arg-info.rb b/gobject-introspection/lib/gobject-introspection/arg-info.rb
new file mode 100644
index 0000000..88d785d
--- /dev/null
+++ b/gobject-introspection/lib/gobject-introspection/arg-info.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module GObjectIntrospection
+  class ArgInfo
+    def gclosure?
+      type_info = type
+      return false if type_info.tag != TypeTag::INTERFACE
+
+      struct_info = type_info.interface
+      struct_info.gtype.name == "GClosure"
+    end
+  end
+end
diff --git a/gobject-introspection/lib/gobject-introspection/callable-info.rb b/gobject-introspection/lib/gobject-introspection/callable-info.rb
index bd13106..8254e29 100644
--- a/gobject-introspection/lib/gobject-introspection/callable-info.rb
+++ b/gobject-introspection/lib/gobject-introspection/callable-info.rb
@@ -78,7 +78,9 @@ module GObjectIntrospection
 
     def require_callback?
       args.any? do |arg|
-        arg.direction == Direction::IN and arg.scope != ScopeType::INVALID
+        arg.direction == Direction::IN and
+          arg.scope != ScopeType::INVALID and
+          !arg.may_be_null?
       end
     end
 
diff --git a/gobject-introspection/lib/gobject-introspection/loader.rb b/gobject-introspection/lib/gobject-introspection/loader.rb
index ab0a32a..a284d7a 100644
--- a/gobject-introspection/lib/gobject-introspection/loader.rb
+++ b/gobject-introspection/lib/gobject-introspection/loader.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -14,6 +14,8 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
+require "English"
+
 module GObjectIntrospection
   class Loader
     class << self
@@ -72,18 +74,20 @@ module GObjectIntrospection
 
     def load_function_info(info)
       name = rubyish_method_name(info)
-      define_module_function(@base_module, name, info)
+      define_singleton_method(@base_module, name, info)
     end
 
     def define_module_function(target_module, name, function_info)
       unlock_gvl = should_unlock_gvl?(function_info, target_module)
-      validate = lambda do |arguments|
+      prepare = lambda do |arguments, &block|
+        arguments, block = build_arguments(function_info, arguments, &block)
         method_name = "#{target_module}\#.#{name}"
         validate_arguments(function_info, method_name, arguments)
+        [arguments, block]
       end
       target_module.module_eval do
         define_method(name) do |*arguments, &block|
-          validate.call(arguments, &block)
+          arguments, block = prepare.call(arguments, &block)
           function_info.invoke({
                                  :arguments => arguments,
                                  :unlock_gvl => unlock_gvl,
@@ -96,14 +100,16 @@ module GObjectIntrospection
 
     def define_singleton_method(klass, name, info)
       unlock_gvl = should_unlock_gvl?(info, klass)
-      validate = lambda do |arguments|
+      prepare = lambda do |arguments|
+        arguments, block = build_arguments(info, arguments, &block)
         validate_arguments(info, "#{klass}.#{name}", arguments)
+        [arguments, block]
       end
       singleton_class = (class << klass; self; end)
       singleton_class.__send__(:define_method, name) do |*arguments, &block|
-        validate.call(arguments, &block)
+        arguments, block = prepare.call(arguments, &block)
         if block.nil? and info.require_callback?
-          Enumerator.new(self, name, *arguments)
+          to_enum(name, *arguments)
         else
           info.invoke({
                         :arguments => arguments,
@@ -128,9 +134,21 @@ module GObjectIntrospection
     end
 
     def load_struct_info(info)
-      return if info.gtype_struct?
+      case info.name
+      when /Class\z/
+        base_class_name = $PREMATCH
+        method_infos = info.methods.find_all do |method_info|
+          method_info.is_a?(MethodInfo)
+        end
+        unless methods.empty?
+          base_class = @base_module.const_get(base_class_name)
+          load_method_infos(method_infos, base_class.singleton_class)
+        end
+      else
+        return if info.gtype_struct?
 
-      define_struct(info)
+        define_struct(info)
+      end
     end
 
     def define_boxed(info)
@@ -203,10 +221,14 @@ module GObjectIntrospection
         end
         @base_module.const_set(info.name, flags_module)
       else
-        self.class.define_class(info.gtype, info.name, @base_module)
+        self.class.define_class(info.gtype, flags_class_name(info), @base_module)
       end
     end
 
+    def flags_class_name(info)
+      info.name
+    end
+
     def load_object_info(info)
       klass = self.class.define_class(info.gtype, info.name, @base_module)
       load_fields(info, klass)
@@ -220,8 +242,12 @@ module GObjectIntrospection
       end
     end
 
+    def field_name(field_info, klass)
+      field_info.name
+    end
+
     def load_field(info, i, field_info, klass)
-      name = field_info.name
+      name = field_name(field_info, klass)
       flags = field_info.flags
 
       if flags.readable?
@@ -230,6 +256,7 @@ module GObjectIntrospection
         else
           reader_method_name = name
         end
+        remove_existing_method(klass, reader_method_name)
         klass.__send__(:define_method, reader_method_name) do ||
           info.get_field_value(self, i)
         end
@@ -264,20 +291,26 @@ module GObjectIntrospection
     def load_constructor_infos(infos, klass)
       return if infos.empty?
 
-      validate = lambda do |info, method_name, arguments|
+      prepare = lambda do |info, method_name, arguments, &block|
+        arguments, block = build_arguments(info, arguments, &block)
         validate_arguments(info, "#{klass}\##{method_name}", arguments)
+        [arguments, block]
+      end
+      call_initialize_post = lambda do |object|
+        initialize_post(object)
       end
       infos.each do |info|
         name = "initialize_#{info.name}"
         unlock_gvl = should_unlock_gvl?(info, klass)
         klass.__send__(:define_method, name) do |*arguments, &block|
-          validate.call(info, name, arguments, &block)
+          arguments, block = prepare.call(info, name, arguments, &block)
           info.invoke({
                         :receiver  => self,
                         :arguments => arguments,
                         :unlock_gvl => unlock_gvl,
                       },
                       &block)
+          call_initialize_post.call(self)
         end
         klass.__send__(:private, name)
       end
@@ -291,6 +324,18 @@ module GObjectIntrospection
       end
     end
 
+    def initialize_post(object)
+    end
+
+    def build_arguments(info, arguments, &block)
+      last_in_arg = info.in_args.last
+      if block and last_in_arg and last_in_arg.gclosure?
+        [arguments + [block], nil]
+      else
+        [arguments, block]
+      end
+    end
+
     def validate_arguments(info, method_name, arguments)
       n_in_args = info.n_in_args
       n_required_in_args = info.n_required_in_args
@@ -340,40 +385,115 @@ module GObjectIntrospection
     end
 
     def match_argument?(arg_info, argument)
-      case arg_info.type.tag
+      type = arg_info.type
+      case type.tag
+      when TypeTag::BOOLEAN
+        argument == true or argument == false
+      when TypeTag::INT8,
+           TypeTag::UINT8,
+           TypeTag::INT16,
+           TypeTag::UINT16,
+           TypeTag::INT32,
+           TypeTag::UINT32,
+           TypeTag::INT64,
+           TypeTag::UINT64,
+           TypeTag::FLOAT,
+           TypeTag::DOUBLE
+        argument.is_a?(Numeric)
+      when TypeTag::GTYPE
+        argument.is_a?(GLib::Type)
       when TypeTag::UTF8
         argument.is_a?(String)
+      when TypeTag::FILENAME
+        argument.is_a?(String)
+      when TypeTag::ARRAY
+        argument.is_a?(Array)
+      when TypeTag::INTERFACE
+        interface = type.interface
+        case interface.type
+        when InfoType::STRUCT
+          match_argument_interface_struct?(arg_info, interface, argument)
+        when InfoType::OBJECT,
+             InfoType::INTERFACE
+          argument.is_a?(interface.gtype.to_class)
+        else
+          # TODO
+          false
+        end
+      when TypeTag::GLIST,
+           TypeTag::GSLIST
+        argument.is_a?(Array)
       else
         # TODO
         false
       end
     end
 
+    def match_argument_interface_struct?(arg_info, interface, argument)
+      gtype = interface.gtype
+      case gtype.name
+      when "void"
+        # TODO
+        false
+      when "CairoSurface"
+        if Object.const_defined?(:Cairo)
+          argument.is_a?(Cairo::Surface)
+        else
+          false
+        end
+      else
+        argument.is_a?(gtype.to_class)
+      end
+    end
+
     def rubyish_method_name(function_info, options={})
       name = function_info.name
       if options[:prefix]
         name = name.gsub(/\A#{Regexp.escape(options[:prefix])}/, "")
       end
       return_type = function_info.return_type
-      if return_type.tag == GObjectIntrospection::TypeTag::BOOLEAN
+      return_type_tag = return_type.tag
+      case return_type_tag
+      when TypeTag::BOOLEAN
         case name
         when /\A(?:is|get_is)_/
           "#{$POSTMATCH}?"
         when /\Aget_/
           if function_info.n_in_args.zero?
-            "#{$POSTMATCH}?"
+            if function_info.n_out_args.zero?
+              "#{$POSTMATCH}?"
+            else
+              $POSTMATCH
+            end
           else
             name
           end
-        when /\A(?:has|use)_/
+        when /\A(?:has|use|can|in|.*_is)_/
           "#{name}?"
+        when "exists"
+          "exist?"
+        else
+          name
+        end
+      when TypeTag::GLIST, TypeTag::GSLIST
+        case name
+        when /\A(?:list|get)_/
+          if function_info.n_in_args.zero?
+            $POSTMATCH
+          else
+            name
+          end
         else
           name
         end
-      elsif /\Aget_/ =~ name and function_info.n_in_args.zero?
-        $POSTMATCH
       else
         case name
+        when /\Aget_/
+          if function_info.n_in_args.zero?
+            $POSTMATCH
+          else
+            name
+          end
         when "to_string"
           "to_s"
         when "foreach"
@@ -400,19 +520,26 @@ module GObjectIntrospection
       define_equal_style_setter(info, klass, method_name)
     end
 
+    def remove_existing_method(klass, method_name)
+      return unless klass.method_defined?(method_name)
+      return unless klass.instance_method(method_name).owner == klass
+      klass.__send__(:remove_method, method_name)
+    end
+
     def define_method(info, klass, method_name)
       unlock_gvl = should_unlock_gvl?(info, klass)
-      validate = lambda do |arguments|
+      remove_existing_method(klass, method_name)
+      function_info_p = (info.class == FunctionInfo)
+      no_return_value_p =
+        (info.return_type.tag == TypeTag::VOID and info.n_out_args.zero?)
+      prepare = lambda do |arguments, &block|
+        arguments, block = build_arguments(info, arguments, &block)
         validate_arguments(info, "#{klass}\##{method_name}", arguments)
+        [arguments, block]
       end
-      if klass.method_defined?(method_name) and
-          klass.instance_method(method_name).owner == klass
-        klass.__send__(:remove_method, method_name)
-      end
-      function_info_p = (info.class == FunctionInfo)
       klass.__send__(:define_method, method_name) do |*arguments, &block|
         arguments = [self] + arguments if function_info_p
-        validate.call(arguments, &block)
+        arguments, block = prepare.call(arguments, &block)
         if block.nil? and info.require_callback?
           to_enum(method_name, *arguments)
         else
@@ -421,7 +548,12 @@ module GObjectIntrospection
             :unlock_gvl => unlock_gvl,
           }
           options[:receiver] = self unless function_info_p
-          info.invoke(options, &block)
+          return_value = info.invoke(options, &block)
+          if no_return_value_p
+            self
+          else
+            return_value
+          end
         end
       end
     end
@@ -429,10 +561,7 @@ module GObjectIntrospection
     def define_equal_style_setter(info, klass, method_name)
       if /\Aset_/ =~ method_name and info.n_args == 1
         setter_method_name = "#{$POSTMATCH}="
-        if klass.method_defined?(setter_method_name) and
-            klass.instance_method(setter_method_name).owner == klass
-          klass.__send__(:remove_method, setter_method_name)
-        end
+        remove_existing_method(klass, setter_method_name)
         klass.__send__(:alias_method, setter_method_name, method_name)
       end
     end
diff --git a/gstreamer/Rakefile b/gstreamer/Rakefile
index 10f9caf..250b98e 100644
--- a/gstreamer/Rakefile
+++ b/gstreamer/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./../glib2/lib")
 require 'gnome2/rake/package-task'
@@ -30,9 +46,9 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
     },
     {
       :name => "sqlite-autoconf",
-      :download_base_url => "http://www.sqlite.org/2014",
+      :download_base_url => "http://www.sqlite.org/2015",
       :label => "SQLite",
-      :version => "3080600",
+      :version => "3081101",
       :compression_method => "gz",
       :windows => {
         :configure_args => [],
@@ -43,12 +59,13 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "libsoup",
       :download_site => :gnome,
       :label => "libsoup",
-      :version => "2.48.1",
+      :version => "2.50.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--enable-introspection",
           "--without-apache-httpd",
+          "--disable-tls-check",
         ],
         :build_concurrently => false,
         :patches => [
@@ -60,7 +77,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "libogg",
       :download_base_url => "#{xiph_download_url_base}/ogg",
       :label => "Ogg",
-      :version => "1.3.1",
+      :version => "1.3.2",
       :windows => {
         :configure_args => [],
         :built_file => "bin/libogg-0.dll",
@@ -70,7 +87,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "libvorbis",
       :download_base_url => "#{xiph_download_url_base}/vorbis",
       :label => "Vorbis",
-      :version => "1.3.3",
+      :version => "1.3.5",
       :windows => {
         :configure_args => [],
         :built_file => "bin/libvorbis-0.dll",
@@ -107,7 +124,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "flac",
       :download_base_url => "#{xiph_download_url_base}/flac",
       :label => "FLAC",
-      :version => "1.3.0",
+      :version => "1.3.1",
       :compression_method => "xz",
       :windows => {
         :configure_args => ["--disable-cpplibs"],
@@ -115,22 +132,23 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       },
     },
     {
-      :name => "speex",
-      :download_base_url => "#{xiph_download_url_base}/speex",
-      :label => "Speex",
-      :version => "1.2rc1",
+      :name => "opus",
+      :download_base_url => "#{xiph_download_url_base}/opus",
+      :label => "Opus",
+      :version => "1.1",
       :windows => {
         :configure_args => [],
-        :built_file => "bin/libspeex-1.dll",
+        :built_file => "bin/libopus-0.dll",
       },
     },
     {
       :name => "gstreamer",
       :download_base_url => "#{freedesktop_download_url_base}/gstreamer",
       :label => "GStreamer",
-      :version => "1.4.3",
+      :version => "1.5.2",
       :compression_method => "xz",
       :windows => {
+        :cc_args => "-std=gnu99",
         :configure_args => [
           "--enable-check",
           "--enable-introspection",
@@ -143,13 +161,17 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gst-plugins-base",
       :download_base_url => "#{freedesktop_download_url_base}/gst-plugins-base",
       :label => "GStreamer plugins (base)",
-      :version => "1.4.3",
+      :version => "1.5.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
           "--enable-introspection",
         ],
         :build_concurrently => false,
+        :patches => [
+          "gst-plugins-base-1.5.2-use-portable-64bit-data-print-modifier.diff",
+          "gst-plugins-base-1.5.2-use-portable-cast.diff",
+        ],
         :built_file => "lib/gstreamer-1.0/libgstgio.dll",
       },
     },
@@ -157,7 +179,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gst-plugins-good",
       :download_base_url => "#{freedesktop_download_url_base}/gst-plugins-good",
       :label => "GStreamer plugins (good)",
-      :version => "1.4.3",
+      :version => "1.5.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
@@ -170,13 +192,18 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gst-plugins-bad",
       :download_base_url => "#{freedesktop_download_url_base}/gst-plugins-bad",
       :label => "GStreamer plugins (bad)",
-      :version => "1.4.3",
+      :version => "1.5.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => ["--disable-librfb"],
         :cc_args => [
           "-std=c99",
         ],
+        :need_autoreconf => true,
+        :patches => [
+          "gst-plugins-bad-1.5.2-use-only-I.diff",
+          "gst-plugins-bad-1.5.2-use-portable-cast.diff",
+        ],
         :built_file => "lib/gstreamer-1.0/libgstmxf.dll",
       },
     },
@@ -184,7 +211,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
     #   :name => "gst-plugins-ugly",
     #   :download_base_url => "#{freedesktop_download_url_base}/gst-plugins-ugly",
     #   :label => "GStreamer plugins (ugly)",
-    #   :version => "1.4.3",
+    #   :version => "1.5.2",
     #   :compression_method => "xz",
     #   :windows => {
     #     :configure_args => [],
@@ -194,7 +221,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gst-libav",
       :download_base_url => "#{freedesktop_download_url_base}/gst-libav",
       :label => "GStreamer libav",
-      :version => "1.4.3",
+      :version => "1.5.2",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/gstreamer/ext/gstreamer/extconf.rb b/gstreamer/ext/gstreamer/extconf.rb
index 5dd5add..b2f1172 100644
--- a/gstreamer/ext/gstreamer/extconf.rb
+++ b/gstreamer/ext/gstreamer/extconf.rb
@@ -45,7 +45,7 @@ setup_windows(module_name, base_dir)
 
 unless required_pkg_config_package(package_id,
                                    :debian => "libgstreamer1.0-dev",
-                                   :redhat => "gstreamer-devel",
+                                   :redhat => "gstreamer1-devel",
                                    :homebrew => "gstreamer",
                                    :macports => "gstreamer")
   exit(false)
diff --git a/gstreamer/lib/gst.rb b/gstreamer/lib/gst.rb
index 2b91699..da6daa7 100644
--- a/gstreamer/lib/gst.rb
+++ b/gstreamer/lib/gst.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -61,7 +61,7 @@ module Gst
         remove_method(:method_missing)
       end
       loader = Loader.new(self, argv)
-      loader.load("Gst")
+      loader.load
       require "gst/bin"
       require "gst/bus"
       require "gst/caps"
@@ -78,22 +78,28 @@ module Gst
     def init_base
       require "gst/base-loader"
       base_loader = BaseLoader.new(self)
-      base_loader.load("GstBase")
+      base_loader.load
     end
 
     def init_controller
       require "gst/controller-loader"
       controller_loader = ControllerLoader.new(self)
-      controller_loader.load("GstController")
+      controller_loader.load
     end
   end
 
   class Loader < GObjectIntrospection::Loader
+    NAMESPACE = "Gst"
+
     def initialize(base_module, init_arguments)
       super(base_module)
       @init_arguments = init_arguments
     end
 
+    def load
+      super(NAMESPACE)
+    end
+
     private
     def pre_load(repository, namespace)
       call_init_function(repository, namespace)
@@ -131,6 +137,12 @@ module Gst
       end
     end
 
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+
     def load_function_info(info)
       case info.name
       when "init"
diff --git a/gstreamer/lib/gst/base-loader.rb b/gstreamer/lib/gst/base-loader.rb
index fb56999..29ca6dd 100644
--- a/gstreamer/lib/gst/base-loader.rb
+++ b/gstreamer/lib/gst/base-loader.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -16,5 +16,10 @@
 
 module Gst
   class BaseLoader < GObjectIntrospection::Loader
+    NAMESPACE = "GstBase"
+
+    def load
+      super(NAMESPACE)
+    end
   end
 end
diff --git a/gstreamer/lib/gst/controller-loader.rb b/gstreamer/lib/gst/controller-loader.rb
index 37bd503..16c289d 100644
--- a/gstreamer/lib/gst/controller-loader.rb
+++ b/gstreamer/lib/gst/controller-loader.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -16,5 +16,10 @@
 
 module Gst
   class ControllerLoader < GObjectIntrospection::Loader
+    NAMESPACE = "GstController"
+
+    def load
+      super(NAMESPACE)
+    end
   end
 end
diff --git a/gstreamer/patches/gst-plugins-bad-1.5.2-use-only-I.diff b/gstreamer/patches/gst-plugins-bad-1.5.2-use-only-I.diff
new file mode 100644
index 0000000..be4b3bd
--- /dev/null
+++ b/gstreamer/patches/gst-plugins-bad-1.5.2-use-only-I.diff
@@ -0,0 +1,12 @@
+diff -ru gst-plugins-bad-1.5.2.orig/gst-libs/gst/gl/Makefile.am gst-plugins-bad-1.5.2/gst-libs/gst/gl/Makefile.am
+--- gst-plugins-bad-1.5.2.orig/gst-libs/gst/gl/Makefile.am	2015-06-22 17:19:18.000000000 +0900
++++ gst-plugins-bad-1.5.2/gst-libs/gst/gl/Makefile.am	2015-09-06 18:43:44.930668366 +0900
+@@ -139,7 +139,7 @@
+ 		--c-include "gst/gl/gl.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		$(GST_PLUGINS_BASE_CFLAGS) \
++		`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --cflags-only-I gstreamer-base- at GST_API_VERSION@` \
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer- at GST_API_VERSION@` \
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base- at GST_API_VERSION@` \
+ 		--library=libgstgl- at GST_API_VERSION@.la \
diff --git a/gstreamer/patches/gst-plugins-bad-1.5.2-use-portable-cast.diff b/gstreamer/patches/gst-plugins-bad-1.5.2-use-portable-cast.diff
new file mode 100644
index 0000000..776a4d4
--- /dev/null
+++ b/gstreamer/patches/gst-plugins-bad-1.5.2-use-portable-cast.diff
@@ -0,0 +1,12 @@
+diff -ru gst-plugins-bad-1.5.2.orig/sys/directsound/gstdirectsoundsrc.c gst-plugins-bad-1.5.2/sys/directsound/gstdirectsoundsrc.c
+--- gst-plugins-bad-1.5.2.orig/sys/directsound/gstdirectsoundsrc.c	2015-04-13 15:56:11.000000000 +0900
++++ gst-plugins-bad-1.5.2/sys/directsound/gstdirectsoundsrc.c	2015-09-09 13:36:58.665602689 +0900
+@@ -730,7 +730,7 @@
+     if (mmres != MMSYSERR_NOERROR)
+       continue;
+ 
+-    mmres = mixerGetDevCaps ((UINT) dsoundsrc->mixer,
++    mmres = mixerGetDevCaps (GPOINTER_TO_UINT (dsoundsrc->mixer),
+         mixer_caps, sizeof (MIXERCAPS));
+ 
+     if (mmres != MMSYSERR_NOERROR) {
diff --git a/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-64bit-data-print-modifier.diff b/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-64bit-data-print-modifier.diff
new file mode 100644
index 0000000..f3d447f
--- /dev/null
+++ b/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-64bit-data-print-modifier.diff
@@ -0,0 +1,12 @@
+diff -ru gst-plugins-base-1.5.2.orig/gst-libs/gst/video/video-dither.c gst-plugins-base-1.5.2/gst-libs/gst/video/video-dither.c
+--- gst-plugins-base-1.5.2.orig/gst-libs/gst/video/video-dither.c	2015-06-22 17:15:57.000000000 +0900
++++ gst-plugins-base-1.5.2/gst-libs/gst/video/video-dither.c	2015-09-06 18:10:34.794869331 +0900
+@@ -413,7 +413,7 @@
+   }
+   dither->orc_mask64 = GUINT64_FROM_BE (dither->orc_mask64);
+   dither->orc_mask32 = GUINT32_FROM_BE (dither->orc_mask32);
+-  GST_DEBUG ("mask64 %08llx", (unsigned long long int) dither->orc_mask64);
++  GST_DEBUG ("mask64 %08" G_GINT64_MODIFIER "x", (unsigned long long int) dither->orc_mask64);
+   GST_DEBUG ("mask32 %08x", dither->orc_mask32);
+ 
+   switch (method) {
diff --git a/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-cast.diff b/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-cast.diff
new file mode 100644
index 0000000..a88e35c
--- /dev/null
+++ b/gstreamer/patches/gst-plugins-base-1.5.2-use-portable-cast.diff
@@ -0,0 +1,21 @@
+diff -ru gst-plugins-base-1.5.2.orig/gst/playback/gstplaybin2.c gst-plugins-base-1.5.2/gst/playback/gstplaybin2.c
+--- gst-plugins-base-1.5.2.orig/gst/playback/gstplaybin2.c	2015-06-23 22:28:58.000000000 +0900
++++ gst-plugins-base-1.5.2/gst/playback/gstplaybin2.c	2015-09-09 13:17:22.244128964 +0900
+@@ -3438,7 +3438,7 @@
+             G_CALLBACK (notify_tags_cb), ntdata, (GClosureNotify) g_free,
+             (GConnectFlags) 0);
+         g_object_set_data (G_OBJECT (sinkpad), "playbin.notify_tags_handler",
+-            (gpointer) (guintptr) notify_tags_handler);
++            GUINT_TO_POINTER (notify_tags_handler));
+       }
+ 
+       /* store the pad in the array */
+@@ -3473,7 +3473,7 @@
+       gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
+       _uridecodebin_event_probe, group, NULL);
+   g_object_set_data (G_OBJECT (pad), "playbin.event_probe_id",
+-      (gpointer) group_id_probe_handler);
++      GUINT_TO_POINTER (group_id_probe_handler));
+ 
+   if (changed) {
+     int signal;
diff --git a/gstreamer/sample/gst-inspect.rb b/gstreamer/sample/gst-inspect.rb
index 1c52852..b6e86be 100755
--- a/gstreamer/sample/gst-inspect.rb
+++ b/gstreamer/sample/gst-inspect.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/evn ruby
+#!/usr/bin/env ruby
 #
 # This sample code is a port of gstreamer/tools/gst-inspect.c. It is
 # licensed under the terms of the GNU Library General Public License,
diff --git a/gstreamer/test/run-test.rb b/gstreamer/test/run-test.rb
index 4ed8b9d..3d5fcd5 100755
--- a/gstreamer/test/run-test.rb
+++ b/gstreamer/test/run-test.rb
@@ -46,6 +46,14 @@ require "gstreamer-test-utils"
 
 require "gst"
 
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(Gst::Loader::NAMESPACE)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
 Gst.init
 
 exit Test::Unit::AutoRunner.run(true)
diff --git a/gtk2/Rakefile b/gtk2/Rakefile
index 9db6f4d..c850797 100644
--- a/gtk2/Rakefile
+++ b/gtk2/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./../glib2/lib")
 require 'gnome2/rake/package-task'
@@ -17,7 +33,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gtk+",
       :download_site => :gnome,
       :label => "gtk+",
-      :version => "2.24.25",
+      :version => "2.24.28",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
@@ -35,7 +51,8 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "hicolor-icon-theme",
       :download_base_url => "http://icon-theme.freedesktop.org/releases",
       :label => "gtk-hi-color-icon-theme",
-      :version => "0.13",
+      :version => "0.15",
+      :compression_method => "xz",
       :windows => {
         :configure_args => [],
         :build_concurrently => false,
diff --git a/gtk2/test/test_gtk_builder.rb b/gtk2/test/test_gtk_builder.rb
index a36d8fa..6f9bcfe 100644
--- a/gtk2/test/test_gtk_builder.rb
+++ b/gtk2/test/test_gtk_builder.rb
@@ -98,7 +98,6 @@ class TestGtkBuilder < Test::Unit::TestCase
     assert_equal([].sort, handler_names.sort)
 
     builder << ui_definition
-    ok_button = builder["ok_button"]
     builder.connect_signals do |name|
       handler_names << name
       Proc.new {}
diff --git a/gtk3-no-gi/COPYING.LIB b/gtk3-no-gi/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/gtk3-no-gi/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/gtk3/README.md b/gtk3-no-gi/README.md
similarity index 100%
copy from gtk3/README.md
copy to gtk3-no-gi/README.md
diff --git a/gtk3/Rakefile b/gtk3-no-gi/Rakefile
similarity index 100%
copy from gtk3/Rakefile
copy to gtk3-no-gi/Rakefile
diff --git a/gtk3/ext/gtk3/conversions.c b/gtk3-no-gi/ext/gtk3/conversions.c
similarity index 100%
rename from gtk3/ext/gtk3/conversions.c
rename to gtk3-no-gi/ext/gtk3/conversions.c
diff --git a/gtk3/ext/gtk3/depend b/gtk3-no-gi/ext/gtk3/depend
similarity index 100%
copy from gtk3/ext/gtk3/depend
copy to gtk3-no-gi/ext/gtk3/depend
diff --git a/gtk3/ext/gtk3/extconf.rb b/gtk3-no-gi/ext/gtk3/extconf.rb
similarity index 100%
copy from gtk3/ext/gtk3/extconf.rb
copy to gtk3-no-gi/ext/gtk3/extconf.rb
diff --git a/gtk3/ext/gtk3/gtk3.def b/gtk3-no-gi/ext/gtk3/gtk3.def
similarity index 100%
rename from gtk3/ext/gtk3/gtk3.def
rename to gtk3-no-gi/ext/gtk3/gtk3.def
diff --git a/gtk3/ext/gtk3/init.c b/gtk3-no-gi/ext/gtk3/init.c
similarity index 100%
rename from gtk3/ext/gtk3/init.c
rename to gtk3-no-gi/ext/gtk3/init.c
diff --git a/gtk3/ext/gtk3/rbgtk-about-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-about-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-about-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-about-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-accel-group-entry.c b/gtk3-no-gi/ext/gtk3/rbgtk-accel-group-entry.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accel-group-entry.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accel-group-entry.c
diff --git a/gtk3/ext/gtk3/rbgtk-accel-group.c b/gtk3-no-gi/ext/gtk3/rbgtk-accel-group.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accel-group.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accel-group.c
diff --git a/gtk3/ext/gtk3/rbgtk-accel-key.c b/gtk3-no-gi/ext/gtk3/rbgtk-accel-key.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accel-key.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accel-key.c
diff --git a/gtk3/ext/gtk3/rbgtk-accel-label.c b/gtk3-no-gi/ext/gtk3/rbgtk-accel-label.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accel-label.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accel-label.c
diff --git a/gtk3/ext/gtk3/rbgtk-accel-map.c b/gtk3-no-gi/ext/gtk3/rbgtk-accel-map.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accel-map.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accel-map.c
diff --git a/gtk3/ext/gtk3/rbgtk-accelerator.c b/gtk3-no-gi/ext/gtk3/rbgtk-accelerator.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accelerator.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accelerator.c
diff --git a/gtk3/ext/gtk3/rbgtk-accessible.c b/gtk3-no-gi/ext/gtk3/rbgtk-accessible.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-accessible.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-accessible.c
diff --git a/gtk3/ext/gtk3/rbgtk-action-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-action-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-action-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-action-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-action-group.c b/gtk3-no-gi/ext/gtk3/rbgtk-action-group.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-action-group.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-action-group.c
diff --git a/gtk3/ext/gtk3/rbgtk-action.c b/gtk3-no-gi/ext/gtk3/rbgtk-action.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-action.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-action.c
diff --git a/gtk3/ext/gtk3/rbgtk-activatable.c b/gtk3-no-gi/ext/gtk3/rbgtk-activatable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-activatable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-activatable.c
diff --git a/gtk3/ext/gtk3/rbgtk-adjustment.c b/gtk3-no-gi/ext/gtk3/rbgtk-adjustment.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-adjustment.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-adjustment.c
diff --git a/gtk3/ext/gtk3/rbgtk-alignment.c b/gtk3-no-gi/ext/gtk3/rbgtk-alignment.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-alignment.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-alignment.c
diff --git a/gtk3/ext/gtk3/rbgtk-allocation.c b/gtk3-no-gi/ext/gtk3/rbgtk-allocation.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-allocation.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-allocation.c
diff --git a/gtk3/ext/gtk3/rbgtk-app-chooser-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-app-chooser-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-app-chooser-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-app-chooser-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-app-chooser-widget.c b/gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-widget.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-app-chooser-widget.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-app-chooser-widget.c
diff --git a/gtk3/ext/gtk3/rbgtk-app-chooser.c b/gtk3-no-gi/ext/gtk3/rbgtk-app-chooser.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-app-chooser.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-app-chooser.c
diff --git a/gtk3/ext/gtk3/rbgtk-application.c b/gtk3-no-gi/ext/gtk3/rbgtk-application.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-application.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-application.c
diff --git a/gtk3/ext/gtk3/rbgtk-arrow.c b/gtk3-no-gi/ext/gtk3/rbgtk-arrow.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-arrow.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-arrow.c
diff --git a/gtk3/ext/gtk3/rbgtk-aspect-frame.c b/gtk3-no-gi/ext/gtk3/rbgtk-aspect-frame.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-aspect-frame.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-aspect-frame.c
diff --git a/gtk3/ext/gtk3/rbgtk-assistant.c b/gtk3-no-gi/ext/gtk3/rbgtk-assistant.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-assistant.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-assistant.c
diff --git a/gtk3/ext/gtk3/rbgtk-bin.c b/gtk3-no-gi/ext/gtk3/rbgtk-bin.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-bin.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-bin.c
diff --git a/gtk3/ext/gtk3/rbgtk-binding-set.c b/gtk3-no-gi/ext/gtk3/rbgtk-binding-set.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-binding-set.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-binding-set.c
diff --git a/gtk3/ext/gtk3/rbgtk-border.c b/gtk3-no-gi/ext/gtk3/rbgtk-border.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-border.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-border.c
diff --git a/gtk3/ext/gtk3/rbgtk-box.c b/gtk3-no-gi/ext/gtk3/rbgtk-box.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-box.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-box.c
diff --git a/gtk3/ext/gtk3/rbgtk-buildable.c b/gtk3-no-gi/ext/gtk3/rbgtk-buildable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-buildable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-buildable.c
diff --git a/gtk3/ext/gtk3/rbgtk-builder.c b/gtk3-no-gi/ext/gtk3/rbgtk-builder.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-builder.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-builder.c
diff --git a/gtk3/ext/gtk3/rbgtk-button-box.c b/gtk3-no-gi/ext/gtk3/rbgtk-button-box.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-button-box.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-button-box.c
diff --git a/gtk3/ext/gtk3/rbgtk-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-calendar.c b/gtk3-no-gi/ext/gtk3/rbgtk-calendar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-calendar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-calendar.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-editable.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-editable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-editable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-editable.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-layout.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-layout.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-layout.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-layout.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-accel.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-accel.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-accel.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-accel.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-combo.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-combo.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-combo.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-combo.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-pixbuf.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-pixbuf.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-pixbuf.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-pixbuf.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-progress.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-progress.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-progress.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-progress.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-spin.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-spin.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-spin.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-spin.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-spinner.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-spinner.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-spinner.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-spinner.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-text.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-text.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-text.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-text.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer-toggle.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-toggle.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer-toggle.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer-toggle.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-renderer.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-renderer.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-renderer.c
diff --git a/gtk3/ext/gtk3/rbgtk-cell-view.c b/gtk3-no-gi/ext/gtk3/rbgtk-cell-view.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-cell-view.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-cell-view.c
diff --git a/gtk3/ext/gtk3/rbgtk-check-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-check-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-check-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-check-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-check-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-check-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-check-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-check-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-clip-board.c b/gtk3-no-gi/ext/gtk3/rbgtk-clip-board.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-clip-board.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-clip-board.c
diff --git a/gtk3/ext/gtk3/rbgtk-color-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-color-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-color-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-color-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-color-selection-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-color-selection-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-color-selection-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-color-selection-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-color-selection.c b/gtk3-no-gi/ext/gtk3/rbgtk-color-selection.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-color-selection.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-color-selection.c
diff --git a/gtk3/ext/gtk3/rbgtk-combo-box-text.c b/gtk3-no-gi/ext/gtk3/rbgtk-combo-box-text.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-combo-box-text.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-combo-box-text.c
diff --git a/gtk3/ext/gtk3/rbgtk-combo-box.c b/gtk3-no-gi/ext/gtk3/rbgtk-combo-box.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-combo-box.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-combo-box.c
diff --git a/gtk3/ext/gtk3/rbgtk-const.c b/gtk3-no-gi/ext/gtk3/rbgtk-const.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-const.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-const.c
diff --git a/gtk3/ext/gtk3/rbgtk-container.c b/gtk3-no-gi/ext/gtk3/rbgtk-container.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-container.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-container.c
diff --git a/gtk3/ext/gtk3/rbgtk-css-provider.c b/gtk3-no-gi/ext/gtk3/rbgtk-css-provider.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-css-provider.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-css-provider.c
diff --git a/gtk3/ext/gtk3/rbgtk-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-drag-gdk-drag-context.c b/gtk3-no-gi/ext/gtk3/rbgtk-drag-gdk-drag-context.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-drag-gdk-drag-context.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-drag-gdk-drag-context.c
diff --git a/gtk3/ext/gtk3/rbgtk-drag.c b/gtk3-no-gi/ext/gtk3/rbgtk-drag.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-drag.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-drag.c
diff --git a/gtk3/ext/gtk3/rbgtk-drawing-area.c b/gtk3-no-gi/ext/gtk3/rbgtk-drawing-area.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-drawing-area.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-drawing-area.c
diff --git a/gtk3/ext/gtk3/rbgtk-editable.c b/gtk3-no-gi/ext/gtk3/rbgtk-editable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-editable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-editable.c
diff --git a/gtk3/ext/gtk3/rbgtk-entry-buffer.c b/gtk3-no-gi/ext/gtk3/rbgtk-entry-buffer.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-entry-buffer.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-entry-buffer.c
diff --git a/gtk3/ext/gtk3/rbgtk-entry-completion.c b/gtk3-no-gi/ext/gtk3/rbgtk-entry-completion.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-entry-completion.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-entry-completion.c
diff --git a/gtk3/ext/gtk3/rbgtk-entry.c b/gtk3-no-gi/ext/gtk3/rbgtk-entry.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-entry.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-entry.c
diff --git a/gtk3/ext/gtk3/rbgtk-event-box.c b/gtk3-no-gi/ext/gtk3/rbgtk-event-box.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-event-box.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-event-box.c
diff --git a/gtk3/ext/gtk3/rbgtk-expander.c b/gtk3-no-gi/ext/gtk3/rbgtk-expander.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-expander.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-expander.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-chooser-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-chooser-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-chooser-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-chooser-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-chooser-widget.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-widget.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-chooser-widget.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-chooser-widget.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-chooser.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-chooser.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-chooser.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-chooser.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-filter.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-filter.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-filter.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-filter.c
diff --git a/gtk3/ext/gtk3/rbgtk-file-system-error.c b/gtk3-no-gi/ext/gtk3/rbgtk-file-system-error.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-file-system-error.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-file-system-error.c
diff --git a/gtk3/ext/gtk3/rbgtk-fixed.c b/gtk3-no-gi/ext/gtk3/rbgtk-fixed.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-fixed.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-fixed.c
diff --git a/gtk3/ext/gtk3/rbgtk-font-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-font-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-font-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-font-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-font-chooser-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-font-chooser-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-font-chooser-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-font-chooser-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-font-chooser-widget.c b/gtk3-no-gi/ext/gtk3/rbgtk-font-chooser-widget.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-font-chooser-widget.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-font-chooser-widget.c
diff --git a/gtk3/ext/gtk3/rbgtk-font-chooser.c b/gtk3-no-gi/ext/gtk3/rbgtk-font-chooser.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-font-chooser.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-font-chooser.c
diff --git a/gtk3/ext/gtk3/rbgtk-frame.c b/gtk3-no-gi/ext/gtk3/rbgtk-frame.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-frame.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-frame.c
diff --git a/gtk3/ext/gtk3/rbgtk-gdk-event.c b/gtk3-no-gi/ext/gtk3/rbgtk-gdk-event.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-gdk-event.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-gdk-event.c
diff --git a/gtk3/ext/gtk3/rbgtk-grid.c b/gtk3-no-gi/ext/gtk3/rbgtk-grid.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-grid.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-grid.c
diff --git a/gtk3/ext/gtk3/rbgtk-handle-box.c b/gtk3-no-gi/ext/gtk3/rbgtk-handle-box.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-handle-box.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-handle-box.c
diff --git a/gtk3/ext/gtk3/rbgtk-header-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-header-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-header-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-header-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-hsv.c b/gtk3-no-gi/ext/gtk3/rbgtk-hsv.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-hsv.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-hsv.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-factory.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-factory.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-factory.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-factory.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-info.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-info.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-info.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-info.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-set.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-set.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-set.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-set.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-size.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-size.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-size.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-size.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-source.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-source.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-source.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-source.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-theme.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-theme.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-theme.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-theme.c
diff --git a/gtk3/ext/gtk3/rbgtk-icon-view.c b/gtk3-no-gi/ext/gtk3/rbgtk-icon-view.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-icon-view.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-icon-view.c
diff --git a/gtk3/ext/gtk3/rbgtk-im-multicontext.c b/gtk3-no-gi/ext/gtk3/rbgtk-im-multicontext.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-im-multicontext.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-im-multicontext.c
diff --git a/gtk3/ext/gtk3/rbgtk-image-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-image-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-image-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-image-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-image.c b/gtk3-no-gi/ext/gtk3/rbgtk-image.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-image.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-image.c
diff --git a/gtk3/ext/gtk3/rbgtk-imcon-text-simple.c b/gtk3-no-gi/ext/gtk3/rbgtk-imcon-text-simple.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-imcon-text-simple.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-imcon-text-simple.c
diff --git a/gtk3/ext/gtk3/rbgtk-imcon-text.c b/gtk3-no-gi/ext/gtk3/rbgtk-imcon-text.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-imcon-text.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-imcon-text.c
diff --git a/gtk3/ext/gtk3/rbgtk-infobar.c b/gtk3-no-gi/ext/gtk3/rbgtk-infobar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-infobar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-infobar.c
diff --git a/gtk3/ext/gtk3/rbgtk-invisible.c b/gtk3-no-gi/ext/gtk3/rbgtk-invisible.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-invisible.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-invisible.c
diff --git a/gtk3/ext/gtk3/rbgtk-label.c b/gtk3-no-gi/ext/gtk3/rbgtk-label.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-label.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-label.c
diff --git a/gtk3/ext/gtk3/rbgtk-layout.c b/gtk3-no-gi/ext/gtk3/rbgtk-layout.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-layout.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-layout.c
diff --git a/gtk3/ext/gtk3/rbgtk-level-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-level-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-level-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-level-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-link-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-link-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-link-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-link-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-list-store.c b/gtk3-no-gi/ext/gtk3/rbgtk-list-store.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-list-store.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-list-store.c
diff --git a/gtk3/ext/gtk3/rbgtk-lock-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-lock-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-lock-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-lock-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-menu-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-menu-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menu-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menu-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-menu-shell.c b/gtk3-no-gi/ext/gtk3/rbgtk-menu-shell.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menu-shell.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menu-shell.c
diff --git a/gtk3/ext/gtk3/rbgtk-menu-tool-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-menu-tool-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menu-tool-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menu-tool-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-menu.c b/gtk3-no-gi/ext/gtk3/rbgtk-menu.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menu.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menu.c
diff --git a/gtk3/ext/gtk3/rbgtk-menubar.c b/gtk3-no-gi/ext/gtk3/rbgtk-menubar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-menubar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-menubar.c
diff --git a/gtk3/ext/gtk3/rbgtk-message-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-message-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-message-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-message-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-misc.c b/gtk3-no-gi/ext/gtk3/rbgtk-misc.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-misc.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-misc.c
diff --git a/gtk3/ext/gtk3/rbgtk-notebook.c b/gtk3-no-gi/ext/gtk3/rbgtk-notebook.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-notebook.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-notebook.c
diff --git a/gtk3/ext/gtk3/rbgtk-numerable-icon.c b/gtk3-no-gi/ext/gtk3/rbgtk-numerable-icon.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-numerable-icon.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-numerable-icon.c
diff --git a/gtk3/ext/gtk3/rbgtk-orientable.c b/gtk3-no-gi/ext/gtk3/rbgtk-orientable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-orientable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-orientable.c
diff --git a/gtk3/ext/gtk3/rbgtk-overlay.c b/gtk3-no-gi/ext/gtk3/rbgtk-overlay.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-overlay.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-overlay.c
diff --git a/gtk3/ext/gtk3/rbgtk-page-setup-unix-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-page-setup-unix-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-page-setup-unix-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-page-setup-unix-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-page-setup.c b/gtk3-no-gi/ext/gtk3/rbgtk-page-setup.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-page-setup.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-page-setup.c
diff --git a/gtk3/ext/gtk3/rbgtk-paned.c b/gtk3-no-gi/ext/gtk3/rbgtk-paned.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-paned.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-paned.c
diff --git a/gtk3/ext/gtk3/rbgtk-paper-size.c b/gtk3-no-gi/ext/gtk3/rbgtk-paper-size.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-paper-size.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-paper-size.c
diff --git a/gtk3/ext/gtk3/rbgtk-plug.c b/gtk3-no-gi/ext/gtk3/rbgtk-plug.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-plug.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-plug.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-context.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-context.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-context.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-context.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-job.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-job.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-job.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-job.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-operation-preview.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-operation-preview.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-operation-preview.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-operation-preview.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-operation.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-operation.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-operation.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-operation.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-settings.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-settings.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-settings.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-settings.c
diff --git a/gtk3/ext/gtk3/rbgtk-print-unix-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-print-unix-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-print-unix-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-print-unix-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-printer.c b/gtk3-no-gi/ext/gtk3/rbgtk-printer.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-printer.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-printer.c
diff --git a/gtk3/ext/gtk3/rbgtk-progress-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-progress-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-progress-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-progress-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-radio-action.c b/gtk3-no-gi/ext/gtk3/rbgtk-radio-action.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-radio-action.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-radio-action.c
diff --git a/gtk3/ext/gtk3/rbgtk-radio-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-radio-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-radio-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-radio-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-radio-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-radio-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-radio-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-radio-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-radio-tool-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-radio-tool-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-radio-tool-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-radio-tool-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-range.c b/gtk3-no-gi/ext/gtk3/rbgtk-range.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-range.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-range.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-action.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-action.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-action.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-action.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-chooser-dialog.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-dialog.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-chooser-dialog.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-dialog.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-chooser-menu.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-menu.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-chooser-menu.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-menu.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-chooser-widget.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-widget.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-chooser-widget.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser-widget.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-chooser.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-chooser.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-chooser.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-data.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-data.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-data.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-data.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-filter-info.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-filter-info.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-filter-info.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-filter-info.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-filter.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-filter.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-filter.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-filter.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-info.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-info.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-info.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-info.c
diff --git a/gtk3/ext/gtk3/rbgtk-recent-manager.c b/gtk3-no-gi/ext/gtk3/rbgtk-recent-manager.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-recent-manager.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-recent-manager.c
diff --git a/gtk3/ext/gtk3/rbgtk-revealer.c b/gtk3-no-gi/ext/gtk3/rbgtk-revealer.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-revealer.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-revealer.c
diff --git a/gtk3/ext/gtk3/rbgtk-scale-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-scale-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-scale-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-scale-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-scale.c b/gtk3-no-gi/ext/gtk3/rbgtk-scale.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-scale.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-scale.c
diff --git a/gtk3/ext/gtk3/rbgtk-scrollable.c b/gtk3-no-gi/ext/gtk3/rbgtk-scrollable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-scrollable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-scrollable.c
diff --git a/gtk3/ext/gtk3/rbgtk-scrollbar.c b/gtk3-no-gi/ext/gtk3/rbgtk-scrollbar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-scrollbar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-scrollbar.c
diff --git a/gtk3/ext/gtk3/rbgtk-scrolled-window.c b/gtk3-no-gi/ext/gtk3/rbgtk-scrolled-window.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-scrolled-window.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-scrolled-window.c
diff --git a/gtk3/ext/gtk3/rbgtk-search-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-search-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-search-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-search-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-search-entry.c b/gtk3-no-gi/ext/gtk3/rbgtk-search-entry.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-search-entry.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-search-entry.c
diff --git a/gtk3/ext/gtk3/rbgtk-selection-data.c b/gtk3-no-gi/ext/gtk3/rbgtk-selection-data.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-selection-data.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-selection-data.c
diff --git a/gtk3/ext/gtk3/rbgtk-selection.c b/gtk3-no-gi/ext/gtk3/rbgtk-selection.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-selection.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-selection.c
diff --git a/gtk3/ext/gtk3/rbgtk-separator-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-separator-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-separator-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-separator-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-separator-tool-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-separator-tool-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-separator-tool-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-separator-tool-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-separator.c b/gtk3-no-gi/ext/gtk3/rbgtk-separator.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-separator.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-separator.c
diff --git a/gtk3/ext/gtk3/rbgtk-settings.c b/gtk3-no-gi/ext/gtk3/rbgtk-settings.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-settings.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-settings.c
diff --git a/gtk3/ext/gtk3/rbgtk-size-group.c b/gtk3-no-gi/ext/gtk3/rbgtk-size-group.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-size-group.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-size-group.c
diff --git a/gtk3/ext/gtk3/rbgtk-socket.c b/gtk3-no-gi/ext/gtk3/rbgtk-socket.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-socket.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-socket.c
diff --git a/gtk3/ext/gtk3/rbgtk-spin-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-spin-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-spin-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-spin-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-spinner.c b/gtk3-no-gi/ext/gtk3/rbgtk-spinner.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-spinner.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-spinner.c
diff --git a/gtk3/ext/gtk3/rbgtk-stack-switcher.c b/gtk3-no-gi/ext/gtk3/rbgtk-stack-switcher.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-stack-switcher.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-stack-switcher.c
diff --git a/gtk3/ext/gtk3/rbgtk-stack.c b/gtk3-no-gi/ext/gtk3/rbgtk-stack.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-stack.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-stack.c
diff --git a/gtk3/ext/gtk3/rbgtk-status-bar.c b/gtk3-no-gi/ext/gtk3/rbgtk-status-bar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-status-bar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-status-bar.c
diff --git a/gtk3/ext/gtk3/rbgtk-status-icon.c b/gtk3-no-gi/ext/gtk3/rbgtk-status-icon.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-status-icon.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-status-icon.c
diff --git a/gtk3/ext/gtk3/rbgtk-stock.c b/gtk3-no-gi/ext/gtk3/rbgtk-stock.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-stock.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-stock.c
diff --git a/gtk3/ext/gtk3/rbgtk-style-context-gdk-screen.c b/gtk3-no-gi/ext/gtk3/rbgtk-style-context-gdk-screen.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-style-context-gdk-screen.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-style-context-gdk-screen.c
diff --git a/gtk3/ext/gtk3/rbgtk-style-context.c b/gtk3-no-gi/ext/gtk3/rbgtk-style-context.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-style-context.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-style-context.c
diff --git a/gtk3/ext/gtk3/rbgtk-style-properties.c b/gtk3-no-gi/ext/gtk3/rbgtk-style-properties.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-style-properties.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-style-properties.c
diff --git a/gtk3/ext/gtk3/rbgtk-style-provider.c b/gtk3-no-gi/ext/gtk3/rbgtk-style-provider.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-style-provider.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-style-provider.c
diff --git a/gtk3/ext/gtk3/rbgtk-switch.c b/gtk3-no-gi/ext/gtk3/rbgtk-switch.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-switch.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-switch.c
diff --git a/gtk3/ext/gtk3/rbgtk-table.c b/gtk3-no-gi/ext/gtk3/rbgtk-table.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-table.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-table.c
diff --git a/gtk3/ext/gtk3/rbgtk-target-list.c b/gtk3-no-gi/ext/gtk3/rbgtk-target-list.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-target-list.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-target-list.c
diff --git a/gtk3/ext/gtk3/rbgtk-tearoff-menu-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-tearoff-menu-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tearoff-menu-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tearoff-menu-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-appearance.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-appearance.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-appearance.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-appearance.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-attributes.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-attributes.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-attributes.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-attributes.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-buffer.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-buffer.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-buffer.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-buffer.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-child-anchor.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-child-anchor.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-child-anchor.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-child-anchor.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-iter.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-iter.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-iter.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-iter.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-mark.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-mark.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-mark.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-mark.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-tag-table.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-tag-table.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-tag-table.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-tag-table.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-tag.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-tag.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-tag.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-tag.c
diff --git a/gtk3/ext/gtk3/rbgtk-text-view.c b/gtk3-no-gi/ext/gtk3/rbgtk-text-view.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-text-view.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-text-view.c
diff --git a/gtk3/ext/gtk3/rbgtk-theming-engine.c b/gtk3-no-gi/ext/gtk3/rbgtk-theming-engine.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-theming-engine.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-theming-engine.c
diff --git a/gtk3/ext/gtk3/rbgtk-toggle-action.c b/gtk3-no-gi/ext/gtk3/rbgtk-toggle-action.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-toggle-action.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-toggle-action.c
diff --git a/gtk3/ext/gtk3/rbgtk-toggle-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-toggle-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-toggle-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-toggle-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-toggle-tool-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-toggle-tool-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-toggle-tool-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-toggle-tool-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-tool-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-tool-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tool-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tool-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-tool-item.c b/gtk3-no-gi/ext/gtk3/rbgtk-tool-item.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tool-item.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tool-item.c
diff --git a/gtk3/ext/gtk3/rbgtk-tool-itemgroup.c b/gtk3-no-gi/ext/gtk3/rbgtk-tool-itemgroup.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tool-itemgroup.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tool-itemgroup.c
diff --git a/gtk3/ext/gtk3/rbgtk-tool-shell.c b/gtk3-no-gi/ext/gtk3/rbgtk-tool-shell.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tool-shell.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tool-shell.c
diff --git a/gtk3/ext/gtk3/rbgtk-toolbar.c b/gtk3-no-gi/ext/gtk3/rbgtk-toolbar.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-toolbar.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-toolbar.c
diff --git a/gtk3/ext/gtk3/rbgtk-tooltip-gdk-display.c b/gtk3-no-gi/ext/gtk3/rbgtk-tooltip-gdk-display.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tooltip-gdk-display.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tooltip-gdk-display.c
diff --git a/gtk3/ext/gtk3/rbgtk-tooltip.c b/gtk3-no-gi/ext/gtk3/rbgtk-tooltip.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tooltip.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tooltip.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-dragdest.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-dragdest.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-dragdest.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-dragdest.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-dragsource.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-dragsource.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-dragsource.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-dragsource.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-iter.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-iter.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-iter.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-iter.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-model.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-model.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-model.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-model.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-modelfilter.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-modelfilter.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-modelfilter.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-modelfilter.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-modelsort.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-modelsort.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-modelsort.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-modelsort.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-path.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-path.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-path.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-path.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-rowreference.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-rowreference.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-rowreference.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-rowreference.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-selection.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-selection.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-selection.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-selection.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-sortable.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-sortable.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-sortable.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-sortable.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-store.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-store.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-store.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-store.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-view-column.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-view-column.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-view-column.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-view-column.c
diff --git a/gtk3/ext/gtk3/rbgtk-tree-view.c b/gtk3-no-gi/ext/gtk3/rbgtk-tree-view.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-tree-view.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-tree-view.c
diff --git a/gtk3/ext/gtk3/rbgtk-ui-manager.c b/gtk3-no-gi/ext/gtk3/rbgtk-ui-manager.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-ui-manager.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-ui-manager.c
diff --git a/gtk3/ext/gtk3/rbgtk-viewport.c b/gtk3-no-gi/ext/gtk3/rbgtk-viewport.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-viewport.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-viewport.c
diff --git a/gtk3/ext/gtk3/rbgtk-volume-button.c b/gtk3-no-gi/ext/gtk3/rbgtk-volume-button.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-volume-button.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-volume-button.c
diff --git a/gtk3/ext/gtk3/rbgtk-widget-path.c b/gtk3-no-gi/ext/gtk3/rbgtk-widget-path.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-widget-path.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-widget-path.c
diff --git a/gtk3/ext/gtk3/rbgtk-widget.c b/gtk3-no-gi/ext/gtk3/rbgtk-widget.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-widget.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-widget.c
diff --git a/gtk3/ext/gtk3/rbgtk-window-group.c b/gtk3-no-gi/ext/gtk3/rbgtk-window-group.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-window-group.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-window-group.c
diff --git a/gtk3/ext/gtk3/rbgtk-window.c b/gtk3-no-gi/ext/gtk3/rbgtk-window.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk-window.c
rename to gtk3-no-gi/ext/gtk3/rbgtk-window.c
diff --git a/gtk3/ext/gtk3/rbgtk.c b/gtk3-no-gi/ext/gtk3/rbgtk.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk.c
rename to gtk3-no-gi/ext/gtk3/rbgtk.c
diff --git a/gtk3/ext/gtk3/rbgtk3.h b/gtk3-no-gi/ext/gtk3/rbgtk3.h
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk3.h
rename to gtk3-no-gi/ext/gtk3/rbgtk3.h
diff --git a/gtk3/ext/gtk3/rbgtk3conversions.h b/gtk3-no-gi/ext/gtk3/rbgtk3conversions.h
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk3conversions.h
rename to gtk3-no-gi/ext/gtk3/rbgtk3conversions.h
diff --git a/gtk3/ext/gtk3/rbgtk3private.h b/gtk3-no-gi/ext/gtk3/rbgtk3private.h
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk3private.h
rename to gtk3-no-gi/ext/gtk3/rbgtk3private.h
diff --git a/gtk3/ext/gtk3/rbgtk3util.c b/gtk3-no-gi/ext/gtk3/rbgtk3util.c
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk3util.c
rename to gtk3-no-gi/ext/gtk3/rbgtk3util.c
diff --git a/gtk3/ext/gtk3/rbgtk3util.h b/gtk3-no-gi/ext/gtk3/rbgtk3util.h
similarity index 100%
rename from gtk3/ext/gtk3/rbgtk3util.h
rename to gtk3-no-gi/ext/gtk3/rbgtk3util.h
diff --git a/gtk3/extconf.rb b/gtk3-no-gi/extconf.rb
similarity index 100%
copy from gtk3/extconf.rb
copy to gtk3-no-gi/extconf.rb
diff --git a/gtk3/lib/gtk3.rb b/gtk3-no-gi/lib/gtk3.rb
similarity index 100%
copy from gtk3/lib/gtk3.rb
copy to gtk3-no-gi/lib/gtk3.rb
diff --git a/gtk3/lib/gtk3/base.rb b/gtk3-no-gi/lib/gtk3/base.rb
similarity index 100%
rename from gtk3/lib/gtk3/base.rb
rename to gtk3-no-gi/lib/gtk3/base.rb
diff --git a/gtk3/lib/gtk3/deprecated.rb b/gtk3-no-gi/lib/gtk3/deprecated.rb
similarity index 100%
copy from gtk3/lib/gtk3/deprecated.rb
copy to gtk3-no-gi/lib/gtk3/deprecated.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/README b/gtk3-no-gi/sample/gtk-demo/README
new file mode 100644
index 0000000..416b053
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/README
@@ -0,0 +1,7 @@
+gtk-demo for Ruby/GTK
+
+To run, do
+
+    ruby main.rb
+
+in this directory.
diff --git a/gtk3-no-gi/sample/gtk-demo/alphatest.png b/gtk3-no-gi/sample/gtk-demo/alphatest.png
new file mode 100644
index 0000000..eb5885f
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/alphatest.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/apple-red.png b/gtk3-no-gi/sample/gtk-demo/apple-red.png
new file mode 100644
index 0000000..b0a24e9
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/apple-red.png differ
diff --git a/gtk3/sample/gtk-demo/appwindow.rb b/gtk3-no-gi/sample/gtk-demo/appwindow.rb
similarity index 100%
rename from gtk3/sample/gtk-demo/appwindow.rb
rename to gtk3-no-gi/sample/gtk-demo/appwindow.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/background.jpg b/gtk3-no-gi/sample/gtk-demo/background.jpg
new file mode 100644
index 0000000..86c006a
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/background.jpg differ
diff --git a/gtk3/sample/gtk-demo/builder.rb b/gtk3-no-gi/sample/gtk-demo/builder.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/builder.rb
copy to gtk3-no-gi/sample/gtk-demo/builder.rb
diff --git a/gtk3/sample/gtk-demo/button_box.rb b/gtk3-no-gi/sample/gtk-demo/button_box.rb
similarity index 100%
rename from gtk3/sample/gtk-demo/button_box.rb
rename to gtk3-no-gi/sample/gtk-demo/button_box.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-arc-negative.rb b/gtk3-no-gi/sample/gtk-demo/cairo-arc-negative.rb
new file mode 100644
index 0000000..f8e54a2
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-arc-negative.rb
@@ -0,0 +1,41 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-arc-negative.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Arc Negative
+
+This demo shows how to use GDK and cairo to draw arc in negative.
+From http://cairographics.org/samples/arc_negative.html.
+=end
+require 'common'
+
+module Demo
+  class CairoArcNegative < CairoWindow
+    CENTER_X = 0.5
+    CENTER_Y = 0.5
+    RADIUS = 0.4
+    ANGLE1 = 45.0 * (Math::PI / 180.0)  # angles are specified
+    ANGLE2 = 180.0 * (Math::PI / 180.0) # in radians
+
+    def initialize
+      super('cairo arc_negative')
+    end
+
+    def draw(cr)
+      cr.arc_negative(CENTER_X, CENTER_Y, RADIUS, ANGLE1, ANGLE2)
+      cr.stroke
+
+      # draw helping lines
+      cr.set_source_rgba(1, 0.2, 0.2, 0.6)
+      cr.arc(CENTER_X, CENTER_Y, 0.05, 0, 2 * Math::PI)
+      cr.fill
+      cr.set_line_width(0.03)
+      cr.arc(CENTER_X, CENTER_Y, RADIUS, ANGLE1, ANGLE1)
+      cr.line_to(CENTER_X, CENTER_Y)
+      cr.arc(CENTER_X, CENTER_Y, RADIUS, ANGLE2, ANGLE2)
+      cr.line_to(CENTER_X, CENTER_Y)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-arc.rb b/gtk3-no-gi/sample/gtk-demo/cairo-arc.rb
new file mode 100644
index 0000000..41de3a8
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-arc.rb
@@ -0,0 +1,41 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-arc.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Arc
+
+This demo shows how to use GDK and cairo to draw arc.
+From http://cairographics.org/samples/arc.html.
+=end
+require 'common'
+
+module Demo
+  class CairoArc < CairoWindow
+    CENTER_X = 0.5
+    CENTER_Y = 0.5
+    RADIUS = 0.4
+    ANGLE1 = 45.0 * (Math::PI / 180.0)  # angles are specified
+    ANGLE2 = 180.0 * (Math::PI / 180.0) # in radians
+
+    def initialize
+      super('cairo arc')
+    end
+
+    def draw(cr)
+      cr.arc(CENTER_X, CENTER_Y, RADIUS, ANGLE1, ANGLE2)
+      cr.stroke
+
+      # draw helping lines
+      cr.set_source_rgba(1, 0.2, 0.2, 0.6)
+      cr.arc(CENTER_X, CENTER_Y, 0.05, 0, 2 * Math::PI)
+      cr.fill
+      cr.set_line_width(0.03)
+      cr.arc(CENTER_X, CENTER_Y, RADIUS, ANGLE1, ANGLE1)
+      cr.line_to(CENTER_X, CENTER_Y)
+      cr.arc(CENTER_X, CENTER_Y, RADIUS, ANGLE2, ANGLE2)
+      cr.line_to(CENTER_X, CENTER_Y)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-clip-image.rb b/gtk3-no-gi/sample/gtk-demo/cairo-clip-image.rb
new file mode 100644
index 0000000..9ab0950
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-clip-image.rb
@@ -0,0 +1,51 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-clip-image.rb,v 1.2 2005/10/16 12:07:32 mutoh Exp $
+=begin
+= cairo/Clip Image
+
+This demo shows how to use GDK and cairo to use clip for image.
+From http://cairographics.org/samples/clip_image.html.
+=end
+require 'common'
+
+module Demo
+  class CairoClipImage < CairoWindow
+    def initialize
+      super('cairo clip image')
+    end
+
+    def draw(cr)
+      cr.save do
+        cr.arc(0.5, 0.5, 0.4, 0, 2 * Math::PI)
+        cr.clip
+
+        cr.new_path
+
+        loader = Gdk::PixbufLoader.new
+        File.open("background.jpg", "rb") do |f|
+          loader.last_write(f.read)
+        end
+        pixbuf = loader.pixbuf
+        cr.scale(1.0 / pixbuf.width, 1.0 / pixbuf.height)
+
+        cr.set_source_pixbuf(pixbuf, 0, 0)
+        cr.paint
+      end
+
+      cr.save do
+        cr.arc(0.5, 0.5, 0.3, 0, 2 * Math::PI)
+        cr.clip
+
+        cr.new_path
+
+        image = Cairo::ImageSurface.from_png("ruby-gnome2-logo.png")
+        cr.scale(1.0 / image.width, 1.0 / image.height)
+
+        cr.set_source(image, 0, 0)
+        cr.paint
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-clip-rectangle.rb b/gtk3-no-gi/sample/gtk-demo/cairo-clip-rectangle.rb
new file mode 100644
index 0000000..a8ae508
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-clip-rectangle.rb
@@ -0,0 +1,35 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-clip-rectangle.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Clip Rectangle
+
+This demo shows how to use GDK and cairo to clip as rectangle.
+From http://cairographics.org/samples/xxx_clip_rectangle.html.
+=end
+require 'common'
+
+module Demo
+  class CairoClipRectangle < CairoWindow
+    def initialize
+      super('cairo clip rectangle')
+    end
+
+    def draw(cr)
+      cr.new_path
+      cr.move_to(0.25, 0.25)
+      cr.line_to(0.25, 0.75)
+      cr.line_to(0.75, 0.75)
+      cr.line_to(0.75, 0.25)
+      cr.line_to(0.25, 0.25)
+      cr.close_path
+
+      cr.clip
+
+      cr.move_to(0, 0)
+      cr.line_to(1, 1)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-clip.rb b/gtk3-no-gi/sample/gtk-demo/cairo-clip.rb
new file mode 100644
index 0000000..3c83e70
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-clip.rb
@@ -0,0 +1,35 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-clip.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Clip
+
+This demo shows how to use GDK and cairo to use clip.
+From http://cairographics.org/samples/clip.html.
+=end
+require 'common'
+
+module Demo
+  class CairoClip < CairoWindow
+    def initialize
+      super('cairo clip')
+    end
+
+    def draw(cr)
+      cr.arc(0.5, 0.5, 0.3, 0, 2 * Math::PI)
+      cr.clip
+
+      cr.new_path
+
+      cr.rectangle(0, 0, 1, 1)
+      cr.fill
+      cr.set_source_rgba(0, 1, 0)
+      cr.move_to(0, 0)
+      cr.line_to(1, 1)
+      cr.move_to(1, 0)
+      cr.line_to(0, 1)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-curve-rectangle.rb b/gtk3-no-gi/sample/gtk-demo/cairo-curve-rectangle.rb
new file mode 100644
index 0000000..44db283
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-curve-rectangle.rb
@@ -0,0 +1,76 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-curve-rectangle.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Curve Rectangle
+
+This demo shows how to use GDK and cairo to draw curve rectangle.
+From http://cairographics.org/samples/curve_rectangle.html.
+=end
+require 'common'
+
+module Demo
+  class CairoCurveRectangle < CairoWindow
+    # a custom shape, that could be wrapped in a function
+    X0 = 0.1 #< parameters like Cairo::Context#rectangle
+    Y0 = 0.1
+    RECT_WIDTH = 0.8
+    RECT_HEIGHT = 0.8
+    RADIUS = 0.4 #< and an approximate curvature radius
+
+    X1 = X0 + RECT_WIDTH
+    Y1 = Y0 + RECT_HEIGHT
+
+    def initialize
+      super('cairo curve rectangle')
+    end
+
+    def draw(cr)
+      return if (RECT_WIDTH <= 0 || RECT_HEIGHT <= 0)
+
+      if (RECT_WIDTH / 2 < RADIUS)
+        if (RECT_HEIGHT / 2 < RADIUS)
+          cr.move_to(X0, (Y0 + Y1) / 2)
+          cr.curve_to(X0 ,Y0, X0, Y0, (X0 + X1) / 2, Y0)
+          cr.curve_to(X1, Y0, X1, Y0, X1, (Y0 + Y1) / 2)
+          cr.curve_to(X1, Y1, X1, Y1, (X1 + X0) / 2, Y1)
+          cr.curve_to(X0, Y1, X0, Y1, X0, (Y0 + Y1) / 2)
+        else
+          cr.move_to(X0, Y0 + RADIUS)
+          cr.curve_to(X0 ,Y0, X0, Y0, (X0 + X1) / 2, Y0)
+          cr.curve_to(X1, Y0, X1, Y0, X1, Y0 + RADIUS)
+          cr.line_to(X1 , Y1 - RADIUS)
+          cr.curve_to(X1, Y1, X1, Y1, (X1 + X0) / 2, Y1)
+          cr.curve_to(X0, Y1, X0, Y1, X0, Y1- RADIUS)
+        end
+      else
+        if (RECT_HEIGHT / 2 < RADIUS)
+          cr.move_to(X0, (Y0 + Y1) / 2)
+          cr.curve_to(X0, Y0, X0 , Y0, X0 + RADIUS, Y0)
+          cr.line_to(X1 - RADIUS, Y0)
+          cr.curve_to(X1, Y0, X1, Y0, X1, (Y0 + Y1) / 2)
+          cr.curve_to(X1, Y1, X1, Y1, X1 - RADIUS, Y1)
+          cr.line_to(X0 + RADIUS, Y1)
+          cr.curve_to(X0, Y1, X0, Y1, X0, (Y0 + Y1) / 2)
+        else
+          cr.move_to(X0, Y0 + RADIUS)
+          cr.curve_to(X0 , Y0, X0 , Y0, X0 + RADIUS, Y0)
+          cr.line_to(X1 - RADIUS, Y0)
+          cr.curve_to(X1, Y0, X1, Y0, X1, Y0 + RADIUS)
+          cr.line_to(X1 , Y1 - RADIUS)
+          cr.curve_to(X1, Y1, X1, Y1, X1 - RADIUS, Y1)
+          cr.line_to(X0 + RADIUS, Y1)
+          cr.curve_to(X0, Y1, X0, Y1, X0, Y1- RADIUS)
+        end
+      end
+
+      cr.close_path
+
+      cr.set_source_rgba(0.5,0.5,1)
+      cr.fill_preserve
+      cr.set_source_rgba(0.5, 0, 0, 0.5)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-curve-to.rb b/gtk3-no-gi/sample/gtk-demo/cairo-curve-to.rb
new file mode 100644
index 0000000..72700e1
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-curve-to.rb
@@ -0,0 +1,43 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-curve-to.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Curve To
+
+This demo shows how to use GDK and cairo to draw curve.
+From http://cairographics.org/samples/curve_to.html.
+=end
+require 'common'
+
+module Demo
+  class CairoCurveTo < CairoWindow
+    X = 0.1
+    Y = 0.5
+    X1 = 0.4
+    Y1 = 0.9
+    X2 = 0.6
+    Y2 = 0.1
+    X3 = 0.9
+    Y3 = 0.5
+
+    def initialize
+      super('cairo curve to')
+    end
+
+    def draw(cr)
+      cr.move_to(X, Y)
+      cr.curve_to(X1, Y1, X2, Y2, X3, Y3)
+
+      cr.stroke
+
+      cr.set_source_rgba(1, 0.2, 0.2, 0.6)
+      cr.set_line_width(0.03)
+      cr.move_to(X, Y)
+      cr.line_to(X1, Y1)
+      cr.move_to(X2, Y2)
+      cr.line_to(X3, Y3)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-dash.rb b/gtk3-no-gi/sample/gtk-demo/cairo-dash.rb
new file mode 100644
index 0000000..6a45dcf
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-dash.rb
@@ -0,0 +1,39 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-dash.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Dash
+
+This demo shows how to use GDK and cairo to show dash.
+From http://cairographics.org/samples/xxx_dash.html.
+=end
+require 'common'
+
+module Demo
+  class CairoDash < CairoWindow
+    def initialize
+      super('cairo dash')
+    end
+
+    def draw(cr)
+      dashes = [
+        0.20,  # in
+        0.05,  # skip
+        0.05,  # ink
+        0.05,  # skip
+      ]
+
+      offset = -0.2
+
+      cr.set_dash(dashes, offset)
+
+      cr.move_to(0.5, 0.1)
+      cr.line_to(0.9, 0.9)
+      cr.rel_line_to(-0.4, 0.0)
+      cr.curve_to(0.2, 0.9, 0.2, 0.5, 0.5, 0.5)
+
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke.rb b/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke.rb
new file mode 100644
index 0000000..83b9172
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke.rb
@@ -0,0 +1,32 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-fill-and-stroke.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Fill And Stroke
+
+This demo shows how to use GDK and cairo to fill and stroke.
+From http://cairographics.org/samples/fill_and_stroke.html.
+=end
+require 'common'
+
+module Demo
+  class CairoFillAndStroke < CairoWindow
+    def initialize
+      super('cairo fill and stroke')
+    end
+
+    def draw(cr)
+      cr.move_to(0.5, 0.1)
+      cr.line_to(0.9, 0.9)
+      cr.rel_line_to(-0.4, 0.0)
+      cr.curve_to(0.2, 0.9, 0.2, 0.5, 0.5, 0.5)
+      cr.close_path
+
+      cr.set_source_rgba(0, 0, 1)
+      cr.fill_preserve
+      cr.set_source_rgba(0, 0, 0)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke2.rb b/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke2.rb
new file mode 100644
index 0000000..9ef7207
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-fill-and-stroke2.rb
@@ -0,0 +1,38 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-fill-and-stroke2.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Fill And Stroke2
+
+This demo shows how to use GDK and cairo to fill and stroke.
+From http://cairographics.org/samples/fill_and_stroke2.html.
+=end
+require 'common'
+
+module Demo
+  class CairoFillAndStroke2 < CairoWindow
+    def initialize
+      super('cairo fill and stroke2')
+    end
+
+    def draw(cr)
+      cr.move_to(0.5, 0.1)
+      cr.line_to(0.9, 0.9)
+      cr.rel_line_to(-0.4, 0.0)
+      cr.curve_to(0.2, 0.9, 0.2, 0.5, 0.5, 0.5)
+      cr.close_path
+
+      cr.move_to(0.25, 0.1)
+      cr.rel_line_to(0.2, 0.2)
+      cr.rel_line_to(-0.2, 0.2)
+      cr.rel_line_to(-0.2, -0.2)
+      cr.close_path
+
+      cr.set_source_rgba(0, 0, 1)
+      cr.fill_preserve
+      cr.set_source_rgba(0, 0, 0)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-gradient.rb b/gtk3-no-gi/sample/gtk-demo/cairo-gradient.rb
new file mode 100644
index 0000000..c3beb24
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-gradient.rb
@@ -0,0 +1,35 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-gradient.rb,v 1.2 2005/10/12 15:23:49 ktou Exp $
+=begin
+= cairo/Gradient
+
+This demo shows how to use GDK and cairo to gradient.
+From http://cairographics.org/samples/gradient.html.
+=end
+require 'common'
+
+module Demo
+  class CairoGradient < CairoWindow
+    def initialize
+      super('cairo gradient')
+    end
+
+    def draw(cr)
+      pat = Cairo::LinearPattern.new(0.0, 0.0,  0.0, 1.0)
+      pat.add_color_stop_rgb(1, 0, 0, 0)
+      pat.add_color_stop_rgb(0, 1, 0, 0)
+      cr.rectangle(0, 0, 1, 1)
+      cr.set_source(pat)
+      cr.fill
+
+      pat = Cairo::RadialPattern.new(0.45, 0.4, 0.1, 0.4, 0.4, 0.5)
+      pat.add_color_stop_rgba(0, 1, 1, 1, 0.8)
+      pat.add_color_stop_rgba(1, 0, 0, 0)
+      cr.set_source(pat)
+      cr.arc(0.5, 0.5, 0.3, 0, 2 * Math::PI)
+      cr.fill
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-image-pattern.rb b/gtk3-no-gi/sample/gtk-demo/cairo-image-pattern.rb
new file mode 100644
index 0000000..92433b6
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-image-pattern.rb
@@ -0,0 +1,39 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-image-pattern.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Image Pattern
+
+This demo shows how to use GDK and cairo to use image pattern.
+From http://cairographics.org/samples/imagepattern.html.
+=end
+require 'common'
+
+module Demo
+  class CairoImagePattern < CairoWindow
+    def initialize
+      super('cairo image pattern')
+    end
+
+    def draw(cr)
+      image = Cairo::ImageSurface.from_png("ruby-gnome2-logo.png")
+
+      pattern = Cairo::SurfacePattern.new(image)
+      pattern.set_extend(Cairo::EXTEND_REPEAT)
+
+      cr.translate(0.5, 0.5)
+      cr.rotate(Math::PI / 4)
+      cr.scale(1 / Math.sqrt(2), 1 / Math.sqrt(2))
+      cr.translate(-0.5, -0.5)
+
+      matrix = Cairo::Matrix.scale(image.width * 5, image.height * 5)
+      pattern.set_matrix(matrix)
+
+      cr.set_source(pattern)
+
+      cr.rectangle(0, 0, 1.0, 1.0)
+      cr.fill
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-image.rb b/gtk3-no-gi/sample/gtk-demo/cairo-image.rb
new file mode 100644
index 0000000..f108f95
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-image.rb
@@ -0,0 +1,49 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-image.rb,v 1.2 2005/10/16 12:07:32 mutoh Exp $
+=begin
+= cairo/Image
+
+This demo shows how to use GDK and cairo to show image.
+From http://cairographics.org/samples/image.html.
+=end
+require 'common'
+
+module Demo
+  class CairoImage < CairoWindow
+    def initialize
+      super('cairo gradient')
+    end
+
+    def draw(cr)
+      cr.save do
+        loader = Gdk::PixbufLoader.new
+        File.open("background.jpg", "rb") do |f|
+          loader.last_write(f.read)
+        end
+        pixbuf = loader.pixbuf
+
+        cr.translate(0.5, 0.5)
+        cr.rotate(45 * Math::PI / 180)
+        cr.scale(1.0 / pixbuf.width, 1.0 / pixbuf.height)
+        cr.translate(-0.5 * pixbuf.width, -0.5 * pixbuf.height)
+
+        cr.set_source_pixbuf(pixbuf, 0, 0)
+        cr.paint
+      end
+
+      cr.save do
+        image = Cairo::ImageSurface.from_png("ruby-gnome2-logo.png")
+
+        cr.translate(0.5, 0.5)
+        cr.rotate(60 * Math::PI / 180)
+        cr.scale(0.8 / image.width, 0.8 / image.height)
+        cr.translate(-0.5 * image.width, -0.5 * image.height)
+
+        cr.set_source(image, 0, 0)
+        cr.paint
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-line-cap.rb b/gtk3-no-gi/sample/gtk-demo/cairo-line-cap.rb
new file mode 100644
index 0000000..1622d6b
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-line-cap.rb
@@ -0,0 +1,53 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-line-cap.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Line Cap
+
+This demo shows how to use GDK and cairo to set line cap.
+From http://cairographics.org/samples/set_line_cap.html.
+=end
+require 'common'
+
+module Demo
+  class CairoLineCap < CairoWindow
+    def initialize
+      super('cairo line cap')
+    end
+
+    def draw(cr)
+      cr.set_line_width(0.12)
+
+      cr.set_line_cap(Cairo::LINE_CAP_BUTT) # default
+      cr.move_to(0.25, 0.2)
+      cr.line_to(0.25, 0.8)
+      cr.stroke
+
+      cr.set_line_cap(Cairo::LINE_CAP_ROUND)
+      cr.move_to(0.5, 0.2)
+      cr.line_to(0.5, 0.8)
+      cr.stroke
+
+      cr.set_line_cap(Cairo::LINE_CAP_SQUARE)
+      cr.move_to(0.75, 0.2)
+      cr.line_to(0.75, 0.8)
+      cr.stroke
+
+      # draw helping lines
+      cr.set_source_rgba(1, 0.2, 0.2)
+      cr.set_line_width(0.01)
+
+      cr.move_to(0.25, 0.2)
+      cr.line_to(0.25, 0.8)
+
+      cr.move_to(0.5, 0.2)
+      cr.line_to(0.5, 0.8)
+
+      cr.move_to(0.75, 0.2)
+      cr.line_to(0.75, 0.8)
+
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-line-join.rb b/gtk3-no-gi/sample/gtk-demo/cairo-line-join.rb
new file mode 100644
index 0000000..40f2e22
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-line-join.rb
@@ -0,0 +1,41 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-line-join.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Line Join
+
+This demo shows how to use GDK and cairo to set line join.
+From http://cairographics.org/samples/set_line_join.html.
+=end
+require 'common'
+
+module Demo
+  class CairoLineJoin < CairoWindow
+    def initialize
+      super('cairo line join')
+    end
+
+    def draw(cr)
+      cr.set_line_width(0.16)
+
+      cr.move_to(0.3, 0.33)
+      cr.rel_line_to(0.2, -0.2)
+      cr.rel_line_to(0.2, 0.2)
+      cr.set_line_join(Cairo::LINE_JOIN_MITER) # default
+      cr.stroke
+
+      cr.move_to(0.3, 0.63)
+      cr.rel_line_to(0.2, -0.2)
+      cr.rel_line_to(0.2, 0.2)
+      cr.set_line_join(Cairo::LINE_JOIN_BEVEL)
+      cr.stroke
+
+      cr.move_to(0.3, 0.93)
+      cr.rel_line_to(0.2, -0.2)
+      cr.rel_line_to(0.2, 0.2)
+      cr.set_line_join(Cairo::LINE_JOIN_ROUND)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-long-lines.rb b/gtk3-no-gi/sample/gtk-demo/cairo-long-lines.rb
new file mode 100644
index 0000000..498b974
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-long-lines.rb
@@ -0,0 +1,41 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-long-lines.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Long Lines
+
+This demo shows how to use GDK and cairo to show long lines.
+From http://cairographics.org/samples/xxx_long_liens.html.
+=end
+require 'common'
+
+module Demo
+  class CairoLongLines < CairoWindow
+    def initialize
+      super('cairo long lines')
+    end
+
+    def draw(cr)
+      cr.move_to(0.1, -50)
+      cr.line_to(0.1, 50)
+      cr.set_source_rgba(1, 0, 0)
+      cr.stroke
+
+      cr.move_to(0.2, -60)
+      cr.line_to(0.2, 60)
+      cr.set_source_rgba(1, 1, 0)
+      cr.stroke
+
+      cr.move_to(0.3, -70)
+      cr.line_to(0.3, 70)
+      cr.set_source_rgba(0, 1, 0)
+      cr.stroke
+
+      cr.move_to(0.4, -80)
+      cr.line_to(0.4, 80)
+      cr.set_source_rgba(0, 0, 1)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-operator.rb b/gtk3-no-gi/sample/gtk-demo/cairo-operator.rb
new file mode 100644
index 0000000..dd1a6cf
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-operator.rb
@@ -0,0 +1,83 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-operator.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Operator
+
+This demo shows how to use GDK and cairo to use Cairo::OPERATOR_*
+From http://cairographics.org/samples/operator_add.html,
+     http://cairographics.org/samples/operator_atop.html,
+     http://cairographics.org/samples/operator_atop_reverse.html,
+     http://cairographics.org/samples/operator_in.html,
+     http://cairographics.org/samples/operator_in_reverse.html,
+     http://cairographics.org/samples/operator_out.html,
+     http://cairographics.org/samples/operator_out_reverse.html,
+     http://cairographics.org/samples/operator_over.html,
+     http://cairographics.org/samples/operator_over_reverse.html,
+     http://cairographics.org/samples/operator_saturate.html and
+     http://cairographics.org/samples/operator_xor.html
+=end
+require "common"
+
+module Demo
+  class CairoOperator < CairoWindow
+    def initialize
+      super("cairo operator")
+      @operator = Cairo::OPERATOR_ADD
+
+      set_default_size(400, 400)
+
+      @drawing_area = child
+      remove(@drawing_area)
+
+      vbox = Gtk::Box.new(:vertical)
+      vbox.pack_start(@drawing_area, :expand => true, :fill => true)
+      vbox.pack_start(operator_selector, :expand => false, :fill => false)
+      add(vbox)
+    end
+
+    def draw(cr)
+      cr.save do
+        image = Cairo::ImageSurface.from_png("ruby-gnome2-logo.png")
+        cr.translate(0.5, 0.5)
+        cr.rotate(-45 * Math::PI / 180)
+        cr.scale(0.8 / image.width, 0.8 / image.height)
+        cr.translate(-0.5 * image.width, -0.5 * image.height)
+        cr.set_source(image, 0.0, 0.0)
+        cr.paint
+      end
+
+      cr.set_operator(@operator)
+
+      cr.set_source_rgba(1, 0, 0, 0.5)
+      cr.rectangle(0.2, 0.2, 0.5, 0.5)
+      cr.fill
+      cr.set_source_rgba(0, 1, 0)
+      cr.rectangle(0.4, 0.4, 0.4, 0.4)
+      cr.fill
+      cr.set_source_rgba(0, 0, 1)
+      cr.rectangle(0.6, 0.6, 0.3, 0.3)
+      cr.fill
+    end
+
+    def operator_selector
+      combo = Gtk::ComboBoxText.new
+      operators = []
+      Cairo.constants.each do |name|
+        operators << name if /^OPERATOR_/ =~ name
+      end
+      operators.sort.each_with_index do |name, i|
+        combo.append_text(name.to_s)
+        combo.set_active(i) if Cairo.const_get(name) == @operator
+      end
+
+      combo.signal_connect("changed") do |widget|
+        text = widget.active_text
+        @operator = Cairo.const_get(text) if text
+        @drawing_area.queue_draw
+      end
+      combo
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-path.rb b/gtk3-no-gi/sample/gtk-demo/cairo-path.rb
new file mode 100644
index 0000000..7f1dded
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-path.rb
@@ -0,0 +1,28 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-path.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Path
+
+This demo shows how to use GDK and cairo to draw path.
+From http://cairographics.org/samples/path.html.
+=end
+require 'common'
+
+module Demo
+  class CairoPath < CairoWindow
+    def initialize
+      super('cairo path')
+    end
+
+    def draw(cr)
+      cr.move_to(0.5, 0.1)
+      cr.line_to(0.9, 0.9)
+      cr.rel_line_to(-0.4, 0.0)
+      cr.curve_to(0.2, 0.9, 0.2, 0.5, 0.5, 0.5)
+
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-pattern-fill.rb b/gtk3-no-gi/sample/gtk-demo/cairo-pattern-fill.rb
new file mode 100644
index 0000000..8847245
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-pattern-fill.rb
@@ -0,0 +1,88 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-pattern-fill.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Pattern Fill
+
+This demo shows how to use GDK and cairo to fill by pattern.
+From http://cairographics.org/samples/pattern_fill.html.
+=end
+require 'common'
+
+module Demo
+  class CairoPatternFill < CairoWindow
+    X_FUZZ = 0.08
+    Y_FUZZ = 0.08
+
+    X_INNER_RADIUS = 0.3
+    Y_INNER_RADIUS = 0.2
+
+    X_OUTER_RADIUS = 0.45
+    Y_OUTER_RADIUS = 0.35
+
+    SPIKES = 10
+
+    TEXT = "Ruby!"
+
+    def initialize
+      super('cairo pattern fill')
+    end
+
+    def draw(cr)
+      srand(45)
+
+      cr.set_line_width(0.01)
+
+      x = y = nil
+      0.step(SPIKES * 2 - 1, 2) do |i|
+        x = x_position(i, X_INNER_RADIUS)
+        y = y_position(i, Y_INNER_RADIUS)
+
+        if (i == 0)
+          cr.move_to(x, y)
+        else
+          cr.line_to(x, y)
+        end
+
+        i += 1
+
+        x = x_position(i, X_OUTER_RADIUS)
+        y = y_position(i, Y_OUTER_RADIUS)
+
+        cr.line_to(x, y)
+      end
+
+      cr.close_path
+      cr.stroke
+
+      cr.select_font_face("Sans",
+                          Cairo::FONT_SLANT_NORMAL,
+                          Cairo::FONT_WEIGHT_BOLD)
+
+      cr.move_to(x - 0.5, y)
+      cr.set_font_size(0.1)
+      cr.text_path(TEXT)
+      cr.set_source_rgba(1, 0, 0.5)
+      cr.fill
+
+      cr.set_font_size(0.2)
+      extents = cr.text_extents(TEXT)
+      x = 0.5 - (extents.width / 2 + extents.x_bearing)
+      y = 0.5 - (extents.height / 2 + extents.y_bearing)
+
+      cr.move_to(x, y)
+      cr.text_path(TEXT)
+      cr.set_source_rgba(1, 0, 0)
+      cr.stroke
+    end
+
+    def x_position(i, radius)
+      0.5 + Math.cos(Math::PI * i / SPIKES) * radius + rand * X_FUZZ
+    end
+
+    def y_position(i, radius)
+      0.5 + Math.sin(Math::PI * i / SPIKES) * radius + rand * Y_FUZZ
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-self-intersect.rb b/gtk3-no-gi/sample/gtk-demo/cairo-self-intersect.rb
new file mode 100644
index 0000000..c8e6566
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-self-intersect.rb
@@ -0,0 +1,32 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-self-intersect.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Self Intersect
+
+This demo shows how to use GDK and cairo to show cross.
+From http://cairographics.org/samples/xxx_self_intersect.html.
+=end
+require 'common'
+
+module Demo
+  class CairoSelfIntersect < CairoWindow
+    def initialize
+      super('cairo self intersect')
+    end
+
+    def draw(cr)
+      cr.move_to(0.3, 0.3)
+      cr.line_to(0.7, 0.3)
+
+      cr.line_to(0.5, 0.3)
+      cr.line_to(0.5, 0.7)
+
+      cr.set_line_width(0.22)
+      cr.set_line_cap(Cairo::LINE_CAP_ROUND)
+      cr.set_line_join(Cairo::LINE_JOIN_ROUND)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-text-align-center.rb b/gtk3-no-gi/sample/gtk-demo/cairo-text-align-center.rb
new file mode 100644
index 0000000..672d6ab
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-text-align-center.rb
@@ -0,0 +1,45 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-text-align-center.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Text Align Center
+
+This demo shows how to use GDK and cairo to show text in center.
+From http://cairographics.org/samples/text_align_center.html.
+=end
+require 'common'
+
+module Demo
+  class CairoTextAlignCenter < CairoWindow
+    TEXT = "Ruby"
+
+    def initialize
+      super('cairo text align center')
+    end
+
+    def draw(cr)
+      cr.select_font_face("Sans",
+                          Cairo::FONT_SLANT_NORMAL,
+                          Cairo::FONT_WEIGHT_NORMAL)
+
+      cr.set_font_size(0.2)
+      extents = cr.text_extents(TEXT)
+      x = 0.5 - (extents.width / 2 + extents.x_bearing)
+      y = 0.5 - (extents.height / 2 + extents.y_bearing)
+
+      cr.move_to(x, y)
+      cr.show_text(TEXT)
+
+      # draw helping lines
+      cr.set_source_rgba(1, 0.2, 0.2, 0.6)
+      cr.arc(x, y, 0.05, 0, 2 * Math::PI)
+      cr.fill
+      cr.move_to(0.5, 0)
+      cr.rel_line_to(0, 1)
+      cr.move_to(0, 0.5)
+      cr.rel_line_to(1, 0)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-text-extents.rb b/gtk3-no-gi/sample/gtk-demo/cairo-text-extents.rb
new file mode 100644
index 0000000..648df7b
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-text-extents.rb
@@ -0,0 +1,46 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-text-extents.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Text Extents
+
+This demo shows how to use GDK and cairo to show text extents.
+From http://cairographics.org/samples/text.html.
+=end
+require 'common'
+
+module Demo
+  class CairoTextExtents < CairoWindow
+    TEXT = "Ruby"
+
+    def initialize
+      super('cairo text')
+    end
+
+    def draw(cr)
+      cr.select_font_face("Sans",
+                              Cairo::FONT_SLANT_NORMAL,
+                              Cairo::FONT_WEIGHT_NORMAL)
+
+      cr.set_font_size(0.3)
+      extents = cr.text_extents(TEXT)
+
+      x = 0.1
+      y = 0.6
+
+      cr.move_to(x, y)
+      cr.show_text(TEXT)
+
+      # draw helping lines
+      cr.set_source_rgba(1, 0.2, 0.2, 0.6)
+      cr.arc(x, y, 0.05, 0, 2 * Math::PI)
+      cr.fill
+      cr.move_to(x, y)
+      cr.rel_line_to(0, -extents.height)
+      cr.rel_line_to(extents.width, 0)
+      cr.rel_line_to(extents.x_bearing, -extents.y_bearing)
+      cr.stroke
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/cairo-text.rb b/gtk3-no-gi/sample/gtk-demo/cairo-text.rb
new file mode 100644
index 0000000..15d3e62
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/cairo-text.rb
@@ -0,0 +1,43 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: cairo-text.rb,v 1.1 2005/10/12 05:38:30 ktou Exp $
+=begin
+= cairo/Text
+
+This demo shows how to use GDK and cairo to show text.
+From http://cairographics.org/samples/text.html.
+=end
+require 'common'
+
+module Demo
+  class CairoText < CairoWindow
+    def initialize
+      super('cairo text')
+    end
+
+    def draw(cr)
+      cr.select_font_face("Sans",
+                          Cairo::FONT_SLANT_NORMAL,
+                          Cairo::FONT_WEIGHT_BOLD)
+      cr.set_font_size(0.35)
+
+      cr.move_to(0.04, 0.53)
+      cr.show_text("Hello")
+
+      cr.move_to(0.27, 0.65)
+      cr.text_path("void")
+      cr.set_source_rgba(0.5, 0.5, 1)
+      cr.fill_preserve
+      cr.set_source_rgba(0, 0, 0)
+      cr.set_line_width(0.01)
+      cr.stroke
+
+      # draw helping lines
+      cr.set_source_rgba(1,0.2,0.2, 0.6)
+      cr.arc(0.04, 0.53, 0.02, 0, 2 * Math::PI)
+      cr.arc(0.27, 0.65, 0.02, 0, 2 * Math::PI)
+      cr.fill
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/changedisplay.rb b/gtk3-no-gi/sample/gtk-demo/changedisplay.rb
new file mode 100644
index 0000000..05e0ecf
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/changedisplay.rb
@@ -0,0 +1,407 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: changedisplay.rb,v 1.6 2005/07/30 11:22:15 mutoh Exp $
+=begin
+= Change Display
+
+Demonstrates migrating a window between different displays and
+screens. A display is a mouse and keyboard with some number of
+associated monitors. A screen is a set of monitors grouped
+into a single physical work area. The neat thing about having
+multiple displays is that they can be on a completely separate
+computers, as long as there is a network connection to the
+computer where the application is running.
+
+Only some of the windowing systems where GTK+ runs have the
+concept of multiple displays and screens. (The X Window System
+is the main example.) Other windowing systems can only
+handle one keyboard and mouse, and combine all monitors into
+a single screen.
+
+This is a moderately complex example, and demonstrates:
+
+- Tracking the currently open displays and screens
+
+- Changing the screen for a window
+
+- Letting the user choose a window by clicking on it
+
+- Using Gtk::ListStore and Gtk::TreeView
+
+- Using Gtk::Dialog
+=end
+
+require 'common'
+
+module Demo
+  class ChangeDisplay < Gtk::Dialog
+    # These enumerations provide symbolic names for the columns
+    # in the two GtkListStore models.
+    DISPLAY_COLUMN_NAME, DISPLAY_COLUMN_DISPLAY = 0, 1
+    SCREEN_COLUMN_NUMBER, SCREEN_COLUMN_SCREEN = 0, 1
+
+    # Main entry point. If the dialog for this demo doesn't yet exist, creates
+    # it. Otherwise, destroys it.
+    def initialize
+      @size_group = nil
+
+      @display_model = nil
+      @screen_model = nil
+
+      @screen_selection = nil
+
+      @current_display = nil
+      @current_screen = nil
+
+      super(
+        :title => 'Change Screen or display',
+        :buttons => [
+          [:close, :close],
+          ['Change', :ok]
+        ]
+      )
+
+      set_default_size(300, 400)
+      signal_connect('response') do |dialog, response_id|
+        if response_id == Gtk::ResponseType::OK
+          query_change_display
+        else
+          destroy
+        end
+      end
+
+      vbox = Gtk::Box.new(:vertical, 5)
+      vbox.set_border_width(8)
+
+      self.child.pack_start(vbox, :expand => true, :fill => true)
+
+      @size_group = Gtk::SizeGroup.new(:horizontal)
+
+      frame = create_display_frame
+      vbox.pack_start(frame, :expand => true, :fill => true)
+
+      frame = create_screen_frame
+      vbox.pack_start(frame, :expand => true, :fill => true)
+
+      initialize_displays
+    end
+
+    # Adds all currently open displays to our list of displays,
+    # and set up a signal connection so that we'll be notified
+    # when displays are opened in the future as well.
+    def initialize_displays
+      manager = Gdk::DisplayManager.get
+
+      manager.displays.each do |display|
+        add_display(display)
+      end
+
+      handler_id = manager.signal_connect('display_opened') do |display|
+        add_display(display)
+      end
+      signal_connect('destroy') do
+        manager.signal_handler_disconnect(handler_id)
+      end
+    end
+
+    # Fills in the screen list based on the current display
+    def fill_screens
+      @screen_model.clear
+
+      if @current_display
+        n_screens = @current_display.n_screens
+
+        n_screens.times do |i|
+          iter = @screen_model.append
+          iter.set_value(SCREEN_COLUMN_NUMBER, i)
+          iter.set_value(SCREEN_COLUMN_SCREEN, @current_display.get_screen(i))
+
+          if i == 0
+            @screen_selection.select_iter(iter)
+          end
+        end
+      end
+    end
+
+    # Creates the 'Display' frame in the main window.
+    def create_display_frame
+      frame, tree_view, button_vbox = create_frame('Display')
+
+      button = left_align_button_new('_Open…')
+      button.signal_connect('clicked') do
+        open_display_cb
+      end
+      button_vbox.pack_start(button, :expand => false, :fill => false, :padding => 0)
+
+      button = left_align_button_new('_Close')
+      button.signal_connect('clicked') do
+        if @current_display
+          @current_display.close
+        end
+      end
+      button_vbox.pack_start(button, :expand => false, :fill => false, :padding => 0)
+
+      @display_model = Gtk::ListStore.new(String, Gdk::Display)
+      tree_view.model = @display_model
+
+      column = Gtk::TreeViewColumn.new('Name',
+                                       Gtk::CellRendererText.new,
+                                       {'text' => DISPLAY_COLUMN_NAME})
+      tree_view.append_column(column)
+
+      selection = tree_view.selection
+      selection.signal_connect('changed') do
+        display_changed_cb(selection)
+      end
+
+      return frame
+    end
+
+    # Creates the 'Screen' frame in the main window.
+    def create_screen_frame
+      frame, tree_view, button_vbox = create_frame('Screen')
+
+      @screen_model = Gtk::ListStore.new(Integer, Gdk::Screen)
+      tree_view.model = @screen_model
+
+      column = Gtk::TreeViewColumn.new('Number',
+                                       Gtk::CellRendererText.new,
+                                       {'text' => SCREEN_COLUMN_NUMBER})
+      tree_view.append_column(column)
+
+      @screen_selection = tree_view.selection
+      @screen_selection.signal_connect('changed') do |selection|
+        @current_screen = if iter = selection.selected
+                            iter.get_value(SCREEN_COLUMN_SCREEN)
+                          else
+                            nil
+                          end
+      end
+
+      return frame
+    end
+
+    # This function is used both for creating the 'Display' and
+    # 'Screen' frames, since they have a similar structure. The
+    # caller hooks up the right context for the value returned
+    # in tree_view, and packs any relevant buttons into button_vbox.
+    def create_frame(title)
+      frame = Gtk::Frame.new(title)
+
+      hbox = Gtk::Box.new(:horizontal, 8)
+      hbox.set_border_width(8)
+      frame.add(hbox)
+
+      scrollwin = Gtk::ScrolledWindow.new
+      scrollwin.set_policy(:never, :automatic)
+      scrollwin.shadow_type = :in
+      hbox.pack_start(scrollwin, :expand => true, :fill => true)
+
+      tree_view = Gtk::TreeView.new
+      tree_view.headers_visible = false
+      scrollwin.add(tree_view)
+
+      selection = tree_view.selection
+      selection.mode = :browse
+
+      button_vbox = Gtk::Box.new(:vertical, 5)
+      hbox.pack_start(button_vbox, :expand => false, :fill => false)
+
+      @size_group.add_widget(button_vbox)
+
+      return frame, tree_view, button_vbox
+    end
+
+    # If we have a stack of buttons, it often looks better if their contents
+    # are left-aligned, rather than centered. This function creates a button
+    # and left-aligns it contents.
+    def left_align_button_new(label)
+      button = Gtk::Button.new(:mnemonic => label)
+      button.child.set_alignment(0.0, 0.5)
+
+      return button
+    end
+
+
+    # Prompts the user for a toplevel window to move, and then moves
+    # that window to the currently selected display
+    def query_change_display
+      screen = self.screen
+
+      toplevel = query_for_toplevel(screen,
+                                    "Please select the toplevel\n"+
+                                    "to move to the new screen")
+
+      if toplevel
+        toplevel.screen = @current_screen
+      else
+        screen.display.beep
+      end
+    end
+
+    # Asks the user to click on a window, then waits for them click
+    # the mouse. When the mouse is released, returns the toplevel
+    # window under the pointer, or nil, if there is none.
+    def query_for_toplevel(screen, prompt)
+      toplevel = nil
+
+      display = screen.display
+
+      popup = Gtk::Window.new(:popup)
+      popup.screen = screen
+      popup.modal = true
+      popup.window_position = :center
+
+      frame = Gtk::Frame.new
+      frame.set_shadow_type(:out)
+      popup.add(frame)
+
+      label = Gtk::Label.new(prompt)
+      label.set_padding(10, 10)
+      frame.add(label)
+
+      popup.show_all
+
+      # TODO: Gdk::Cursor.new(screen.display, Gdk::Cursor::CROSSHAIR)
+      cursor = Gdk::Cursor.new(:crosshair)
+
+      if Gdk::pointer_grab(
+        popup.window,
+        false,
+        :button_release_mask,
+        nil,
+        cursor,
+        Gdk::Event::CURRENT_TIME
+      ) == Gdk::GRAB_SUCCESS
+      clicked = false
+
+        popup.signal_connect('button-release-event') do
+          clicked = true
+        end
+
+        # Process events until clicked is set by button_release_event_cb.
+        # We pass in may_block = true since we want to wait if there
+        # are no events currently.
+        until clicked
+          Gtk.main_iteration # TODO: GLib::main_context_iteration(nil, true)
+
+          toplevel = find_toplevel_at_pointer(screen.display)
+          if toplevel == popup
+            toplevel = nil
+          end
+        end
+
+        popup.destroy
+        Gdk.flush # Really release the grab
+
+        return toplevel
+      end
+    end
+
+    # Finds the toplevel window under the mouse pointer, if any.
+    def find_toplevel_at_pointer(display)
+      pointer_window, x, y = display.window_at_pointer
+
+      # The user data field of a GdkWindow is used to store a pointer
+      # to the widget that created it.
+      if pointer_window
+        widget = pointer_window.user_data
+      end
+
+      return (if widget
+                widget.toplevel
+              else
+                nil
+              end)
+    end
+
+    # Called when the user clicks on 'Open...' in the display
+    # frame. Prompts for a new display, and then opens a connection
+    # to that display.
+    def open_display_cb
+      dialog = Gtk::Dialog.new(
+        :title => 'Open Display',
+        :parent => self,
+        :flags => :modal,
+        :buttons => [
+          [:cancel, :cancel],
+          [:ok, :ok]
+         ]
+      )
+
+      dialog.default_response = Gtk::ResponseType::OK
+      display_entry = Gtk::Entry.new
+      display_entry.activates_default = true
+      dialog_label =
+        Gtk::Label.new("Please enter the name of\nthe new display\n")
+
+      dialog.child.add(dialog_label)
+      dialog.child.add(display_entry)
+
+      display_entry.grab_focus
+      dialog.child.show_all
+
+      result = nil
+      until result
+        response_id = dialog.run
+        break if response_id != Gtk::ResponseType::OK
+
+        new_screen_name = display_entry.text
+
+        unless new_screen_name.empty?
+          begin
+            result = Gdk::Dispaly.open(new_screen_name)
+          rescue
+            dialog_label.text = "Can't open display :\n\t%s\nplease try another one\n" % [new_screen_name]
+          end
+        end
+      end
+      dialog.destroy
+    end
+
+    # Called when the selected row in the display list changes.
+    # Updates info.current_display, then refills the list of
+    # screens.
+    def display_changed_cb(selection)
+      @current_display =
+        if iter = selection.selected
+          iter.get_value(DISPLAY_COLUMN_DISPLAY)
+        else
+          nil
+        end
+      fill_screens
+    end
+
+    # Adds a new display to our list of displays, and connects
+    # to the 'closed' signal so that we can remove it from the
+    # list of displays again.
+    def add_display(display)
+      iter = @display_model.append
+      iter.set_value(DISPLAY_COLUMN_NAME, display.name)
+      iter.set_value(DISPLAY_COLUMN_DISPLAY, display)
+
+      handler_id = display.signal_connect('closed') do
+        display_closed_cb(display)
+      end
+
+      signal_connect('destroy') do
+        display.signal_handler_disconnect(handler_id)
+      end
+    end
+
+    # Called when one of the currently open displays is closed.
+    # Remove it from our list of displays.
+    def display_closed_cb(display)
+      @display_model.each do |model, path, iter|
+        tmp_display = iter.get_value( DISPLAY_COLUMN_DISPLAY)
+        if tmp_display == display
+          @display_model.remove(iter)
+          break
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/clipboard.rb b/gtk3-no-gi/sample/gtk-demo/clipboard.rb
new file mode 100644
index 0000000..99b29bd
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/clipboard.rb
@@ -0,0 +1,67 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+# $Id: clipboard.rb,v 1.3 2005/07/28 14:30:38 mutoh Exp $
+=begin
+= Clipboard
+
+GtkClipboard is used for clipboard handling. This demo shows how to
+copy and paste text to and from the clipboard.
+=end
+
+require 'common'
+
+module Demo
+  class Clipboard < Demo::BasicWindow
+    def initialize
+      super('Clipboard')
+
+      vbox = Gtk::Box.new(:vertical)
+      vbox.border_width = 8
+
+      add(vbox)
+
+      label = Gtk::Label.new(%Q["Copy" will copy the text\nin the entry to the clipboard])
+
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      hbox = Gtk::Box.new(:horizontal, 0)
+      hbox.border_width = 8
+      vbox.pack_start(hbox, :expand => false, :fill => false, :padding => 0)
+
+      # Create the first entry
+      entry = Gtk::Entry.new
+      hbox.pack_start(entry, :expand => true, :fill => true, :padding => 0)
+
+      # Create the button
+      button = Gtk::Button.new(:stock_id => :copy)
+      hbox.pack_start(button, :expand => false, :fill => false, :padding => 0)
+      button.signal_connect('clicked', entry) do |w, e|
+        clipboard = e.get_clipboard(Gdk::Selection::CLIPBOARD)
+        clipboard.text = e.text
+      end
+
+      label = Gtk::Label.new(%Q["Paste" will paste the text from the clipboard to the entry])
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      hbox = Gtk::Box.new(:horizontal, 4)
+      hbox.border_width = 8
+      vbox.pack_start(hbox, :expand => false, :fill => false, :padding => 0)
+
+      # Create the second entry
+      entry = Gtk::Entry.new
+      hbox.pack_start(entry, :expand => true, :fill => true, :padding => 0)
+
+      # Create the button
+      button = Gtk::Button.new(:stock_id => :paste)
+      hbox.pack_start(button, :expand => false, :fill => false, :padding => 0)
+      button.signal_connect('clicked', entry) do |w, e|
+        clipboard = e.get_clipboard(Gdk::Selection::CLIPBOARD)
+        clipboard.request_text do |board, text, data|
+          e.text = text
+        end
+      end
+
+    end
+  end
+end
+
diff --git a/gtk3-no-gi/sample/gtk-demo/colorsel.rb b/gtk3-no-gi/sample/gtk-demo/colorsel.rb
new file mode 100644
index 0000000..8f8193d
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/colorsel.rb
@@ -0,0 +1,82 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: colorsel.rb,v 1.4 2005/02/12 23:02:43 kzys Exp $
+=begin
+= Color Selector
+
+Gtk::ColorSelection lets the user choose a color. Gtk::ColorSelectionDialog
+is a prebuilt dialog containing a Gtk::ColorSelection.
+=end
+require 'common'
+
+module Demo
+  class ColorSel < BasicWindow
+    def initialize
+      super('Color Selection')
+
+      @color = Gdk::RGBA.new(0, 0, 1, 1)
+
+      set_border_width(8)
+
+      vbox = Gtk::Box.new(:vertical, 0)
+      vbox.set_border_width(8)
+      add(vbox)
+
+      ## Create the color swatch area
+      @frame = Gtk::Frame.new
+      @frame.set_shadow_type(:in)
+      vbox.pack_start(@frame, :expand => true, :fill => true, :padding => 0)
+
+      @da = Gtk::DrawingArea.new
+
+      @da.signal_connect('draw') do |widget, event|
+        if widget.window
+          context = widget.style_context
+          background_color = context.get_background_color(:normal)
+          event.set_source_rgba(background_color.to_a)
+          event.paint
+        end
+      end
+
+      # set a minimum size
+      @da.set_size_request(200, 200)
+      # set the color
+      @da.override_background_color(:normal, @color)
+
+      @frame.add(@da)
+
+      alignment = Gtk::Alignment.new(1.0, 0.5, 0.0, 0.0)
+
+      button = Gtk::Button.new(:mnemonic => '_Change the above color')
+      alignment.add(button)
+
+      vbox.pack_start(alignment, :expand => false, :fill => false, :padding => 0)
+
+      button.signal_connect('clicked') do
+        change_color_callback
+      end
+    end
+
+    def change_color_callback
+      dialog = Gtk::ColorSelectionDialog.new(:title => 'Changing color')
+
+      dialog.set_transient_for(self)
+
+      colorsel = dialog.color_selection
+
+      colorsel.set_previous_rgba(@color)
+      colorsel.set_current_rgba(@color)
+      colorsel.set_has_palette(true)
+
+      response = dialog.run
+
+      if response == Gtk::ResponseType::OK
+        @color = colorsel.current_rgba
+        @da.override_background_color(:normal, @color)
+      end
+
+      dialog.destroy
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/common.rb b/gtk3-no-gi/sample/gtk-demo/common.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/common.rb
copy to gtk3-no-gi/sample/gtk-demo/common.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/css_accordion.css b/gtk3-no-gi/sample/gtk-demo/css_accordion.css
new file mode 100644
index 0000000..90db9fc
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/css_accordion.css
@@ -0,0 +1,53 @@
+ at import url("reset.css");
+
+* {
+    transition-property: color, background-color, border-color, background-image, padding, border-width;
+    transition-duration: 1s;
+
+    font: Cantarell 20px;
+}
+
+GtkWindow {
+    background: linear-gradient(153deg, #151515, #151515 5px, transparent 5px) 0 0,
+                linear-gradient(333deg, #151515, #151515 5px, transparent 5px) 10px 5px,
+                linear-gradient(153deg, #222, #222 5px, transparent 5px) 0 5px,
+                linear-gradient(333deg, #222, #222 5px, transparent 5px) 10px 10px,
+                linear-gradient(90deg, #1b1b1b, #1b1b1b 10px, transparent 10px),
+                linear-gradient(#1d1d1d, #1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
+    background-color: #131313;
+    background-size: 20px 20px;
+}
+
+.button {
+    color: black;
+    background-color: #bbb;
+    border-style: solid;
+    border-width: 2px 0 2px 2px;
+    border-color: #333;
+
+    padding: 12px 4px;
+}
+
+.button:first-child {
+    border-radius: 5px 0 0 5px;
+}
+
+.button:last-child {
+    border-radius: 0 5px 5px 0;
+    border-width: 2px;
+}
+
+.button:hover {
+    padding: 12px 48px;
+    background-color: #4870bc;
+}
+
+.button *:hover {
+    color: white;
+}
+
+.button:hover:active,
+.button:active {
+    background-color: #993401;
+}
+
diff --git a/gtk3/sample/gtk-demo/css_accordion.rb b/gtk3-no-gi/sample/gtk-demo/css_accordion.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/css_accordion.rb
copy to gtk3-no-gi/sample/gtk-demo/css_accordion.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/demo.ui b/gtk3-no-gi/sample/gtk-demo/demo.ui
new file mode 100644
index 0000000..9d27c85
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/demo.ui
@@ -0,0 +1,258 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<interface>
+    <object class="GtkListStore" id="liststore1">
+      <columns>
+        <column type="gchararray"/>
+        <column type="gchararray"/>
+        <column type="gint"/>
+        <column type="gchararray"/>
+      </columns>
+      <data>
+        <row>
+          <col id="0">John</col>
+          <col id="1">Doe</col>
+          <col id="2">25</col>
+          <col id="3">This is the John Doe row</col>
+        </row>
+        <row>
+          <col id="0">Mary</col>
+          <col id="1">Dole</col>
+          <col id="2">50</col>
+          <col id="3">This is the Mary Dole row</col>
+        </row>
+      </data>
+    </object>
+    <object class="GtkUIManager" id="uimanager">
+        <child>
+            <object class="GtkActionGroup" id="DefaultActions">
+                <child>
+                    <object class="GtkAction" id="Copy">
+                        <property name="name">Copy</property>
+                        <property name="tooltip" translatable="yes">Copy selected object into the clipboard</property>
+                        <property name="stock_id">gtk-copy</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Cut">
+                        <property name="name">Cut</property>
+                        <property name="tooltip" translatable="yes">Cut selected object into the clipboard</property>
+                        <property name="stock_id">gtk-cut</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="EditMenu">
+                        <property name="name">EditMenu</property>
+                        <property name="label" translatable="yes">_Edit</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="FileMenu">
+                        <property name="name">FileMenu</property>
+                        <property name="label" translatable="yes">_File</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="New">
+                        <property name="name">New</property>
+                        <property name="tooltip" translatable="yes">Create a new file</property>
+                        <property name="stock_id">gtk-new</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Open">
+                        <property name="name">Open</property>
+                        <property name="tooltip" translatable="yes">Open a file</property>
+                        <property name="stock_id">gtk-open</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Paste">
+                        <property name="name">Paste</property>
+                        <property name="tooltip" translatable="yes">Paste object from the Clipboard</property>
+                        <property name="stock_id">gtk-paste</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Quit">
+                        <property name="name">Quit</property>
+                        <property name="tooltip" translatable="yes">Quit the program</property>
+                        <property name="stock_id">gtk-quit</property>
+                        <signal handler="quit_activate" name="activate"/>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Save">
+                        <property name="name">Save</property>
+                        <property name="is_important">True</property>
+                        <property name="tooltip" translatable="yes">Save a file</property>
+                        <property name="stock_id">gtk-save</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="SaveAs">
+                        <property name="name">SaveAs</property>
+                        <property name="tooltip" translatable="yes">Save with a different name</property>
+                        <property name="stock_id">gtk-save-as</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="HelpMenu">
+                        <property name="name">HelpMenu</property>
+                        <property name="label" translatable="yes">_Help</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="About">
+                        <property name="name">About</property>
+                        <property name="stock_id">gtk-about</property>
+                        <signal handler="about_activate" name="activate"/>
+                    </object>
+                    <accelerator key="F1"/>
+                </child>
+            </object>
+        </child>
+        <ui>
+          <menubar name="menubar1">
+            <menu action="FileMenu" name="FileMenu">
+              <menuitem action="New" name="New"/>
+              <menuitem action="Open" name="Open"/>
+              <menuitem action="Save" name="Save"/>
+              <menuitem action="SaveAs" name="SaveAs"/>
+              <separator/>
+              <menuitem action="Quit" name="Quit"/>
+            </menu>
+            <menu action="EditMenu">
+              <menuitem action="Copy" name="Copy"/>
+              <menuitem action="Cut" name="Cut"/>
+              <menuitem action="Paste" name="Paste"/>
+            </menu>
+            <menu action="HelpMenu" name="HelpMenu">
+              <menuitem action="About" name="About"/>
+            </menu>
+          </menubar>
+          <toolbar name="toolbar1">
+            <toolitem action="New" name="New"/>
+            <toolitem action="Open" name="Open"/>
+            <toolitem action="Save" name="Save"/>
+            <separator/>
+            <toolitem action="Copy" name="Copy"/>
+            <toolitem action="Cut" name="Cut"/>
+            <toolitem action="Paste" name="Paste"/>
+          </toolbar>
+        </ui>
+    </object>
+    <object class="GtkAboutDialog" id="aboutdialog1">
+        <property name="program-name" translatable="yes">GtkBuilder demo</property>
+         <accessibility>
+	     <relation target="window1" type="subwindow-of"/>
+	 </accessibility>
+    </object>
+    <object class="GtkWindow" id="window1">
+        <property name="default_height">250</property>
+        <property name="default_width">440</property>
+        <property name="title">GtkBuilder demo</property>
+        <child>
+            <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <child>
+                    <object constructor="uimanager" class="GtkMenuBar" id="menubar1">
+                        <property name="visible">True</property>
+	            	<child internal-child="accessible">
+	            	    <object class="AtkObject" id="a11y-menubar">
+	            	        <property name="AtkObject::accessible-name">The menubar</property>
+	            	    </object>
+	            	</child>
+	            </object>
+                    <packing>
+                        <property name="expand">False</property>
+                    </packing>
+                </child>
+                <child>
+                    <object constructor="uimanager" class="GtkToolbar" id="toolbar1">
+                        <property name="visible">True</property>
+	            	<child internal-child="accessible">
+	            	    <object class="AtkObject" id="a11y-toolbar">
+	            	        <property name="AtkObject::accessible-name">The toolbar</property>
+	            	    </object>
+	            	</child>
+                    </object>
+                    <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                    </packing>
+                </child>
+                <child>
+                    <object class="GtkScrolledWindow" id="scrolledwindow1">
+                      <property name="hscrollbar_policy">automatic</property>
+                      <property name="shadow_type">in</property>
+                      <property name="visible">True</property>
+                      <property name="vscrollbar_policy">automatic</property>
+                      <child>
+                        <object class="GtkTreeView" id="treeview1">
+                          <property name="visible">True</property>
+                          <property name="model">liststore1</property>
+                          <property name="tooltip-column">3</property>
+	            	  <child internal-child="accessible">
+	            	      <object class="AtkObject" id="a11y-treeview">
+	            	          <property name="AtkObject::accessible-name">Name list</property>
+                                  <property name="AtkObject::accessible-description">
+                                    A list of person with name, surname and age columns
+                                  </property>
+	            	      </object>
+	            	  </child>
+                          <child>
+                            <object class="GtkTreeViewColumn" id="column1">
+                              <property name="title">Name</property>
+                              <child>
+                                <object class="GtkCellRendererText" id="renderer1"/>
+                                <attributes>
+                                  <attribute name="text">0</attribute>
+                                </attributes>
+                              </child>
+                            </object>
+                          </child>
+                          <child>
+                            <object class="GtkTreeViewColumn" id="column2">
+                              <property name="title">Surname</property>
+                              <child>
+                                <object class="GtkCellRendererText" id="renderer2"/>
+                                <attributes>
+                                  <attribute name="text">1</attribute>
+                                </attributes>
+                              </child>
+                            </object>
+                          </child>
+                          <child>
+                            <object class="GtkTreeViewColumn" id="column3">
+                              <property name="title">Age</property>
+                              <child>
+                                <object class="GtkCellRendererText" id="renderer3"/>
+                                <attributes>
+                                  <attribute name="text">2</attribute>
+                                </attributes>
+                              </child>
+                            </object>
+                          </child>
+                        </object>
+                      </child>
+		    <accessibility>
+		      	<action action_name="move-cursor" description="Move the cursor to select another person."/>
+		    </accessibility>
+                    </object>
+                    <packing>
+                        <property name="position">2</property>
+                    </packing>
+                </child>
+                <child>
+                    <object class="GtkStatusbar" id="statusbar1">
+                        <property name="visible">True</property>
+                    </object>
+                    <packing>
+                        <property name="expand">False</property>
+                        <property name="position">3</property>
+                    </packing>
+                </child>
+            </object>
+        </child>
+    </object>
+</interface>
diff --git a/gtk3/sample/gtk-demo/dialog.rb b/gtk3-no-gi/sample/gtk-demo/dialog.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/dialog.rb
copy to gtk3-no-gi/sample/gtk-demo/dialog.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/drawingarea.rb b/gtk3-no-gi/sample/gtk-demo/drawingarea.rb
new file mode 100644
index 0000000..fc021da
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/drawingarea.rb
@@ -0,0 +1,205 @@
+# Copyright (c) 2003-2014 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: drawingarea.rb,v 1.5 2005/02/12 23:02:43 kzys Exp $
+=begin
+= Drawing Area
+
+Gtk::DrawingArea is a blank area where you can draw custom displays
+of various kinds.
+
+This demo has two drawing areas. The checkerboard area shows
+how you can just draw something; all you have to do is write
+a signal handler for expose_event, as shown here.
+
+The 'scribble' area is a bit more advanced, and shows how to handle
+events such as button presses and mouse motion. Click the mouse
+and drag in the scribble area to draw squiggles. Resize the window
+to clear the area.
+=end
+
+require "common"
+
+module Demo
+  class DrawingArea < BasicWindow
+    def initialize
+      # Pixmap for scribble area, to store current scribbles
+      @cairo_context = nil
+      super("Drawing Area")
+
+      self.border_width = 8
+
+      vbox = Gtk::Box.new(:vertical, 8)
+      vbox.border_width = 8
+      add(vbox)
+
+      ## Create the checkerboard area
+      label = Gtk::Label.new
+      label.set_markup("<u>Checkerboard pattern</u>")
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+      vbox.pack_start(frame, :expand => true, :fill => true, :padding => 0)
+
+      da = Gtk::DrawingArea.new
+      # set a minimum size
+      da.set_size_request(100, 100)
+
+      frame.add(da)
+
+      da.signal_connect("draw") do |widget, event|
+        checkerboard_draw(widget, event)
+      end
+
+      ## Create the scribble area
+      label = Gtk::Label.new
+      label.set_markup("<u>Scribble area</u>")
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+      vbox.pack_start(frame, :expand => true, :fill => true, :padding => 0)
+
+      da = Gtk::DrawingArea.new
+      # set a minimum size
+      da.set_size_request(100, 100)
+
+      frame.add(da)
+
+      # Signals used to handle backing pixmap
+      da.signal_connect("draw") do |*args|
+        scribble_draw(*args)
+      end
+      da.signal_connect("configure-event") do |widget, event|
+        scribble_configure_event(widget)
+      end
+
+      # Event signals
+      da.signal_connect("motion-notify-event") do |*args|
+        scribble_motion_notify_event(*args)
+      end
+      da.signal_connect("button-press-event") do |*args|
+        scribble_button_press_event(*args)
+      end
+
+      # Ask to receive events the drawing area doesn't normally
+      # subscribe to
+      da.events |= (Gdk::Event::LEAVE_NOTIFY_MASK |
+                    Gdk::Event::BUTTON_PRESS_MASK |
+                    Gdk::Event::POINTER_MOTION_MASK |
+                    Gdk::Event::POINTER_MOTION_HINT_MASK)
+    end
+
+    # Create a new surface of the appropriate size to store our scribbles
+    def scribble_configure_event(widget)
+      allocation = widget.allocation
+      surface = widget.window.create_similar_surface(:color,
+                                                     allocation.width,
+                                                     allocation.height)
+      @cairo_context = Cairo::Context.new(surface)
+      @cairo_context.set_source_rgb(1, 1, 1)
+      @cairo_context.paint
+
+      # We've handled the configure event, no need for further processing.
+      return true
+    end
+
+    CHECK_SIZE = 10
+    SPACING = 2
+    def checkerboard_draw(da, cairo_context)
+      # At the start of a draw handler, a clip region of event.area
+      # is set on the window, and event.area has been cleared to the
+      # widget's background color. The docs for
+      # gdk_window_begin_paint_region give more details on how this
+      # works.
+
+      xcount = 0
+      width  = da.allocated_width
+      height = da.allocated_height
+      SPACING.step(da.allocation.width, CHECK_SIZE + SPACING) do |i|
+        ycount = xcount % 2; # start with even/odd depending on row
+        SPACING.step(da.allocation.height, CHECK_SIZE + SPACING) do |j|
+          if ycount % 2 == 1
+            cairo_context.set_source_rgb(0.45777, 0, 0.45777)
+          else
+            cairo_context.set_source_rgb(1, 1, 1)
+          end
+
+          # If we're outside the clip, this will do nothing.
+          cairo_context.fill do
+            cairo_context.rectangle(i, j, CHECK_SIZE, CHECK_SIZE)
+          end
+          ycount += 1
+        end
+        xcount += 1
+      end
+      # return true because we've handled this event, so no
+      # further processing is required.
+      #
+      return true
+    end
+
+    # Redraw the screen from the surface
+    def scribble_draw(widget, event)
+      event.set_source(@cairo_context.target)
+      event.paint
+      return false
+    end
+
+    # Draw a rectangle on the screen
+    def draw_brush(widget, x, y)
+      update_rect = Gdk::Rectangle.new(x - 3, y - 3, 6, 6)
+
+      # Paint to the surface, where we store our state
+      @cairo_context.fill do
+        @cairo_context.set_source_rgb(0, 0, 0)
+        @cairo_context.rectangle(update_rect.x,
+                                 update_rect.y,
+                                 update_rect.width,
+                                 update_rect.height)
+      end
+
+      # Now invalidate the affected region of the drawing area.
+      widget.window.invalidate(update_rect, false)
+    end
+
+    def scribble_button_press_event(widget, event)
+      # paranoia check, in case we haven't gotten a configure event
+      return false unless @cairo_context
+
+      if event.button == 1
+        draw_brush(widget, event.x, event.y)
+      end
+
+      # We've handled the event, stop processing
+      return true
+    end
+
+    def scribble_motion_notify_event(widget, event)
+      # paranoia check, in case we haven't gotten a configure event
+      return false unless @cairo_context
+
+      # This call is very important; it requests the next motion event.
+      # If you don't call Gdk::Window#pointer you'll only get
+      # a single motion event. The reason is that we specified
+      # Gdk::POINTER_MOTION_HINT_MASK to Gtk::Widget#set_events.
+      # If we hadn't specified that, we could just use event.x, event.y
+      # as the pointer location. But we'd also get deluged in events.
+      # By requesting the next event as we handle the current one,
+      # we avoid getting a huge number of events faster than we
+      # can cope.
+
+      # NOTE: Gdk::EventMotion#window will be restored from Ruby/GDK3 2.1.1.
+      # win, x, y, state = event.window.get_device_position(event.device)
+      win, x, y, state = widget.window.get_device_position(event.device)
+
+      if (state & :button1_mask) != 0
+        draw_brush(widget, x, y)
+      end
+
+      # We've handled it, stop processing
+      return true
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/editable_cells.rb b/gtk3-no-gi/sample/gtk-demo/editable_cells.rb
new file mode 100644
index 0000000..3179531
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/editable_cells.rb
@@ -0,0 +1,173 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: editable_cells.rb,v 1.7 2005/02/06 18:25:13 kzys Exp $
+=begin
+= Tree View/Editable Cells
+
+This demo demonstrates the use of editable cells in a Gtk::TreeView. If
+you're new to the Gtk::TreeView widgets and associates, look into
+the Gtk::ListStore example first.
+=end
+require 'common'
+
+module Demo
+  class EditableCells < BasicWindow
+    Item = Struct.new('Item', :number, :product, :editable)
+    COLUMN_NUMBER, COLUMN_PRODUCT, COLUMN_EDITABLE, NUM_COLUMNS = *(0..4).to_a
+
+    def initialize
+      super('Shopping list')
+      self.border_width = 5
+
+      vbox = Gtk::VBox.new(false, 5)
+      add(vbox)
+
+      vbox.pack_start(Gtk::Label.new('Shopping list (you can edit the cells!)'),
+                      :expand => false, :fill => false, :padding => 0)
+
+      sw = Gtk::ScrolledWindow.new
+      sw.shadow_type = Gtk::SHADOW_ETCHED_IN
+      sw.set_policy(:automatic, :automatic)
+      vbox.pack_start(sw, :expand => true, :fill => true, :padding => 0)
+
+      # create model
+      model = create_model
+
+      # create tree view
+      treeview = Gtk::TreeView.new(model)
+      treeview.rules_hint = true
+      treeview.selection.mode = Gtk::SELECTION_SINGLE
+
+      add_columns(treeview)
+
+      sw.add(treeview)
+
+      # some buttons
+      hbox = Gtk::Box.new(:horizontal, 4)
+      hbox.homogeneous = true
+      vbox.pack_start(hbox, :expand => false, :fill => false, :padding => 0)
+
+      button = Gtk::Button.new('Add item')
+      button.signal_connect('clicked') do
+        add_item(model)
+      end
+      hbox.pack_start(button, :expand => true, :fill => true, :padding => 0)
+
+      button = Gtk::Button.new('Remove item')
+      button.signal_connect('clicked') do
+        remove_item(treeview)
+      end
+      hbox.pack_start(button, :expand => true, :fill => true, :padding => 0)
+
+      set_default_size(320, 200)
+    end
+
+    def create_model
+      # create array
+      @articles = []
+
+      add_items
+
+      # create list store
+      model = Gtk::ListStore.new(Integer, String, TrueClass)
+
+      # add items
+      @articles.each do |article|
+        iter = model.append
+
+        article.each_with_index do |value, index|
+          iter.set_value(index, value)
+        end
+      end
+      return model
+    end
+
+    def add_items
+      item = Item.new(3, 'bottles of coke', true)
+      @articles.push(item)
+
+      item = Item.new(5, 'packages of noodles', true)
+      @articles.push(item)
+
+      item = Item.new(2, 'packages of chocolate chip cookies', true)
+      @articles.push(item)
+
+      item = Item.new(1, 'can vanilla ice cream', true)
+      @articles.push(item)
+
+      item = Item.new(6, 'eggs', true)
+      @articles.push(item)
+    end
+
+    def add_columns(treeview)
+      model = treeview.model
+
+      # number column
+      renderer = Gtk::CellRendererText.new
+      renderer.signal_connect('edited') do |*args|
+        cell_edited(*args.push(model))
+      end
+      treeview.insert_column(-1, 'Number', renderer,
+                             {
+                               :text => COLUMN_NUMBER,
+                               :editable => COLUMN_EDITABLE,
+                             })
+      def renderer.column
+        COLUMN_NUMBER
+      end
+
+      # product column
+      renderer = Gtk::CellRendererText.new
+      renderer.signal_connect('edited') do |*args|
+        cell_edited(*args.push(model))
+      end
+      def renderer.column
+        COLUMN_PRODUCT
+      end
+      treeview.insert_column(-1, 'Product', renderer,
+                             {
+                               :text => COLUMN_PRODUCT,
+                               :editable => COLUMN_EDITABLE,
+                             })
+    end
+
+    def cell_edited(cell, path_string, new_text, model)
+      path = Gtk::TreePath.new(path_string)
+
+      column = cell.column
+
+      iter = model.get_iter(path)
+      case column
+      when COLUMN_NUMBER
+        i = iter.path.indices[0]
+        @articles[i].number = new_text.to_i
+        iter.set_value(column, @articles[i].number)
+      when COLUMN_PRODUCT
+        i = iter.path.indices[0]
+        @articles[i].product = new_text
+        iter.set_value(column, @articles[i].product)
+      end
+    end
+
+    def add_item(model)
+      foo = Item.new(0, 'Description here', true)
+      @articles.concat([foo])
+
+      iter = model.append
+      foo.each_with_index do |value, index|
+        iter.set_value(index, value)
+      end
+    end
+
+    def remove_item(treeview)
+      model = treeview.model
+      selection = treeview.selection
+
+      if iter = selection.selected
+        @articles.delete_at(iter.path.indices[0])
+        model.remove(iter)
+      end
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/entry_completion.rb b/gtk3-no-gi/sample/gtk-demo/entry_completion.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/entry_completion.rb
copy to gtk3-no-gi/sample/gtk-demo/entry_completion.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/expander.rb b/gtk3-no-gi/sample/gtk-demo/expander.rb
new file mode 100644
index 0000000..b6cdc4d
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/expander.rb
@@ -0,0 +1,42 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+# $Id: expander.rb,v 1.2 2005/02/25 17:09:25 kzys Exp $
+=begin
+= Expander (Expander)
+
+GtkExpander allows to provide additional content that is initially hidden.
+This is also known as "disclosure triangle".
+=end
+
+require 'common'
+
+module Demo
+  class Expander < Gtk::Dialog
+    def initialize
+      # as opposed to the GTK2 dialog, the buttons have to be enclodes by brackeds
+      # together with their ResponseType AND all groups have to bracketed together
+      super(:title => 'GtkExpander',
+            :parent => nil,
+            :flags => 0,
+            :buttons => [[Gtk::Stock::CLOSE, Gtk::ResponseType::NONE]])
+      self.resizable = false
+
+      signal_connect('response') do
+        self.destroy
+      end
+
+      vbox = Gtk::Box.new(:vertical, 5)
+      self.child.pack_start(vbox, :expand => true, :fill => true)
+      vbox.border_width = 5
+
+      label = Gtk::Label.new('Expander demo. CLick on the triangle for details.')
+      vbox.pack_start(label, :expand => false, :fill => false)
+
+      # Create the expander
+      expander = Gtk::Expander.new('Details')
+      vbox.pack_start(expander, :expand => false, :fill => false)
+
+      expander.add(Gtk::Label.new('Details can be shown or hidden.'))
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/floppybuddy.gif b/gtk3-no-gi/sample/gtk-demo/floppybuddy.gif
new file mode 100644
index 0000000..ac986c8
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/floppybuddy.gif differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-applets.png b/gtk3-no-gi/sample/gtk-demo/gnome-applets.png
new file mode 100644
index 0000000..8d3549e
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-applets.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-calendar.png b/gtk3-no-gi/sample/gtk-demo/gnome-calendar.png
new file mode 100644
index 0000000..889f329
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-calendar.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-foot.png b/gtk3-no-gi/sample/gtk-demo/gnome-foot.png
new file mode 100644
index 0000000..0476658
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-foot.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-fs-directory.png b/gtk3-no-gi/sample/gtk-demo/gnome-fs-directory.png
new file mode 100644
index 0000000..05921a6
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-fs-directory.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-fs-regular.png b/gtk3-no-gi/sample/gtk-demo/gnome-fs-regular.png
new file mode 100644
index 0000000..0f5019c
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-fs-regular.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-gimp.png b/gtk3-no-gi/sample/gtk-demo/gnome-gimp.png
new file mode 100644
index 0000000..f6bbc6d
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-gimp.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-gmush.png b/gtk3-no-gi/sample/gtk-demo/gnome-gmush.png
new file mode 100644
index 0000000..0a4b0d0
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-gmush.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnome-gsame.png b/gtk3-no-gi/sample/gtk-demo/gnome-gsame.png
new file mode 100644
index 0000000..01c0611
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnome-gsame.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gnu-keys.png b/gtk3-no-gi/sample/gtk-demo/gnu-keys.png
new file mode 100644
index 0000000..58a3377
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gnu-keys.png differ
diff --git a/gtk3-no-gi/sample/gtk-demo/gtk-logo-rgb.gif b/gtk3-no-gi/sample/gtk-demo/gtk-logo-rgb.gif
new file mode 100644
index 0000000..63c622b
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/gtk-logo-rgb.gif differ
diff --git a/gtk3/sample/gtk-demo/hypertext.rb b/gtk3-no-gi/sample/gtk-demo/hypertext.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/hypertext.rb
copy to gtk3-no-gi/sample/gtk-demo/hypertext.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/iconview.rb b/gtk3-no-gi/sample/gtk-demo/iconview.rb
new file mode 100644
index 0000000..a39bf2a
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/iconview.rb
@@ -0,0 +1,110 @@
+# Copyright (c) 2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: iconview.rb,v 1.7 2007/08/05 15:41:31 mutoh Exp $
+=begin
+= Icon View (IconView)
+
+The Gtk::IconView widget is used to display and manipulate icons.
+It uses a Gtk::TreeModel for data storage, so the list store example
+might be helpful.
+=end
+
+
+require 'common'
+
+module Demo
+  class IconView < Demo::BasicWindow
+    COL_PATH, COL_DISPLAY_NAME, COL_IS_DIR, COL_PIXBUF = (0..3).to_a
+
+    def fill_store
+      @store.clear
+      Dir.glob(File.join(@parent, "*")).each do |path|
+        is_dir = FileTest.directory?(path)
+        iter = @store.append
+        # set COL_DISPLAY_NAME first because changing an iter will trigger the
+        # sort function; if we set something else first, the value of
+        # COL_DISPLAY_NAME for this row will be "nil" and the sort function will fail
+#puts path
+#puts GLib.convert(GLib.filename_to_utf8(path), "Shift_JIS", "UTF-8")
+#puts File.basename(GLib.convert(GLib.filename_to_utf8(path), "Shift_JIS", "UTF-8"))
+#        iter[COL_DISPLAY_NAME] = File.basename(GLib.filename_to_utf8(path))
+        iter[COL_DISPLAY_NAME] = GLib.filename_to_utf8(path)
+        iter[COL_PATH] = path
+        iter[COL_IS_DIR] = is_dir
+        iter[COL_PIXBUF] = is_dir ? @folder_pixbuf : @file_pixbuf
+      end
+    end
+
+    def initialize
+      super('Gtk::IconView demo')
+      @file_pixbuf = Gdk::Pixbuf.new(Demo.find_file("gnome-fs-regular.png"))
+      @folder_pixbuf = Gdk::Pixbuf.new(Demo.find_file("gnome-fs-directory.png"))
+
+      @store = Gtk::ListStore.new(String, String, TrueClass, Gdk::Pixbuf)
+      @parent = "/"
+
+      @store.set_default_sort_func do |a, b|
+        if !a[COL_IS_DIR] and b[COL_IS_DIR]
+          1
+        elsif a[COL_IS_DIR] and !b[COL_IS_DIR]
+          -1
+        else
+          a[COL_DISPLAY_NAME] <=> b[COL_DISPLAY_NAME]
+        end
+      end
+      @store.set_sort_column_id(Gtk::TreeSortable::DEFAULT_SORT_COLUMN_ID,
+                                Gtk::SortType::ASCENDING)
+
+      fill_store
+      set_default_size(650, 400)
+      set_border_width(8)
+
+      vbox = Gtk::Box.new(:vertical)
+      add(vbox)
+
+      toolbar = Gtk::Toolbar.new
+      vbox.pack_start(toolbar, :expand => false, :fill => false, :padding => 0)
+
+      up_button = Gtk::ToolButton.new(:stock_id => :go_up)
+      up_button.important = true
+      up_button.sensitive = false
+      toolbar.insert(up_button, -1)
+      up_button.signal_connect("clicked") do
+        @parent = File.dirname(@parent)
+        fill_store
+        up_button.sensitive = @parent != "/"
+      end
+
+      home_button = Gtk::ToolButton.new(:stock_id => :home)
+      home_button.important = true
+      toolbar.insert(home_button, -1)
+      home_button.signal_connect("clicked") do
+        @parent = GLib.home_dir
+        fill_store
+        up_button.sensitive = true
+      end
+
+      sw = Gtk::ScrolledWindow.new
+      sw.shadow_type = :etched_in
+      sw.set_policy(:automatic, :automatic)
+      vbox.pack_start(sw, :expand => true, :fill => true, :padding => 0)
+
+      iconview = Gtk::IconView.new(@store)
+      iconview.selection_mode = :multiple
+      iconview.text_column = COL_DISPLAY_NAME
+      iconview.pixbuf_column = COL_PIXBUF
+      iconview.signal_connect("item_activated") do |iview, path|
+        iter = @store.get_iter(path)
+        if iter[COL_DISPLAY_NAME]
+          @parent = iter[COL_PATH]
+          fill_store
+          up_button.sensitive = true
+        end
+      end
+      sw.add(iconview)
+      iconview.grab_focus
+    end
+  end
+end
+
diff --git a/gtk3-no-gi/sample/gtk-demo/images.rb b/gtk3-no-gi/sample/gtk-demo/images.rb
new file mode 100644
index 0000000..6110772
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/images.rb
@@ -0,0 +1,197 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: images.rb,v 1.5 2006/04/08 12:30:03 mutoh Exp $
+=begin
+= Images
+
+Gtk::Image is used to display an image; the image can be in a number of formats.
+Typically, you load an image into a Gdk::Pixbuf, then display the pixbuf.
+
+This demo code shows some of the more obscure cases, in the simple
+case a call to Gtk::Image.new is all you need.
+
+If you want to put image data in your program as a String variable,
+use the make-inline-pixbuf program that comes with GTK+.
+This way you won't need to depend on loading external files, your
+application binary can be self-contained.
+=end
+require 'common'
+
+module Demo
+  class Images < BasicWindow
+    def initialize
+      @pixbuf_loader = nil
+      @load_timeout = 0
+      @image_stream = nil
+
+      super('Images')
+      signal_connect('destroy') do
+        cleanup_callback
+      end
+
+      self.border_width = 8
+
+      vbox = Gtk::VBox.new(false, 8)
+      vbox.border_width = 8
+      add(vbox)
+
+      label = Gtk::Label.new
+      label.set_markup('<u>Image loaded from a file</u>')
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+
+      # The alignment keeps the frame from growing when users resize
+      # the window
+      align = Gtk::Alignment.new(0.5, 0.5, 0, 0)
+      align.add(frame)
+      vbox.pack_start(align, :expand => false, :fill => false, :padding => 0)
+
+      # demo_find_file looks in the the current directory first,
+      # so you can run gtk-demo without installing GTK, then looks
+      # in the location where the file is installed.
+      pixbuf = nil
+      begin
+        filename = Demo.find_file('gtk-logo-rgb.gif')
+        pixbuf = Gdk::Pixbuf.new(filename)
+      rescue
+        # This code shows off error handling. You can just use
+        # Gtk::Image.new instead if you don't want to report
+        # errors to the user. If the file doesn't load when using
+        # Gtk::Image.new, a 'missing image' icon will
+        # be displayed instead.
+        dialog = Gtk::MessageDialog.new(self,
+                                        Gtk::Dialog::DESTROY_WITH_PARENT,
+                                        Gtk::MessageDialog::ERROR,
+                                        Gtk::MessageDialog::BUTTONS_CLOSE,
+                                        "Unable to open image file 'gtk-logo-rgb.gif': #{$1}")
+
+        dialog.signal_connect('response') do |widget, data|
+          widget.destroy
+        end
+        dialog.show
+      end
+
+      image = Gtk::Image.new(pixbuf)
+      frame.add(image)
+
+
+      # Animation
+      label = Gtk::Label.new
+      label.set_markup('<u>Animation loaded from a file</u>')
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+
+      # The alignment keeps the frame from growing when users resize
+      # the window
+      align = Gtk::Alignment.new(0.5, 0.5, 0, 0)
+      align.add(frame)
+      vbox.pack_start(align, :expand => false, :fill => false, :padding => 0)
+
+      filename = Demo.find_file('floppybuddy.gif')
+      image = Gtk::Image.new(filename)
+      frame.add(image)
+
+
+      # Progressive
+      label = Gtk::Label.new
+      label.set_markup('<u>Progressive image loading</u>')
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new(nil)
+      frame.shadow_type = :in
+
+      # The alignment keeps the frame from growing when users resize
+      # the window
+      align = Gtk::Alignment.new(0.5, 0.5, 0, 0)
+      align.add(frame)
+      vbox.pack_start(align, :expand => false, :fill => false, :padding => 0)
+
+      # Create an empty image for now; the progressive loader
+      # will create the pixbuf and fill it in.
+      image = Gtk::Image.new
+      frame.add(image)
+
+      start_progressive_loading(image)
+
+      # Sensitivity control
+      button = Gtk::ToggleButton.new('_Insensitive', true)
+      vbox.pack_start(button, :expand => false, :fill => false, :padding => 0)
+
+      button.signal_connect('toggled') do |widget|
+        vbox.children.each do |widget|
+          if widget != button
+            widget.sensitive = ! button.active?
+          end
+        end
+      end
+    end
+
+    def start_progressive_loading(image)
+      @load_timeout = Gtk.timeout_add(150) do
+        progressive_timeout(image)
+      end
+    end
+
+    def progressive_timeout(image)
+      if @image_stream
+        buf = @image_stream.read(256)
+
+        @pixbuf_loader.write(buf)
+
+        if @image_stream.eof?
+          @image_stream.close
+          @image_stream = nil
+
+          @pixbuf_loader.close
+          @pixbuf_loader = nil
+        end
+      else
+        filename = Demo.find_file('alphatest.png')
+        @image_stream = File.open(filename, 'rb')
+
+        if @pixbuf_loader != nil
+          @pixbuf_loader.close
+          @pixbuf_loader = nil
+        end
+
+        @pixbuf_loader = Gdk::PixbufLoader.new
+
+        @pixbuf_loader.signal_connect('area_prepared') do |loader|
+          pixbuf = loader.pixbuf
+
+          # Avoid displaying random memory contents, since the pixbuf
+          # isn't filled in yet.
+          pixbuf.fill!(0xaaaaaaff)
+
+          image.pixbuf = pixbuf
+        end
+
+        @pixbuf_loader.signal_connect('area_updated') do
+          # We know the pixbuf inside the Gtk::Image has changed, but the image
+          # itself doesn't know this; so queue a redraw.  If we wanted to be
+          # really efficient, we could use a drawing area or something
+          # instead of a Gtk::Image, so we could control the exact position of
+          # the pixbuf on the display, then we could queue a draw for only
+          # the updated area of the image.
+          image.queue_draw
+        end
+      end
+
+      # leave timeout installed
+      return true
+    end
+
+    def cleanup_callback
+      @pixbuf_loader.close if @pixbuf_loader
+      @pixbuf_loader = nil
+      if @load_timeout != 0
+        Gtk.timeout_remove(@load_timeout)
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/infobar.rb b/gtk3-no-gi/sample/gtk-demo/infobar.rb
new file mode 100644
index 0000000..43597ea
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/infobar.rb
@@ -0,0 +1,78 @@
+# Copyright (c) 2013 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+=begin
+= Info bar
+
+Info bar widgets are used to report important messages to the user.
+=end
+require 'common'
+
+module Demo
+  class InfoBar < BasicWindow
+    def initialize
+      super('Info Bars')
+
+      self.border_width = 8
+
+
+      vbox = Gtk::Box.new :vertical
+      self.add vbox
+
+      bar = Gtk::InfoBar.new
+      vbox.pack_start bar, :expand => false, :fill => false, :padding => 0
+      bar.message_type = :info
+      label = Gtk::Label.new 'This is an info bar with message type GTK_MESSAGE_INFO'
+      bar.content_area.pack_start label, :expand => false, :fill => false, :padding => 0
+
+      bar = Gtk::InfoBar.new
+      vbox.pack_start bar, :expand => false, :fill => false, :padding => 0
+      bar.message_type = :warning
+      label = Gtk::Label.new 'This is an info bar with message type GTK_MESSAGE_WARNING'
+      bar.content_area.pack_start label, :expand => false, :fill => false, :padding => 0
+
+      bar = Gtk::InfoBar.new [:ok, :ok]
+      bar.signal_connect(:response) {|widget, response_id| on_bar_response widget, response_id}
+      vbox.pack_start bar, :expand => false, :fill => false, :padding => 0
+      bar.message_type = :question
+      label = Gtk::Label.new 'This is an info bar with message type GTK_MESSAGE_QUESTION'
+      bar.content_area.pack_start label, :expand => false, :fill => false, :padding => 0
+
+      bar = Gtk::InfoBar.new
+      vbox.pack_start bar, :expand => false, :fill => false, :padding => 0
+      bar.message_type = :error
+      label = Gtk::Label.new 'This is an info bar with message type GTK_MESSAGE_ERROR'
+      bar.content_area.pack_start label, :expand => false, :fill => false, :padding => 0
+
+      bar = Gtk::InfoBar.new
+      vbox.pack_start bar, :expand => false, :fill => false, :padding => 0
+      bar.message_type = :other
+      label = Gtk::Label.new 'This is an info bar with message type GTK_MESSAGE_OTHER'
+      bar.content_area.pack_start label, :expand => false, :fill => false, :padding => 0
+
+
+      frame = Gtk::Frame.new 'Info bars'
+      vbox.pack_start frame, :expand => false, :fill => false, :padding => 8
+
+      vbox2 = Gtk::Box.new :vertical, 8
+      vbox2.border_width = 8
+      frame.add vbox2
+
+      # Standard message dialog
+      label = Gtk::Label.new 'An example of different info bars'
+      vbox2.pack_start label, :expand => false, :fill => false, :padding => 0
+    end
+
+    def on_bar_response info_bar, response_id
+      dialog = Gtk::MessageDialog.new :parent => self,
+                                      :flags => [:modal, :destroy_with_parent],
+                                      :type => :info,
+                                      :buttons_type => :ok,
+                                      :message => 'You clicked a button on an info bar'
+
+      dialog.set_secondary_text "Your response has id %d" % response_id
+      dialog.signal_connect(:response) {dialog.destroy}
+      dialog.show_all
+    end
+  end
+end
\ No newline at end of file
diff --git a/gtk3-no-gi/sample/gtk-demo/item_factory.rb b/gtk3-no-gi/sample/gtk-demo/item_factory.rb
new file mode 100644
index 0000000..4802d09
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/item_factory.rb
@@ -0,0 +1,94 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: item_factory.rb,v 1.4 2005/02/12 23:02:43 kzys Exp $
+=begin
+= Item Factory
+
+The Gtk::ItemFactory object allows the easy creation of menus
+from an array of descriptions of menu items.
+=end
+require 'common'
+
+module Demo
+  class ItemFactory < BasicWindow
+    def initialize
+      super('Item Factory')
+
+      accel_group = Gtk::AccelGroup.new
+      item_factory = Gtk::ItemFactory.new(Gtk::ItemFactory::TYPE_MENU_BAR,
+                                          '<main>', accel_group)
+
+      add_accel_group(accel_group)
+      set_border_width(0)
+      ifactory_cb = proc do |data, widget|
+        puts "ItemFactory: activated \"#{Gtk::ItemFactory.path_from_widget(widget)}\""
+      end
+      menu_items = [
+        ['/_File'],
+        ['/File/tearoff1',
+          '<Tearoff>', nil, nil, ifactory_cb],
+        ['/File/_New',
+          '<Item>', '<control>N', nil, ifactory_cb],
+        ['/File/_Open',
+          '<Item>', '<control>O', nil, ifactory_cb],
+        ['/File/_Save',
+          '<Item>', '<control>S', nil, ifactory_cb],
+        ['/File/Save _As...',
+          '<Item>', nil, nil, ifactory_cb],
+        ['/File/sep1', '<Separator>'],
+        ['/File/_Quit',
+          '<Item>', '<control>Q', nil, ifactory_cb],
+
+        ['/_Preferences'],
+        ['/_Preferences/_Color'],
+        [ '/_Preferences/Color/_Red',
+          '<RadioItem>', nil, nil, ifactory_cb],
+        ['/_Preferences/Color/_Green',
+          '/Preferences/Color/Red', nil, nil, ifactory_cb],
+        ['/_Preferences/Color/_Blue',
+          '/Preferences/Color/Red', nil, nil, ifactory_cb],
+        ['/_Preferences/_Shape'],
+        ['/_Preferences/Shape/_Square',
+          '<RadioItem>', nil, nil, ifactory_cb],
+        [ '/_Preferences/Shape/_Rectangle',
+          '/Preferences/Shape/Square', nil, nil, ifactory_cb],
+        [ '/_Preferences/Shape/_Oval',
+          '/Preferences/Shape/Rectangle', nil, nil, ifactory_cb],
+
+        [ '/_Help', '<LastBranch>'],
+        [ '/Help/_About', '<Item>', nil, nil, ifactory_cb],
+      ]
+      item_factory.create_items(menu_items)
+
+      item_factory.get_item('/Preferences/Shape/Oval').set_active(true)
+
+      box1 = Gtk::VBox.new(false, 0)
+      add(box1)
+
+      box1.pack_start(item_factory.get_widget('<main>'), :expand => false, :fill => false, :padding => 0)
+
+      label = Gtk::Label.new("Type\n<alt>\nto start")
+      label.set_size_request(200, 200)
+      label.set_alignment(0.5, 0.5)
+      box1.pack_start(label, :expand => true, :fill => true, :padding => 0)
+
+      separator = Gtk::HSeparator.new
+      box1.pack_start(separator)
+
+
+      box2 = Gtk::VBox.new(false, 10)
+      box2.set_border_width(10)
+      box1.pack_start(box2, :expand => false, :fill => true, :padding => 0)
+
+      button = Gtk::Button.new('close')
+      # TODO: Need signal_connect_swapped?
+      button.signal_connect('clicked') do
+        quit
+      end
+      box2.pack_start(button, :expand => true, :fill => true, :padding => 0)
+      button.set_flags(Gtk::Widget::CAN_DEFAULT)
+      button.grab_default
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/links.rb b/gtk3-no-gi/sample/gtk-demo/links.rb
new file mode 100644
index 0000000..303240c
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/links.rb
@@ -0,0 +1,53 @@
+# Copyright (c) 2013 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+=begin
+= Links
+
+GtkLabel can show hyperlinks. The default action is to call gtk_show_uri() on their URI, but it is possible to override this with a custom handler.
+=end
+require 'common'
+
+module Demo
+  class Links < BasicWindow
+    def initialize
+      super('Links')
+
+      title = 'Links'
+      border_width = 12
+      signal_connect(:destroy) {self.destroy}
+
+      label = Gtk::Label.new "Some <a href=\"http://en.wikipedia.org/wiki/Text\"" +
+                             "title=\"plain text\">text</a> may be marked up\n" +
+                             "as hyperlinks, which can be clicked\n" +
+                             "or activated via <a href=\"keynav\">keynav</a>\n" +
+                             "and they work fine with other markup, like when\n" +
+                             "searching on <a href=\"http://www.google.com/\">" +
+                             "<span color=\"#0266C8\">G</span><span color=\"#F90101\">o</span>" +
+                             "<span color=\"#F2B50F\">o</span><span color=\"#0266C8\">g</span>" +
+                             "<span color=\"#00933B\">l</span><span color=\"#F90101\">e</span>" +
+                             "</a>."
+      label.use_markup = true
+      label.signal_connect(:activate_link) {|widget, uri| activate_link uri}
+      add label
+      label.show
+    end
+
+    def activate_link uri
+      if uri == 'keynav'
+        dialog = Gtk::MessageDialog.new :parent => self,
+                   :flags => :destroy_with_parent,
+                   :type => :info,
+                   :buttons_type => :ok
+
+        dialog.markup = "The term <i>keynav</i> is a shorthand for " +
+                        "keyboard navigation and refers to the process of using " +
+                        "a program (exclusively) via keyboard input."
+        dialog.present
+        dialog.signal_connect(:response) {dialog.destroy}
+        return true
+      end
+      false
+    end
+  end
+end
\ No newline at end of file
diff --git a/gtk3-no-gi/sample/gtk-demo/list_store.rb b/gtk3-no-gi/sample/gtk-demo/list_store.rb
new file mode 100644
index 0000000..cc4b69f
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/list_store.rb
@@ -0,0 +1,138 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: list_store.rb,v 1.5 2005/02/06 18:25:13 kzys Exp $
+=begin
+= Tree View/List Store
+
+The Gtk::ListStore is used to store data in list form, to be used
+later on by a Gtk::TreeView to display it. This demo builds a
+simple Gtk::ListStore and displays it. See the Stock Browser
+demo for a more advanced example.
+=end
+require 'common'
+
+module Demo
+  class ListStore < BasicWindow
+    Bug = Struct.new('Bug', :fixed, :number, :severity, :description)
+    COLUMN_FIXED, COLUMN_NUMBER, COLUMN_SEVERITY, COLUMN_DESCRIPTION,
+      NUM_COLUMNS = *(0..5).to_a
+    DATA = [
+      [ false, 60482, 'Normal',     'scrollable notebooks and hidden tabs' ],
+      [ false, 60620, 'Critical',   'gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe' ],
+      [ false, 50214, 'Major',      'Xft support does not clean up correctly' ],
+      [ true,  52877, 'Major',      'GtkFileSelection needs a refresh method. ' ],
+      [ false, 56070, 'Normal',     "Can't click button after setting in sensitive" ],
+      [ true,  56355, 'Normal',     'GtkLabel - Not all changes propagate correctly' ],
+      [ false, 50055, 'Normal',     'Rework width/height computations for TreeView' ],
+      [ false, 58278, 'Normal',     "gtk_dialog_set_response_sensitive  doesn't work" ],
+      [ false, 55767, 'Normal',     'Getters for all setters' ],
+      [ false, 56925, 'Normal',     'Gtkcalender size' ],
+      [ false, 56221, 'Normal',     'Selectable label needs right-click copy menu' ],
+      [ true,  50939, 'Normal',     'Add shift clicking to GtkTextView' ],
+      [ false, 6112,  'Enhancement','netscape-like collapsable toolbars' ],
+      [ false, 1,     'Normal',     'First bug :=)' ],
+    ].collect do |ary|
+      Bug.new(*ary)
+    end
+    def initialize
+      super('GtkListStore demo')
+      self.border_width = 8
+
+      vbox = Gtk::VBox.new(false, 8)
+      add(vbox)
+
+      label = Gtk::Label.new('This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).')
+      vbox.pack_start(label, :expand => false, :fill => false, :padding => 0)
+
+      sw = Gtk::ScrolledWindow.new(nil, nil)
+      sw.shadow_type = Gtk::SHADOW_ETCHED_IN
+      sw.set_policy(Gtk::POLICY_NEVER, :automatic)
+      vbox.pack_start(sw, :expand => true, :fill => true, :padding => 0)
+
+      # create tree model
+      model = create_model
+
+      # create tree view
+      treeview = Gtk::TreeView.new(model)
+      treeview.rules_hint = true
+      treeview.search_column = COLUMN_DESCRIPTION
+
+      sw.add(treeview)
+
+      # add columns to the tree view
+      add_columns(treeview)
+
+      set_default_size(280, 250)
+    end
+
+    def create_model
+      # create list store
+      store = Gtk::ListStore.new(TrueClass, Integer, String, String)
+
+      # add data to the list store
+      DATA.each do |bug|
+        iter = store.append
+        bug.each_with_index do |value, index|
+          iter[index] = value
+        end
+      end
+      return store
+    end
+
+    def add_columns(treeview)
+      # column for fixed toggles
+      renderer = Gtk::CellRendererToggle.new
+      renderer.signal_connect('toggled') do |cell, path|
+        fixed_toggled(treeview.model, path)
+      end
+
+      column = Gtk::TreeViewColumn.new('Fixed?',
+                                       renderer,
+                                       'active' => COLUMN_FIXED)
+
+      # set this column to a fixed sizing (of 50 pixels)
+      column.sizing = Gtk::TreeViewColumn::FIXED
+      column.fixed_width = 50
+      treeview.append_column(column)
+
+      # column for bug numbers
+      renderer = Gtk::CellRendererText.new
+      column = Gtk::TreeViewColumn.new('Bug number',
+                                       renderer,
+                                       'text' => COLUMN_NUMBER)
+      column.set_sort_column_id(COLUMN_NUMBER)
+      treeview.append_column(column)
+
+      # column for severities
+      renderer = Gtk::CellRendererText.new
+      column = Gtk::TreeViewColumn.new('Severity',
+                                       renderer,
+                                       'text' => COLUMN_SEVERITY)
+      column.set_sort_column_id(COLUMN_SEVERITY)
+      treeview.append_column(column)
+
+      # column for description
+      renderer = Gtk::CellRendererText.new
+      column = Gtk::TreeViewColumn.new('Description',
+                                       renderer,
+                                       'text' => COLUMN_DESCRIPTION)
+      column.set_sort_column_id(COLUMN_DESCRIPTION)
+      treeview.append_column(column)
+    end
+
+    def fixed_toggled(model, path_str)
+      path = Gtk::TreePath.new(path_str)
+
+      # get toggled iter
+      iter = model.get_iter(path)
+      fixed =iter[COLUMN_FIXED]
+
+      # do something with the value
+      fixed ^= 1
+
+      # set new value
+      iter[COLUMN_FIXED] = fixed
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/main.rb b/gtk3-no-gi/sample/gtk-demo/main.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/main.rb
copy to gtk3-no-gi/sample/gtk-demo/main.rb
diff --git a/gtk3/sample/gtk-demo/menus.rb b/gtk3-no-gi/sample/gtk-demo/menus.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/menus.rb
copy to gtk3-no-gi/sample/gtk-demo/menus.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/panes.rb b/gtk3-no-gi/sample/gtk-demo/panes.rb
new file mode 100644
index 0000000..16f01dd
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/panes.rb
@@ -0,0 +1,156 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: panes.rb,v 1.5 2005/02/12 23:06:07 kzys Exp $
+=begin
+= Paned Widgets
+
+The Gtk::HPaned and Gtk::VPaned Widgets divide their content
+area into two panes with a divider in between that the
+user can adjust. A separate child is placed into each
+pane.
+
+There are a number of options that can be set for each pane.
+This test contains both a horizontal (HPaned) and a vertical
+(VPaned) widget, and allows you to adjust the options for
+each side of each widget.
+=end
+require 'common'
+
+module Demo
+  class Panes < BasicWindow
+    def initialize
+      super('Panes')
+      self.border_width = 0
+
+      vbox = Gtk::VBox.new(false, 0)
+      add(vbox)
+
+      vpaned = Gtk::VPaned.new
+      vbox.pack_start(vpaned, :expand => true, :fill => true, :padding => 0)
+      vpaned.border_width = 5
+
+      hpaned = Gtk::HPaned.new
+      vpaned.add1(hpaned)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+      frame.set_size_request(60, 60)
+      hpaned.add1(frame)
+
+      button = Gtk::Button.new('_Hi there', true)
+      frame.add(button)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+      frame.set_size_request(80, 60)
+      hpaned.add2(frame)
+
+      frame = Gtk::Frame.new
+      frame.shadow_type = :in
+      frame.set_size_request(60, 80)
+      vpaned.add2(frame)
+
+      # Now create toggle buttons to control sizing
+
+      vbox.pack_start(create_pane_options(hpaned,
+                                          'Horizontal', 'Left', 'Right'),
+                      :expand => false, :fill => false, :padding => 0)
+
+      vbox.pack_start(create_pane_options(vpaned,
+                                          'Vertical', 'Top', 'Bottom'),
+                      :expand => false, :fill => false, :padding => 0)
+    end
+
+    def create_pane_options(paned, frame_label, label1, label2)
+      frame = Gtk::Frame.new(frame_label)
+      frame.border_width = 4
+
+      table = Gtk::Table.new(3, 2, true)
+      frame.add(table)
+
+      label = Gtk::Label.new(label1)
+      table.attach_defaults(label, 0, 1, 0, 1)
+
+      check_button = Gtk::CheckButton.new('_Resize', true)
+      table.attach_defaults(check_button, 0, 1, 1, 2)
+      check_button.signal_connect('toggled') do
+        toggle_resize(paned.child1)
+      end
+
+      check_button = Gtk::CheckButton.new('_Shrink', true)
+      table.attach_defaults(check_button, 0, 1, 2, 3)
+      check_button.active = true
+      check_button.signal_connect('toggled') do
+        toggle_shrink(paned.child1)
+      end
+
+      label = Gtk::Label.new(label2)
+      table.attach_defaults(label, 1, 2, 0, 1)
+
+      check_button = Gtk::CheckButton.new('_Resize')
+      table.attach_defaults(check_button, 1, 2, 1, 2)
+      check_button.active = true
+      check_button.signal_connect('toggled') do
+        toggle_resize(paned.child2)
+      end
+
+      check_button = Gtk::CheckButton.new('_Shrink')
+      table.attach_defaults(check_button, 1, 2, 2, 3)
+      check_button.active = true
+      check_button.signal_connect('toggled') do
+        toggle_shrink(paned.child2)
+      end
+
+      return frame
+    end
+
+    def toggle_resize(child)
+      paned = child.parent
+      is_child1 = (child == paned.child1)
+
+      resize = if is_child1
+                 paned.child1_resize?
+               else
+                 paned.child2_resize?
+               end
+
+      shrink = if is_child1
+                 paned.child1_shrink?
+               else
+                 paned.child2_shrink?
+               end
+
+      child.parent.remove(child)
+      if is_child1
+        paned.pack1(child, !resize, shrink)
+      else
+        paned.pack2(child, !resize, shrink)
+      end
+    end
+
+    def toggle_shrink(child)
+      paned = child.parent
+      is_child1 = (child == paned.child1)
+
+      resize = if is_child1
+                 paned.child1_resize?
+               else
+                 paned.child2_resize?
+               end
+
+      shrink = if is_child1
+                 paned.child1_shrink?
+               else
+                 paned.child2_shrink?
+               end
+
+      child.parent.remove(child)
+      if is_child1
+        paned.pack1(child, resize, !shrink)
+      else
+        paned.pack2(child, resize, !shrink)
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/pixbufs.rb b/gtk3-no-gi/sample/gtk-demo/pixbufs.rb
new file mode 100644
index 0000000..6cb386a
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/pixbufs.rb
@@ -0,0 +1,167 @@
+# Copyright (c) 2003-2014 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: pixbufs.rb,v 1.5 2005/02/12 23:02:43 kzys Exp $
+=begin
+= Pixbufs
+
+A Gdk::Pixbuf represents an image, normally in RGB or RGBA format.
+Pixbufs are normally used to load files from disk and perform
+image scaling.
+
+This demo is not all that educational, but looks cool. It was written
+by Extreme Pixbuf Hacker Federico Mena Quintero. It also shows
+off how to use Gtk::DrawingArea to do a simple animation.
+
+Look at the Image demo for additional pixbuf usage examples.
+=end
+
+require "common"
+
+module Demo
+  class Pixbufs < BasicWindow
+    FRAME_DELAY = 50
+
+    BACKGROUND_NAME = "background.jpg"
+
+    IMAGE_NAMES = [
+      "apple-red.png",
+      "gnome-applets.png",
+      "gnome-calendar.png",
+      "gnome-foot.png",
+      "gnome-gmush.png",
+      "gnome-gimp.png",
+      "gnome-gsame.png",
+      "gnu-keys.png",
+      "ruby-gnome2-logo.png",
+    ]
+
+    CYCLE_LEN = 60
+    def initialize
+      super("Pixbufs")
+      set_resizable(false)
+
+      @background = nil
+      @frame = nil
+      @frame_num = 0
+      @images = []
+
+      begin
+        load_pixbufs
+
+        set_size_request(@background.width, @background.height)
+
+        @frame = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB,
+                                 false, 8,
+                                 @background.width, @background.height)
+
+        @da = Gtk::DrawingArea.new
+
+        @da.signal_connect("draw") do |w, e|
+          draw_cb(w, e)
+        end
+
+        add(@da)
+
+        timeout_id = GLib::Timeout.add(FRAME_DELAY) do
+          timeout
+        end
+        signal_connect("destroy") do
+          GLib::Source.remove(timeout_id)
+        end
+      rescue
+        message = "Failed to load an image: #{$!.message}"
+        dialog = Gtk::MessageDialog.new(:parent       => self,
+                                        :flags        => :destroy_with_parent,
+                                        :type         => :error,
+                                        :buttons_type => :close,
+                                        :message      => message)
+
+        dialog.signal_connect("response") do
+          dialog.destroy
+        end
+
+        dialog.show
+      end
+    end
+
+    def load_pixbufs
+      # Loads the images for the demo
+
+      if @background
+        return # already loaded earlier
+      end
+
+      # demo_find_file() looks in the the current directory first,
+      # so you can run gtk-demo without installing GTK, then looks
+      # in the location where the file is installed.
+      #
+      filename = Demo.find_file(BACKGROUND_NAME)
+      @background = Gdk::Pixbuf.new(filename)
+
+      IMAGE_NAMES.each_with_index do |basename, i|
+        filename = Demo.find_file(basename)
+
+        @images[i] = Gdk::Pixbuf.new(filename)
+      end
+    end
+
+    def draw_cb(widget, cairo_context)
+      cairo_context.set_source_pixbuf(@frame)
+      cairo_context.paint
+      true
+    end
+
+    # Timeout handler to regenerate the frame
+    def timeout
+      @background.copy_area(0, 0, @background.width, @background.height,
+                           @frame, 0, 0)
+
+      f = Float(@frame_num % CYCLE_LEN) / CYCLE_LEN;
+
+      xmid = @background.width  / 2.0
+      ymid = @background.height / 2.0
+
+      radius = [xmid, ymid].min / 2.0
+
+      @images.each_with_index do |image, i|
+        ang = 2.0 * Math::PI * Float(i) / IMAGE_NAMES.length - f * 2.0 * Math::PI
+
+        r = radius + (radius / 3.0) * Math.sin(f * 2.0 * Math::PI)
+
+        xpos = (xmid + r * Math.cos(ang) - image.width  / 2.0 + 0.5).floor
+        ypos = (ymid + r * Math.sin(ang) - image.height / 2.0 + 0.5).floor
+
+        k = if (i & 1) == 1
+              Math.sin(f * 2.0 * Math::PI)
+            else
+              Math.cos(f * 2.0 * Math::PI)
+            end
+        k = [0.25, 2.0 * k * k].max
+
+        r1 = Gdk::Rectangle.new(xpos, ypos, image.width * k, image.height * k)
+        r2 = Gdk::Rectangle.new(0, 0, @background.width, @background.height)
+
+        dest = r1.intersect(r2)
+        if dest
+          @frame.composite!(image, dest.x, dest.y, dest.width, dest.height,
+                            xpos, ypos, k, k, Gdk::Pixbuf::INTERP_NEAREST,
+                            if (i & 1) == 1
+                              [
+                                127,
+                                (255 * Math.sin(f * 2.0 * Math::PI)).abs,
+                              ].max
+                            else
+                              [
+                                127,
+                                (255 * Math.cos(f * 2.0 * Math::PI)).abs,
+                              ].max
+                            end)
+        end
+      end
+      @da.queue_draw
+      @frame_num += 1
+      true
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/printing.rb b/gtk3-no-gi/sample/gtk-demo/printing.rb
new file mode 100644
index 0000000..ac88e31
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/printing.rb
@@ -0,0 +1,128 @@
+# Copyright (c) 2008 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+=begin
+= Printing
+
+Gtk::PrintOperation offers a simple API to support printing
+in a cross-platform way.
+=end
+
+require 'common'
+
+module Demo
+  class Printing < BasicWindow
+    Data = Struct.new(:font_size, :lines_per_page, :lines, :n_pages)
+    HEADER_HEIGHT = 10 * 72 / 25.4
+    HEADER_GAP = 3 * 72 / 25.4
+
+    def initialize
+      super('Printing')
+
+      button = Gtk::Button.new("Print...")
+      button.signal_connect("clicked") do
+        begin
+          run_print_operation
+        rescue
+          dialog = Gtk::MessageDialog.new(self, :destroy_with_parent, :error,
+                                          :close, $!.message)
+          dialog.signal_connect("response") do
+            dialog.destroy
+            true
+          end
+          dialog.show
+        end
+        true
+      end
+      add(button)
+    end
+
+    private
+    def run_print_operation
+      operation = Gtk::PrintOperation.new
+
+      data = Data.new
+      data.font_size = 12.0
+      operation.signal_connect("begin-print") do |_operation, context|
+        on_begin_print(_operation, context, data)
+      end
+      operation.signal_connect("draw-page") do |_operation, context, page_number|
+        on_draw_page(_operation, context, page_number, data)
+      end
+      operation.signal_connect("end-print") do |_operation, context|
+        on_end_print(_operation, context, data)
+      end
+
+      operation.use_full_page = false
+      operation.unit = :points
+
+      operation.run(:print_dialog, self)
+    end
+
+    def on_begin_print(operation, context, data)
+      height = context.height - HEADER_HEIGHT - HEADER_GAP
+      data.lines_per_page = (height / data.font_size).floor
+      data.lines = File.readlines(__FILE__)
+      data.n_pages = (data.lines.size - 1) / data.lines_per_page + 1
+      operation.set_n_pages(data.n_pages)
+    end
+
+    def on_draw_page(operation, context, page_number, data)
+      cr = context.cairo_context
+      draw_header(cr, operation, context, page_number, data)
+      draw_body(cr, operation, context, page_number, data)
+    end
+
+    def draw_header(cr, operation, context, page_number, data)
+      width = context.width
+
+      cr.rectangle(0, 0, width, HEADER_HEIGHT)
+      cr.set_source_rgb(0.8, 0.8, 0.8)
+      cr.fill_preserve
+
+      cr.set_source_rgb(0, 0, 0)
+      cr.line_width = 1
+      cr.stroke
+
+      layout = context.create_pango_layout
+      layout.font_description = "sans 14"
+
+      layout.text = File.basename(__FILE__)
+      text_width, text_height = layout.pixel_size
+
+      if (text_width > width)
+        layout.width = width
+        layout.ellipsize = :start
+        text_width, text_height = layout.pixel_size
+      end
+
+      y = (HEADER_HEIGHT - text_height) / 2
+
+      cr.move_to((width - text_width) / 2, y)
+      cr.show_pango_layout(layout)
+
+      layout.text = "#{page_number + 1}/#{data.n_pages}"
+      layout.width = -1
+      text_width, text_height = layout.pixel_size
+      cr.move_to(width - text_width - 4, y)
+      cr.show_pango_layout(layout)
+    end
+
+    def draw_body(cr, operation, context, page_number, data)
+      layout = context.create_pango_layout
+      description = Pango::FontDescription.new("monosapce")
+      description.size = data.font_size * Pango::SCALE
+      layout.font_description = description
+
+      cr.move_to(0, HEADER_HEIGHT + HEADER_GAP)
+      start_line = page_number * data.lines_per_page
+      data.lines[start_line, data.lines_per_page].each do |line|
+        layout.text = line
+        cr.show_pango_layout(layout)
+        cr.rel_move_to(0, data.font_size)
+      end
+    end
+
+    def on_end_print(operation, context, data)
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/reset.css b/gtk3-no-gi/sample/gtk-demo/reset.css
new file mode 100644
index 0000000..117563a
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/reset.css
@@ -0,0 +1,69 @@
+/* @import this colorsheet to get the default values for every property.
+ * This is useful when writing special CSS tests that should not be
+ * inluenced by themes - not even the default ones.
+ * Keep in mind that the output will be very ugly and not look like
+ * anything GTK.
+ * Also, when adding new style properties, please add them here.
+ */
+
+* {
+  color: inherit;
+  font-size: inherit;
+  background-color: initial;
+  font-family: inherit;
+  font-style: inherit;
+  font-variant: inherit;
+  font-weight: inherit;
+  text-shadow: inherit;
+  icon-shadow: inherit;
+  box-shadow: initial;
+  margin-top: initial;
+  margin-left: initial;
+  margin-bottom: initial;
+  margin-right: initial;
+  padding-top: initial;
+  padding-left: initial;
+  padding-bottom: initial;
+  padding-right: initial;
+  border-top-style: initial;
+  border-top-width: initial;
+  border-left-style: initial;
+  border-left-width: initial;
+  border-bottom-style: initial;
+  border-bottom-width: initial;
+  border-right-style: initial;
+  border-right-width: initial;
+  border-top-left-radius: initial;
+  border-top-right-radius: initial;
+  border-bottom-right-radius: initial;
+  border-bottom-left-radius: initial;
+  outline-style: initial;
+  outline-width: initial;
+  outline-offset: initial;
+  background-clip: initial;
+  background-origin: initial;
+  background-size: initial;
+  background-position: initial;
+  border-top-color: initial;
+  border-right-color: initial;
+  border-bottom-color: initial;
+  border-left-color: initial;
+  outline-color:  initial;
+  background-repeat: initial;
+  background-image: initial;
+  border-image-source: initial;
+  border-image-repeat: initial;
+  border-image-slice: initial;
+  border-image-width: initial;
+  transition-property: initial;
+  transition-duration: initial;
+  transition-timing-function: initial;
+  transition-delay: initial;
+  engine: initial;
+  gtk-key-bindings: initial;
+
+  -GtkWidget-focus-line-width: 0;
+  -GtkWidget-focus-padding: 0;
+  -GtkNotebook-initial-gap: 0;
+}
+
diff --git a/gtk3-no-gi/sample/gtk-demo/rotated_text.rb b/gtk3-no-gi/sample/gtk-demo/rotated_text.rb
new file mode 100644
index 0000000..01b2d23
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/rotated_text.rb
@@ -0,0 +1,72 @@
+# Copyright (c) 2005-2014  Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: rotated_text.rb,v 1.2 2005/03/05 15:01:16 mutoh Exp $
+=begin
+= Rotated Text
+
+This demo shows how to use Cairo and Pango to draw rotated and transformed text.
+=end
+require "common"
+
+module Demo
+  class RotatedText < BasicWindow
+    RADIUS = 150
+    N_WORDS = 10
+    FONT = "Sans Bold 27"
+
+    def initialize
+      super("Rotated Text")
+
+      drawing_area = Gtk::DrawingArea.new
+      add(drawing_area)
+      drawing_area.override_background_color(:normal, Gdk::RGBA.new(1.0,
+                                                                    1.0,
+                                                                    1.0,
+                                                                    0.0))
+
+      drawing_area.signal_connect("draw") do |_drawing_area, cairo_context|
+        cairo_context.set_source_rgb(1.0, 1.0, 1.0)
+        cairo_context.paint
+        cairo_context.save do
+          width, height = size
+          cairo_context.scale(width.to_f / (RADIUS * 2),
+                              height.to_f / (RADIUS * 2))
+          draw_text(cairo_context)
+        end
+      end
+    end
+
+    private
+    def draw_text(cairo_context)
+      # Center coordinates on the middle of the region we are drawing
+      cairo_context.translate(RADIUS, RADIUS)
+
+      # Create a PangoLayout, set the font and text
+      layout = cairo_context.create_pango_layout
+
+      layout.text = "Text"
+      layout.font_description = Pango::FontDescription.new(FONT)
+
+      # Draw the layout N_WORDS times in a circle
+      N_WORDS.times do |i|
+        angle = (360.0 * i) / N_WORDS
+
+        cairo_context.save do
+          # Gradient from red at angle == 60 to blue at angle == 240
+          red = (1 + Math.cos((angle - 60) * Math::PI / 180.0)) / 2
+          cairo_context.set_source_rgb(red, 0.0, 1.0 - red)
+
+          cairo_context.rotate(angle * Math::PI / 180.0)
+
+          # Inform Pango to re-layout the text with the new transformation
+          cairo_context.update_pango_layout(layout)
+
+          width, height = layout.size
+          cairo_context.move_to(-(width / Pango::SCALE) / 2, -RADIUS)
+          cairo_context.show_pango_layout(layout)
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/ruby-gnome2-logo.png b/gtk3-no-gi/sample/gtk-demo/ruby-gnome2-logo.png
new file mode 100644
index 0000000..0b38a52
Binary files /dev/null and b/gtk3-no-gi/sample/gtk-demo/ruby-gnome2-logo.png differ
diff --git a/gtk3/sample/gtk-demo/sizegroup.rb b/gtk3-no-gi/sample/gtk-demo/sizegroup.rb
similarity index 100%
copy from gtk3/sample/gtk-demo/sizegroup.rb
copy to gtk3-no-gi/sample/gtk-demo/sizegroup.rb
diff --git a/gtk3-no-gi/sample/gtk-demo/spinner.rb b/gtk3-no-gi/sample/gtk-demo/spinner.rb
new file mode 100644
index 0000000..1a4452e
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/spinner.rb
@@ -0,0 +1,59 @@
+# Copyright (c) 2013 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+=begin
+= Spinner
+
+GtkSpinner allows to show that background activity is on-going.
+=end
+require 'common'
+
+module Demo
+  class Spinner < Gtk::Dialog
+    def initialize
+      super(:title => 'Spinner',
+            :parent => nil,
+            :flags => nil,
+            :buttons => [[:close, :none]])
+
+      signal_connect(:response) {self.destroy}
+      signal_connect(:destroy) {self.destroy}
+
+      self.resizable = false
+
+      vbox = Gtk::Box.new :vertical, 5
+
+      self.content_area.pack_start vbox, :expand => true, :fill => true, :padding => 0
+      vbox.border_width = 5
+
+      # Sensitive
+      hbox = Gtk::Box.new :horizontal, 5
+      @spinner_sensitive = Gtk::Spinner.new
+      hbox.add @spinner_sensitive
+      hbox.add Gtk::Entry.new
+      vbox.add hbox
+
+      # Disabled
+      hbox = Gtk::Box.new :horizontal, 5
+      @spinner_insensitive = Gtk::Spinner.new
+      hbox.add @spinner_insensitive
+      hbox.add Gtk::Entry.new
+      vbox.add hbox
+      hbox.sensitive = false
+
+      button = Gtk::Button.new :stock_id => :media_play
+      button.signal_connect(:clicked) do
+        @spinner_sensitive.start
+        @spinner_insensitive.start
+      end
+      vbox.add button
+
+      button = Gtk::Button.new :stock_id => :media_stop
+      button.signal_connect(:clicked) do
+        @spinner_sensitive.stop
+        @spinner_insensitive.stop
+      end
+      vbox.add button
+    end
+  end
+end
\ No newline at end of file
diff --git a/gtk3-no-gi/sample/gtk-demo/stock_browser.rb b/gtk3-no-gi/sample/gtk-demo/stock_browser.rb
new file mode 100644
index 0000000..128ebc3
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/stock_browser.rb
@@ -0,0 +1,233 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: stock_browser.rb,v 1.5 2005/02/12 23:02:43 kzys Exp $
+=begin
+= Stock Item and Icon Browser
+
+This source code for this demo doesn't demonstrate anything
+particularly useful in applications. The purpose of the 'demo' is
+just to provide a handy place to browse the available stock icons
+and stock items.
+=end
+require 'common'
+
+module Demo
+  class StockBrowser < BasicWindow
+    Item = Struct.new('Item',
+      :stock_id, :label, :modifier, :keyval, :translation_domain)
+    ItemInfo = Struct.new('ItemInfo',
+      :id, :item, :small_icon, :const, :accel_str)
+    ItemDisplay = Struct.new('ItemDisplay',
+      :type_label, :const_label, :id_label, :label_accel_label,
+      :icon_image)
+
+    def initialize
+      super('Stock Icons and Items')
+      set_default_size(-1, 500)
+
+      self.border_width = 8
+
+      hbox = Gtk::Box.new(:horizontal, 8)
+      add(hbox)
+
+      sw = Gtk::ScrolledWindow.new
+      sw.set_policy(:never, :automatic)
+      hbox.pack_start(sw, :expand => false, :fill => false, :padding => 0)
+
+      model = create_model
+
+      treeview = Gtk::TreeView.new(model)
+      sw.add(treeview)
+
+      column = Gtk::TreeViewColumn.new
+      column.title = 'Const'
+
+      cell_renderer = Gtk::CellRendererPixbuf.new
+      column.pack_start(cell_renderer, :expand => false)
+      column.set_attributes(cell_renderer, "stock_id" => 1)
+
+      cell_renderer = Gtk::CellRendererText.new
+      column.pack_start(cell_renderer, :expand => true)
+      column.set_cell_data_func(cell_renderer) do |column, cell, model, iter|
+        cell.text = iter[0].const
+      end
+
+      treeview.append_column(column)
+
+      cell_renderer = Gtk::CellRendererText.new
+      treeview.insert_column(-1, 'Label', cell_renderer) do |col, cell, model, iter|
+        info = iter[0]
+        cell.text = info.item.label if info
+      end
+
+      cell_renderer = Gtk::CellRendererText.new
+      treeview.insert_column(-1, 'Accel', cell_renderer) do |col, cell, model, iter|
+        info = iter[0]
+        cell.text = info.accel_str if info
+      end
+
+      cell_renderer = Gtk::CellRendererText.new
+      treeview.insert_column(-1, 'ID', cell_renderer) do |col, cell, model, iter|
+        info = iter[0]
+        cell.text = info.id if info
+      end
+
+      align = Gtk::Alignment.new(0.5, 0.0, 0.0, 0.0)
+      hbox.pack_end(align, :expand => false, :fill => false, :padding => 0)
+
+      frame = Gtk::Frame.new('Selected Item')
+      align.add(frame)
+
+      vbox = Gtk::Box.new(:vertical, 8)
+      vbox.border_width = 4
+      frame.add(vbox)
+
+      display = ItemDisplay.new
+      class << treeview
+        @display = nil
+        attr_accessor :display
+      end
+      treeview.display = display
+
+      display.type_label = Gtk::Label.new
+      display.const_label = Gtk::Label.new
+      display.id_label = Gtk::Label.new
+      display.label_accel_label = Gtk::Label.new
+      display.icon_image = Gtk::Image.new # empty image
+
+      vbox.pack_start(display.type_label, :expand => false, :fill => false, :padding => 0)
+
+      vbox.pack_start(display.icon_image, :expand => false, :fill => false, :padding => 0)
+
+      vbox.pack_start(display.label_accel_label, :expand => false, :fill => false, :padding => 0)
+      vbox.pack_start(display.const_label, :expand => false, :fill => false, :padding => 0)
+      vbox.pack_start(display.id_label, :expand => false, :fill => false, :padding => 0)
+
+      selection = treeview.selection
+      selection.mode = :single
+
+      selection.signal_connect('changed') do |s|
+        selection_changed(s)
+      end
+    end
+
+    def create_model
+      store = Gtk::ListStore.new(ItemInfo, String, String, String)
+
+      list_ids = Gtk::Stock.ids
+      list_ids.sort! do |a, b|
+        a.to_s <=> b.to_s
+      end
+      list_ids.each do |stock_id|
+        info = ItemInfo.new
+
+        info.id = stock_id
+
+        begin
+          info.item = Item.new(*Gtk::Stock.lookup(stock_id))
+        rescue ArgumentError
+          info.item = Item.new
+        end
+
+        # only show icons for stock IDs that have default icons
+        icon_set = Gtk::IconFactory.lookup_default(info.id.to_s)
+        if icon_set
+          # See what sizes this stock icon really exists at
+          sizes = icon_set.sizes
+
+          # Use menu size if it exists, otherwise first size found
+          size = sizes.find do |s| s == :menu end || sizes.first
+
+          info.small_icon = render_icon_pixbuf(info.id, size)
+
+          unless size == :menu
+            # Make the result the proper size for our thumbnail
+            w, h = Gtk::IconSize.lookup(size)
+
+            scaled = info.small_icon.scale(w, h, Gdk::Pixbuf::INTERP_BILINEAR)
+            info.small_icon = scaled
+          end
+
+        else
+          info.small_icon = nil
+        end
+
+        if info.item.keyval
+          info.accel_str = Gtk::Accelerator.to_name(info.item.keyval,
+                      info.item.modifier)
+        else
+          info.accel_str = ''
+        end
+
+        info.const = id_to_const(info.id)
+
+        iter = store.append
+        iter[0] = info
+        iter[1] = info.id
+      end
+
+      return store
+    end
+
+    def selection_changed(selection)
+      treeview = selection.tree_view
+      display = treeview.display
+
+      iter = selection.selected
+      info = iter[0]
+
+      display.type_label.label = if info.small_icon and info.item.label
+                                   'Icon and Item'
+                                 elsif info.small_icon
+                                   'Icon Only'
+                                 elsif info.item.label
+                                   'Item Only'
+                                 else
+                                   '???????'
+                                 end
+      display.const_label.label = info.const
+      display.id_label.label = info.id
+
+      if info.item.label
+        str = "%s %s" % [info.item.label, info.accel_str]
+        display.label_accel_label.set_text(str, true)
+      else
+        display.label_accel_label.set_text('')
+      end
+
+      if info.small_icon
+        display.icon_image.set_from_stock(info.id, get_largest_size(info.id))
+      else
+        display.icon_image.pixbuf = nil
+      end
+    end
+
+    def get_largest_size(symbol)
+      set = Gtk::IconFactory.lookup_default(symbol.id2name)
+      best_size = :invalid
+      best_pixels = 0
+
+      sizes = set.sizes
+      sizes.collect! do |i|
+        width, height = Gtk::IconSize.lookup(i)
+        [i, width * height]
+      end
+      return (sizes.max do |a, b| a[1] <=> b[1] end)[0]
+    end
+
+    def id_to_const(id)
+      const = ''
+
+      s = id.id2name
+      if s =~ /^gtk-/
+        const += 'Gtk::Stock::'
+        s[0,4] = ''
+      end
+
+      const += s.upcase.gsub(/-/, '_')
+
+      const
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/textview.rb b/gtk3-no-gi/sample/gtk-demo/textview.rb
new file mode 100644
index 0000000..07ce061
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/textview.rb
@@ -0,0 +1,436 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: textview.rb,v 1.8 2005/02/06 18:25:13 kzys Exp $
+=begin
+= Text Widget/Multiple Views
+
+The Gtk::TextView widget displays a Gtk::TextBuffer.
+One Gtk::TextBuffer can be displayed by multiple Gtk::TextViews.
+This demo has two views displaying a single buffer,
+and shows off the widget's text formatting features.
+=end
+require 'common'
+
+module Demo
+  class TextView < BasicWindow
+
+    GRAY50_WIDTH = 2
+    GRAY50_HEIGHT = 2
+    GRAY50_BITS = [0x02, 0x01].pack("c")
+    @@nest_window = nil
+
+    def initialize
+      super("TextView Window")
+
+      set_default_size(450, 450)
+
+      set_title("TextView")
+      set_border_width(0)
+
+      vpaned = Gtk::VPaned.new
+      vpaned.set_border_width(5)
+      add(vpaned)
+      ##
+      # For convenience, we just use the autocreated buffer from
+      # the first text view; you could also create the buffer
+      # by itself with Gtk::TextBuffer.new, then later create
+      # a view widget.
+      #
+      view1 = Gtk::TextView.new
+      buffer = view1.buffer
+      view2 = Gtk::TextView.new(buffer)
+
+      sw = Gtk::ScrolledWindow.new(nil, nil)
+      sw.set_policy(:automatic,
+                    :automatic)
+      vpaned.add1(sw)
+
+      sw.add(view1)
+
+      sw = Gtk::ScrolledWindow.new(nil, nil)
+      sw.set_policy(:automatic,
+                    :automatic)
+      vpaned.add2(sw)
+
+      sw.add(view2)
+
+      create_tags(buffer)
+      insert_text(buffer)
+
+      attach_widgets(view1)
+      attach_widgets(view2)
+
+      vpaned.show_all
+
+      self.show
+    end
+
+    def create_tags(buffer)
+      ##
+      #  Create a bunch of tags. Note that it's also possible to
+      #  create tags with Gtk::TextTag.new then add them to the
+      #  tag table for the buffer, Gtk::TextBuffer#create_tag is
+      #  just a convenience function. Also note that you don't have
+      #  to give tags a name; pass NULL for the name to create an
+      #  anonymous tag.
+      #
+      #  In any real app, another useful optimization would be to create
+      #  a Gtk::TextTagTable in advance, and reuse the same tag table for
+      #  all the buffers with the same tag set, instead of creating
+      #  new copies of the same tags for every buffer.
+      #
+      #  Tags are assigned default priorities in order of addition to the
+      #  tag table.         That is, tags created later that affect the same text
+      #  property affected by an earlier tag will override the earlier
+      #  tag.  You can modify tag priorities with
+      #  Gtk::TextTag#set_priority.
+      #
+
+      buffer.create_tag('heading',
+                        'weight' => Pango::FontDescription::WEIGHT_BOLD,
+                        'size' => 15 * Pango::SCALE)
+
+      buffer.create_tag("italic",
+                        "style" => Pango::FontDescription::STYLE_ITALIC)
+
+      buffer.create_tag("bold",
+                        "weight" => Pango::FontDescription::WEIGHT_BOLD)
+
+      buffer.create_tag("big",
+                        # points times the PANGO_SCALE factor
+                        "size" => 20 * Pango::SCALE)
+
+      buffer.create_tag("xx-small",
+                        "scale" => Pango::AttrScale::XX_SMALL)
+
+      buffer.create_tag("x-large",
+                        "scale" => Pango::AttrScale::X_LARGE)
+
+      buffer.create_tag("monospace", "family" => "monospace")
+
+      buffer.create_tag("blue_foreground", "foreground" => "blue")
+
+      buffer.create_tag("red_background", "background" => "red")
+
+      stipple = Gdk::Pixmap.create_from_data(nil, GRAY50_BITS, GRAY50_WIDTH,
+                                             GRAY50_HEIGHT)
+
+      buffer.create_tag("background_stipple",
+                        "background_stipple" => stipple)
+
+      buffer.create_tag("foreground_stipple",
+                        "foreground_stipple" => stipple)
+
+      buffer.create_tag("big_gap_before_line",
+                        "pixels_above_lines" => 30)
+
+      buffer.create_tag("big_gap_after_line",
+                        "pixels_below_lines" => 30)
+
+      buffer.create_tag("double_spaced_line",
+                        "pixels_inside_wrap" => 10)
+
+      buffer.create_tag("not_editable",
+                         "editable" => false)
+
+      buffer.create_tag("word_wrap",
+                        "wrap_mode" => :word)
+
+      buffer.create_tag("char_wrap",
+                        "wrap_mode" => Gtk::TextTag::WRAP_CHAR)
+
+      buffer.create_tag("no_wrap",
+                        "wrap_mode" => :none)
+
+      buffer.create_tag("center",
+                        "justification" => Gtk::JUSTIFY_CENTER)
+
+      buffer.create_tag("right_justify",
+                        "justification" => Gtk::JUSTIFY_RIGHT)
+
+      buffer.create_tag("wide_margins",
+                        "left_margin" => 50,
+                          "right_margin" => 50)
+
+      buffer.create_tag("strikethrough",
+                        "strikethrough" => true)
+
+      buffer.create_tag("underline",
+                        "underline" => Pango::AttrUnderline::SINGLE)
+
+      buffer.create_tag("double_underline",
+                        "underline" => Pango::AttrUnderline::DOUBLE)
+
+      buffer.create_tag("superscript",
+                        "rise" => 10 * Pango::SCALE, #  10 pixels
+                        "size" => 8 * Pango::SCALE)  #  8 points
+
+      buffer.create_tag("subscript",
+                        "rise" => -10 * Pango::SCALE, #  10 pixels
+                        "size" => 8 * Pango::SCALE) #  8 points
+
+      buffer.create_tag("rtl_quote",
+                        "wrap_mode" => :word,
+                        "direction" => Gtk::Widget::TEXT_DIR_RTL,
+                        "indent" => 30,
+                        "left_margin" => 20,
+                        "right_margin" => 20)
+    end
+
+    def insert_text(buffer)
+
+      ##
+      #  Demo.find_file looks in the the current directory first,
+      # so you can run gtk-demo without installing GTK, then looks
+      # in the location where the file is installed.
+      #
+
+      filename = Demo.find_file("gtk-logo-rgb.gif")
+      pixbuf = Gdk::Pixbuf.new(filename) if filename
+
+      unless pixbuf
+        $stderr.print "Failed to load image file gtk-logo-rgb.gif\n"
+        exit 1
+      end
+
+      scaled = pixbuf.scale(32, 32, Gdk::Pixbuf::INTERP_BILINEAR)
+      pixbuf = scaled
+
+      ##
+      #  get start of buffer; each insertion will revalidate the
+      #  iterator to point to just after the inserted text.
+      #
+
+      iter = buffer.get_iter_at(:offset => 0)
+
+      buffer.insert(iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n")
+
+      buffer.insert(iter, "Font styles. ", 'heading')
+
+      buffer.insert(iter, "For example, you can have ")
+      buffer.insert(iter, "italic", "italic")
+      buffer.insert(iter, ", ")
+      buffer.insert(iter, "bold", "bold")
+      buffer.insert(iter, ", or ")
+      buffer.insert(iter, "monospace(typewriter)", "monospace")
+      buffer.insert(iter, ", or ")
+      buffer.insert(iter, "big", "big")
+      buffer.insert(iter, " text. ")
+      buffer.insert(iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as ")
+      buffer.insert(iter, "xx-small", "xx-small")
+      buffer.insert(iter, " or ")
+      buffer.insert(iter, "x-large", "x-large")
+      buffer.insert(iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n")
+
+      buffer.insert(iter, "Colors. ", "heading")
+
+      buffer.insert(iter, "Colors such as ")
+      buffer.insert(iter, "a blue foreground", "blue_foreground")
+      buffer.insert(iter, " or ")
+      buffer.insert(iter, "a red background", "red_background")
+      buffer.insert(iter, " or even ")
+      buffer.insert(iter, "a stippled red background",
+                    "red_background", "background_stipple")
+
+      buffer.insert(iter, " or ")
+      buffer.insert(iter, "a stippled blue foreground on solid red background",
+                    "blue_foreground", "red_background", "foreground_stipple")
+
+      buffer.insert(iter, "(select that to read it) can be used.\n\n")
+
+      buffer.insert(iter, "Underline, strikethrough, and rise. ", "heading")
+
+      buffer.insert(iter, "Strikethrough", "strikethrough")
+      buffer.insert(iter, ", ")
+      buffer.insert(iter, "underline", "underline")
+      buffer.insert(iter, ", ")
+      buffer.insert(iter, "double underline", "double_underline")
+      buffer.insert(iter, ", ")
+      buffer.insert(iter, "superscript", "superscript")
+      buffer.insert(iter, ", and ")
+      buffer.insert(iter, "subscript", "subscript")
+      buffer.insert(iter, " are all supported.\n\n")
+
+      buffer.insert(iter, "Images. ", "heading")
+
+      buffer.insert(iter, "The buffer can have images in it: ")
+      buffer.insert(iter, pixbuf)
+      buffer.insert(iter, pixbuf)
+      buffer.insert(iter, pixbuf)
+      buffer.insert(iter, " for example.\n\n")
+
+      buffer.insert(iter, "Spacing. ", "heading")
+
+      buffer.insert(iter, "You can adjust the amount of space before each line.\n")
+
+      buffer.insert(iter, "This line has a whole lot of space before it.\n",
+                    "big_gap_before_line", "wide_margins")
+      buffer.insert(iter, "You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n",
+                    "big_gap_after_line", "wide_margins")
+
+      buffer.insert(iter, "You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n",
+                    "double_spaced_line", "wide_margins")
+
+      buffer.insert(iter, "Also note that those lines have extra-wide margins.\n\n")
+
+      buffer.insert(iter, "Editability. ", "heading")
+
+      buffer.insert(iter, "This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n",
+                    "not_editable")
+
+      buffer.insert(iter, "Wrapping. ", "heading")
+
+      buffer.insert(iter, "This line(and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n")
+
+      buffer.insert(iter, "This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", "char_wrap")
+
+      buffer.insert(iter, "This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", "no_wrap")
+
+      buffer.insert(iter, "Justification. ", "heading")
+
+      buffer.insert(iter, "\nThis line has center justification.\n", "center")
+
+      buffer.insert(iter, "This line has right justification.\n",
+                    "right_justify")
+
+      buffer.insert(iter, "\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", "wide_margins")
+
+      buffer.insert(iter, "Internationalization. ", "heading")
+
+      buffer.insert(iter, "You can put all sorts of Unicode text in the buffer.\n\nGerman(Deutsch Süd) Grüß Gott\nGreek(Ελληνικά) Γειά σας\nHebrew        שלום\nJapanese(日本語)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n")
+
+      buffer.insert(iter, "Here's a word-wrapped quote in a right-to-left language:\n")
+      buffer.insert(iter, "??? ??? ???? ?? ???? ???????? ????? ?? ???? ?????? ??????? ??????? ?? ???? ?????? ?? ????? ?? ??????? ????? ??????? ??? ?????? ????? ?????? ????? ???? ?? ?????? ?????? ?? ???????? ?????? ????? ?? ???? ???? ????????? ???????. ???? ???? ??? ???????? ????? ?? »????????« ?? ???????.\n\n", "rtl_quote")
+
+      buffer.insert(iter, "You can put widgets in the buffer: Here's a button: ")
+      anchor = buffer.create_child_anchor(iter)
+      buffer.insert(iter, " and a menu: ")
+      anchor = buffer.create_child_anchor(iter)
+      buffer.insert(iter, " and a scale: ")
+      anchor = buffer.create_child_anchor(iter)
+      buffer.insert(iter, " and an animation: ")
+      anchor = buffer.create_child_anchor(iter)
+      buffer.insert(iter, " finally a text entry: ")
+      anchor = buffer.create_child_anchor(iter)
+      buffer.insert(iter, ".\n")
+
+      buffer.insert(iter, "\n\nThis demo doesn't demonstrate all the Gtk::TextBuffer features; it leaves out, for example: invisible/hidden text(doesn't work in GTK 2, but planned), tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...")
+
+      #  Apply word_wrap tag to whole buffer
+
+      buf_start, buf_end = buffer.bounds
+      buffer.apply_tag("word_wrap", buf_start, buf_end)
+    end
+
+    def find_anchor(iter)
+      while iter.forward_char do
+        return true if iter.child_anchor
+      end
+      return false
+    end
+
+    def attach_widgets(text_view)
+
+      buffer = text_view.buffer;
+
+      iter = buffer.start_iter
+
+      i = 0;
+      while find_anchor(iter) do
+        anchor = iter.child_anchor
+
+        if  i == 0
+          widget = Gtk::Button.new("Click Me")
+          widget.signal_connect('clicked') { |button|
+            if @@nest_window and ! @@nest_window.destroyed?
+              @@nest_window.present
+              break
+            end
+
+            buffer = Gtk::TextBuffer.new
+            iter = buffer.start_iter
+
+            buffer.insert(iter, "This buffer is shared by a set of nested text views.\n Nested view:\n")
+            anchor = buffer.create_child_anchor(iter)
+            buffer.insert(iter, "\nDon't do this in real applications, please.\n")
+
+            view = Gtk::TextView.new(buffer)
+
+            recursive_attach_view(0, view, anchor)
+
+            @@nest_window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
+            sw = Gtk::ScrolledWindow.new(nil, nil)
+            sw.set_policy(:automatic,
+                          :automatic)
+
+            @@nest_window.add(sw)
+            sw.add(view)
+
+            @@nest_window.set_default_size(300, 400)
+            @@nest_window.show_all
+          }
+        elsif i == 1
+          menu = Gtk::Menu.new
+          widget = Gtk::OptionMenu.new
+
+          menu_item = Gtk::MenuItem.new("Option 1")
+          menu.append(menu_item)
+          menu_item = Gtk::MenuItem.new("Option 2")
+          menu.append(menu_item)
+          menu_item = Gtk::MenuItem.new("Option 3")
+          menu.append(menu_item)
+
+          widget.menu = menu
+
+        elsif i == 2
+          widget = Gtk::HScale.new
+          widget.set_range(0, 100)
+          widget.set_size_request(70, -1)
+
+        elsif i == 3
+          filename = Demo.find_file("floppybuddy.gif")
+          widget = Gtk::Image.new(filename)
+
+        elsif i == 4
+          widget = Gtk::Entry.new
+
+        else
+          #widget = nil;  avoids a compiler warning
+          #g_assert_not_reached ;
+        end
+
+        text_view.add_child_at_anchor(widget,
+                                      anchor)
+
+        widget.show_all
+        i += 1
+      end
+    end
+
+
+    def recursive_attach_view(depth, view, anchor)
+      return  if depth > 4
+
+      child_view = Gtk::TextView.new(view.buffer)
+
+      #  Event box is to add a black border around each child view
+      event_box = Gtk::EventBox.new
+      color = Gdk::Color.parse("black")
+      event_box.modify_bg(Gtk::STATE_NORMAL, color)
+
+      align = Gtk::Alignment.new(0.5, 0.5, 1.0, 1.0)
+      align.set_border_width(1)
+
+      event_box.add(align)
+      align.add(child_view)
+
+      view.add_child_at_anchor(event_box, anchor)
+
+      recursive_attach_view(depth + 1, child_view, anchor)
+    end
+
+  end
+end
+
diff --git a/gtk3-no-gi/sample/gtk-demo/theming.ui b/gtk3-no-gi/sample/gtk-demo/theming.ui
new file mode 100644
index 0000000..728b1d1
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/theming.ui
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkGrid" id="grid">
+    <property name="row-spacing">6</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkToolbar" id="toolbar1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="show-arrow">False</property>
+        <style>
+          <class name="primary-toolbar"/>
+        </style>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton1">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Normal</property>
+            <property name="use_underline">True</property>
+            <property name="is_important">True</property>
+            <property name="icon_name">edit-find</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton2">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Active</property>
+            <property name="use_underline">True</property>
+            <property name="is_important">True</property>
+            <property name="icon_name">edit-find</property>
+            <property name="active">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton3">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Insensitive</property>
+            <property name="use_underline">True</property>
+            <property name="is_important">True</property>
+            <property name="icon_name">edit-find</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton5">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Raised</property>
+            <property name="use_underline">True</property>
+            <property name="is_important">True</property>
+            <property name="icon_name">edit-find-symbolic</property>
+            <style>
+              <class name="raised"/>
+            </style>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton6">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Raised Active</property>
+            <property name="use_underline">True</property>
+            <property name="is_important">True</property>
+            <property name="icon_name">edit-find-symbolic</property>
+            <property name="active">True</property>
+            <style>
+              <class name="raised"/>
+            </style>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="toolbutton4">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Insensitive Active</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">edit-find</property>
+            <property name="is_important">True</property>
+            <property name="active">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolItem" id="toolitementry">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="entry1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="placeholder-text" translatable="yes">Search...</property>
+                <property name="secondary-icon-name">edit-find-symbolic</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolItem" id="toolitemswitch">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkSwitch" id="switch1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">horizontal</property>
+        <property name="valign">center</property>
+        <property name="halign">center</property>
+        <style>
+          <class name="linked"/>
+        </style>
+        <child>
+          <object class="GtkButton" id="button1">
+            <property name="label" translatable="yes">Hi, I am a button</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button2">
+            <property name="label" translatable="yes">And I'm another button</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button3">
+            <property name="label" translatable="yes">This is a button party!</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkToolbar" id="itoolbar1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="icon_size">1</property>
+        <style>
+          <class name="inline-toolbar"/>
+        </style>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton1">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Normal</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">list-add-symbolic</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton2">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Normal</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">list-add-symbolic</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton3">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Active</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">list-remove-symbolic</property>
+            <property name="active">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton4">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Active</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">list-remove-symbolic</property>
+            <property name="active">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton5">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Insensitive</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">edit-find-symbolic</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToggleToolButton" id="itoolbutton6">
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">Insensitive Active</property>
+            <property name="use_underline">True</property>
+            <property name="icon_name">go-up-symbolic</property>
+            <property name="active">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk3-no-gi/sample/gtk-demo/theming_style_classes.rb b/gtk3-no-gi/sample/gtk-demo/theming_style_classes.rb
new file mode 100644
index 0000000..c955bf4
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/theming_style_classes.rb
@@ -0,0 +1,48 @@
+#
+# This sample code is a port of gtk3/demos/gtk-demo/theming_style_classes.c.
+# The UI file used in this sample code is copied from gtk3/demos/gtk-demo.
+# This is licensed under the terms of the GNU Lesser General Public
+# License, version 2.1 or (at your option) later.
+#
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+=begin
+= CSS Theming/Style Classes
+
+GTK+ uses CSS for theming. Style classes can be associated
+with widgets to inform the theme about intended rendering.
+
+This demo shows some common examples where theming features
+of GTK+ are used for certain effects: primary toolbars,
+inline toolbars and linked buttons.
+=end
+
+require "common"
+
+module Demo
+  class ThemingStyleClasses < BasicWindow
+    def initialize
+      super("Style Claases")
+      self.border_width = 12
+
+      builder = Gtk::Builder.new
+      builder.add("theming.ui")
+
+      grid = builder.get_object("grid")
+      add(grid)
+    end
+  end
+end
diff --git a/gtk3-no-gi/sample/gtk-demo/tree_store.rb b/gtk3-no-gi/sample/gtk-demo/tree_store.rb
new file mode 100644
index 0000000..1e2f7d8
--- /dev/null
+++ b/gtk3-no-gi/sample/gtk-demo/tree_store.rb
@@ -0,0 +1,270 @@
+# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+# $Id: tree_store.rb,v 1.7 2005/02/06 18:25:13 kzys Exp $
+=begin
+= Tree View/Tree Store
+
+The Gtk::TreeStore is used to store data in tree form, to be
+used later on by a Gtk::TreeView to display it. This demo builds
+a simple Gtk::TreeStore and displays it. If you're new to the
+GtkTreeView widgets and associates, look into the Gtk::ListStore
+example first.
+=end
+require 'common'
+
+module Demo
+  class TreeStore < BasicWindow
+    # TreeItem structure
+    TreeItem = Struct.new('TreeItem',
+                          :label,
+                          :alex, :havoc, :tim, :owen, :dave,
+                          :world_holiday) # shared by the European hackers
+
+    # columns
+    (
+     HOLIDAY_NAME_COLUMN,
+     ALEX_COLUMN,
+     HAVOC_COLUMN,
+     TIM_COLUMN,
+     OWEN_COLUMN,
+     DAVE_COLUMN,
+
+     VISIBLE_COLUMN,
+     WORLD_COLUMN,
+     NUM_COLUMNS,
+     ) = *(0..9).to_a
+
+
+    # tree data
+    TOPLEVEL = [
+      ['January',
+        [
+          ["New Years Day", true, true, true, true, false, true],
+          ["Presidential Inauguration", false, true, false, true, false, false],
+          ["Martin Luther King Jr. day", false, true, false, true, false, false],
+        ]
+      ],
+      ['February',
+        [
+          ["Presidents' Day", false, true, false, true, false, false],
+          ["Groundhog Day", false, false, false, false, false, false],
+          ["Valentine's Day", false, false, false, false, true, true],
+        ]
+      ],
+      ['March',
+        [
+          ["National Tree Planting Day", false, false, false, false, false, false],
+          [ "St Patrick's Day", false, false, false, false, false, true],
+        ]
+      ],
+      ['April',
+        [
+          [ "April Fools' Day", false, false, false, false, false, true ],
+          [ "Army Day", false, false, false, false, false, false ],
+          [ "Earth Day", false, false, false, false, false, true ],
+          [ "Administrative Professionals' Day", false, false, false, false, false, false ],
+        ]],
+      ['May',
+        [
+          [ "Nurses' Day", false, false, false, false, false, false ],
+          [ "National Day of Prayer", false, false, false, false, false, false ],
+          [ "Mothers' Day", false, false, false, false, false, true ],
+          [ "Armed Forces Day", false, false, false, false, false, false ],
+          [ "Memorial Day", true, true, true, true, false, true ],
+
+        ]
+      ],
+      ['June',
+        [
+          [ "June Fathers' Day", false, false, false, false, false, true ],
+          [ "Juneteenth (Liberation of Slaves)", false, false, false, false, false, false ],
+          [ "Flag Day", false, true, false, true, false, false ],
+        ]
+      ],
+      ['July',
+        [
+          [ "Parents' Day", false, false, false, false, false, true ],
+          [ "Independence Day", false, true, false, true, false, false ],
+        ]
+      ],
+      ['August',
+        [
+          [ "Air Force Day", false, false, false, false, false, false ],
+          [ "Coast Guard Day", false, false, false, false, false, false ],
+          [ "Friendship Day", false, false, false, false, false, false ],
+        ]
+      ],
+      ['September',
+        [
+          [ "Grandparents' Day", false, false, false, false, false, true ],
+          [ "Citizenship Day or Constitution Day", false, false, false, false, false, false ],
+          [ "Labor Day", true, true, true, true, false, true ],
+        ]
+      ],
+      ['October',
+        [
+          [ "National Children's Day", false, false, false, false, false, false ],
+          [ "Bosses' Day", false, false, false, false, false, false ],
+          [ "Sweetest Day", false, false, false, false, false, false ],
+          [ "Mother-in-Law's Day", false, false, false, false, false, false ],
+          [ "Navy Day", false, false, false, false, false, false ],
+          [ "Columbus Day", false, true, false, true, false, false ],
+          [ "Halloween", false, false, false, false, false, true ],
+        ]
+      ],
+      ['November',
+        [
+          [ "Marine Corps Day", false, false, false, false, false, false ],
+          [ "Veterans' Day", true, true, true, true, false, true ],
+          [ "Thanksgiving", false, true, false, true, false, false ],
+        ]
+      ],
+      ['December',
+        [
+          [ 'Pearl Harbor Remembrance Day', false, false, false, false, false, false ],
+          [ 'Christmas', true, true, true, true, false, true ],
+          [ 'Kwanzaa', false, false, false, false, false, false ],
+        ]
+      ],
+    ].collect do |month_name, holidays|
+      [
+        month_name,
+        holidays.collect do |args| TreeItem.new(args) end,
+      ]
+    end
+
+    def initialize
+      # create window, etc
+      super('Card planning sheet')
+
+      vbox = Gtk::VBox.new(false, 8)
+      vbox.border_width = 8
+      add(vbox)
+
+      vbox.pack_start(Gtk::Label.new("Jonathan's Holiday Card Planning Sheet"),
+                      :expand => false, :fill => false, :padding => 0)
+
+      sw = Gtk::ScrolledWindow.new(nil, nil)
+      sw.shadow_type = Gtk::SHADOW_ETCHED_IN
+      sw.set_policy(:automatic,
+                    :automatic)
+      vbox.pack_start(sw, :expand => true, :fill => true, :padding => 0)
+
+      # create model
+      model = create_model
+
+      # create tree view
+      treeview = Gtk::TreeView.new(model)
+      treeview.rules_hint = true
+      treeview.selection.mode = Gtk::SELECTION_MULTIPLE
+
+      add_columns(treeview)
+
+      sw.add(treeview)
+
+      # expand all rows after the treeview widget has been realized
+      treeview.signal_connect('realize') do
+        treeview.expand_all
+      end
+      set_default_size(650, 400)
+    end
+
+    def create_model
+      # create tree store
+      model = Gtk::TreeStore.new(String,
+                                 TrueClass,
+                                 TrueClass,
+                                 TrueClass,
+                                 TrueClass,
+                                 TrueClass,
+                                 TrueClass,
+                                 TrueClass)
+
+      # add data to the tree store
+      TOPLEVEL.each do |month_name, holidays|
+        iter = model.append(nil)
+
+        iter[HOLIDAY_NAME_COLUMN] = month_name
+        (ALEX_COLUMN..DAVE_COLUMN).each do |index|
+          iter[index] = false
+        end
+
+        # add children
+        holidays.each do |holiday|
+          child_iter = model.append(iter)
+          child_iter[HOLIDAY_NAME_COLUMN] = holiday.label[0]
+          %w(alex havoc tim owen dave).each_with_index do |person, i|
+            child_iter[ALEX_COLUMN + i] = holiday[person]
+          end
+          child_iter[VISIBLE_COLUMN] = true
+          child_iter[WORLD_COLUMN] = holiday.world_holiday
+        end
+
+      end
+
+      return model
+    end
+
+    def add_columns(treeview)
+      model = treeview.model
+
+      # column for holiday names
+      renderer = Gtk::CellRendererText.new
+      renderer.xalign = 0.0
+
+      col_offset = treeview.insert_column(-1, 'Holiday',
+                                          renderer,
+                                          'text' => HOLIDAY_NAME_COLUMN)
+      column = treeview.get_column(col_offset - 1)
+      column.clickable = true
+
+      [
+        ['Alex',  true ],
+        ['Havoc', false],
+        ['Tim',   true ],
+        ['Owen',  false],
+        ['Dave',  false],
+      ].each_with_index do |args, i|
+        person, european = *args
+        renderer = Gtk::CellRendererToggle.new
+        renderer.xalign = 0.0
+        eval(%Q[def renderer.column; #{ALEX_COLUMN + i}; end])
+
+        renderer.signal_connect('toggled') do |cell, path|
+          item_toggled(cell, path, model)
+        end
+
+        attributes =  {
+          'active' => (ALEX_COLUMN + i),
+          'visible' => VISIBLE_COLUMN,
+        }
+        if european
+          attributes['activatable'] = WORLD_COLUMN
+        end
+        col_offset = treeview.insert_column(-1, person, renderer, attributes)
+
+        column = treeview.get_column(col_offset - 1)
+        column.sizing = Gtk::TreeViewColumn::FIXED
+        column.fixed_width = 50
+        column.clickable = true
+      end
+    end
+
+    def item_toggled (cell, path_str, model)
+      path = Gtk::TreePath.new(path_str)
+
+      column = cell.column
+
+      # get toggled iter
+      iter = model.get_iter(path)
+      toggle_item = iter[column]
+
+      # do something with the value
+      toggle_item ^= 1
+
+      # set new value
+      iter[column] = toggle_item
+    end
+  end
+end
diff --git a/gtk3/sample/misc/aboutdialog.rb b/gtk3-no-gi/sample/misc/aboutdialog.rb
similarity index 100%
copy from gtk3/sample/misc/aboutdialog.rb
copy to gtk3-no-gi/sample/misc/aboutdialog.rb
diff --git a/gtk3/sample/misc/aboutdialog2.rb b/gtk3-no-gi/sample/misc/aboutdialog2.rb
similarity index 100%
copy from gtk3/sample/misc/aboutdialog2.rb
copy to gtk3-no-gi/sample/misc/aboutdialog2.rb
diff --git a/gtk3/sample/misc/alpha-demo.rb b/gtk3-no-gi/sample/misc/alpha-demo.rb
similarity index 100%
copy from gtk3/sample/misc/alpha-demo.rb
copy to gtk3-no-gi/sample/misc/alpha-demo.rb
diff --git a/gtk3/sample/misc/assistant.rb b/gtk3-no-gi/sample/misc/assistant.rb
similarity index 100%
copy from gtk3/sample/misc/assistant.rb
copy to gtk3-no-gi/sample/misc/assistant.rb
diff --git a/gtk3/sample/misc/bindings.rb b/gtk3-no-gi/sample/misc/bindings.rb
similarity index 100%
copy from gtk3/sample/misc/bindings.rb
copy to gtk3-no-gi/sample/misc/bindings.rb
diff --git a/gtk3/sample/misc/button.rb b/gtk3-no-gi/sample/misc/button.rb
similarity index 100%
copy from gtk3/sample/misc/button.rb
copy to gtk3-no-gi/sample/misc/button.rb
diff --git a/gtk3/sample/misc/button2.rb b/gtk3-no-gi/sample/misc/button2.rb
similarity index 100%
copy from gtk3/sample/misc/button2.rb
copy to gtk3-no-gi/sample/misc/button2.rb
diff --git a/gtk3/sample/misc/buttonbox.rb b/gtk3-no-gi/sample/misc/buttonbox.rb
similarity index 100%
copy from gtk3/sample/misc/buttonbox.rb
copy to gtk3-no-gi/sample/misc/buttonbox.rb
diff --git a/gtk3/sample/misc/cairo-pong.rb b/gtk3-no-gi/sample/misc/cairo-pong.rb
similarity index 100%
copy from gtk3/sample/misc/cairo-pong.rb
copy to gtk3-no-gi/sample/misc/cairo-pong.rb
diff --git a/gtk3/sample/misc/calendar.rb b/gtk3-no-gi/sample/misc/calendar.rb
similarity index 100%
copy from gtk3/sample/misc/calendar.rb
copy to gtk3-no-gi/sample/misc/calendar.rb
diff --git a/gtk3/sample/misc/checkbutton.rb b/gtk3-no-gi/sample/misc/checkbutton.rb
similarity index 100%
copy from gtk3/sample/misc/checkbutton.rb
copy to gtk3-no-gi/sample/misc/checkbutton.rb
diff --git a/gtk3/sample/misc/colorselection.rb b/gtk3-no-gi/sample/misc/colorselection.rb
similarity index 100%
copy from gtk3/sample/misc/colorselection.rb
copy to gtk3-no-gi/sample/misc/colorselection.rb
diff --git a/gtk3/sample/misc/combo_check.rb b/gtk3-no-gi/sample/misc/combo_check.rb
similarity index 100%
rename from gtk3/sample/misc/combo_check.rb
rename to gtk3-no-gi/sample/misc/combo_check.rb
diff --git a/gtk3/sample/misc/combobox.rb b/gtk3-no-gi/sample/misc/combobox.rb
similarity index 100%
copy from gtk3/sample/misc/combobox.rb
copy to gtk3-no-gi/sample/misc/combobox.rb
diff --git a/gtk3/sample/misc/composited-windows.rb b/gtk3-no-gi/sample/misc/composited-windows.rb
similarity index 100%
rename from gtk3/sample/misc/composited-windows.rb
rename to gtk3-no-gi/sample/misc/composited-windows.rb
diff --git a/gtk3/sample/misc/cursor.rb b/gtk3-no-gi/sample/misc/cursor.rb
similarity index 100%
copy from gtk3/sample/misc/cursor.rb
copy to gtk3-no-gi/sample/misc/cursor.rb
diff --git a/gtk3/sample/misc/dialog.rb b/gtk3-no-gi/sample/misc/dialog.rb
similarity index 100%
copy from gtk3/sample/misc/dialog.rb
copy to gtk3-no-gi/sample/misc/dialog.rb
diff --git a/gtk3/sample/misc/dialog2.rb b/gtk3-no-gi/sample/misc/dialog2.rb
similarity index 100%
copy from gtk3/sample/misc/dialog2.rb
copy to gtk3-no-gi/sample/misc/dialog2.rb
diff --git a/gtk3/sample/misc/dnd.rb b/gtk3-no-gi/sample/misc/dnd.rb
similarity index 100%
copy from gtk3/sample/misc/dnd.rb
copy to gtk3-no-gi/sample/misc/dnd.rb
diff --git a/gtk3/sample/misc/dndtreeview.rb b/gtk3-no-gi/sample/misc/dndtreeview.rb
similarity index 100%
copy from gtk3/sample/misc/dndtreeview.rb
copy to gtk3-no-gi/sample/misc/dndtreeview.rb
diff --git a/gtk3/sample/misc/drag-move.rb b/gtk3-no-gi/sample/misc/drag-move.rb
similarity index 100%
copy from gtk3/sample/misc/drag-move.rb
copy to gtk3-no-gi/sample/misc/drag-move.rb
diff --git a/gtk3/sample/misc/drawing.rb b/gtk3-no-gi/sample/misc/drawing.rb
similarity index 100%
copy from gtk3/sample/misc/drawing.rb
copy to gtk3-no-gi/sample/misc/drawing.rb
diff --git a/gtk3/sample/misc/entry.rb b/gtk3-no-gi/sample/misc/entry.rb
similarity index 100%
copy from gtk3/sample/misc/entry.rb
copy to gtk3-no-gi/sample/misc/entry.rb
diff --git a/gtk3/sample/misc/entrycompletion.rb b/gtk3-no-gi/sample/misc/entrycompletion.rb
similarity index 100%
copy from gtk3/sample/misc/entrycompletion.rb
copy to gtk3-no-gi/sample/misc/entrycompletion.rb
diff --git a/gtk3/sample/misc/expander.rb b/gtk3-no-gi/sample/misc/expander.rb
similarity index 100%
copy from gtk3/sample/misc/expander.rb
copy to gtk3-no-gi/sample/misc/expander.rb
diff --git a/gtk3/sample/misc/filechooser.rb b/gtk3-no-gi/sample/misc/filechooser.rb
similarity index 100%
copy from gtk3/sample/misc/filechooser.rb
copy to gtk3-no-gi/sample/misc/filechooser.rb
diff --git a/gtk3/sample/misc/frame.rb b/gtk3-no-gi/sample/misc/frame.rb
similarity index 100%
copy from gtk3/sample/misc/frame.rb
copy to gtk3-no-gi/sample/misc/frame.rb
diff --git a/gtk3/sample/misc/gdkscreen.rb b/gtk3-no-gi/sample/misc/gdkscreen.rb
similarity index 100%
copy from gtk3/sample/misc/gdkscreen.rb
copy to gtk3-no-gi/sample/misc/gdkscreen.rb
diff --git a/gtk3-no-gi/sample/misc/gnome-logo-icon.png b/gtk3-no-gi/sample/misc/gnome-logo-icon.png
new file mode 100644
index 0000000..06721a9
Binary files /dev/null and b/gtk3-no-gi/sample/misc/gnome-logo-icon.png differ
diff --git a/gtk3/sample/misc/helloworld.rb b/gtk3-no-gi/sample/misc/helloworld.rb
similarity index 100%
copy from gtk3/sample/misc/helloworld.rb
copy to gtk3-no-gi/sample/misc/helloworld.rb
diff --git a/gtk3/sample/misc/iconview.rb b/gtk3-no-gi/sample/misc/iconview.rb
similarity index 100%
copy from gtk3/sample/misc/iconview.rb
copy to gtk3-no-gi/sample/misc/iconview.rb
diff --git a/gtk3/sample/misc/image.rb b/gtk3-no-gi/sample/misc/image.rb
similarity index 100%
copy from gtk3/sample/misc/image.rb
copy to gtk3-no-gi/sample/misc/image.rb
diff --git a/gtk3/sample/misc/itemfactory.rb b/gtk3-no-gi/sample/misc/itemfactory.rb
similarity index 100%
rename from gtk3/sample/misc/itemfactory.rb
rename to gtk3-no-gi/sample/misc/itemfactory.rb
diff --git a/gtk3/sample/misc/itemfactory2.rb b/gtk3-no-gi/sample/misc/itemfactory2.rb
similarity index 100%
rename from gtk3/sample/misc/itemfactory2.rb
rename to gtk3-no-gi/sample/misc/itemfactory2.rb
diff --git a/gtk3/sample/misc/keyboard_grab.rb b/gtk3-no-gi/sample/misc/keyboard_grab.rb
similarity index 100%
rename from gtk3/sample/misc/keyboard_grab.rb
rename to gtk3-no-gi/sample/misc/keyboard_grab.rb
diff --git a/gtk3/sample/misc/label.rb b/gtk3-no-gi/sample/misc/label.rb
similarity index 100%
copy from gtk3/sample/misc/label.rb
copy to gtk3-no-gi/sample/misc/label.rb
diff --git a/gtk3/sample/misc/linkbutton.rb b/gtk3-no-gi/sample/misc/linkbutton.rb
similarity index 100%
copy from gtk3/sample/misc/linkbutton.rb
copy to gtk3-no-gi/sample/misc/linkbutton.rb
diff --git a/gtk3/sample/misc/listview.rb b/gtk3-no-gi/sample/misc/listview.rb
similarity index 100%
copy from gtk3/sample/misc/listview.rb
copy to gtk3-no-gi/sample/misc/listview.rb
diff --git a/gtk3/sample/misc/menu.rb b/gtk3-no-gi/sample/misc/menu.rb
similarity index 100%
copy from gtk3/sample/misc/menu.rb
copy to gtk3-no-gi/sample/misc/menu.rb
diff --git a/gtk3/sample/misc/misc_button.rb b/gtk3-no-gi/sample/misc/misc_button.rb
similarity index 100%
rename from gtk3/sample/misc/misc_button.rb
rename to gtk3-no-gi/sample/misc/misc_button.rb
diff --git a/gtk3/sample/misc/mouse-gesture.rb b/gtk3-no-gi/sample/misc/mouse-gesture.rb
similarity index 100%
copy from gtk3/sample/misc/mouse-gesture.rb
copy to gtk3-no-gi/sample/misc/mouse-gesture.rb
diff --git a/gtk3/sample/misc/pangorenderer.rb b/gtk3-no-gi/sample/misc/pangorenderer.rb
similarity index 100%
rename from gtk3/sample/misc/pangorenderer.rb
rename to gtk3-no-gi/sample/misc/pangorenderer.rb
diff --git a/gtk3/sample/misc/pointer_grab.rb b/gtk3-no-gi/sample/misc/pointer_grab.rb
similarity index 100%
rename from gtk3/sample/misc/pointer_grab.rb
rename to gtk3-no-gi/sample/misc/pointer_grab.rb
diff --git a/gtk3/sample/misc/print.rb b/gtk3-no-gi/sample/misc/print.rb
similarity index 100%
copy from gtk3/sample/misc/print.rb
copy to gtk3-no-gi/sample/misc/print.rb
diff --git a/gtk3/sample/misc/properties.rb b/gtk3-no-gi/sample/misc/properties.rb
similarity index 100%
copy from gtk3/sample/misc/properties.rb
copy to gtk3-no-gi/sample/misc/properties.rb
diff --git a/gtk3/sample/misc/radiobutton.rb b/gtk3-no-gi/sample/misc/radiobutton.rb
similarity index 100%
copy from gtk3/sample/misc/radiobutton.rb
copy to gtk3-no-gi/sample/misc/radiobutton.rb
diff --git a/gtk3/sample/misc/recentchooserdialog.rb b/gtk3-no-gi/sample/misc/recentchooserdialog.rb
similarity index 100%
copy from gtk3/sample/misc/recentchooserdialog.rb
copy to gtk3-no-gi/sample/misc/recentchooserdialog.rb
diff --git a/gtk3/sample/misc/rgtk+cairo.rb b/gtk3-no-gi/sample/misc/rgtk+cairo.rb
similarity index 100%
copy from gtk3/sample/misc/rgtk+cairo.rb
copy to gtk3-no-gi/sample/misc/rgtk+cairo.rb
diff --git a/gtk3/sample/misc/scalebutton.rb b/gtk3-no-gi/sample/misc/scalebutton.rb
similarity index 100%
copy from gtk3/sample/misc/scalebutton.rb
copy to gtk3-no-gi/sample/misc/scalebutton.rb
diff --git a/gtk3/sample/misc/settings.rb b/gtk3-no-gi/sample/misc/settings.rb
similarity index 100%
rename from gtk3/sample/misc/settings.rb
rename to gtk3-no-gi/sample/misc/settings.rb
diff --git a/gtk3/sample/misc/statusicon.rb b/gtk3-no-gi/sample/misc/statusicon.rb
similarity index 100%
copy from gtk3/sample/misc/statusicon.rb
copy to gtk3-no-gi/sample/misc/statusicon.rb
diff --git a/gtk3/sample/misc/stock.rb b/gtk3-no-gi/sample/misc/stock.rb
similarity index 100%
copy from gtk3/sample/misc/stock.rb
copy to gtk3-no-gi/sample/misc/stock.rb
diff --git a/gtk3/sample/misc/style_property.rb b/gtk3-no-gi/sample/misc/style_property.rb
similarity index 100%
rename from gtk3/sample/misc/style_property.rb
rename to gtk3-no-gi/sample/misc/style_property.rb
diff --git a/gtk3/sample/misc/style_property.rc b/gtk3-no-gi/sample/misc/style_property.rc
similarity index 100%
rename from gtk3/sample/misc/style_property.rc
rename to gtk3-no-gi/sample/misc/style_property.rc
diff --git a/gtk3/sample/misc/t-gtkplug.rb b/gtk3-no-gi/sample/misc/t-gtkplug.rb
similarity index 100%
copy from gtk3/sample/misc/t-gtkplug.rb
copy to gtk3-no-gi/sample/misc/t-gtkplug.rb
diff --git a/gtk3/sample/misc/t-gtksocket.rb b/gtk3-no-gi/sample/misc/t-gtksocket.rb
similarity index 100%
copy from gtk3/sample/misc/t-gtksocket.rb
copy to gtk3-no-gi/sample/misc/t-gtksocket.rb
diff --git a/gtk3/sample/testgtk/test.xpm b/gtk3-no-gi/sample/misc/test.xpm
similarity index 100%
copy from gtk3/sample/testgtk/test.xpm
copy to gtk3-no-gi/sample/misc/test.xpm
diff --git a/gtk3/sample/misc/textbuffer_serialize.rb b/gtk3-no-gi/sample/misc/textbuffer_serialize.rb
similarity index 100%
rename from gtk3/sample/misc/textbuffer_serialize.rb
rename to gtk3-no-gi/sample/misc/textbuffer_serialize.rb
diff --git a/gtk3/sample/misc/threads.rb b/gtk3-no-gi/sample/misc/threads.rb
similarity index 100%
copy from gtk3/sample/misc/threads.rb
copy to gtk3-no-gi/sample/misc/threads.rb
diff --git a/gtk3/sample/misc/to_drawable.rb b/gtk3-no-gi/sample/misc/to_drawable.rb
similarity index 100%
rename from gtk3/sample/misc/to_drawable.rb
rename to gtk3-no-gi/sample/misc/to_drawable.rb
diff --git a/gtk3/sample/misc/togglebutton.rb b/gtk3-no-gi/sample/misc/togglebutton.rb
similarity index 100%
copy from gtk3/sample/misc/togglebutton.rb
copy to gtk3-no-gi/sample/misc/togglebutton.rb
diff --git a/gtk3/sample/misc/toolbar.rb b/gtk3-no-gi/sample/misc/toolbar.rb
similarity index 100%
copy from gtk3/sample/misc/toolbar.rb
copy to gtk3-no-gi/sample/misc/toolbar.rb
diff --git a/gtk3/sample/misc/tooltips.rb b/gtk3-no-gi/sample/misc/tooltips.rb
similarity index 100%
copy from gtk3/sample/misc/tooltips.rb
copy to gtk3-no-gi/sample/misc/tooltips.rb
diff --git a/gtk3/sample/misc/tree_combo.rb b/gtk3-no-gi/sample/misc/tree_combo.rb
similarity index 100%
rename from gtk3/sample/misc/tree_combo.rb
rename to gtk3-no-gi/sample/misc/tree_combo.rb
diff --git a/gtk3/sample/misc/tree_progress.rb b/gtk3-no-gi/sample/misc/tree_progress.rb
similarity index 100%
rename from gtk3/sample/misc/tree_progress.rb
rename to gtk3-no-gi/sample/misc/tree_progress.rb
diff --git a/gtk3/sample/misc/treemodelfilter.rb b/gtk3-no-gi/sample/misc/treemodelfilter.rb
similarity index 100%
copy from gtk3/sample/misc/treemodelfilter.rb
copy to gtk3-no-gi/sample/misc/treemodelfilter.rb
diff --git a/gtk3/sample/misc/treeview.rb b/gtk3-no-gi/sample/misc/treeview.rb
similarity index 100%
copy from gtk3/sample/misc/treeview.rb
copy to gtk3-no-gi/sample/misc/treeview.rb
diff --git a/gtk3/sample/misc/uimanager.rb b/gtk3-no-gi/sample/misc/uimanager.rb
similarity index 100%
rename from gtk3/sample/misc/uimanager.rb
rename to gtk3-no-gi/sample/misc/uimanager.rb
diff --git a/gtk3/sample/misc/uimanager2.rb b/gtk3-no-gi/sample/misc/uimanager2.rb
similarity index 100%
rename from gtk3/sample/misc/uimanager2.rb
rename to gtk3-no-gi/sample/misc/uimanager2.rb
diff --git a/gtk3/sample/misc/uimanager2.xml b/gtk3-no-gi/sample/misc/uimanager2.xml
similarity index 100%
rename from gtk3/sample/misc/uimanager2.xml
rename to gtk3-no-gi/sample/misc/uimanager2.xml
diff --git a/gtk3/sample/misc/window.rb b/gtk3-no-gi/sample/misc/window.rb
similarity index 100%
copy from gtk3/sample/misc/window.rb
copy to gtk3-no-gi/sample/misc/window.rb
diff --git a/gtk3/sample/misc/xbm_cursor.rb b/gtk3-no-gi/sample/misc/xbm_cursor.rb
similarity index 100%
rename from gtk3/sample/misc/xbm_cursor.rb
rename to gtk3-no-gi/sample/misc/xbm_cursor.rb
diff --git a/gtk3/sample/testgtk/3DRings.xpm b/gtk3-no-gi/sample/testgtk/3DRings.xpm
similarity index 100%
rename from gtk3/sample/testgtk/3DRings.xpm
rename to gtk3-no-gi/sample/testgtk/3DRings.xpm
diff --git a/gtk3/sample/testgtk/FilesQueue.xpm b/gtk3-no-gi/sample/testgtk/FilesQueue.xpm
similarity index 100%
rename from gtk3/sample/testgtk/FilesQueue.xpm
rename to gtk3-no-gi/sample/testgtk/FilesQueue.xpm
diff --git a/gtk3/sample/testgtk/Modeller.xpm b/gtk3-no-gi/sample/testgtk/Modeller.xpm
similarity index 100%
rename from gtk3/sample/testgtk/Modeller.xpm
rename to gtk3-no-gi/sample/testgtk/Modeller.xpm
diff --git a/gtk3/sample/testgtk/README b/gtk3-no-gi/sample/testgtk/README
similarity index 100%
rename from gtk3/sample/testgtk/README
rename to gtk3-no-gi/sample/testgtk/README
diff --git a/gtk3/sample/testgtk/button.rb b/gtk3-no-gi/sample/testgtk/button.rb
similarity index 100%
rename from gtk3/sample/testgtk/button.rb
rename to gtk3-no-gi/sample/testgtk/button.rb
diff --git a/gtk3/sample/testgtk/buttonbox.rb b/gtk3-no-gi/sample/testgtk/buttonbox.rb
similarity index 100%
rename from gtk3/sample/testgtk/buttonbox.rb
rename to gtk3-no-gi/sample/testgtk/buttonbox.rb
diff --git a/gtk3/sample/testgtk/check-n.xpm b/gtk3-no-gi/sample/testgtk/check-n.xpm
similarity index 100%
rename from gtk3/sample/testgtk/check-n.xpm
rename to gtk3-no-gi/sample/testgtk/check-n.xpm
diff --git a/gtk3/sample/testgtk/check-y.xpm b/gtk3-no-gi/sample/testgtk/check-y.xpm
similarity index 100%
rename from gtk3/sample/testgtk/check-y.xpm
rename to gtk3-no-gi/sample/testgtk/check-y.xpm
diff --git a/gtk3/sample/testgtk/checkbutton.rb b/gtk3-no-gi/sample/testgtk/checkbutton.rb
similarity index 100%
rename from gtk3/sample/testgtk/checkbutton.rb
rename to gtk3-no-gi/sample/testgtk/checkbutton.rb
diff --git a/gtk3/sample/testgtk/circles.xbm b/gtk3-no-gi/sample/testgtk/circles.xbm
similarity index 100%
rename from gtk3/sample/testgtk/circles.xbm
rename to gtk3-no-gi/sample/testgtk/circles.xbm
diff --git a/gtk3/sample/testgtk/colorselect.rb b/gtk3-no-gi/sample/testgtk/colorselect.rb
similarity index 100%
rename from gtk3/sample/testgtk/colorselect.rb
rename to gtk3-no-gi/sample/testgtk/colorselect.rb
diff --git a/gtk3/sample/testgtk/dialog.rb b/gtk3-no-gi/sample/testgtk/dialog.rb
similarity index 100%
rename from gtk3/sample/testgtk/dialog.rb
rename to gtk3-no-gi/sample/testgtk/dialog.rb
diff --git a/gtk3/sample/testgtk/entry.rb b/gtk3-no-gi/sample/testgtk/entry.rb
similarity index 100%
rename from gtk3/sample/testgtk/entry.rb
rename to gtk3-no-gi/sample/testgtk/entry.rb
diff --git a/gtk3/sample/testgtk/filesel.rb b/gtk3-no-gi/sample/testgtk/filesel.rb
similarity index 100%
rename from gtk3/sample/testgtk/filesel.rb
rename to gtk3-no-gi/sample/testgtk/filesel.rb
diff --git a/gtk3/sample/testgtk/fontselection.rb b/gtk3-no-gi/sample/testgtk/fontselection.rb
similarity index 100%
rename from gtk3/sample/testgtk/fontselection.rb
rename to gtk3-no-gi/sample/testgtk/fontselection.rb
diff --git a/gtk3/sample/testgtk/labels.rb b/gtk3-no-gi/sample/testgtk/labels.rb
similarity index 100%
rename from gtk3/sample/testgtk/labels.rb
rename to gtk3-no-gi/sample/testgtk/labels.rb
diff --git a/gtk3/sample/testgtk/layout.rb b/gtk3-no-gi/sample/testgtk/layout.rb
similarity index 100%
rename from gtk3/sample/testgtk/layout.rb
rename to gtk3-no-gi/sample/testgtk/layout.rb
diff --git a/gtk3/sample/testgtk/marble.xpm b/gtk3-no-gi/sample/testgtk/marble.xpm
similarity index 100%
rename from gtk3/sample/testgtk/marble.xpm
rename to gtk3-no-gi/sample/testgtk/marble.xpm
diff --git a/gtk3/sample/testgtk/menu.rb b/gtk3-no-gi/sample/testgtk/menu.rb
similarity index 100%
rename from gtk3/sample/testgtk/menu.rb
rename to gtk3-no-gi/sample/testgtk/menu.rb
diff --git a/gtk3/sample/testgtk/notebook.rb b/gtk3-no-gi/sample/testgtk/notebook.rb
similarity index 100%
rename from gtk3/sample/testgtk/notebook.rb
rename to gtk3-no-gi/sample/testgtk/notebook.rb
diff --git a/gtk3/sample/testgtk/pixmap.rb b/gtk3-no-gi/sample/testgtk/pixmap.rb
similarity index 100%
rename from gtk3/sample/testgtk/pixmap.rb
rename to gtk3-no-gi/sample/testgtk/pixmap.rb
diff --git a/gtk3/sample/testgtk/progressbar.rb b/gtk3-no-gi/sample/testgtk/progressbar.rb
similarity index 100%
rename from gtk3/sample/testgtk/progressbar.rb
rename to gtk3-no-gi/sample/testgtk/progressbar.rb
diff --git a/gtk3/sample/testgtk/radiobutton.rb b/gtk3-no-gi/sample/testgtk/radiobutton.rb
similarity index 100%
rename from gtk3/sample/testgtk/radiobutton.rb
rename to gtk3-no-gi/sample/testgtk/radiobutton.rb
diff --git a/gtk3/sample/testgtk/range.rb b/gtk3-no-gi/sample/testgtk/range.rb
similarity index 100%
rename from gtk3/sample/testgtk/range.rb
rename to gtk3-no-gi/sample/testgtk/range.rb
diff --git a/gtk3/sample/testgtk/reparent.rb b/gtk3-no-gi/sample/testgtk/reparent.rb
similarity index 100%
rename from gtk3/sample/testgtk/reparent.rb
rename to gtk3-no-gi/sample/testgtk/reparent.rb
diff --git a/gtk3/sample/testgtk/sample.rb b/gtk3-no-gi/sample/testgtk/sample.rb
similarity index 100%
rename from gtk3/sample/testgtk/sample.rb
rename to gtk3-no-gi/sample/testgtk/sample.rb
diff --git a/gtk3/sample/testgtk/savedposition.rb b/gtk3-no-gi/sample/testgtk/savedposition.rb
similarity index 100%
rename from gtk3/sample/testgtk/savedposition.rb
rename to gtk3-no-gi/sample/testgtk/savedposition.rb
diff --git a/gtk3/sample/testgtk/scrolledwindow.rb b/gtk3-no-gi/sample/testgtk/scrolledwindow.rb
similarity index 100%
rename from gtk3/sample/testgtk/scrolledwindow.rb
rename to gtk3-no-gi/sample/testgtk/scrolledwindow.rb
diff --git a/gtk3/sample/testgtk/shapedwindow.rb b/gtk3-no-gi/sample/testgtk/shapedwindow.rb
similarity index 100%
rename from gtk3/sample/testgtk/shapedwindow.rb
rename to gtk3-no-gi/sample/testgtk/shapedwindow.rb
diff --git a/gtk3/sample/testgtk/spinbutton.rb b/gtk3-no-gi/sample/testgtk/spinbutton.rb
similarity index 100%
rename from gtk3/sample/testgtk/spinbutton.rb
rename to gtk3-no-gi/sample/testgtk/spinbutton.rb
diff --git a/gtk3/sample/testgtk/statusbar.rb b/gtk3-no-gi/sample/testgtk/statusbar.rb
similarity index 100%
rename from gtk3/sample/testgtk/statusbar.rb
rename to gtk3-no-gi/sample/testgtk/statusbar.rb
diff --git a/gtk3/sample/testgtk/test.xpm b/gtk3-no-gi/sample/testgtk/test.xpm
similarity index 100%
rename from gtk3/sample/testgtk/test.xpm
rename to gtk3-no-gi/sample/testgtk/test.xpm
diff --git a/gtk3/sample/testgtk/testgtk.rb b/gtk3-no-gi/sample/testgtk/testgtk.rb
similarity index 100%
rename from gtk3/sample/testgtk/testgtk.rb
rename to gtk3-no-gi/sample/testgtk/testgtk.rb
diff --git a/gtk3/sample/testgtk/testgtkrc b/gtk3-no-gi/sample/testgtk/testgtkrc
similarity index 100%
rename from gtk3/sample/testgtk/testgtkrc
rename to gtk3-no-gi/sample/testgtk/testgtkrc
diff --git a/gtk3/sample/testgtk/testgtkrc2 b/gtk3-no-gi/sample/testgtk/testgtkrc2
similarity index 100%
rename from gtk3/sample/testgtk/testgtkrc2
rename to gtk3-no-gi/sample/testgtk/testgtkrc2
diff --git a/gtk3/sample/testgtk/togglebutton.rb b/gtk3-no-gi/sample/testgtk/togglebutton.rb
similarity index 100%
rename from gtk3/sample/testgtk/togglebutton.rb
rename to gtk3-no-gi/sample/testgtk/togglebutton.rb
diff --git a/gtk3/sample/testgtk/toolbar.rb b/gtk3-no-gi/sample/testgtk/toolbar.rb
similarity index 100%
rename from gtk3/sample/testgtk/toolbar.rb
rename to gtk3-no-gi/sample/testgtk/toolbar.rb
diff --git a/gtk3/sample/testgtk/tooltips.rb b/gtk3-no-gi/sample/testgtk/tooltips.rb
similarity index 100%
rename from gtk3/sample/testgtk/tooltips.rb
rename to gtk3-no-gi/sample/testgtk/tooltips.rb
diff --git a/gtk3/sample/testgtk/wmhints.rb b/gtk3-no-gi/sample/testgtk/wmhints.rb
similarity index 100%
rename from gtk3/sample/testgtk/wmhints.rb
rename to gtk3-no-gi/sample/testgtk/wmhints.rb
diff --git a/gtk3/test/gtk-test-utils.rb b/gtk3-no-gi/test/gtk-test-utils.rb
similarity index 100%
copy from gtk3/test/gtk-test-utils.rb
copy to gtk3-no-gi/test/gtk-test-utils.rb
diff --git a/gtk3/test/run-test.rb b/gtk3-no-gi/test/run-test.rb
similarity index 100%
copy from gtk3/test/run-test.rb
copy to gtk3-no-gi/test/run-test.rb
diff --git a/gtk3/test/test_gc.rb b/gtk3-no-gi/test/test_gc.rb
similarity index 100%
copy from gtk3/test/test_gc.rb
copy to gtk3-no-gi/test/test_gc.rb
diff --git a/gtk3/test/test_gtk.rb b/gtk3-no-gi/test/test_gtk.rb
similarity index 100%
copy from gtk3/test/test_gtk.rb
copy to gtk3-no-gi/test/test_gtk.rb
diff --git a/gtk3/test/test_gtk_about_dialog.rb b/gtk3-no-gi/test/test_gtk_about_dialog.rb
similarity index 100%
copy from gtk3/test/test_gtk_about_dialog.rb
copy to gtk3-no-gi/test/test_gtk_about_dialog.rb
diff --git a/gtk3/test/test_gtk_accel_group_entry.rb b/gtk3-no-gi/test/test_gtk_accel_group_entry.rb
similarity index 100%
rename from gtk3/test/test_gtk_accel_group_entry.rb
rename to gtk3-no-gi/test/test_gtk_accel_group_entry.rb
diff --git a/gtk3/test/test_gtk_accel_key.rb b/gtk3-no-gi/test/test_gtk_accel_key.rb
similarity index 100%
copy from gtk3/test/test_gtk_accel_key.rb
copy to gtk3-no-gi/test/test_gtk_accel_key.rb
diff --git a/gtk3/test/test_gtk_accessible.rb b/gtk3-no-gi/test/test_gtk_accessible.rb
similarity index 100%
copy from gtk3/test/test_gtk_accessible.rb
copy to gtk3-no-gi/test/test_gtk_accessible.rb
diff --git a/gtk3/test/test_gtk_action_group.rb b/gtk3-no-gi/test/test_gtk_action_group.rb
similarity index 100%
rename from gtk3/test/test_gtk_action_group.rb
rename to gtk3-no-gi/test/test_gtk_action_group.rb
diff --git a/gtk3/test/test_gtk_allocation.rb b/gtk3-no-gi/test/test_gtk_allocation.rb
similarity index 100%
rename from gtk3/test/test_gtk_allocation.rb
rename to gtk3-no-gi/test/test_gtk_allocation.rb
diff --git a/gtk3/test/test_gtk_border.rb b/gtk3-no-gi/test/test_gtk_border.rb
similarity index 100%
copy from gtk3/test/test_gtk_border.rb
copy to gtk3-no-gi/test/test_gtk_border.rb
diff --git a/gtk3/test/test_gtk_buildable.rb b/gtk3-no-gi/test/test_gtk_buildable.rb
similarity index 100%
rename from gtk3/test/test_gtk_buildable.rb
rename to gtk3-no-gi/test/test_gtk_buildable.rb
diff --git a/gtk3/test/test_gtk_builder.rb b/gtk3-no-gi/test/test_gtk_builder.rb
similarity index 100%
rename from gtk3/test/test_gtk_builder.rb
rename to gtk3-no-gi/test/test_gtk_builder.rb
diff --git a/gtk3/test/test_gtk_container.rb b/gtk3-no-gi/test/test_gtk_container.rb
similarity index 100%
rename from gtk3/test/test_gtk_container.rb
rename to gtk3-no-gi/test/test_gtk_container.rb
diff --git a/gtk3/test/test_gtk_css_provider.rb b/gtk3-no-gi/test/test_gtk_css_provider.rb
similarity index 100%
rename from gtk3/test/test_gtk_css_provider.rb
rename to gtk3-no-gi/test/test_gtk_css_provider.rb
diff --git a/gtk3/test/test_gtk_entry.rb b/gtk3-no-gi/test/test_gtk_entry.rb
similarity index 100%
copy from gtk3/test/test_gtk_entry.rb
copy to gtk3-no-gi/test/test_gtk_entry.rb
diff --git a/gtk3/test/test_gtk_header_bar.rb b/gtk3-no-gi/test/test_gtk_header_bar.rb
similarity index 100%
rename from gtk3/test/test_gtk_header_bar.rb
rename to gtk3-no-gi/test/test_gtk_header_bar.rb
diff --git a/gtk3/test/test_gtk_icon_theme.rb b/gtk3-no-gi/test/test_gtk_icon_theme.rb
similarity index 100%
copy from gtk3/test/test_gtk_icon_theme.rb
copy to gtk3-no-gi/test/test_gtk_icon_theme.rb
diff --git a/gtk3/test/test_gtk_icon_view.rb b/gtk3-no-gi/test/test_gtk_icon_view.rb
similarity index 100%
rename from gtk3/test/test_gtk_icon_view.rb
rename to gtk3-no-gi/test/test_gtk_icon_view.rb
diff --git a/gtk3/test/test_gtk_image.rb b/gtk3-no-gi/test/test_gtk_image.rb
similarity index 100%
rename from gtk3/test/test_gtk_image.rb
rename to gtk3-no-gi/test/test_gtk_image.rb
diff --git a/gtk3/test/test_gtk_level_bar.rb b/gtk3-no-gi/test/test_gtk_level_bar.rb
similarity index 100%
rename from gtk3/test/test_gtk_level_bar.rb
rename to gtk3-no-gi/test/test_gtk_level_bar.rb
diff --git a/gtk3/test/test_gtk_list_store.rb b/gtk3-no-gi/test/test_gtk_list_store.rb
similarity index 100%
rename from gtk3/test/test_gtk_list_store.rb
rename to gtk3-no-gi/test/test_gtk_list_store.rb
diff --git a/gtk3/test/test_gtk_menu_button.rb b/gtk3-no-gi/test/test_gtk_menu_button.rb
similarity index 100%
copy from gtk3/test/test_gtk_menu_button.rb
copy to gtk3-no-gi/test/test_gtk_menu_button.rb
diff --git a/gtk3/test/test_gtk_menu_item.rb b/gtk3-no-gi/test/test_gtk_menu_item.rb
similarity index 100%
copy from gtk3/test/test_gtk_menu_item.rb
copy to gtk3-no-gi/test/test_gtk_menu_item.rb
diff --git a/gtk3/test/test_gtk_recent_data.rb b/gtk3-no-gi/test/test_gtk_recent_data.rb
similarity index 100%
copy from gtk3/test/test_gtk_recent_data.rb
copy to gtk3-no-gi/test/test_gtk_recent_data.rb
diff --git a/gtk3/test/test_gtk_recent_filter_info.rb b/gtk3-no-gi/test/test_gtk_recent_filter_info.rb
similarity index 100%
rename from gtk3/test/test_gtk_recent_filter_info.rb
rename to gtk3-no-gi/test/test_gtk_recent_filter_info.rb
diff --git a/gtk3/test/test_gtk_revealer.rb b/gtk3-no-gi/test/test_gtk_revealer.rb
similarity index 100%
copy from gtk3/test/test_gtk_revealer.rb
copy to gtk3-no-gi/test/test_gtk_revealer.rb
diff --git a/gtk3/test/test_gtk_search_bar.rb b/gtk3-no-gi/test/test_gtk_search_bar.rb
similarity index 100%
rename from gtk3/test/test_gtk_search_bar.rb
rename to gtk3-no-gi/test/test_gtk_search_bar.rb
diff --git a/gtk3/test/test_gtk_search_entry.rb b/gtk3-no-gi/test/test_gtk_search_entry.rb
similarity index 100%
copy from gtk3/test/test_gtk_search_entry.rb
copy to gtk3-no-gi/test/test_gtk_search_entry.rb
diff --git a/gtk3/test/test_gtk_stack.rb b/gtk3-no-gi/test/test_gtk_stack.rb
similarity index 100%
rename from gtk3/test/test_gtk_stack.rb
rename to gtk3-no-gi/test/test_gtk_stack.rb
diff --git a/gtk3/test/test_gtk_stack_switcher.rb b/gtk3-no-gi/test/test_gtk_stack_switcher.rb
similarity index 100%
copy from gtk3/test/test_gtk_stack_switcher.rb
copy to gtk3-no-gi/test/test_gtk_stack_switcher.rb
diff --git a/gtk3/test/test_gtk_style_context.rb b/gtk3-no-gi/test/test_gtk_style_context.rb
similarity index 100%
copy from gtk3/test/test_gtk_style_context.rb
copy to gtk3-no-gi/test/test_gtk_style_context.rb
diff --git a/gtk3/test/test_gtk_style_properties.rb b/gtk3-no-gi/test/test_gtk_style_properties.rb
similarity index 100%
copy from gtk3/test/test_gtk_style_properties.rb
copy to gtk3-no-gi/test/test_gtk_style_properties.rb
diff --git a/gtk3/test/test_gtk_tree_path.rb b/gtk3-no-gi/test/test_gtk_tree_path.rb
similarity index 100%
rename from gtk3/test/test_gtk_tree_path.rb
rename to gtk3-no-gi/test/test_gtk_tree_path.rb
diff --git a/gtk3/test/test_gtk_tree_selection.rb b/gtk3-no-gi/test/test_gtk_tree_selection.rb
similarity index 100%
rename from gtk3/test/test_gtk_tree_selection.rb
rename to gtk3-no-gi/test/test_gtk_tree_selection.rb
diff --git a/gtk3/test/test_gtk_unix_print.rb b/gtk3-no-gi/test/test_gtk_unix_print.rb
similarity index 100%
rename from gtk3/test/test_gtk_unix_print.rb
rename to gtk3-no-gi/test/test_gtk_unix_print.rb
diff --git a/gtk3/test/test_gtk_widget.rb b/gtk3-no-gi/test/test_gtk_widget.rb
similarity index 100%
rename from gtk3/test/test_gtk_widget.rb
rename to gtk3-no-gi/test/test_gtk_widget.rb
diff --git a/gtk3/README.md b/gtk3/README.md
index 06dece2..9993cfb 100644
--- a/gtk3/README.md
+++ b/gtk3/README.md
@@ -1,10 +1,11 @@
 # Ruby/GTK3
 
-Ruby/GTK3 is a Ruby binding of GTK 3.
+Ruby/GTK3 is a Ruby binding of GTK+ 3.
 
 ## Requirements
 
-* Ruby/GLib2, Ruby/ATK, Ruby/Pango, Ruby/GdkPixbuf2 and Ruby/GTK3 in
+* Ruby/GLib2, Ruby/ATK, Ruby/Pango, Ruby/GdkPixbuf2, Ruby/GIO2,
+  Ruby/GDK3, Ruby/GObjectIntrospection and Ruby/GTK3 in
   [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
 * [rcairo](https://github.com/rcairo/rcairo)
 * [GTK+](http://www.gtk.org/) 3.4.2 or later
@@ -15,7 +16,7 @@ Ruby/GTK3 is a Ruby binding of GTK 3.
 
 ## License
 
-Copyright (c) 2002-2013 Ruby-GNOME2 Project Team
+Copyright (c) 2002-2014 Ruby-GNOME2 Project Team
 
 This program is free software. You can distribute/modify this program
 under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
diff --git a/gtk3/Rakefile b/gtk3/Rakefile
index 4906f4e..1d93e96 100644
--- a/gtk3/Rakefile
+++ b/gtk3/Rakefile
@@ -13,6 +13,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
     "pango",
     "gdk_pixbuf2",
     "gdk3",
+    "gobject-introspection",
   ]
   package.windows.packages = []
   package.windows.dependencies = []
diff --git a/gtk3/TODO b/gtk3/TODO
new file mode 100644
index 0000000..b899839
--- /dev/null
+++ b/gtk3/TODO
@@ -0,0 +1,2 @@
+* Implement Gtk::PageSetupUnixDialog by hand.
+* Implement Gtk::PrintUnixDialog by hand.
diff --git a/gtk3/ext/gtk3/depend b/gtk3/ext/gtk3/depend
index 30bbd71..dc8de3f 100644
--- a/gtk3/ext/gtk3/depend
+++ b/gtk3/ext/gtk3/depend
@@ -1,8 +1,3 @@
-install-so: install-headers
-install-headers:
-	$(INSTALL_DATA) $(srcdir)/rbgtk3.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) $(srcdir)/rbgtk3conversions.h $(RUBYARCHDIR)
-
 install: install-pc
 install-pc:
 	if test -n "$(pkgconfigdir)"; then			\
diff --git a/gtk3/ext/gtk3/extconf.rb b/gtk3/ext/gtk3/extconf.rb
old mode 100644
new mode 100755
index 1ddea26..934bfdf
--- a/gtk3/ext/gtk3/extconf.rb
+++ b/gtk3/ext/gtk3/extconf.rb
@@ -1,20 +1,33 @@
-=begin
-extconf.rb for Ruby/GTK extention library
-=end
-
-require 'pathname'
-
-source_dir = Pathname(__FILE__).dirname
-base_dir = source_dir.parent.parent.expand_path
-top_dir = base_dir.parent.expand_path
+#!/usr/bin/env ruby
+#
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "pathname"
+
+base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
+top_dir = base_dir.parent
 top_build_dir = Pathname(".").parent.parent.parent.expand_path
 
-mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
+mkmf_gnome2_dir = top_dir + "glib2" + "lib"
 version_suffix = ""
 unless mkmf_gnome2_dir.exist?
-  if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
+  if /(-\d+\.\d+\.\d+)\z/ =~ base_dir.basename.to_s
     version_suffix = $1
-    mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
+    mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + "lib"
   end
 end
 
@@ -23,20 +36,21 @@ $LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
 module_name = "gtk3"
 package_id = "gtk+-3.0"
 
-begin
-  require 'mkmf-gnome2'
-rescue LoadError
-  require 'rubygems'
-  gem 'glib2'
-  require 'mkmf-gnome2'
-end
-
-have_func("rb_errinfo")
-
-["glib2", "cairo-gobject", "atk", "pango", "gdk_pixbuf2", "gdk3"].each do |package|
-  depended_module_name = package.gsub(/-/, "_")
+require "mkmf-gnome2"
+
+depended_packages = [
+  "glib2",
+  "gobject-introspection",
+  "cairo-gobject",
+  "atk",
+  "pango",
+  "gdk_pixbuf2",
+  "gdk3",
+].each do |package|
   directory = "#{package}#{version_suffix}"
-  build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{depended_module_name}/#{RUBY_VERSION}"
+  build_base_path = "#{directory}/tmp/#{RUBY_PLATFORM}"
+  package_library_name = package.gsub(/-/, "_")
+  build_dir = "#{build_base_path}/#{package_library_name}/#{RUBY_VERSION}"
   add_depend_package(package, "#{directory}/ext/#{package}",
                      top_dir.to_s,
                      :top_build_dir => top_build_dir.to_s,
@@ -51,41 +65,17 @@ setup_windows(module_name, base_dir)
 
 unless required_pkg_config_package(package_id,
                                    :debian => "libgtk-3-dev",
-                                   :fedora => "gtk3-devel",
+                                   :redhat => "gtk3-devel",
                                    :homebrew => "gtk+3",
                                    :macports => "gtk3")
   exit(false)
 end
 
-have_header("st.h")
-have_header("ruby/st.h")
-
-STDOUT.print("checking for targets... ")
-STDOUT.flush
-targets = PKGConfig.variable(package_id, "targets").split(/\s+/)
-STDOUT.print(targets.join(" "), "\n")
-
-gtk_header = "gtk/gtk.h"
-have_func('gtk_plug_get_type', gtk_header)
-have_func('gtk_socket_get_type', gtk_header)
-have_func('pango_render_part_get_type', gtk_header)
-have_header('gtk/gtkfilesystem.h') do |src|
-  "#define GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED\n#{src}"
-end
-
-xlib_header = "X11/Xlib.h"
-if targets.include?("x11") and have_header('X11/Xlib.h') and have_library("X11")
-  have_func("XReadBitmapFileData", xlib_header)
-  have_func("XGetErrorText", xlib_header)
-end
-
-if !targets.include?("win32") and PKGConfig.have_package('gtk+-unix-print-3.0')
-  $defs.push("-DHAVE_GTK_UNIX_PRINT")
+unless PKGConfig.have_package("gobject-introspection-1.0")
+  exit(false)
 end
 
-create_pkg_config_file("Ruby/GTK3", package_id, ruby_gnome2_version)
-
-ensure_objs
+create_pkg_config_file("Ruby/GTK3", package_id)
 
 $defs << "-DRUBY_GTK3_COMPILATION"
 create_makefile(module_name)
diff --git a/gtk3/ext/gtk3/rb-gtk3-container.c b/gtk3/ext/gtk3/rb-gtk3-container.c
new file mode 100644
index 0000000..dbabb7f
--- /dev/null
+++ b/gtk3/ext/gtk3/rb-gtk3-container.c
@@ -0,0 +1,159 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rb-gtk3-private.h"
+
+#define RG_TARGET_NAMESPACE cContainer
+#define _SELF(self) (RVAL2GTKCONTAINER(self))
+
+static GQuark q_ruby_setter;
+static GQuark q_ruby_getter;
+
+static void rb_gtk3_container_mark(gpointer object);
+
+static void
+rb_gtk3_container_mark_callback(GtkWidget *widget,
+                                G_GNUC_UNUSED gpointer data)
+{
+    if (rbgobj_gc_mark_instance(widget))
+        return;
+
+    if (GTK_IS_CONTAINER(widget))
+        rb_gtk3_container_mark(widget);
+}
+
+static void
+rb_gtk3_container_mark(gpointer object)
+{
+    gtk_container_forall(GTK_CONTAINER(object),
+                         rb_gtk3_container_mark_callback,
+                         NULL);
+}
+
+/* FIXME: use rb_protect */
+static void
+get_child_prop_func(GtkContainer *container,
+                    GtkWidget *child,
+                    G_GNUC_UNUSED guint property_id,
+                    GValue *value,
+                    GParamSpec *pspec)
+{
+    ID ruby_getter = (ID)g_param_spec_get_qdata(pspec, q_ruby_getter);
+    if (!ruby_getter) {
+        gchar *name = g_strconcat("get_", g_param_spec_get_name(pspec), NULL);
+        gchar *p;
+        for (p = name; *p; p++) {
+          if (*p == '-')
+            *p = '_';
+        }
+        ruby_getter = rb_intern(name);
+        g_param_spec_set_qdata(pspec, q_ruby_getter, (gpointer)ruby_getter);
+        g_free(name);
+    }
+
+    {
+        VALUE ret = rb_funcall(GOBJ2RVAL(container), ruby_getter, 1, GOBJ2RVAL(child));
+        rbgobj_rvalue_to_gvalue(ret, value);
+    }
+}
+
+/* FIXME: use rb_protect */
+static void
+set_child_prop_func(GtkContainer *container,
+                    GtkWidget *child,
+                    G_GNUC_UNUSED guint property_id,
+                    const GValue *value,
+                    GParamSpec *pspec)
+{
+    ID ruby_setter = (ID)g_param_spec_get_qdata(pspec, q_ruby_setter);
+    if (!ruby_setter) {
+        gchar *name = g_strconcat("set_", g_param_spec_get_name(pspec), NULL);
+        gchar *p;
+        for (p = name; *p; p++) {
+          if (*p == '-')
+            *p = '_';
+        }
+        ruby_setter = rb_intern(name);
+        g_param_spec_set_qdata(pspec, q_ruby_setter, (gpointer)ruby_setter);
+        g_free(name);
+    }
+
+    rb_funcall(GOBJ2RVAL(container), ruby_setter,
+               2,
+               GOBJ2RVAL(child), GVAL2RVAL(value));
+}
+
+static void
+class_init_func(gpointer g_class, gpointer class_data)
+{
+    GtkContainerClass *g_container_class = GTK_CONTAINER_CLASS(g_class);
+
+    rbgobj_class_init_func(g_class, class_data);
+
+    g_container_class->set_child_property = set_child_prop_func;
+    g_container_class->get_child_property = get_child_prop_func;
+
+    rbgtk3_class_init_func(g_class, class_data);
+}
+
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    rb_call_super(argc, argv);
+    rbgtk3_initialize(self);
+    return Qnil;
+}
+
+static VALUE
+rg_s_type_register(int argc, VALUE *argv, VALUE klass)
+{
+    VALUE type_name;
+
+    rb_scan_args(argc, argv, "01", &type_name);
+
+    rbgobj_register_type(klass, type_name, class_init_func);
+
+    {
+        VALUE initialize_module;
+        initialize_module = rb_define_module_under(klass, "ContainerHook");
+        rbg_define_method(initialize_module,
+                          "initialize", rg_initialize, -1);
+        rb_include_module(klass, initialize_module);
+    }
+
+    return Qnil;
+}
+
+void
+rbgtk3_container_init(void)
+{
+    VALUE mGtk;
+    VALUE RG_TARGET_NAMESPACE;
+
+    q_ruby_getter = g_quark_from_static_string("__ruby_getter");
+    q_ruby_setter = g_quark_from_static_string("__ruby_setter");
+
+    mGtk = rb_const_get(rb_cObject, rb_intern("Gtk"));
+    RG_TARGET_NAMESPACE = rb_const_get(mGtk, rb_intern("Container"));
+
+    rbgobj_register_mark_func(GTK_TYPE_CONTAINER, rb_gtk3_container_mark);
+
+    RG_DEF_SMETHOD(type_register, -1);
+}
diff --git a/gtk3/ext/gtk3/rb-gtk3-private.h b/gtk3/ext/gtk3/rb-gtk3-private.h
new file mode 100644
index 0000000..c058874
--- /dev/null
+++ b/gtk3/ext/gtk3/rb-gtk3-private.h
@@ -0,0 +1,32 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef RB_GTK3_PRIVATE_H
+#define RB_GTK3_PRIVATE_H
+
+#include "rb-gtk3.h"
+
+G_GNUC_INTERNAL void rbgtk3_class_init_func(gpointer g_class, gpointer class_data);
+G_GNUC_INTERNAL void rbgtk3_initialize(VALUE self);
+
+G_GNUC_INTERNAL void rbgtk3_container_init(void);
+G_GNUC_INTERNAL void rbgtk3_widget_init(void);
+
+#endif
diff --git a/gtk3/ext/gtk3/rb-gtk3-widget.c b/gtk3/ext/gtk3/rb-gtk3-widget.c
new file mode 100644
index 0000000..7ce376f
--- /dev/null
+++ b/gtk3/ext/gtk3/rb-gtk3-widget.c
@@ -0,0 +1,71 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rb-gtk3-private.h"
+
+#define RG_TARGET_NAMESPACE cWidget
+#define _SELF(self) (RVAL2GTKWIDGET(self))
+
+static void
+class_init_func(gpointer g_class, gpointer class_data)
+{
+    rbgobj_class_init_func(g_class, class_data);
+    rbgtk3_class_init_func(g_class, class_data);
+}
+
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    rb_call_super(argc, argv);
+    rbgtk3_initialize(self);
+    return Qnil;
+}
+
+static VALUE
+rg_s_type_register(int argc, VALUE *argv, VALUE klass)
+{
+    VALUE type_name;
+
+    rb_scan_args(argc, argv, "01", &type_name);
+
+    rbgobj_register_type(klass, type_name, class_init_func);
+
+    {
+        VALUE initialize_module;
+        initialize_module = rb_define_module_under(klass, "WidgetHook");
+        rbg_define_method(initialize_module,
+                          "initialize", rg_initialize, -1);
+        rb_include_module(klass, initialize_module);
+    }
+
+    return Qnil;
+}
+
+void
+rbgtk3_widget_init(void)
+{
+    VALUE mGtk;
+    VALUE RG_TARGET_NAMESPACE;
+
+    mGtk = rb_const_get(rb_cObject, rb_intern("Gtk"));
+    RG_TARGET_NAMESPACE = rb_const_get(mGtk, rb_intern("Widget"));
+
+    RG_DEF_SMETHOD(type_register, -1);
+}
diff --git a/gtk3/ext/gtk3/rb-gtk3.c b/gtk3/ext/gtk3/rb-gtk3.c
new file mode 100644
index 0000000..f0e7177
--- /dev/null
+++ b/gtk3/ext/gtk3/rb-gtk3.c
@@ -0,0 +1,407 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rb-gtk3-private.h"
+
+/*
+#if GTK_CHECK_VERSION(3, 10, 0)
+#    define RB_GTK_ACTION_IS_DEPRECATED
+#    define RB_GTK_ACTION_GROUP_IS_DEPRECATED
+#    define RB_GTK_UI_MANAGER_IS_DEPRECATED
+#endif
+*/
+
+static gboolean
+name_equal(GIArgInfo *info, const gchar *target_name)
+{
+    GITypeInfo type_info;
+    GIBaseInfo *interface_info;
+    const gchar *namespace;
+    const gchar *name;
+    gboolean equal_name_p = FALSE;
+
+    g_arg_info_load_type(info, &type_info);
+    interface_info = g_type_info_get_interface(&type_info);
+    namespace = g_base_info_get_namespace(interface_info);
+    name = g_base_info_get_name(interface_info);
+    if (strcmp(namespace, "Gtk") == 0 && strcmp(name, target_name) == 0) {
+        equal_name_p = TRUE;
+    }
+    g_base_info_unref(interface_info);
+
+    return equal_name_p;
+}
+
+static void
+rb_gtk3_callback_callback(GtkWidget *widget, gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_call;
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback, id_call, 1,
+               GOBJ2RVAL(widget));
+}
+
+static gint
+rb_gtk3_assistant_page_func_callback(gint current_page, gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_call;
+    VALUE rb_next_page;
+
+    CONST_ID(id_call, "call");
+    rb_next_page = rb_funcall(callback_data->rb_callback, id_call, 1,
+                              INT2NUM(current_page));
+    return NUM2INT(rb_next_page);
+}
+
+static void
+rb_gtk3_builder_connect_func_callback(GtkBuilder *builder,
+                                      GObject *object,
+                                      const gchar *signal_name,
+                                      const gchar *handler_name,
+                                      GObject *connect_object,
+                                      GConnectFlags flags,
+                                      gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id___connect_signals__;
+    VALUE rb_object;
+
+    CONST_ID(id___connect_signals__, "__connect_signals__");
+    rb_object = GOBJ2RVAL(object);
+    G_RELATIVE(rb_object, callback_data->rb_callback);
+    rb_funcall(GOBJ2RVAL(builder), id___connect_signals__, 6,
+               callback_data->rb_callback,
+               rb_object,
+               CSTR2RVAL(signal_name),
+               CSTR2RVAL(handler_name),
+               GOBJ2RVAL(connect_object),
+               GCONNECTFLAGS2RVAL(flags));
+}
+
+static const gchar *
+rb_gtk3_translate_func_callback(const gchar *path,
+                                gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_call;
+    VALUE rb_translated;
+
+    CONST_ID(id_call, "call");
+    rb_translated = rb_funcall(callback_data->rb_callback,
+                               id_call,
+                               1,
+                               CSTR2RVAL(path));
+    return RVAL2CSTR(rb_translated);
+}
+
+static void
+rb_gtk3_tree_cell_data_func_callback(GtkTreeViewColumn *column,
+                                     GtkCellRenderer *cell,
+                                     GtkTreeModel *model,
+                                     GtkTreeIter *iter,
+                                     gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_set_model;
+    ID id_call;
+    VALUE rb_model;
+    VALUE rb_iter;
+
+    CONST_ID(id_set_model, "model=");
+    rb_model = GOBJ2RVAL(model);
+    rb_iter = BOXED2RVAL(iter, GTK_TYPE_TREE_ITER);
+    rb_funcall(rb_iter, id_set_model, 1, rb_model);
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback,
+               id_call,
+               4,
+               GOBJ2RVAL(column),
+               GOBJ2RVAL(cell),
+               rb_model,
+               rb_iter);
+}
+
+static void
+rb_gtk3_tree_model_filter_modify_func_callback(GtkTreeModel *model,
+                                               GtkTreeIter *iter,
+                                               GValue *value,
+                                               gint column,
+                                               gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_set_model;
+    ID id_call;
+    VALUE rb_model;
+    VALUE rb_iter;
+    VALUE rb_value;
+    VALUE rb_column;
+
+    CONST_ID(id_set_model, "model=");
+    rb_model = GOBJ2RVAL(model);
+    rb_iter = BOXED2RVAL(iter, GTK_TYPE_TREE_ITER);
+    rb_funcall(rb_iter, id_set_model, 1, rb_model);
+    rb_column = INT2NUM(column);
+
+    CONST_ID(id_call, "call");
+    rb_value = rb_funcall(callback_data->rb_callback,
+                          id_call,
+                          3,
+                          rb_model,
+                          rb_iter,
+                          rb_column);
+    rbgobj_rvalue_to_gvalue(rb_value, value);
+}
+
+static gboolean
+rb_gtk3_tree_model_filter_visible_func_callback(GtkTreeModel *model,
+                                                GtkTreeIter *iter,
+                                                gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_set_model;
+    ID id_call;
+    VALUE rb_model;
+    VALUE rb_iter;
+    VALUE rb_visible;
+    gboolean visible = FALSE;
+
+    CONST_ID(id_set_model, "model=");
+    rb_model = GOBJ2RVAL(model);
+    rb_iter = BOXED2RVAL(iter, GTK_TYPE_TREE_ITER);
+    rb_funcall(rb_iter, id_set_model, 1, rb_model);
+
+    CONST_ID(id_call, "call");
+    rb_visible = rb_funcall(callback_data->rb_callback,
+                            id_call,
+                            2,
+                            rb_model,
+                            rb_iter);
+    visible = RVAL2CBOOL(rb_visible);
+
+    return visible;
+}
+
+static gboolean
+rb_gtk3_tree_model_foreach_func_callback(GtkTreeModel *model,
+                                         GtkTreePath *path,
+                                         GtkTreeIter *iter,
+                                         gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_set_model;
+    ID id_call;
+    VALUE rb_model;
+    VALUE rb_iter;
+    gboolean stop = FALSE;
+
+    CONST_ID(id_set_model, "model=");
+    rb_model = GOBJ2RVAL(model);
+    rb_iter = BOXED2RVAL(iter, GTK_TYPE_TREE_ITER);
+    rb_funcall(rb_iter, id_set_model, 1, rb_model);
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback,
+               id_call,
+               3,
+               rb_model,
+               BOXED2RVAL(path, GTK_TYPE_TREE_PATH),
+               rb_iter);
+
+    return stop;
+}
+
+static void
+rb_gtk3_tree_selection_foreach_func_callback(GtkTreeModel *model,
+                                             GtkTreePath *path,
+                                             GtkTreeIter *iter,
+                                             gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_set_model;
+    ID id_call;
+    VALUE rb_model;
+    VALUE rb_iter;
+
+    CONST_ID(id_set_model, "model=");
+    rb_model = GOBJ2RVAL(model);
+    rb_iter = BOXED2RVAL(iter, GTK_TYPE_TREE_ITER);
+    rb_funcall(rb_iter, id_set_model, 1, rb_model);
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback,
+               id_call,
+               3,
+               rb_model,
+               BOXED2RVAL(path, GTK_TYPE_TREE_PATH),
+               rb_iter);
+}
+
+static void
+rb_gtk3_tree_view_mapping_func_callback(GtkTreeView *tree_view,
+                                        GtkTreePath *path,
+                                        gpointer user_data)
+{
+    RBGICallbackData *callback_data = user_data;
+    ID id_call;
+
+    CONST_ID(id_call, "call");
+    rb_funcall(callback_data->rb_callback,
+               id_call,
+               2,
+               GOBJ2RVAL(tree_view),
+               BOXED2RVAL(path, GTK_TYPE_TREE_PATH));
+}
+
+static gpointer
+rb_gtk3_callback_finder(GIArgInfo *info)
+{
+    if (name_equal(info, "Callback")) {
+        return rb_gtk3_callback_callback;
+    } else if (name_equal(info, "AssistantPageFunc")) {
+        return rb_gtk3_assistant_page_func_callback;
+    } else if (name_equal(info, "BuilderConnectFunc")) {
+        return rb_gtk3_builder_connect_func_callback;
+    } else if (name_equal(info, "TranslateFunc")) {
+        return rb_gtk3_translate_func_callback;
+    } else if (name_equal(info, "TreeCellDataFunc")) {
+        return rb_gtk3_tree_cell_data_func_callback;
+    } else if (name_equal(info, "TreeModelFilterModifyFunc")) {
+        return rb_gtk3_tree_model_filter_modify_func_callback;
+    } else if (name_equal(info, "TreeModelFilterVisibleFunc")) {
+        return rb_gtk3_tree_model_filter_visible_func_callback;
+    } else if (name_equal(info, "TreeModelForeachFunc")) {
+        return rb_gtk3_tree_model_foreach_func_callback;
+    } else if (name_equal(info, "TreeSelectionForeachFunc")) {
+        return rb_gtk3_tree_selection_foreach_func_callback;
+    } else if (name_equal(info, "TreeViewMappingFunc")) {
+        return rb_gtk3_tree_view_mapping_func_callback;
+    } else {
+        return NULL;
+    }
+}
+
+#ifndef RB_GTK_ACTION_IS_DEPRECATED
+static void
+rb_gtk3_action_mark(gpointer object)
+{
+    GtkAction *action;
+    GSList *proxies, *node;
+
+    action = GTK_ACTION(object);
+    proxies = gtk_action_get_proxies(action);
+    for (node = proxies; node; node = g_slist_next(node)) {
+        GtkWidget *proxy = node->data;
+        rbgobj_gc_mark_instance(proxy);
+    }
+}
+#endif
+
+static void
+rb_gtk3_builder_mark(gpointer object)
+{
+    GtkBuilder *builder;
+    GSList *objects;
+
+    builder = GTK_BUILDER(object);
+    objects = gtk_builder_get_objects(builder);
+    g_slist_foreach(objects, (GFunc)rbgobj_gc_mark_instance, NULL);
+    g_slist_free(objects);
+}
+
+#ifndef RB_GTK_ACTION_GROUP_IS_DEPRECATED
+static void
+rb_gtk3_action_group_mark(gpointer object)
+{
+    GtkActionGroup *group;
+    GList *actions, *node;
+
+    group = GTK_ACTION_GROUP(object);
+    actions = gtk_action_group_list_actions(group);
+    for (node = actions; node; node = g_list_next(node)) {
+        GtkWidget *action = node->data;
+        rbgobj_gc_mark_instance(action);
+    }
+    g_list_free(actions);
+}
+#endif
+
+#ifndef RB_GTK_UI_MANAGER_IS_DEPRECATED
+static void
+rb_gtk3_ui_manager_mark(gpointer object)
+{
+    GtkUIManager *manager;
+    GList *action_groups, *node;
+
+    manager = GTK_UI_MANAGER(object);
+    action_groups = gtk_ui_manager_get_action_groups(manager);
+    for (node = action_groups; node; node = g_list_next(node)) {
+        GtkWidget *action_group = node->data;
+        rbgobj_gc_mark_instance(action_group);
+    }
+
+    rbgobj_gc_mark_instance(gtk_ui_manager_get_accel_group(manager));
+}
+#endif
+
+void
+rbgtk3_class_init_func(gpointer g_class, G_GNUC_UNUSED gpointer class_data)
+{
+    VALUE rb_class;
+
+    rb_class = GTYPE2CLASS(G_TYPE_FROM_CLASS(g_class));
+    rb_funcall(rb_class, rb_intern("init"), 0);
+}
+
+void
+rbgtk3_initialize(VALUE self)
+{
+    GObject *object;
+
+    object = RVAL2GOBJ(self);
+    g_object_ref_sink(object);
+
+    rb_funcall(self, rb_intern("initialize_post"), 0);
+}
+
+void
+Init_gtk3(void)
+{
+    rb_gi_callback_register_finder(rb_gtk3_callback_finder);
+
+#ifndef RB_GTK_ACTION_IS_DEPRECATED
+    rbgobj_register_mark_func(GTK_TYPE_ACTION, rb_gtk3_action_mark);
+#endif
+    rbgobj_register_mark_func(GTK_TYPE_BUILDER, rb_gtk3_builder_mark);
+#ifndef RB_GTK_ACTION_GROUP_IS_DEPRECATED
+    rbgobj_register_mark_func(GTK_TYPE_ACTION_GROUP, rb_gtk3_action_group_mark);
+#endif
+#ifndef RB_GTK_UI_MANAGER_IS_DEPRECATED
+    rbgobj_register_mark_func(GTK_TYPE_UI_MANAGER, rb_gtk3_ui_manager_mark);
+#endif
+
+    rbgtk3_container_init();
+    rbgtk3_widget_init();
+
+    rbgobj_boxed_not_copy_obj(GTK_TYPE_SELECTION_DATA);
+}
diff --git a/gtk3/ext/gtk3/rb-gtk3.h b/gtk3/ext/gtk3/rb-gtk3.h
new file mode 100644
index 0000000..8e6375f
--- /dev/null
+++ b/gtk3/ext/gtk3/rb-gtk3.h
@@ -0,0 +1,30 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2015  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef RB_GTK3_H
+#define RB_GTK3_H
+
+#include <gtk/gtk.h>
+
+#include <rb-gobject-introspection.h>
+
+extern void Init_gtk3 (void);
+
+#endif
diff --git a/gtk3/extconf.rb b/gtk3/extconf.rb
old mode 100644
new mode 100755
index a816ec8..ab81099
--- a/gtk3/extconf.rb
+++ b/gtk3/extconf.rb
@@ -1,18 +1,34 @@
 #!/usr/bin/env ruby
+#
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require 'pathname'
-require 'mkmf'
-require 'rbconfig'
-require 'fileutils'
+require "pathname"
+require "mkmf"
+require "rbconfig"
+require "fileutils"
 
 package = "gtk3"
 
 base_dir = Pathname(__FILE__).dirname.expand_path
 ext_dir = base_dir + "ext" + package
-mkmf_gnome2_dir = base_dir + 'lib'
+mkmf_gnome2_dir = base_dir + "lib"
 
-ruby = File.join(RbConfig::CONFIG['bindir'],
-                 RbConfig::CONFIG['ruby_install_name'] +
+ruby = File.join(RbConfig::CONFIG["bindir"],
+                 RbConfig::CONFIG["ruby_install_name"] +
                  RbConfig::CONFIG["EXEEXT"])
 
 build_dir = Pathname("ext") + package
@@ -24,7 +40,7 @@ create_makefile(package)
 FileUtils.mv("Makefile", "Makefile.lib")
 
 File.open("Makefile", "w") do |makefile|
-  makefile.puts(<<-EOM)
+  makefile.puts(<<-MAKEFILE)
 all:
 	(cd ext/#{package} && $(MAKE))
 	$(MAKE) -f Makefile.lib
@@ -45,5 +61,5 @@ distclean:
 	(cd ext/#{package} && $(MAKE) distclean)
 	$(MAKE) -f Makefile.lib distclean
 	@rm -f Makefile.lib
-EOM
+  MAKEFILE
 end
diff --git a/gtk3/lib/gtk3.rb b/gtk3/lib/gtk3.rb
old mode 100755
new mode 100644
index 1514ca8..c1ee550
--- a/gtk3/lib/gtk3.rb
+++ b/gtk3/lib/gtk3.rb
@@ -1,11 +1,72 @@
-#! /usr/bin/env ruby
-=begin
-  Copyright (c) 2006-2011 Ruby-GNOME2 Project Team
-  This program is licenced under the same licence as Ruby-GNOME2.
-=end
+# Copyright (C) 2006-2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require 'gtk3/base'
-require 'gtk3/deprecated'
+require "gobject-introspection"
+require "atk"
+require "gdk3"
+require "gio2"
 
-Gdk.init if Gdk.respond_to?(:init)
-Gtk.init
+base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
+vendor_dir = base_dir + "vendor" + "local"
+vendor_bin_dir = vendor_dir + "bin"
+GLib.prepend_dll_path(vendor_bin_dir)
+vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
+GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
+
+require "gtk3/loader"
+
+module Gtk
+  LOG_DOMAIN = "Gtk"
+  GLib::Log.set_log_domain(LOG_DOMAIN)
+
+  class Error < StandardError
+  end
+
+  class InitError < Error
+  end
+
+  class << self
+    def const_missing(name)
+      init()
+      if const_defined?(name)
+        const_get(name)
+      else
+        super
+      end
+    end
+
+    def method_missing(name, *args, &block)
+      init()
+      if respond_to?(name)
+        __send__(name, *args, &block)
+      else
+        super
+      end
+    end
+
+    def init(*argv)
+      class << self
+        remove_method(:init)
+        remove_method(:const_missing)
+        remove_method(:method_missing)
+      end
+      Gio.init if Gio.respond_to?(:init)
+      Gdk.init if Gdk.respond_to?(:init)
+      loader = Loader.new(self, argv)
+      loader.load("Gtk")
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/about-dialog.rb b/gtk3/lib/gtk3/about-dialog.rb
new file mode 100644
index 0000000..16d2ea8
--- /dev/null
+++ b/gtk3/lib/gtk3/about-dialog.rb
@@ -0,0 +1,34 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class AboutDialog
+    class << self
+      def show(parent=nil, attributes=nil)
+        dialog = new
+        (attributes || {}).each do |key, value|
+          dialog.send("#{key}=", value)
+        end
+        if parent
+          dialog.modal = true
+          dialog.transient_for = parent
+          dialog.destroy_with_parent = true
+        end
+        dialog.present
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/action-group.rb b/gtk3/lib/gtk3/action-group.rb
new file mode 100644
index 0000000..0c56418
--- /dev/null
+++ b/gtk3/lib/gtk3/action-group.rb
@@ -0,0 +1,131 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ActionGroup
+    alias_method :add_action_raw, :add_action
+    def add_action(action, options={})
+      accelerator = options[:accelerator]
+
+      if accelerator
+        add_action_with_accel(action, accelerator)
+      else
+        add_action_raw(action)
+      end
+    end
+
+    def add_actions(actions)
+      actions.each do |config|
+        if config.is_a?(Array)
+          name        = config[0]
+          stock_id    = config[1]
+          label       = config[2]
+          accelerator = config[3]
+          tooltip     = config[4]
+          callback    = config[5]
+        else
+          name        = config[:name]
+          stock_id    = config[:stock_id]
+          label       = config[:label]
+          accelerator = config[:accelerator]
+          tooltip     = config[:tooltip]
+          callback    = config[:callback]
+        end
+
+        action = Action.new(name,
+                            :label    => translate_string(label),
+                            :tooltip  => translate_string(tooltip),
+                            :stock_id => stock_id)
+        action.signal_connect("activate") do
+          callback.call(self, action)
+        end
+        add_action(action, :accelerator => accelerator)
+      end
+    end
+
+    def add_toggle_actions(actions)
+      actions.each do |config|
+        if config.is_a?(Array)
+          name        = config[0]
+          stock_id    = config[1]
+          label       = config[2]
+          accelerator = config[3]
+          tooltip     = config[4]
+          callback    = config[5]
+          is_active   = config[6]
+        else
+          name        = config[:name]
+          stock_id    = config[:stock_id]
+          label       = config[:label]
+          accelerator = config[:accelerator]
+          tooltip     = config[:tooltip]
+          callback    = config[:callback]
+          is_active   = config[:is_active]
+        end
+
+        action = ToggleAction.new(name,
+                                  :label    => translate_string(label),
+                                  :tooltip  => translate_string(tooltip),
+                                  :stock_id => stock_id)
+        action.active = is_active
+        action.signal_connect("activate") do
+          callback.call(self, action)
+        end
+        add_action(action, :accelerator => accelerator)
+      end
+    end
+
+    def add_radio_actions(actions, default_value=nil)
+      actions.each_with_index do |config, i|
+        if config.is_a?(Array)
+          name        = config[0]
+          stock_id    = config[1]
+          label       = config[2]
+          accelerator = config[3]
+          tooltip     = config[4]
+          value       = config[5]
+        else
+          name        = config[:name]
+          stock_id    = config[:stock_id]
+          label       = config[:label]
+          accelerator = config[:accelerator]
+          tooltip     = config[:tooltip]
+          value       = config[:value]
+        end
+
+        action = RadioAction.new(name,
+                                 value,
+                                 :label    => translate_string(label),
+                                 :tooltip  => translate_string(tooltip),
+                                 :stock_id => stock_id)
+        action.active = true if value == default_value
+        if i.zero?
+          action.signal_connect("changed") do |connected_action, current_action|
+            yield(connected_action, current_action)
+          end
+        end
+        add_action(action, :accelerator => accelerator)
+      end
+    end
+
+    alias_method :translate_string_raw, :translate_string
+    def translate_string(string)
+      return nil if string.nil?
+
+      translate_string_raw(string)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/action.rb b/gtk3/lib/gtk3/action.rb
new file mode 100644
index 0000000..d73591c
--- /dev/null
+++ b/gtk3/lib/gtk3/action.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Action
+    alias_method :initialize_raw, :initialize
+    def initialize(name, options={})
+      initialize_raw(name,
+                     options[:label],
+                     options[:tooltip],
+                     options[:stock_id])
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/binding-set.rb b/gtk3/lib/gtk3/binding-set.rb
new file mode 100644
index 0000000..2c95aa7
--- /dev/null
+++ b/gtk3/lib/gtk3/binding-set.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class BindingSet
+    def add_signal(description)
+      BindingEntry.add_signal_from_string(self, description)
+    end
+
+    def remove(key, modifiers)
+      BindingEntry.remove(self, key, modifiers)
+    end
+
+    def skip(key, modifiers)
+      BindingEntry.skip(self, key, modifiers)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/border.rb b/gtk3/lib/gtk3/border.rb
new file mode 100644
index 0000000..306ece9
--- /dev/null
+++ b/gtk3/lib/gtk3/border.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Border
+    alias_method :initialize_raw, :initialize
+    def initialize(left, right, top, bottom)
+      initialize_raw
+      self.left = left
+      self.right = right
+      self.top = top
+      self.bottom = bottom
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/box.rb b/gtk3/lib/gtk3/box.rb
new file mode 100644
index 0000000..7610c92
--- /dev/null
+++ b/gtk3/lib/gtk3/box.rb
@@ -0,0 +1,40 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Box
+    alias_method :initialize_raw, :initialize
+    def initialize(orientation, spacing=0)
+      initialize_raw(orientation, spacing || 0)
+    end
+
+    alias_method :pack_start_raw, :pack_start
+    def pack_start(child, options={})
+      expand  = options[:expand]  || false
+      fill    = options[:fill]    || false
+      padding = options[:padding] || 0
+      pack_start_raw(child, expand, fill, padding)
+    end
+
+    alias_method :pack_end_raw, :pack_end
+    def pack_end(child, options={})
+      expand  = options[:expand]  || false
+      fill    = options[:fill]    || false
+      padding = options[:padding] || 0
+      pack_end_raw(child, expand, fill, padding)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/builder.rb b/gtk3/lib/gtk3/builder.rb
new file mode 100644
index 0000000..f026540
--- /dev/null
+++ b/gtk3/lib/gtk3/builder.rb
@@ -0,0 +1,91 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Builder
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      file      = options[:file]
+      resource  = options[:resource]
+      string    = options[:string]
+
+      if file
+        initialize_new_from_file(file)
+      elsif resource
+        initialize_new_from_resource(resource)
+      elsif string
+        initialize_new_from_string(string, string.bytesize)
+      else
+        initialize_raw
+      end
+    end
+
+    alias_method :[], :get_object
+
+    alias_method :add_from_string_raw, :add_from_string
+    def add_from_string(string)
+      add_from_string_raw(string, string.bytesize)
+    end
+
+    def add(target)
+      if target.respond_to?(:to_path)
+        add_from_file(target.to_path)
+      elsif target.start_with?("<") or target.start_with?(" ")
+        add_from_string(target)
+      elsif File.exist?(target)
+        add_from_file(target)
+      else
+        add_from_resource(target)
+      end
+    end
+
+    def <<(target)
+      add(target)
+      self
+    end
+
+    private
+    def normalize_handler_name(name)
+      name.gsub(/[-\s]+/, "_")
+    end
+
+    def __connect_signals__(connector, object, signal_name,
+                            handler_name, connect_object, flags)
+      handler_name = normalize_handler_name(handler_name)
+      if connect_object
+        handler = connect_object.method(handler_name)
+      else
+        handler = connector.call(handler_name)
+      end
+      unless handler
+        $stderr.puts("Undefined handler: #{handler_name}") if $DEBUG
+        return
+      end
+
+      if flags.after?
+        signal_connect_method = :signal_connect_after
+      else
+        signal_connect_method = :signal_connect
+      end
+
+      if handler.arity.zero?
+        object.send(signal_connect_method, signal_name) {handler.call}
+      else
+        object.send(signal_connect_method, signal_name, &handler)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/button.rb b/gtk3/lib/gtk3/button.rb
new file mode 100644
index 0000000..7f6350d
--- /dev/null
+++ b/gtk3/lib/gtk3/button.rb
@@ -0,0 +1,53 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Button
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      label = options[:label]
+      use_underline = options[:use_underline]
+      if use_underline.nil?
+        mnemonic = options[:mnemonic]
+        if mnemonic
+          label = mnemonic
+          use_underline = true
+        end
+      end
+      stock = options[:stock_id]
+      icon_name = options[:icon_name]
+      icon_size = options[:icon_size] || :button
+
+      if label
+        if use_underline
+          initialize_new_with_mnemonic(label)
+        else
+          initialize_new_with_label(label)
+        end
+      elsif stock
+        initialize_new_from_stock(stock)
+      elsif icon_name
+        case icon_size
+        when Symbol, String
+          icon_size = IconSize.new(icon_size.to_s)
+        end
+        initialize_new_from_icon_name(icon_name, icon_size)
+      else
+        initialize_raw
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/calendar.rb b/gtk3/lib/gtk3/calendar.rb
new file mode 100644
index 0000000..32367ee
--- /dev/null
+++ b/gtk3/lib/gtk3/calendar.rb
@@ -0,0 +1,24 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Calendar
+    alias_method :select_month_raw, :select_month
+    def select_month(month, year)
+      select_month_raw(month - 1, year)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/cell-layout.rb b/gtk3/lib/gtk3/cell-layout.rb
new file mode 100644
index 0000000..d67c643
--- /dev/null
+++ b/gtk3/lib/gtk3/cell-layout.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  module CellLayout
+    def set_attributes(cell, attributes)
+      attributes.each do |key, value|
+        add_attribute(cell, key, value)
+      end
+    end
+
+    alias_method :add_attribute_raw, :add_attribute
+    def add_attribute(cell, name, value)
+      name = name.to_s if name.is_a?(Symbol)
+      add_attribute_raw(cell, name, value)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/clipboard.rb b/gtk3/lib/gtk3/clipboard.rb
new file mode 100644
index 0000000..b817039
--- /dev/null
+++ b/gtk3/lib/gtk3/clipboard.rb
@@ -0,0 +1,25 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Clipboard
+    alias_method :set_text_raw, :set_text
+    def set_text(text)
+      set_text_raw(text, text.bytesize)
+    end
+    alias_method :text=, :set_text
+  end
+end
diff --git a/gtk3/lib/gtk3/color-chooser-dialog.rb b/gtk3/lib/gtk3/color-chooser-dialog.rb
new file mode 100644
index 0000000..9ca54fb
--- /dev/null
+++ b/gtk3/lib/gtk3/color-chooser-dialog.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ColorChooserDialog
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      title = options[:title]
+      parent = options[:parent]
+
+      initialize_raw(title, parent)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/combo-box-text.rb b/gtk3/lib/gtk3/combo-box-text.rb
new file mode 100644
index 0000000..a4baa22
--- /dev/null
+++ b/gtk3/lib/gtk3/combo-box-text.rb
@@ -0,0 +1,30 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ComboBoxText
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      entry = options[:entry]
+
+      if entry
+        initialize_new_with_entry
+      else
+        initialize_new
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/combo-box.rb b/gtk3/lib/gtk3/combo-box.rb
new file mode 100644
index 0000000..4d920bb
--- /dev/null
+++ b/gtk3/lib/gtk3/combo-box.rb
@@ -0,0 +1,55 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ComboBox
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      entry = options[:entry]
+      model = options[:model]
+      area  = options[:area]
+
+      if entry
+        if model
+          initialize_new_with_model_and_entry(model)
+        elsif area
+          initialize_new_with_area_and_entry(area)
+        else
+          initialize_new_with_entry
+        end
+      else
+        if model
+          initialize_new_with_model(model)
+        elsif area
+          initialize_new_with_area(area)
+        else
+          initialize_new
+        end
+      end
+    end
+
+    alias_method :active_iter_raw, :active_iter
+    def active_iter
+      found, iter = active_iter_raw
+      if found
+        iter.model = model
+        iter
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/container.rb b/gtk3/lib/gtk3/container.rb
new file mode 100644
index 0000000..ccbedae
--- /dev/null
+++ b/gtk3/lib/gtk3/container.rb
@@ -0,0 +1,51 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Container
+    class << self
+      alias_method :child_properties_raw, :child_properties
+      def child_properties
+        child_properties_raw[0]
+      end
+    end
+
+    include Enumerable
+
+    def <<(widget)
+      add(widget)
+      self
+    end
+
+    alias_method :focus_chain_raw, :focus_chain
+    def focus_chain
+      set_explicitly, widgets = focus_chain_raw
+      if set_explicitly
+        widgets
+      else
+        nil
+      end
+    end
+
+    alias_method :child_get_property_raw, :child_get_property
+    def child_get_property(child, name)
+      property = self.class.find_child_property(name)
+      value = GLib::Value.new(property.value_type)
+      child_get_property_raw(child, name, value)
+      value.value
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/css-provider.rb b/gtk3/lib/gtk3/css-provider.rb
new file mode 100644
index 0000000..f1bdf81
--- /dev/null
+++ b/gtk3/lib/gtk3/css-provider.rb
@@ -0,0 +1,38 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class CssProvider
+    def load(options)
+      data = options[:data]
+      file = options[:file]
+      path = options[:path]
+      resource_path = options[:resource_path]
+      if data
+        load_from_data(data)
+      elsif file
+        load_from_file(file)
+      elsif path
+        load_from_path(path)
+      elsif resource_path
+        load_from_resource(resource_path)
+      else
+        message = "Must specify one of :data, :file, :path or :resource_path"
+        raise ArgumentError, "#{message}: #{options.inspect}"
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/deprecated.rb b/gtk3/lib/gtk3/deprecated.rb
index e72c78d..d24a05d 100644
--- a/gtk3/lib/gtk3/deprecated.rb
+++ b/gtk3/lib/gtk3/deprecated.rb
@@ -1,22 +1,32 @@
 module Gtk
   extend GLib::Deprecatable
-  define_deprecated_const :Combo,               :raise => "Use 'Gtk::ComboBoxText' instead."
-  define_deprecated_const :ComboBoxEntry,       :raise => "Use 'Gtk::ComboBox' instead."
-  define_deprecated_const :Curve,               :raise => "Don't use this widget anymore."
-  define_deprecated_const :FileSelection,       :raise => "Use 'Gtk::FileChooserDialog' instead."
-  define_deprecated_const :FontSelection,       :raise => "Use 'Gtk::FontChooserWidget' instead."
-  define_deprecated_const :FontSelectionDialog, :raise => "Use 'Gtk::FontChooserDialog' instead."
-  define_deprecated_const :GammaCurve,          :raise => "Don't use this widget anymore."
-  define_deprecated_const :HRuler,              :raise => "Don't use this widget anymore."
-  define_deprecated_const :InputDialog,         :raise => "Don't use this widget anymore."
-  define_deprecated_const :ItemFactory,         :raise => "Use 'Gtk::UIManager' instead."
-  define_deprecated_const :OptionMenu,          :raise => "Use 'Gtk::ComboBox' instead."
-  define_deprecated_const :RC,                  :raise => "Use 'Gtk::StyleContext' instead."
-  define_deprecated_const :RcStyle,             :raise => "Use 'Gtk::CssProvider' instead."
-  define_deprecated_const :Ruler,               :raise => "Don't use this widget anymore."
-  define_deprecated_const :Style,               :raise => "Use 'Gtk::StyleContext' instead."
-  define_deprecated_const :Tooltips,            :raise => "Use 'Gtk::Tooltip' API."
-  define_deprecated_const :VRuler,              :raise => "Don't use this widget anymore."
+  define_deprecated_const :Allocation, "Gdk::Rectangle"
+
+  define_deprecated_const :Combo,                  :raise => "Use 'Gtk::ComboBoxText' instead."
+  define_deprecated_const :ComboBoxEntry,          :raise => "Use 'Gtk::ComboBox' instead."
+  define_deprecated_const :Curve,                  :raise => "Don't use this widget anymore."
+  define_deprecated_const :FileSelection,          :raise => "Use 'Gtk::FileChooserDialog' instead."
+  define_deprecated_const :FontSelection,          :raise => "Use 'Gtk::FontChooserWidget' instead."
+  define_deprecated_const :FontSelectionDialog,    :raise => "Use 'Gtk::FontChooserDialog' instead."
+  remove_const(:ColorSelection)
+  define_deprecated_const :ColorSelection,         :raise => "Use 'Gtk::ColorChooserWidget' instead."
+  define_deprecated_const :ColorSelectionDialog,   :raise => "Use 'Gtk::ColorChooserDialog' instead."
+  define_deprecated_const :GammaCurve,             :raise => "Don't use this widget anymore."
+  define_deprecated_const :HRuler,                 :raise => "Don't use this widget anymore."
+  define_deprecated_const :InputDialog,            :raise => "Don't use this widget anymore."
+  define_deprecated_const :ItemFactory,            :raise => "Use 'Gtk::UIManager' instead."
+  define_deprecated_const :OptionMenu,             :raise => "Use 'Gtk::ComboBox' instead."
+  define_deprecated_const :PageSetupUnixDialog,    :raise => "Use 'Gtk::PrintOperation' instead."
+  define_deprecated_const :Printer,                :raise => "Use 'Gtk::PrintOperation' instead."
+  define_deprecated_const :PrintCapabilities,      :raise => "Use 'Gtk::PrintOperation' instead."
+  define_deprecated_const :PrintJob,               :raise => "Use 'Gtk::PrintOperation' instead."
+  define_deprecated_const :PrintUnixDialog,        :raise => "Use 'Gtk::PrintOperation' instead."
+  define_deprecated_const :RC,                     :raise => "Use 'Gtk::StyleContext' instead."
+  define_deprecated_const :RcStyle,                :raise => "Use 'Gtk::CssProvider' instead."
+  define_deprecated_const :Ruler,                  :raise => "Don't use this widget anymore."
+  define_deprecated_const :Style,                  :raise => "Use 'Gtk::StyleContext' instead."
+  define_deprecated_const :Tooltips,               :raise => "Use 'Gtk::Tooltip' API."
+  define_deprecated_const :VRuler,                 :raise => "Don't use this widget anymore."
   define_deprecated_flags :AccelFlags, 'ACCEL'
   define_deprecated_flags :AttachOptions
   define_deprecated_enums :CornerType, 'CORNER'
@@ -64,8 +74,8 @@ module Gtk
   define_deprecated_singleton_method :init_add, :warn => "Don't use this method."
   define_deprecated_singleton_method :quit_add, :warn => "Don't use this method."
   define_deprecated_singleton_method :quit_remove, :warn => "Don't use this method."
-  define_deprecated_singleton_method :get_event_widget, :warn => "Use 'Gdk::Event#event_widget'." do |_self, event|
-    event && event.event_widget
+  define_deprecated_singleton_method :get_event_widget, :warn => "Use 'Gdk::Event#widget'." do |_self, event|
+    event && event.widget
   end
   define_deprecated_singleton_method :timeout_add, :warn => "Use 'GLib::Timeout.add'." do |_self, interval, &block|
     GLib::Timeout.add(interval, &block)
@@ -110,7 +120,8 @@ module Gtk
 
   class Assistant
     extend GLib::Deprecatable
-    define_deprecated_enums :PageType, 'PAGE'
+    define_deprecated_const :PageType, "Gtk::AssistantPageType"
+    define_deprecated_enums :AssistantPageType, 'PAGE'
     define_deprecated_method :set_page_header_image, :warn => "Don't use this method."
     define_deprecated_method :get_page_header_image, :warn => "Don't use this method."
     define_deprecated_method :set_page_side_image, :warn => "Don't use this method."
@@ -119,7 +130,9 @@ module Gtk
 
   class BindingSet
     extend GLib::Deprecatable
-    define_deprecated_method :entry_clear, :entry_remove
+    define_deprecated_method :entry_clear, :remove
+    define_deprecated_method :entry_skip, :skip
+    define_deprecated_method :entry_add_signal, :add_signal
     define_deprecated_method :add_path, :raise => "Don't use this method."
   end
 
@@ -159,15 +172,11 @@ module Gtk
     define_deprecated_signal :released, :warn => "Use 'Gtk::Widget::button-release-event' signal."
     define_deprecated_method_by_hash_args :initialize,
         'label_or_stock_id, use_underline = nil',
-        ':label => nil, :mnemonic => nil, :stock_id => nil' do
+        ':label => nil, :use_underline => nil, :stock_id => nil' do
         |_self, label_or_stock_id, use_underline|
       case label_or_stock_id
       when String
-        if use_underline
-          [{:mnemonic => label_or_stock_id}]
-        else
-          [{:label => label_or_stock_id}]
-        end
+        [{:label => label_or_stock_id, :use_underline => use_underline}]
       when Symbol
         [{:stock_id => label_or_stock_id}]
       else
@@ -183,24 +192,27 @@ module Gtk
 
   class Calendar
     extend GLib::Deprecatable
-    define_deprecated_flags :DisplayOptions
+    define_deprecated_flags "Gtk::CalendarDisplayOptions"
     define_deprecated_method :freeze, :warn => "Don't use this method."
     define_deprecated_method :thaw, :warn => "Don't use this method."
   end
 
   class CellRenderer
     extend GLib::Deprecatable
-    define_deprecated_enums :Mode, 'MODE'
-    define_deprecated_flags :State
+    define_deprecated_const :Mode, "Gtk::CellRendererMode"
+    define_deprecated_enums :CellRendererMode, 'MODE'
+    define_deprecated_const :State, "Gtk::CellRendererState"
+    define_deprecated_flags :CellRendererState
     define_deprecated_method :editing_canceled, :warn => "Use '#{self}#stop_editing'." do |_self|
       _self.stop_editing(true)
     end
-    define_deprecated_method :get_size, :raise => "Use Gtk::Renderer#get_preferred_size."
+    define_deprecated_method :get_size, :raise => "Use Gtk::CellRenderer#get_preferred_size."
   end
 
   class CellRendererAccel
     extend GLib::Deprecatable
-    define_deprecated_enums :Mode, 'MODE'
+    define_deprecated_const :Mode, "Gtk::CellRendererAccelMode"
+    define_deprecated_enums :CellRendererAccelMode, 'MODE'
   end
 
   class CellView
@@ -208,7 +220,7 @@ module Gtk
     define_deprecated_method :cell_renderers, :warn => "Use 'Gtk::CellLayout#cells'." do |_self|
       _self.cells
     end
-    define_deprecated_method :get_size_of_row, :raise => "Use Gtk::Renderer#get_preferred_size."
+    define_deprecated_method :get_size_of_row, :raise => "Use Gtk::Widget#get_preferred_size."
   end
 
   class ColorSelectionDialog
@@ -238,9 +250,15 @@ module Gtk
     end
   end
 
+  class Container
+    extend GLib::Deprecatable
+    define_deprecated_singleton_method :child_property, :find_child_property
+  end
+
   class Dialog
     extend GLib::Deprecatable
-    define_deprecated_flags :Flags
+    define_deprecated_const :Flags, "Gtk::DialogFlags"
+    define_deprecated_flags :DialogFlags
     define_deprecated_const :ResponseType, 'Gtk::ResponseType'
     define_deprecated_enums 'Gtk::ResponseType', 'RESPONSE'
     define_deprecated_method :vbox, :child
@@ -254,10 +272,12 @@ module Gtk
 
   module Drag
     extend GLib::Deprecatable
-    define_deprecated_flags :DestDefaults, 'DEST_DEFAULT'
-    define_deprecated_flags :TargetFlags, 'TARGET'
+    define_deprecated_const :DestDefaults, "Gtk::DestDefaults"
+    define_deprecated_const :TargetFlags, "Gtk::TargetFlags"
     define_deprecated_singleton_method :finish, :warn => "Use 'Gdk::DragContext#finish'." do |_self, context, success, del, time|
-      context.finish(success, del, time)
+      context.finish(:success => success,
+                     :delete => delete,
+                     :time => time)
     end
     define_deprecated_singleton_method :set_icon_default, :warn => "Use 'Gdk::DragContext#set_icon_default'." do |_self, context|
       context.set_icon_default
@@ -384,8 +404,10 @@ module Gtk
 
   module FileChooser
     extend GLib::Deprecatable
-    define_deprecated_enums :Action, 'ACTION'
-    define_deprecated_enums :Confirmation, 'CONFIRMATION'
+    define_deprecated_const :Action, "Gtk::FileChooserAction"
+    define_deprecated_enums :FileChooserAction, 'ACTION'
+    define_deprecated_const :Confirmation, "Gtk::FileChooserConfirmation"
+    define_deprecated_enums :FileChooserConfirmation, 'CONFIRMATION'
   end
 
   class FileChooserDialog
@@ -394,19 +416,28 @@ module Gtk
         'title, parent, action, back, *buttons',
         ':title => nil, :parent => nil, :action => :open, :buttons => nil' do
         |_self, title, parent, action, back, *buttons|
-      [{:title => title, :parent => parent, :action => action, :buttons => buttons}]
+      options = {
+          :title => title,
+          :parent => parent,
+          :action => action,
+          :buttons => buttons,
+      }
+      [options]
     end
   end
 
   class FileFilter
     extend GLib::Deprecatable
-    define_deprecated_flags :Flags
+    define_deprecated_const :Flags, "Gtk::FileFilterFlags"
+    define_deprecated_flags :FileFilterFlags
   end
 
   class HBox
     extend GLib::Deprecatable
     define_deprecated_singleton_method :new, :warn => "Use 'Gtk::Box.new(:horizontal, spacing)'." do |_self, homogeneous, spacing|
-      Gtk::Box.new(:horizontal, spacing).set_homogeneous(homogeneous)
+      box = Gtk::Box.new(:horizontal, spacing)
+      box.set_homogeneous(homogeneous)
+      box
     end
   end
 
@@ -450,28 +481,30 @@ module Gtk
     define_deprecated_method :render_icon, :raise => "Use '#{self}#render_icon_pixbuf'."
   end
 
-  module IconSize
-    extend GLib::Deprecatable
-    define_deprecated_enums :IconSize
-  end
+  #module IconSize
+  #  extend GLib::Deprecatable
+  #  define_deprecated_enums :IconSize
+  #end
 
   class IconTheme
     extend GLib::Deprecatable
-    define_deprecated_flags :LookupFlags, 'LOOKUP'
+    define_deprecated_const :LookupFlags, "Gtk::IconLookupFlags"
+    define_deprecated_flags :IconLookupFlags, 'LOOKUP'
   end
 
   class IconView
     extend GLib::Deprecatable
-    define_deprecated_enums :Type
+    define_deprecated_enums :IconViewDropPosition
   end
 
   class Image
     extend GLib::Deprecatable
-    define_deprecated_enums :Type
+    define_deprecated_const :Type, "Gtk::ImageType"
+    define_deprecated_enums :ImageType
     define_deprecated_method :set, :warn => "Use '#{self}#set_stock', '#{self}#set_icon_name', '#{self}#set_icon_set', '#{self}#set_file', '#{self}#set_pixbuf' or '#{self}#set_pixbuf_animation'."
     define_deprecated_method_by_hash_args :initialize,
         'image, size = nil',
-        ':label => nil, :mnemonic => nil, :stock => nil, :size => nil' do
+        ':stock => nil, :icon_name => nil, :icon_set => nil, :icon => nil, :file => nil, :pixbuf => nil, :animation => nil, :surface => nil, :size => nil' do
         |_self, image, size|
       case image
       when String
@@ -484,6 +517,8 @@ module Gtk
         [{:stock => image, :size => size}]
       when Gtk::IconSet
         [{:icon_set => image, :size => size}]
+      when Gio::Icon
+        [{:icon => image, :size => size}]
       else
         [image]
       end
@@ -553,9 +588,9 @@ module Gtk
     define_deprecated_enums 'Gtk::MessageType'
     define_deprecated_method_by_hash_args :initialize,
         'parent, flags, type, buttons_type, message',
-        ':parent => nil, :flags => 0, :type => :info, :buttons_type => :ok, :message => ""' do
-        |_self, parent, flags, type, buttons_type, message|
-      [{:parent => parent, :flags => flags, :type => type, :buttons_type => buttons_type, :message => message}]
+        ':parent => nil, :flags => 0, :type => :info, :buttons => :ok, :message => ""' do
+        |_self, parent, flags, type, buttons, message|
+      [{:parent => parent, :flags => flags, :type => type, :buttons => buttons, :message => message}]
     end
   end
 
@@ -571,14 +606,6 @@ module Gtk
     end
   end
 
-  class PageSetupUnixDialog
-    extend GLib::Deprecatable
-    define_deprecated_method_by_hash_args :initialize,
-        'title, parent', ':title => nil, :parent => nil' do |_self, title, parent|
-      [{:title => title, :parent => parent}]
-    end
-  end
-
   class PaperSize
     extend GLib::Deprecatable
     define_deprecated_enums :Unit, 'UNIT'
@@ -586,9 +613,12 @@ module Gtk
 
   class PrintOperation
     extend GLib::Deprecatable
-    define_deprecated_enums :Action, 'ACTION'
-    define_deprecated_enums :Result, 'RESULT'
-    define_deprecated_enums :Status, 'STATUS'
+    define_deprecated_const :Action, "Gtk::PrintOperationAction"
+    define_deprecated_enums :PrintOperationAction, 'ACTION'
+    define_deprecated_const :Result, "Gtk::PrintOperationResult"
+    define_deprecated_enums :PrintOperationResult, 'RESULT'
+    define_deprecated_const :Status, "Gtk::PrintStatus"
+    define_deprecated_enums :PrintStatus, 'STATUS'
   end
 
   class PrintSettings
@@ -600,15 +630,6 @@ module Gtk
     define_deprecated_enums :PrintQuality, 'QUALITY'
   end
 
-  class PrintUnixDialog
-    extend GLib::Deprecatable
-    define_deprecated_flags :Capabilities, 'CAPABILITY'
-    define_deprecated_method_by_hash_args :initialize,
-        'title, parent', ':title => nil, :parent => nil' do |_self, title, parent|
-      [{:title => title, :parent => parent}]
-    end
-  end
-
   class Paned
     extend GLib::Deprecatable
     %w(child1 child2).product(%w(resize shrink)).each do |child, prop|
@@ -640,6 +661,27 @@ module Gtk
     end
   end
 
+  class RadioButton
+    extend GLib::Deprecatable
+    define_deprecated_method_by_hash_args :initialize,
+        'member_or_label, label_or_use_underline, use_underline',
+        ':label => label, :member => member, :use_underline => use_underline',
+        0 do |_self, member_or_label, label_or_use_underline, use_underline|
+      options = {}
+      if member_or_label.is_a?(Gtk::RadioButton)
+        options[:member] = member_or_label
+        if label_or_use_underline.is_a?(String)
+          options[:label] = label_or_use_underline
+          options[:use_underline] = use_underline
+        end
+      else
+        options[:label] = member_or_label
+        options[:use_underline] = label_or_use_underline
+      end
+      [options]
+    end
+  end
+
   class Range
     extend GLib::Deprecatable
     define_deprecated_enums :SensitivityType, 'SENSITIVITY'
@@ -650,8 +692,10 @@ module Gtk
 
   module RC
     extend GLib::Deprecatable
-    define_deprecated_flags :Flags
-    define_deprecated_enums :TokenType, 'TOKEN'
+    define_deprecated_const :Flags, "Gtk::RCFlags"
+    define_deprecated_flags :RCFlags
+    define_deprecated_const :TokenType, "Gtk::RCTokenType"
+    define_deprecated_enums :RCTokenType, 'TOKEN'
   end
 
   class RecentAction
@@ -678,16 +722,28 @@ module Gtk
     extend GLib::Deprecatable
     define_deprecated_method_by_hash_args :initialize,
         'title, parent, manager, *buttons',
-        ':title => nil, :parent => nil, :manager => nil, :buttons => nil' do
-        |_self, title, parent, *buttons|
-      manager = buttons.first.is_a?(RecentManager) ? buttons.shift : nil
-      [{:title => title, :parent => parent, :manager => manager, :buttons => buttons}]
+        ':title => nil, :parent => nil, ' +
+        ':recent_manager => nil, :buttons => nil' do |_self, title, parent, *buttons|
+      if buttons.first.is_a?(RecentManager)
+        recent_manager = buttons.shift
+      else
+        recent_manager = nil
+      end
+      [
+        {
+          :title          => title,
+          :parent         => parent,
+          :recent_manager => recent_manager,
+          :buttons        => buttons,
+        },
+      ]
     end
   end
 
   class RecentFilter
     extend GLib::Deprecatable
-    define_deprecated_flags :Flags
+    define_deprecated_const :Flags, "Gtk::RecentFilterFlags"
+    define_deprecated_flags :RecentFilterFlags
   end
 
   class RecentManager
@@ -725,13 +781,16 @@ module Gtk
 
   class SizeGroup
     extend GLib::Deprecatable
-    define_deprecated_enums :Mode
+    define_deprecated_const :Mode, "Gtk::SizeGroupMode"
+    define_deprecated_enums :SizeGroupMode
   end
 
   class SpinButton
     extend GLib::Deprecatable
-    define_deprecated_enums :Type
-    define_deprecated_enums :UpdatePolicy, 'UPDATE'
+    define_deprecated_const :Type, "Gtk::SpinType"
+    define_deprecated_enums :SpinType
+    define_deprecated_const :UpdatePolicy, "Gtk::SpinButtonUpdatePolicy"
+    define_deprecated_enums :SpinButtonUpdatePolicy, 'UPDATE'
   end
 
   class TextAttributes
@@ -776,7 +835,8 @@ module Gtk
 
   class TextIter
     extend GLib::Deprecatable
-    define_deprecated_flags :SearchFlags, 'SEARCH'
+    define_deprecated_const :SearchFlags, "Gtk::TextSearchFlags"
+    define_deprecated_flags :TextSearchFlags, 'SEARCH'
     define_deprecated_method :backword_visible_word_start, :backward_visible_word_start
   end
 
@@ -837,20 +897,29 @@ module Gtk
 
   module TreeModel
     extend GLib::Deprecatable
-    define_deprecated_flags :Flags
+    define_deprecated_const :Flags, "Gtk::TreeModelFlags"
+    define_deprecated_flags :TreeModelFlags
+  end
+
+  class TreeSelection
+    extend GLib::Deprecatable
+    define_deprecated_method :selected_each, :each
   end
 
   class TreeView
     extend GLib::Deprecatable
-    define_deprecated_enums :DropPosition, 'DROP'
-    define_deprecated_enums :GridLines, 'GRID_LINES'
+    define_deprecated_const :DropPosition, "Gtk::TreeViewDropPosition"
+    define_deprecated_enums :TreeViewDropPosition, 'DROP'
+    define_deprecated_const :GridLines, "Gtk::TreeViewGridLines"
+    define_deprecated_enums :TreeViewGridLines, 'GRID_LINES'
     define_deprecated_method :widget_to_tree_coords, :convert_widget_to_bin_window_coords
     define_deprecated_method :tree_to_widget_coords, :convert_bin_window_to_widget_coords
   end
 
   class TreeViewColumn
     extend GLib::Deprecatable
-    define_deprecated_enums :Sizing
+    define_deprecated_const :Sizing, "Gtk::TreeViewColumnSizing"
+    define_deprecated_enums :TreeViewColumnSizing
     define_deprecated_method :cell_renderers, :warn => "Use 'Gtk::CellLayout#cells'." do |_self|
       _self.cells
     end
@@ -858,13 +927,16 @@ module Gtk
 
   class UIManager
     extend GLib::Deprecatable
-    define_deprecated_flags :ItemType
+    define_deprecated_const :ItemType, "Gtk::UIManagerItemType"
+    define_deprecated_flags :UIManagerItemType
   end
 
   class VBox
     extend GLib::Deprecatable
     define_deprecated_singleton_method :new, :warn => "Use 'Gtk::Box.new(:vertical, spacing)'." do |_self, homogeneous, spacing|
-      Gtk::Box.new(:vertical, spacing).set_homogeneous(homogeneous)
+      box = Gtk::Box.new(:vertical, spacing)
+      box.set_homogeneous(homogeneous)
+      box
     end
   end
 
@@ -905,8 +977,10 @@ module Gtk
 
   class Widget
     extend GLib::Deprecatable
-    define_deprecated_enums :HelpType, 'HELP'
-    define_deprecated_enums :TextDirection, 'TEXT_DIR'
+    define_deprecated_const :HelpType, "Gtk::WidgetHelpType"
+    define_deprecated_enums :WidgetHelpType, 'HELP'
+    define_deprecated_const :TextDirection, "Gtk::TextDIrection"
+    define_deprecated_enums "Gtk::TextDirection", 'TEXT_DIR'
     define_deprecated_singleton_method :push_colormap, :warn => "Don't use this method."
     define_deprecated_singleton_method :pop_colormap, :warn => "Don't use this method."
     define_deprecated_singleton_method :set_default_colormap, :warn => "Don't use this method."
@@ -932,8 +1006,8 @@ module Gtk
     define_deprecated_method :colormap, :raise => "Use '#{self}#visual'."
     define_deprecated_method :set_colormap, :warn => "Use '#{self}#set_visual'."
     alias :colormap= :set_colormap
-    define_deprecated_method :shape_combine_mask, :warn => "Don't use this method."
-    define_deprecated_method :input_shape_combine_mask, :warn => "Don't use this method."
+    define_deprecated_method :shape_combine_mask, :warn => "Use '#{self}#shape_combine_region' instead."
+    define_deprecated_method :input_shape_combine_mask, :warn => "Use '#{self}#input_shape_combine_region' instead."
     define_deprecated_method :reset_shapes, :warn => "Don't use this method."
     define_deprecated_method :set_scroll_adjustments, :warn => "Use 'Gtk::Scrollable#set_hadjustment' and 'Gtk::Scrollable#set_vadjustment'." do |_self, hadj, vadj|
       _self.set_hadjustment(hadj)
@@ -944,9 +1018,6 @@ module Gtk
     define_deprecated_method :action, :warn => "Use 'Gtk::Activatable#related_action'." do |_self|
       _self.related_action
     end
-    define_deprecated_method :size_request, :warn => "Use '#{self}#preferred_size'." do |_self|
-      _self.preferred_size.last
-    end
     define_deprecated_method :child_requisition, :warn => "Use '#{self}#preferred_size'." do |_self|
       _self.preferred_size.last
     end
@@ -996,9 +1067,32 @@ module Gtk
 
   class Window
     extend GLib::Deprecatable
-    define_deprecated_enums :Position, 'POS'
-    define_deprecated_enums :Type
+    define_deprecated_const :Position, "Gtk::WindowPosition"
+    define_deprecated_enums "Gtk::WindowPosition", 'POS'
+    define_deprecated_const :Type, "Gtk::WindowType"
+    define_deprecated_enums "Gtk::WindowType"
     define_deprecated_method :active_focus, :activate_focus
     define_deprecated_method :active_default, :activate_default
   end
+
+  class RecentFilter
+    extend GLib::Deprecatable
+    define_deprecated_const :Flags, 'Gtk::RecentFilterFlags'
+  end
+end
+
+module Gdk
+  class DragContext
+    define_deprecated_method_by_hash_args :finish,
+        'success, delete, time',
+        ':success => true, :delete => false, :time => Gdk::CURRENT_TIME' do |_self, success, delete, time|
+      [{:success => success, :delete => delete, :time => time}]
+    end
+  end
+
+  class Event
+    define_deprecated_method :event_widget, :warn => "Use 'Gdk::Event#widget'." do |_self|
+      _self.widget
+    end
+  end
 end
diff --git a/gtk3/lib/gtk3/dialog.rb b/gtk3/lib/gtk3/dialog.rb
new file mode 100644
index 0000000..a82369a
--- /dev/null
+++ b/gtk3/lib/gtk3/dialog.rb
@@ -0,0 +1,65 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Dialog
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      initialize_raw
+
+      title   = options[:title]
+      parent  = options[:parent]
+      flags   = options[:flags]
+      buttons = options[:buttons]
+
+      set_title(title) if title
+      set_transient_for(parent) if parent
+      if flags
+        unless flags.is_a?(DialogFlags)
+          flags = DialogFlags.new(flags)
+        end
+        set_modal(true) if flags.modal?
+        set_destroy_with_parent(true) if flags.destroy_with_parent?
+      end
+
+      add_buttons(*buttons) if buttons
+    end
+
+    alias_method :run_raw, :run
+    def run
+      response_id = run_raw
+      if response_id < 0
+        ResponseType.new(response_id)
+      else
+        response_id
+      end
+    end
+
+    def add_buttons(*buttons)
+      buttons.each do |text, response_id|
+        add_button(text, response_id)
+      end
+    end
+
+    if method_defined?(:use_header_bar)
+      alias_method :use_header_bar_raw, :use_header_bar
+      undef_method :use_header_bar
+      def use_header_bar?
+        use_header_bar_raw != 0
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/file-chooser-dialog.rb b/gtk3/lib/gtk3/file-chooser-dialog.rb
new file mode 100644
index 0000000..ffb2a95
--- /dev/null
+++ b/gtk3/lib/gtk3/file-chooser-dialog.rb
@@ -0,0 +1,36 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class FileChooserDialog
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      GLib::Object.instance_method(:initialize).bind(self).call
+      Loader.reference_gobject(self, :sink => true)
+
+      title = options[:title]
+      parent = options[:parent]
+      action = options[:action] || :open
+      buttons = options[:buttons]
+
+      set_title(title) if title
+      set_action(action) if action
+      set_transient_for(parent) if parent
+
+      add_buttons(*buttons) if buttons
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/font-chooser-dialog.rb b/gtk3/lib/gtk3/font-chooser-dialog.rb
new file mode 100644
index 0000000..c6c6325
--- /dev/null
+++ b/gtk3/lib/gtk3/font-chooser-dialog.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class FontChooserDialog
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      title = options[:title]
+      parent = options[:parent]
+
+      initialize_raw(title, parent)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/gdk-drag-context.rb b/gtk3/lib/gtk3/gdk-drag-context.rb
new file mode 100644
index 0000000..b91e458
--- /dev/null
+++ b/gtk3/lib/gtk3/gdk-drag-context.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gdk # Not Gtk!
+  class DragContext
+    alias_method :finish_raw, :finish
+    def finish(options={})
+      success = options[:success]
+      success = true if success.nil?
+      delete = options[:delete]
+      delete = false if delete.nil?
+      time = options[:time] || Gdk::CURRENT_TIME
+      finish_raw(success, delete, time)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/gesture-multi-press.rb b/gtk3/lib/gtk3/gesture-multi-press.rb
new file mode 100644
index 0000000..1058211
--- /dev/null
+++ b/gtk3/lib/gtk3/gesture-multi-press.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  if const_defined?(:GestureMultiPress)
+    class GestureMultiPress
+      alias_method :area_raw, :area
+      def area
+        filled, rectangle = area_raw
+        if filled
+          rectangle
+        else
+          nil
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/icon-theme.rb b/gtk3/lib/gtk3/icon-theme.rb
new file mode 100644
index 0000000..2f0d00f
--- /dev/null
+++ b/gtk3/lib/gtk3/icon-theme.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class IconTheme
+    alias_method :choose_icon_raw, :choose_icon
+    def choose_icon(icon_names, size, flags=nil)
+      icon_names = [icon_names] unless icon_names.is_a?(Array)
+      if flags.nil?
+        flags = :generic_fallback
+      end
+      choose_icon_raw(icon_names, size, flags)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/icon-view.rb b/gtk3/lib/gtk3/icon-view.rb
new file mode 100644
index 0000000..f81a334
--- /dev/null
+++ b/gtk3/lib/gtk3/icon-view.rb
@@ -0,0 +1,45 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class IconView
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      model = options[:model]
+      area  = options[:area]
+
+      if model
+        initialize_new_with_model(model)
+      elsif area
+        initialize_new_with_area(area)
+      else
+        initialize_new
+      end
+    end
+
+    if method_defined?(:get_cell_rect)
+      alias_method :get_cell_rect_raw, :get_cell_rect
+      def get_cell_rect(path, cell=nil)
+        exist, rect = get_cell_rect_raw(path, cell)
+        if exist
+          rect
+        else
+          nil
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/image.rb b/gtk3/lib/gtk3/image.rb
new file mode 100644
index 0000000..6fe3492
--- /dev/null
+++ b/gtk3/lib/gtk3/image.rb
@@ -0,0 +1,113 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Image
+    alias_method :initialize_raw, :initialize
+    # Creates a Gtk::Image. The source of the image depends on the options
+    # given.
+    #
+    # @param Hash{Symbol => Gtk::Stock, String, Gtk::IconSet, Gio::Icon,
+    #                       Gdk::Pixbuf, Gdk::PixbufAnimation, Cairo::Surface,
+    #                       Fixnum}
+    #
+    # @example Create an image from a file.
+    #   image = Gtk::Image.new :file => 'path/to/the/image.png'
+    #
+    # @example Create an image from stock.
+    #   image = Gtk::Image.new :stock => Gtk::Stock::OPEN, :size => :dialog
+    #
+    # @example Create an image from icon name.
+    #   image = Gtk::Image.new :icon_name => 'gtk-open', :size => :dialog
+    #
+    # @example Create an image from a Gio::Icon, that itself is loaded from a
+    #          file.
+    #   icon = Gio::Icon.new_for_string 'path/to/the/image.png'
+    #   image = Gtk::Image.new :icon => icon, :size => :dialog
+    #
+    # @example Create an image from from a Gio::Icon that is an Gio::ThemedIcon.
+    #   icon = Gio::ThemedIcon.new 'gtk-open'
+    #   image = Gtk::Image.new :icon => icon, :size => :dialog
+    #
+    # @example Create an image from a Gdk::Pixbuf.
+    #   pixbuf = Gdk::Pixbuf.new 'path/to/the/image.png'
+    #   image = Gtk::Image.new :pixbuf => pixbuf
+    #
+    # @example Create an image from an Gtk::IconSet, that itself is created
+    #          from a Gdk::Pixbuf.
+    #   pixbuf = Gdk::Pixbuf.new 'path/to/the/image.png'
+    #   iconSet = Gtk::IconSet.new pixbuf
+    #   image = Gtk::Image.new :icon_set => iconSet, :size => :dialog
+    #
+    # @example Create an image from a Gdk::PixbufAnimation
+    #   pixAnim = Gdk::PixbufAnimation.new 'anim.gif'
+    #   image = Gtk::Image.new :animation => pixAnim
+    #
+    # @example Create an image from a file in a resource file
+    #   resource = Gio::Resource.load(a_resource_file)
+    #   Gio::Resources.register(resource)
+    #   resource_path = "/path/to/image.png"
+    #   image = Gtk::Image.new :resource => resource_path
+    #
+    # @example Create an image from a Cairo::Surface that is a
+    #          Cairo::ImageSurface.
+    #   surface = Cairo::ImageSurface.new :RGB24, 60, 60
+    #   context = Cairo::Context.new surface
+    #   context.set_source_rgb 0, 1, 0
+    #   context.rectangle 10, 10, 40, 40
+    #   context.fill.stroke
+    #   image = Gtk::Image.new :surface => surface
+    def initialize(options={})
+      stock     = options[:stock] || nil
+      icon_name = options[:icon_name] || nil
+      icon_set  = options[:icon_set] || nil
+      icon      = options[:icon] || options[:gicon] || nil
+      file      = options[:file] || nil
+      pixbuf    = options[:pixbuf] || nil
+      animation = options[:animation] || nil
+      resource  = options[:resource] ||nil
+      surface   = options[:surface] || nil
+      size      = options[:size] || nil
+
+      case size
+      when String, Symbol
+        size = Gtk.icon_size_from_name("gtk-#{size}")
+      end
+
+      if stock
+        initialize_new_from_stock(stock, size)
+      elsif icon_name
+        initialize_new_from_icon_name(icon_name, size)
+      elsif icon_set
+        initialize_new_from_icon_set(icon_set, size)
+      elsif icon
+        initialize_new_from_gicon(icon, size)
+      elsif file
+        initialize_new_from_file(file)
+      elsif pixbuf
+        initialize_new_from_pixbuf(pixbuf)
+      elsif animation
+        initialize_new_from_animation(animation)
+      elsif resource
+        initialize_new_from_resource(resource)
+      elsif surface
+        initialize_new_from_surface(surface)
+      else
+        raise ArgumentError, "Invalid arguments."
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/label.rb b/gtk3/lib/gtk3/label.rb
new file mode 100644
index 0000000..1021326
--- /dev/null
+++ b/gtk3/lib/gtk3/label.rb
@@ -0,0 +1,54 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Label
+    alias_method :initialize_raw, :initialize
+    def initialize(text=nil, options={})
+      if options == true or options == false or options.nil?
+        mnemonic = options
+        warn "Gtk::Label.new(text, mnemonic) style has been deprecated. " +
+             "Use Gtk::Label.new(text, {:use_underline => #{mnemonic}}) style instead."
+        options = {
+          :use_underline => mnemonic,
+        }
+      end
+      if options[:use_underline]
+        initialize_new_with_mnemonic(text)
+      else
+        initialize_raw(text || "")
+      end
+    end
+
+    private :set_markup_with_mnemonic
+    alias_method :set_markup_raw, :set_markup
+    def set_markup(text, options={})
+      if options == true or options == false or options.nil?
+        mnemonic = options
+        warn "Gtk::Label#set_markup(text, mnemonic) style has been deprecated. " +
+             "Use Gtk::Label#set_marup(text, {:use_underline => #{mnemonic}}) style instead."
+        options = {
+          :use_underline => mnemonic,
+        }
+      end
+      if options[:use_underline]
+        set_markup_with_mnemonic(text)
+      else
+        set_markup_raw(text)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/level-bar.rb b/gtk3/lib/gtk3/level-bar.rb
new file mode 100644
index 0000000..26ec084
--- /dev/null
+++ b/gtk3/lib/gtk3/level-bar.rb
@@ -0,0 +1,32 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class LevelBar
+    if method_defined?(:get_offset_value)
+      alias_method :get_offset_value_raw, :get_offset_value
+
+      def get_offset_value(name)
+        found, offset = get_offset_value_raw(name)
+        if found
+          offset
+        else
+          nil
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/list-store.rb b/gtk3/lib/gtk3/list-store.rb
new file mode 100644
index 0000000..86e19bf
--- /dev/null
+++ b/gtk3/lib/gtk3/list-store.rb
@@ -0,0 +1,81 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ListStore
+    alias_method :initialize_raw, :initialize
+    def initialize(*columns)
+      if columns.empty?
+        raise ArgumentError, "No column type is specified"
+      end
+      initialize_raw(columns)
+    end
+
+    def set_values(iter, values)
+      columns = []
+      _values = []
+      if values.is_a?(Hash)
+        values.each do |column_id, value|
+          type = get_column_type(column_id)
+          columns << column_id
+          _values << GLib::Value.new(type, value)
+        end
+      else
+        values.each_with_index do |value, i|
+          type = get_column_type(i)
+          columns << i
+          _values << GLib::Value.new(type, value)
+        end
+      end
+      set(iter, columns, _values)
+    end
+
+    alias_method :append_raw, :append
+    def append
+      iter = append_raw
+      setup_iter(iter)
+      iter
+    end
+
+    alias_method :prepend_raw, :prepend
+    def prepend
+      iter = prepend_raw
+      setup_iter(iter)
+      iter
+    end
+
+    alias_method :insert_raw, :insert
+    def insert(index)
+      iter = insert_raw(index)
+      setup_iter(iter)
+      iter
+    end
+
+    alias_method :insert_before_raw, :insert_before
+    def insert_before(index)
+      iter = insert_before_raw(index)
+      setup_iter(iter)
+      iter
+    end
+
+    alias_method :insert_after_raw, :insert_after
+    def insert_after(index)
+      iter = insert_after_raw(index)
+      setup_iter(iter)
+      iter
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/loader.rb b/gtk3/lib/gtk3/loader.rb
new file mode 100644
index 0000000..dd08ed1
--- /dev/null
+++ b/gtk3/lib/gtk3/loader.rb
@@ -0,0 +1,403 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Loader < GObjectIntrospection::Loader
+    def initialize(base_module, init_arguments)
+      super(base_module)
+      @init_arguments = init_arguments
+    end
+
+    private
+    def pre_load(repository, namespace)
+      call_init_function(repository, namespace)
+      define_stock_module
+      define_version_module
+      setup_tree_model(repository, namespace)
+      setup_pending_constants
+    end
+
+    def call_init_function(repository, namespace)
+      init_check = repository.find(namespace, "init_check")
+      arguments = [
+        [$0] + @init_arguments,
+      ]
+      succeeded, argv = init_check.invoke(:arguments => arguments)
+      @init_arguments.replace(argv[1..-1])
+      raise InitError, "failed to initialize GTK+" unless succeeded
+    end
+
+    def define_stock_module
+      @stock_module = Module.new
+      @base_module.const_set("Stock", @stock_module)
+    end
+
+    def define_version_module
+      @version_module = Module.new
+      @base_module.const_set("Version", @version_module)
+    end
+
+    def setup_tree_model(repository, namespace)
+      repository.each(namespace) do |info|
+        case info
+        when GObjectIntrospection::InterfaceInfo
+          case info.name
+          when "TreeModel"
+            info.gtype.to_class.__send__(:include, Enumerable)
+            return
+          end
+        end
+      end
+    end
+
+    def level_bar_class
+      @level_bar_class ||= @base_module.const_get(:LevelBar)
+    end
+
+    def style_provider_module
+      @style_provider_module ||= @base_module.const_get(:StyleProvider)
+    end
+
+    def post_load(repository, namespace)
+      apply_pending_constants
+      require_extension
+      require_libraries
+    end
+
+    def require_extension
+      begin
+        major, minor, _ = RUBY_VERSION.split(/\./)
+        require "#{major}.#{minor}/gtk3.so"
+      rescue LoadError
+        require "gtk3.so"
+      end
+    end
+
+    def require_libraries
+      require "gtk3/gdk-drag-context"
+
+      require "gtk3/about-dialog"
+      require "gtk3/action"
+      require "gtk3/action-group"
+      require "gtk3/binding-set"
+      require "gtk3/border"
+      require "gtk3/box"
+      require "gtk3/button"
+      require "gtk3/builder"
+      require "gtk3/calendar"
+      require "gtk3/cell-layout"
+      require "gtk3/clipboard"
+      require "gtk3/color-chooser-dialog"
+      require "gtk3/combo-box"
+      require "gtk3/combo-box-text"
+      require "gtk3/container"
+      require "gtk3/css-provider"
+      require "gtk3/dialog"
+      require "gtk3/file-chooser-dialog"
+      require "gtk3/font-chooser-dialog"
+      require "gtk3/gesture-multi-press"
+      require "gtk3/icon-theme"
+      require "gtk3/icon-view"
+      require "gtk3/image"
+      require "gtk3/label"
+      require "gtk3/level-bar"
+      require "gtk3/list-store"
+      require "gtk3/menu-item"
+      require "gtk3/message-dialog"
+      require "gtk3/paned"
+      require "gtk3/radio-action"
+      require "gtk3/radio-button"
+      require "gtk3/recent-chooser-dialog"
+      require "gtk3/scale-button"
+      require "gtk3/scrolled-window"
+      require "gtk3/search-bar"
+      require "gtk3/selection-data"
+      require "gtk3/spin-button"
+      require "gtk3/stack"
+      require "gtk3/stock"
+      require "gtk3/style-context"
+      require "gtk3/style-properties"
+      require "gtk3/target-list"
+      require "gtk3/target-entry"
+      require "gtk3/text-buffer"
+      require "gtk3/text-iter"
+      require "gtk3/text-tag-table"
+      require "gtk3/toggle-action"
+      require "gtk3/toggle-button"
+      require "gtk3/tool-button"
+      require "gtk3/tree-iter"
+      require "gtk3/tree-model"
+      require "gtk3/tree-model-filter"
+      require "gtk3/tree-path"
+      require "gtk3/tree-selection"
+      require "gtk3/tree-store"
+      require "gtk3/tree-view"
+      require "gtk3/tree-view-column"
+      require "gtk3/ui-manager"
+      require "gtk3/version"
+      require "gtk3/widget"
+      require "gtk3/window"
+
+      require "gtk3/deprecated"
+    end
+
+    def rubyish_method_name(function_info, options={})
+      name = function_info.name
+      case name
+      when /\Alist_(child_properties|style_properties)\z/
+        $1
+      else
+        super
+      end
+    end
+
+    def load_function_info(info)
+      name = info.name
+      case name
+      when "init", /_get_type\z/
+        # ignore
+      when /\Astock_/
+        stock_module = @base_module.const_get(:Stock)
+        method_name = rubyish_method_name(info, :prefix => "stock_")
+        define_singleton_method(stock_module, method_name, info)
+      when /\Adrag_(?:source_|dest_|get_data\z|(?:un)highlight\z|begin|check_threshold\z)/
+        # For OS X. It may be broken. It's not tested.
+        widget_class = @base_module.const_get(:Widget)
+        method_name = rubyish_method_name(info)
+        define_method(info, widget_class, method_name)
+      when /\Adrag_/
+        method_name = rubyish_method_name(info, :prefix => "drag_")
+        define_method(info, Gdk::DragContext, method_name)
+      when /\Abinding_/
+        # Ignore because singleton methods are defined.
+      else
+        super
+      end
+    end
+
+    def define_singleton_method(klass, name, info)
+      case klass.name
+      when "Gtk"
+        case name
+        when "get_event_widget"
+          define_gdk_event_widget(info)
+          return
+        when "events_pending"
+          name = "events_pending?"
+        end
+      when "Gtk::Widget"
+        case name
+        when "default_style"
+          # Ignore deprecated method
+          return
+        end
+      end
+
+      super(klass, name, info)
+    end
+
+    def define_gdk_event_widget(info)
+      define_method(info, Gdk::Event, "widget")
+    end
+
+    def define_enum(info)
+      case info.name
+      when /\AArrow/
+        self.class.define_class(info.gtype, $POSTMATCH, Gtk::Arrow)
+      when /\ALevelBar/
+        self.class.define_class(info.gtype, $POSTMATCH, Gtk::LevelBar)
+      when /\ARevealer/
+        self.class.define_class(info.gtype, $POSTMATCH, Gtk::Revealer)
+      when /\AStack/
+        self.class.define_class(info.gtype, $POSTMATCH, Gtk::Stack)
+      else
+        super
+      end
+    end
+
+    def enum_class_name(info)
+      case info.name
+      when /\ARc/
+        "RC#{$POSTMATCH}"
+      else
+        super
+      end
+    end
+
+    def flags_class_name(info)
+      case info.name
+      when /\ARc/
+        "RC#{$POSTMATCH}"
+      else
+        super
+      end
+    end
+
+    def field_name(field_info, klass)
+      case klass.name
+      when "Gtk::AccelKey"
+        super.gsub(/\Aaccel_/, "")
+      else
+        super
+      end
+    end
+
+    def load_method_info(info, klass, method_name)
+      case klass.name
+      when "Gtk::Assistant"
+        case method_name
+        when /\A(?:set|get)_page_(?:header|side)_image\z/
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::Buildable"
+        case method_name
+        when "name"
+          method_name = "builder_name"
+        when "set_name"
+          method_name = "set_builder_name"
+        end
+      when "Gtk::Builder"
+        case method_name
+        when "connect_signals"
+          return
+        when "connect_signals_full"
+          method_name = "connect_signals"
+        when "get_type_from_name"
+          method_name = "get_type"
+        end
+      when "Gtk::BindingSet"
+        case method_name
+        when "add_path"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::Button"
+        case method_name
+        when "enter", "leave", "pressed", "released"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::CellRenderer"
+        case method_name
+        when "get_size"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::CellView"
+        case method_name
+        when "get_size_of_row"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::Container"
+        case method_name
+        when "forall"
+          method_name = "each_all"
+        end
+      when "Gtk::IconSet"
+        case method_name
+        when "render_icon"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::IconTheme"
+        case method_name
+        when "list_icons"
+          method_name = "icons"
+        end
+      when "Gtk::Image"
+        method_name = method_name.gsub(/\Agicon/, "icon")
+      when "Gtk::Tooltip"
+        case method_name
+        when "set_icon_from_stock"
+          # Ignore deprecated methods
+          return
+        end
+      when "Gtk::TreeSelection"
+        case method_name
+        when "selected_foreach"
+          method_name = "each"
+        end
+      when "Gtk::TreeView"
+        case method_name
+        when "row_expanded"
+          method_name += "?"
+        end
+      when "Gtk::Widget"
+        case info.name
+        when "size_request",
+             "get_child_requisition",
+             "ensure_style",
+             "reset_rc_styles",
+             "class_path",
+             "modify_style",
+             "get_modifier_style",
+             "modify_fg",
+             "modify_bg",
+             "modify_text",
+             "modify_base",
+             "modify_font",
+             "modify_cursor",
+             "render_icon",
+             "get_state",
+             "has_rc_style",
+             "get_requisition",
+             "get_pointer"
+          # Ignore deprecated method
+          return
+        end
+      end
+      super(info, klass, method_name)
+    end
+
+    def load_constant_info(info)
+      case info.name
+      when /\ASTOCK_/
+        @stock_module.const_set($POSTMATCH, info.value)
+      when /_VERSION\z/
+        @version_module.const_set($PREMATCH, info.value)
+      when /\ALEVEL_BAR_/
+        @pending_constants << info
+      when /\ASTYLE_PROVIDER_/
+        @pending_constants << info
+      else
+        super
+      end
+    end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+
+    def setup_pending_constants
+      @pending_constants = []
+    end
+
+    def apply_pending_constants
+      @pending_constants.each do |info|
+        case info.name
+        when /\ALEVEL_BAR_/
+          level_bar_class.const_set($POSTMATCH, info.value)
+        when /\ASTYLE_PROVIDER_/
+          style_provider_module.const_set($POSTMATCH, info.value)
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/menu-item.rb b/gtk3/lib/gtk3/menu-item.rb
new file mode 100644
index 0000000..2301b27
--- /dev/null
+++ b/gtk3/lib/gtk3/menu-item.rb
@@ -0,0 +1,33 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class MenuItem
+    alias_method :initialize_raw, :initialize
+    def initialize(*args)
+      if args.size == 1
+        label = args.first
+        if label.nil?
+          initialize_raw
+        else
+          initialize_raw(label)
+        end
+      else
+        initialize_raw(*args)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/message-dialog.rb b/gtk3/lib/gtk3/message-dialog.rb
new file mode 100644
index 0000000..80ee66a
--- /dev/null
+++ b/gtk3/lib/gtk3/message-dialog.rb
@@ -0,0 +1,49 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class MessageDialog
+    def initialize(options={})
+      parent  = options[:parent]
+      flags   = options[:flags] || 0
+      type    = options[:type] || :info
+      buttons = options[:buttons] || options[:buttons_type] || :ok
+      message = options[:message]
+
+      initialize_general = GLib::Object.instance_method(:initialize).bind(self)
+      initialize_general.call(:message_type => type,
+                              :buttons => buttons)
+      Loader.reference_gobject(self, :sink => true)
+
+      if message
+        self.use_markup = false
+        self.text = message
+      end
+
+      if parent
+        self.transient_for = parent
+      end
+
+      if flags
+        unless flags.is_a?(DialogFlags)
+          flags = DialogFlags.new(flags)
+        end
+        self.modal = true if flags.modal?
+        self.destroy_with_parent = true if flags.destroy_with_parent?
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/paned.rb b/gtk3/lib/gtk3/paned.rb
new file mode 100644
index 0000000..01cd575
--- /dev/null
+++ b/gtk3/lib/gtk3/paned.rb
@@ -0,0 +1,37 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Paned
+    alias_method :pack1_raw, :pack1
+    def pack1(child, options={})
+      resize = options[:resize]
+      resize = false if resize.nil?
+      shrink = options[:shrink]
+      shrink = true if shrink.nil?
+      pack1_raw(child, resize, shrink)
+    end
+
+    alias_method :pack2_raw, :pack2
+    def pack2(child, options={})
+      resize = options[:resize]
+      resize = true if resize.nil?
+      shrink = options[:shrink]
+      shrink = true if shrink.nil?
+      pack2_raw(child, resize, shrink)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/radio-action.rb b/gtk3/lib/gtk3/radio-action.rb
new file mode 100644
index 0000000..7352e56
--- /dev/null
+++ b/gtk3/lib/gtk3/radio-action.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class RadioAction
+    alias_method :initialize_raw, :initialize
+    def initialize(name, value, options={})
+      initialize_raw(name,
+                     options[:label],
+                     options[:tooltip],
+                     options[:stock_id],
+                     value)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/radio-button.rb b/gtk3/lib/gtk3/radio-button.rb
new file mode 100644
index 0000000..3cc5401
--- /dev/null
+++ b/gtk3/lib/gtk3/radio-button.rb
@@ -0,0 +1,49 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class RadioButton
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      group         = options[:group]
+      label         = options[:label]
+      member        = options[:member]
+      use_underline = options[:use_underline]
+
+      if label
+        if member
+          if use_underline
+            initialize_new_with_mnemonic_from_widget(member, label)
+          else
+            initialize_new_with_label_from_widget(member, label)
+          end
+        else
+          if use_underline
+            initialize_new_with_mnemonic(group, label)
+          else
+            initialize_new_with_label(group, label)
+          end
+        end
+      else
+        if member
+          initialize_new_from_widget(member)
+        else
+          initialize_raw
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/recent-chooser-dialog.rb b/gtk3/lib/gtk3/recent-chooser-dialog.rb
new file mode 100644
index 0000000..c9f6de8
--- /dev/null
+++ b/gtk3/lib/gtk3/recent-chooser-dialog.rb
@@ -0,0 +1,38 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class RecentChooserDialog
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      initialize_options = {
+        :recent_manager => options[:recent_manager],
+      }
+      gobject_initialize = GLib::Object.instance_method(:initialize).bind(self)
+      gobject_initialize.call(initialize_options)
+      Loader.reference_gobject(self, :sink => true)
+
+      title = options[:title]
+      parent = options[:parent]
+      buttons = options[:buttons]
+
+      set_title(title) if title
+      set_transient_for(parent) if parent
+
+      add_buttons(*buttons) if buttons
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/scale-button.rb b/gtk3/lib/gtk3/scale-button.rb
new file mode 100644
index 0000000..b6bd1fd
--- /dev/null
+++ b/gtk3/lib/gtk3/scale-button.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ScaleButton
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      icon_size = options[:icon_size] || :button
+      min       = options[:min]       || 0
+      max       = options[:max]       || 100
+      step      = options[:step]      || 2
+      icons     = options[:icons]     || nil
+
+      case icon_size
+      when Symbol, String
+        icon_size = IconSize.new(icon_size.to_s)
+      end
+
+      initialize_raw(icon_size, min, max, step, icons)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/scrolled-window.rb b/gtk3/lib/gtk3/scrolled-window.rb
new file mode 100644
index 0000000..d46a5fe
--- /dev/null
+++ b/gtk3/lib/gtk3/scrolled-window.rb
@@ -0,0 +1,24 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ScrolledWindow
+    alias_method :initialize_raw, :initialize
+    def initialize(hadjustment=nil, vadjustment=nil)
+      initialize_raw(hadjustment, vadjustment)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/search-bar.rb b/gtk3/lib/gtk3/search-bar.rb
new file mode 100644
index 0000000..91f71dd
--- /dev/null
+++ b/gtk3/lib/gtk3/search-bar.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class SearchBar
+    if method_defined?(:connect_entry)
+      alias_method :connect_entry_raw, :connect_entry
+      def connect_entry(entry)
+        connect_entry_raw(entry)
+        self
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/selection-data.rb b/gtk3/lib/gtk3/selection-data.rb
new file mode 100644
index 0000000..d476352
--- /dev/null
+++ b/gtk3/lib/gtk3/selection-data.rb
@@ -0,0 +1,42 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class SelectionData
+    alias_method :set_raw, :set
+    def set(type, data, options={})
+      format ||= options[:format]
+      if format.nil?
+        case type
+        when Gdk::Selection::TYPE_INTEGER
+          format = 32
+        when Gdk::Selection::TYPE_STRING
+          format = 8
+        else
+          message = "specify :format as the number of bits of each data"
+          raise ArgumentError, message
+        end
+      end
+      set_raw(type, format, data)
+    end
+
+    alias_method :set_text_raw, :set_text
+    def set_text(text)
+      set_text_raw(text, text.bytesize)
+    end
+    alias_method :text=, :set_text
+  end
+end
diff --git a/gtk3/lib/gtk3/spin-button.rb b/gtk3/lib/gtk3/spin-button.rb
new file mode 100644
index 0000000..3721049
--- /dev/null
+++ b/gtk3/lib/gtk3/spin-button.rb
@@ -0,0 +1,34 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class SpinButton
+    alias_method :initialize_raw, :initialize
+    def initialize(arg0, arg1=nil, arg2=nil)
+      if arg0.is_a?(Gtk::Adjustment)
+        adjustment = arg0
+        climb_rate = arg1 || 0.0
+        digits     = arg2 || 0
+        initialize_raw(adjustment, climb_rate, digits)
+      else
+        min  = arg0
+        max  = arg1
+        step = arg2
+        initialize_new_with_range(min, max, step)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/stack.rb b/gtk3/lib/gtk3/stack.rb
new file mode 100644
index 0000000..ce0904c
--- /dev/null
+++ b/gtk3/lib/gtk3/stack.rb
@@ -0,0 +1,54 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Stack
+    if method_defined?(:set_visible_child)
+      alias_method :set_visible_child_raw, :set_visible_child
+      def set_visible_child(widget_or_name, transition_type=nil)
+        case widget_or_name
+        when String
+          name = widget_or_name
+        else
+          widget = widget_or_name
+        end
+
+        if widget
+          set_visible_child_raw(widget)
+        else
+          if transition_type
+            set_visible_child_full(name, transition_type)
+          else
+            set_visible_child_name(name)
+          end
+        end
+      end
+    end
+
+    if method_defined?(:add_titled) and method_defined?(:add_named)
+      def add(widget, name=nil, title=nil)
+        if title
+          add_titled(widget, name, title)
+        elsif name
+          add_named(widget, name)
+        else
+          super(widget)
+        end
+        self
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/stock.rb b/gtk3/lib/gtk3/stock.rb
new file mode 100644
index 0000000..07756bd
--- /dev/null
+++ b/gtk3/lib/gtk3/stock.rb
@@ -0,0 +1,70 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  module Stock
+    class << self
+      alias_method :add_raw, :add
+      def add(stock_id, label, *rest)
+        case rest.size
+        when 0
+          options = {}
+        when 1
+          if rest[0].is_a?(Hash)
+            options = rest[0]
+          else
+            options = {:modifier => rest[0]}
+          end
+        else
+          options = {
+            :modifier           => rest[0],
+            :key_value          => rest[1],
+            :translation_domain => rest[2],
+          }
+        end
+
+        item = StockItem.new
+
+        stock_id = stock_id.to_s if stock_id.is_a?(Symbol)
+        item.stock_id = stock_id
+
+        item.label = label
+
+        modifier = options[:modifier]
+        item.modifier = modifier if modifier
+
+        key_value = options[:key_value]
+        item.keyval = key_value if key_value
+
+        translation_domain = options[:translation_domain]
+        item.translation_domain = translation_domain if translation_domain
+
+        add_raw([item])
+      end
+
+      alias_method :lookup_raw, :lookup
+      def lookup(stock_id)
+        stock_id = stock_id.to_s if stock_id.is_a?(Symbol)
+        found, item = lookup_raw(stock_id)
+        if found
+          item
+        else
+          nil
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/style-context.rb b/gtk3/lib/gtk3/style-context.rb
new file mode 100644
index 0000000..7ccd8e8
--- /dev/null
+++ b/gtk3/lib/gtk3/style-context.rb
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class StyleContext
+    class << self
+      alias_method :reset_widgets_raw, :reset_widgets
+      def reset_widgets(screen=nil)
+        reset_widgets_raw(screen || Gdk::Screen.default)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/style-properties.rb b/gtk3/lib/gtk3/style-properties.rb
new file mode 100644
index 0000000..dd8b1e2
--- /dev/null
+++ b/gtk3/lib/gtk3/style-properties.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class StyleProperties
+    alias_method :get_property_raw, :get_property
+    def get_property(key, state)
+      found, property = get_property_raw(key, state)
+      if found
+        property.value
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/target-entry.rb b/gtk3/lib/gtk3/target-entry.rb
new file mode 100644
index 0000000..39a7295
--- /dev/null
+++ b/gtk3/lib/gtk3/target-entry.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TargetEntry
+    alias_method :initialize_raw, :initialize
+    def initialize(target, flags, info)
+      unless flags.is_a?(Gtk::TargetFlags)
+        flags = Gtk::TargetFlags.new(flags)
+      end
+      initialize_raw(target, flags.to_i, info)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/target-list.rb b/gtk3/lib/gtk3/target-list.rb
new file mode 100644
index 0000000..15487a2
--- /dev/null
+++ b/gtk3/lib/gtk3/target-list.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TargetList
+    alias_method :find_raw, :find
+    def find(target)
+      target = Gdk::Atom.intern(target) if target.is_a?(String)
+
+      found, info = find_raw(target)
+      if found
+        info
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/text-buffer.rb b/gtk3/lib/gtk3/text-buffer.rb
new file mode 100644
index 0000000..05fcc6c
--- /dev/null
+++ b/gtk3/lib/gtk3/text-buffer.rb
@@ -0,0 +1,165 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TextBuffer
+    def create_tag(tag_name=nil, properties={})
+      tag = TextTag.new(tag_name)
+      succeeded = tag_table.add(tag)
+      return nil unless succeeded
+
+      properties.each do |property|
+        key, value = property
+        tag.set_property(key, value)
+      end
+
+      tag
+    end
+
+    # prevent collision with deprecated methods.
+    alias_method :get_iter_at_line_offset_raw,  :get_iter_at_line_offset
+    alias_method :get_iter_at_line_index_raw,   :get_iter_at_line_index
+    alias_method :get_iter_at_line_raw,         :get_iter_at_line
+    alias_method :get_iter_at_offset_raw,       :get_iter_at_offset
+    alias_method :get_iter_at_mark_raw,         :get_iter_at_mark
+    alias_method :get_iter_at_child_anchor_raw, :get_iter_at_child_anchor
+    def get_iter_at(arguments)
+      line   = arguments[:line]
+      offset = arguments[:offset]
+      index  = arguments[:index]
+      mark   = arguments[:mark]
+      anchor = arguments[:anchor]
+      if line
+        if offset
+          get_iter_at_line_offset_raw(line, offset)
+        elsif index
+          get_iter_at_line_index_raw(line, index)
+        else
+          get_iter_at_line_raw(line)
+        end
+      elsif offset
+        get_iter_at_offset_raw(offset)
+      elsif mark
+        get_iter_at_mark_raw(mark)
+      elsif anchor
+        get_iter_at_child_anchor_raw(anchor)
+      else
+        message =
+          "Must specify one of :line, :offset, :mark or :anchor: #{arguments.inspect}"
+        raise ArgumentError, message
+      end
+    end
+
+    alias_method :insert_raw,              :insert
+    alias_method :insert_pixbuf_raw,       :insert_pixbuf
+    alias_method :insert_child_anchor_raw, :insert_child_anchor
+    def insert(iter, target, options={})
+      interactive = options[:interactive]
+      default_editable = options[:default_editable]
+      tags = options[:tags]
+
+      start_offset = iter.offset
+      if interactive
+        default_editable = true if default_editable.nil?
+        insert_interactive(iter, target, default_editable)
+      else
+        case target
+        when Gdk::Pixbuf
+          insert_pixbuf_raw(iter, target)
+        when TextChildAnchor
+          insert_text_child_anchor_raw(iter, target)
+        else
+          insert_raw(iter, target, target.bytesize)
+        end
+      end
+
+      if tags
+        start_iter = get_iter_at(:offset => start_offset)
+        tags.each do |tag|
+          tag = tag_table.lookup(tag) if tag.is_a?(String)
+          apply_tag(tag, start_iter, iter)
+        end
+      end
+
+      self
+    end
+
+    alias_method :insert_at_cursor_raw, :insert_at_cursor
+    def insert_at_cursor(text, options={})
+      interactive = options[:interactive]
+      default_editable = options[:default_editable]
+
+      if interactive
+        default_editable = true if default_editable.nil?
+        insert_interactive_at_cursor(text, default_editable)
+      else
+        insert_at_cursor_raw(text, text.bytesize)
+      end
+    end
+
+    alias_method :set_text_raw, :set_text
+    def set_text(text)
+      set_text_raw(text, text.bytesize)
+    end
+    remove_method :text=
+    alias_method :text=, :set_text
+
+    alias_method :apply_tag_raw, :apply_tag
+    def apply_tag(tag, start, last)
+      if tag.is_a?(String)
+        apply_tag_by_name(tag, start, last)
+      else
+        apply_tag_raw(tag, start, last)
+      end
+    end
+
+    alias_method :serialize_formats_raw, :serialize_formats
+    def serialize_formats
+      serialize_formats_raw[0]
+    end
+
+    alias_method :deserialize_formats_raw, :deserialize_formats
+    def deserialize_formats
+      deserialize_formats_raw[0]
+    end
+
+    alias_method :serialize_raw, :serialize
+    def serialize(*arguments)
+      serialize_raw(*arguments)[0].pack("C*")
+    end
+
+    alias_method :selection_bounds_raw, :selection_bounds
+    def selection_bounds
+      selected, start_iter, end_iter = selection_bounds_raw
+      if selected
+        [start_iter, end_iter]
+      else
+        nil
+      end
+    end
+
+    private
+    alias_method :insert_interactive_raw, :insert_interactive
+    def insert_interactive(iter, text, default_ediatable)
+      insert_interactive_raw(iter, text, text.bytesize, default_ediatable)
+    end
+
+    alias_method :insert_interactive_at_cursor_raw, :insert_interactive_at_cursor
+    def insert_interactive_at_cursor(text, default_ediatable)
+      insert_interactive_at_cursor_raw(text, text.bytesize, default_ediatable)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/text-iter.rb b/gtk3/lib/gtk3/text-iter.rb
new file mode 100644
index 0000000..c967e5c
--- /dev/null
+++ b/gtk3/lib/gtk3/text-iter.rb
@@ -0,0 +1,39 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TextIter
+    alias_method :forward_search_raw, :forward_search
+    def forward_search(text, flags, limit=nil)
+      found, start_iter, end_iter = forward_search_raw(text, flags, limit)
+      if found
+        [start_iter, end_iter]
+      else
+        nil
+      end
+    end
+
+    alias_method :backward_search_raw, :backward_search
+    def backward_search(text, flags, limit=nil)
+      found, start_iter, end_iter = backward_search_raw(text, flags, limit)
+      if found
+        [start_iter, end_iter]
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/text-tag-table.rb b/gtk3/lib/gtk3/text-tag-table.rb
new file mode 100644
index 0000000..38e4d8d
--- /dev/null
+++ b/gtk3/lib/gtk3/text-tag-table.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TextTagTable
+    alias_method :add_raw, :add
+    def add(tag)
+      succeeded = add_raw(tag)
+      # GTK+ 3.12 or older returns nothing.
+      # We assume that it's always succeeded for the case.
+      if succeeded.nil?
+        true
+      else
+        succeeded
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/toggle-action.rb b/gtk3/lib/gtk3/toggle-action.rb
new file mode 100644
index 0000000..dfd05f9
--- /dev/null
+++ b/gtk3/lib/gtk3/toggle-action.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ToggleAction
+    alias_method :initialize_raw, :initialize
+    def initialize(name, options={})
+      initialize_raw(name,
+                     options[:label],
+                     options[:tooltip],
+                     options[:stock_id])
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/toggle-button.rb b/gtk3/lib/gtk3/toggle-button.rb
new file mode 100644
index 0000000..2727349
--- /dev/null
+++ b/gtk3/lib/gtk3/toggle-button.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ToggleButton
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      label = options[:label]
+      use_underline = options[:use_underline]
+
+      if label
+        if use_underline
+          initialize_new_with_mnemonic(label)
+        else
+          initialize_new_with_label(label)
+        end
+      else
+        initialize_raw
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tool-button.rb b/gtk3/lib/gtk3/tool-button.rb
new file mode 100644
index 0000000..3a60298
--- /dev/null
+++ b/gtk3/lib/gtk3/tool-button.rb
@@ -0,0 +1,36 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class ToolButton
+    alias_method :initialize_raw, :initialize
+    def initialize(options={})
+      icon_widget = options[:icon_widget]
+      label       = options[:label]
+      stock_id    = options[:stock_id]
+
+      if icon_widget
+        initialize_new(icon_widget)
+      elsif stock_id
+        initialize_new_from_stock(stock_id)
+      else
+        initialize_new
+      end
+
+      set_label(label) if label
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-iter.rb b/gtk3/lib/gtk3/tree-iter.rb
new file mode 100644
index 0000000..af0f964
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-iter.rb
@@ -0,0 +1,52 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeIter
+    def model
+      @model
+    end
+
+    def model=(model)
+      @model = model
+    end
+
+    def get_value(column)
+      @model.get_value(self, column).value
+    end
+    alias_method :[], :get_value
+
+    def set_value(column, value)
+      @model.set_value(self, column, value)
+    end
+    alias_method :[]=, :set_value
+
+    def set_values(values)
+      @model.set_values(self, values)
+    end
+    alias_method :values=, :set_values
+
+    def path
+      @model.get_path(self)
+    end
+
+    def ==(other)
+      other.is_a?(self.class) and
+        @model == other.model and
+        path == other.path
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-model-filter.rb b/gtk3/lib/gtk3/tree-model-filter.rb
new file mode 100644
index 0000000..1730aba
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-model-filter.rb
@@ -0,0 +1,45 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeModelFilter
+    def initialize(child_model, root=nil)
+      super(:child_model => child_model, :virtual_root => root)
+    end
+
+    alias_method :set_modify_func_raw, :set_modify_func
+    def set_modify_func(*types, &block)
+      raise ArgumentError, "one or more types are required" if types.empty?
+      set_modify_func_raw(types, &block)
+    end
+
+    alias_method :convert_iter_to_child_iter_raw, :convert_iter_to_child_iter
+    def convert_iter_to_child_iter(iter)
+      child_iter = convert_iter_to_child_iter_raw(iter)
+      child_iter.model = model
+      child_iter
+    end
+
+    alias_method :convert_child_iter_to_iter_raw, :convert_child_iter_to_iter
+    def convert_child_iter_to_iter(child_iter)
+      converted, iter = convert_child_iter_to_iter_raw(child_iter)
+      return nil unless converted
+
+      iter.model = self
+      iter
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-model.rb b/gtk3/lib/gtk3/tree-model.rb
new file mode 100644
index 0000000..f141f09
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-model.rb
@@ -0,0 +1,51 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  module TreeModel
+    alias_method :get_iter_raw, :get_iter
+    def get_iter(path)
+      if path.is_a?(String)
+        got, iter = get_iter_from_string(path)
+      else
+        got, iter = get_iter_raw(path)
+      end
+
+      if got
+        setup_iter(iter)
+        iter
+      else
+        nil
+      end
+    end
+
+    alias_method :iter_first_raw, :iter_first
+    def iter_first
+      got, iter = iter_first_raw
+      if got
+        setup_iter(iter)
+        iter
+      else
+        nil
+      end
+    end
+
+    private
+    def setup_iter(iter)
+      iter.model = self
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-path.rb b/gtk3/lib/gtk3/tree-path.rb
new file mode 100644
index 0000000..642d79f
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-path.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreePath
+    include Comparable
+
+    def <=>(other)
+      if other.is_a?(self.class)
+        compare(other)
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-selection.rb b/gtk3/lib/gtk3/tree-selection.rb
new file mode 100644
index 0000000..b4a7f7d
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-selection.rb
@@ -0,0 +1,30 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeSelection
+    include Enumerable
+
+    alias_method :selected_raw, :selected
+    def selected
+      selected_p, model, iter = selected_raw
+      return nil unless selected_p
+
+      iter.model = model
+      iter
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-store.rb b/gtk3/lib/gtk3/tree-store.rb
new file mode 100644
index 0000000..211ee93
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-store.rb
@@ -0,0 +1,59 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeStore
+    alias_method :initialize_raw, :initialize
+    def initialize(*column_types)
+      initialize_raw(column_types)
+    end
+
+    alias_method :insert_raw, :insert
+    def insert(parent, position)
+      iter = insert_raw(parent, position)
+      iter.model = self
+      iter
+    end
+
+    alias_method :insert_before_raw, :insert_before
+    def insert_before(parent, sibling)
+      iter = insert_before_raw(parent, sibling)
+      iter.model = self
+      iter
+    end
+
+    alias_method :insert_after_raw, :insert_after
+    def insert_after(parent, sibling)
+      iter = insert_after_raw(parent, sibling)
+      iter.model = self
+      iter
+    end
+
+    alias_method :prepend_raw, :prepend
+    def prepend(parent)
+      iter = prepend_raw(parent)
+      iter.model = self
+      iter
+    end
+
+    alias_method :append_raw, :append
+    def append(parent)
+      iter = append_raw(parent)
+      iter.model = self
+      iter
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-view-column.rb b/gtk3/lib/gtk3/tree-view-column.rb
new file mode 100644
index 0000000..bb5e616
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-view-column.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeViewColumn
+    alias_method :initialize_raw, :initialize
+    def initialize(title=nil, cell=nil, attributes={})
+      initialize_raw
+      set_title(title) if title
+      pack_start(cell, true) if cell
+      attributes.each_entry do |key, value|
+        add_attribute(cell, key, value)
+      end
+    end
+
+    alias_method :add_attribute_raw, :add_attribute
+    def add_attribute(cell, key, value)
+      key = key.to_s if key.is_a?(Symbol)
+      add_attribute_raw(cell, key, value)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/tree-view.rb b/gtk3/lib/gtk3/tree-view.rb
new file mode 100644
index 0000000..5a86ae5
--- /dev/null
+++ b/gtk3/lib/gtk3/tree-view.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class TreeView
+    alias_method :get_path_at_pos_raw, :get_path_at_pos
+    def get_path_at_pos(x, y)
+      found, *info = get_path_at_pos_raw(x, y)
+      if found
+        info
+      else
+        nil
+      end
+    end
+
+    alias_method :enable_model_drag_source_raw, :enable_model_drag_source
+    def enable_model_drag_source(flags, targets, actions)
+      targets = ensure_drag_targets(targets)
+      enable_model_drag_source_raw(flags, targets, actions)
+    end
+
+    alias_method :enable_model_drag_dest_raw, :enable_model_drag_dest
+    def enable_model_drag_dest(targets, actions)
+      targets = ensure_drag_targets(targets)
+      enable_model_drag_dest_raw(targets, actions)
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/ui-manager.rb b/gtk3/lib/gtk3/ui-manager.rb
new file mode 100644
index 0000000..6ea1204
--- /dev/null
+++ b/gtk3/lib/gtk3/ui-manager.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class UIManager
+    alias_method :add_ui_raw, :add_ui
+    def add_ui(buffer_or_filename, *args)
+      if args.empty?
+        if buffer_or_filename =~ /<ui>/
+          add_ui_from_string(buffer_or_filename,
+                             buffer_or_filename.length)
+        else
+          add_ui_from_file(buffer_or_filename)
+        end
+      else
+        merge_id = buffer_or_filename
+        path, name, action, type, top, = args
+        add_ui_raw(merge_id, path, name, action, type, top)
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/version.rb b/gtk3/lib/gtk3/version.rb
new file mode 100644
index 0000000..e991181
--- /dev/null
+++ b/gtk3/lib/gtk3/version.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  module Version
+    STRING = [MAJOR, MINOR, MICRO].join(".")
+
+    class << self
+      def or_later?(major, minor, micro=nil)
+        error_message = Gtk.check_version(major, minor, micro)
+        error_message.nil?
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/widget.rb b/gtk3/lib/gtk3/widget.rb
new file mode 100644
index 0000000..d6bcd72
--- /dev/null
+++ b/gtk3/lib/gtk3/widget.rb
@@ -0,0 +1,127 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Widget
+    class << self
+      def init
+      end
+
+      def have_template?
+        @have_template ||= false
+      end
+
+      if method_defined?(:set_template)
+        alias_method :set_template_raw, :set_template
+        def set_template(template)
+          resource = template[:resource]
+          data = template[:data]
+          if resource
+            set_template_from_resource(resource)
+          else
+            set_template_raw(data)
+          end
+          @have_template = true
+        end
+
+        def bind_template_child(name, options={})
+          internal_child = options[:internal_child]
+          internal_child = false if internal_child.nil?
+          bind_template_child_full(name, internal_child, 0)
+          @template_children ||= []
+          @template_children << name
+          attr_reader(name)
+        end
+      end
+
+      alias_method :style_properties_raw, :style_properties
+      def style_properties
+        style_properties_raw[0]
+      end
+    end
+
+    alias_method :events_raw, :events
+    def events
+      Gdk::EventMask.new(events_raw)
+    end
+
+    alias_method :add_events_raw, :add_events
+    def add_events(new_events)
+      unless new_events.is_a?(Gdk::EventMask)
+        new_events = Gdk::EventMask.new(new_events)
+      end
+      add_events_raw(new_events.to_i)
+    end
+
+    alias_method :set_events_raw, :set_events
+    def set_events(new_events)
+      unless new_events.is_a?(Gdk::EventMask)
+        new_events = Gdk::EventMask.new(new_events)
+      end
+      set_events_raw(new_events.to_i)
+    end
+
+    alias_method :events_raw=, :events=
+    alias_method :events=, :set_events
+
+    alias_method :drag_source_set_raw, :drag_source_set
+    def drag_source_set(flags, targets, actions)
+      targets = ensure_drag_targets(targets)
+      drag_source_set_raw(flags, targets, actions)
+    end
+
+    alias_method :drag_dest_set_raw, :drag_dest_set
+    def drag_dest_set(flags, targets, actions)
+      targets = ensure_drag_targets(targets)
+      drag_dest_set_raw(flags, targets, actions)
+    end
+
+    alias_method :style_get_property_raw, :style_get_property
+    def style_get_property(name)
+      property = self.class.find_style_property(name)
+      value = GLib::Value.new(property.value_type)
+      style_get_property_raw(name, value)
+      value.value
+    end
+
+    private
+    def initialize_post
+      klass = self.class
+      return unless klass.have_template?
+      return unless respond_to?(:init_template)
+
+      init_template
+      gtype = klass.gtype
+      child_names = klass.instance_variable_get(:@template_children)
+      child_names.each do |name|
+        instance_variable_set("@#{name}", get_template_child(gtype, name))
+      end
+    end
+
+    def ensure_drag_targets(targets)
+      return targets unless targets.is_a?(Array)
+
+      targets.collect do |target|
+        case target
+        when Array
+          TargetEntry.new(*target)
+        else
+          target
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/lib/gtk3/window.rb b/gtk3/lib/gtk3/window.rb
new file mode 100644
index 0000000..496e54b
--- /dev/null
+++ b/gtk3/lib/gtk3/window.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Gtk
+  class Window
+    alias_method :initialize_raw, :initialize
+    def initialize(type=:toplevel)
+      if type.is_a?(String)
+        initialize_raw(:toplevel)
+        self.title = type
+      else
+        initialize_raw(type)
+      end
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/TODO b/gtk3/sample/gtk-demo/TODO
new file mode 100644
index 0000000..86f59fa
--- /dev/null
+++ b/gtk3/sample/gtk-demo/TODO
@@ -0,0 +1,69 @@
+# C version (3.17.6) versus Ruby version
+
+C version             Ruby version    Updated
+application.c           no              no
+assistant.c             no              no
+builder.c               ok              no
+button_box.c            ok              ok
+changedisplay.c         ok              no
+clipboard.c             ok              no
+colorsel.c              ok              no
+combobox.c              no              no
+css_accordion.c         ok              no
+css_basics.c            ok              no
+css_multiplebgs.c       no              no
+css_pixbufs.c           no              no
+css_shadows.c           no              no
+cursors.c               no              no
+dialog.c                ok              no
+drawingarea.c           ok              no
+editable_cells.c        ok              no
+entry_buffer.c          no              no
+entry_completion.c      ok              no
+event_axes.c            no              no
+expander.c              ok              no
+filtermodel.c           no              no
+font_features.c         no              no
+gestures.c              no              no
+glarea.c                no              no
+headerbar.c             no              no
+hypertext.c             ok              no
+iconview.c              ok              no
+iconview_edit.c         no              no
+images.c                ok              no
+infobar.c               ok              no
+links.c                 ok              no
+listbox.c               no              no
+flowbox.c               no              no
+list_store.c            ok              no
+markup.c                no              no
+menus.c                 ok              no
+offscreen_window.c      no              no
+offscreen_window2.c     no              no
+overlay.c               no              no
+overlay2.c              no              no
+panes.c                 ok              no
+pickers.c               no              no
+pixbufs.c               ok              no
+popover.c               no              no
+printing.c              ok              no
+revealer.c              no              no
+rotated_text.c          ok              no
+scale.c                 no              no
+search_entry.c          no              no
+search_entry2.c         no              no
+sidebar.c               no              no
+sizegroup.c             ok              no
+spinbutton.c            no              no
+spinner.c               ok              no
+stack.c                 no              no
+textmask.c              no              no
+textview.c              ok              no
+textscroll.c            no              no
+theming_style_classes.c ok              no
+toolpalette.c           no              no
+transparent.c           no              no
+tree_store.c            ok              no
+
+# Ruby version
+Check all the ruby demos that doesn't correspond to a C version.
diff --git a/gtk3/sample/gtk-demo/application.ui b/gtk3/sample/gtk-demo/application.ui
new file mode 100644
index 0000000..68757a9
--- /dev/null
+++ b/gtk3/sample/gtk-demo/application.ui
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkGrid" id="grid">
+    <child>
+      <object class="GtkToolbar" id="toolbar">
+        <property name="orientation">horizontal</property>
+        <property name="halign">fill</property>
+        <property name="hexpand">True</property>
+        <style>
+          <class name="primary-toolbar"/>
+        </style>
+        <child>
+          <object class="GtkMenuToolButton" id="menutool">
+            <property name="icon-name">document-open</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToolButton" id="quit">
+            <property name="icon-name">application-exit</property>
+            <property name="action-name">app.quit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSeparatorToolItem" id="sep"/>
+        </child>
+        <child>
+          <object class="GtkToolButton" id="logo">
+            <property name="icon-name">applications-other</property>
+            <property name="action-name">win.logo</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkInfoBar" id="infobar">
+        <property name="no-show-all">True</property>
+        <property name="halign">fill</property>
+        <property name="hexpand">True</property>
+        <child internal-child="content_area">
+          <object class="GtkBox" id="content_area">
+            <child>
+              <object class="GtkLabel" id="message">
+                <property name="visible">True</property>
+                <property name="hexpand">True</property>
+                <property name="halign">fill</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkBox" id="action_area">
+            <child>
+              <object class="GtkButton" id="button">
+                <property name="visible">True</property>
+                <property name="valign">center</property>
+                <property name="label" translatable="yes">_OK</property>
+                <property name="use_underline">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkScrolledWindow" id="sw">
+        <property name="shadow-type">in</property>
+        <child>
+          <object class="GtkTextView" id="contents">
+            <property name="halign">fill</property>
+            <property name="valign">fill</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkStatusbar" id="status">
+        <property name="halign">fill</property>
+        <property name="hexpand">True</property>
+        <property name="visible">True</property>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">3</property>
+      </packing>
+    </child>
+  </object>
+  <menu id="toolmenu">
+    <item>
+      <attribute name="label">File1</attribute>
+      <attribute name="action">win.file1</attribute>
+    </item>
+  </menu>
+</interface>
diff --git a/gtk3/sample/gtk-demo/builder.rb b/gtk3/sample/gtk-demo/builder.rb
index dc4a1ce..c849c2c 100644
--- a/gtk3/sample/gtk-demo/builder.rb
+++ b/gtk3/sample/gtk-demo/builder.rb
@@ -1,4 +1,4 @@
-# Copyright (c) 2008 Ruby-GNOME2 Project Team
+# Copyright (c) 2008-2015 Ruby-GNOME2 Project Team
 # This program is licenced under the same licence as Ruby-GNOME2.
 #
 =begin
@@ -14,7 +14,7 @@ module Demo
     def initialize
       super('Interface Builder')
 
-      available = Gtk.check_version?(2, 12, 0)
+      available = Gtk::Version.or_later?(2, 12, 0)
       if available
         label = Gtk::Label.new("Build an interface from XML description.")
       else
diff --git a/gtk3/sample/gtk-demo/button-box.rb b/gtk3/sample/gtk-demo/button-box.rb
new file mode 100644
index 0000000..bcdc639
--- /dev/null
+++ b/gtk3/sample/gtk-demo/button-box.rb
@@ -0,0 +1,82 @@
+# Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
+# This program is licenced under the same licence as Ruby-GNOME2.
+#
+=begin
+= Button Boxes
+
+The Button Box widgets are used to arrange buttons with padding.
+=end
+require "common"
+
+module Demo
+  class ButtonBox < BasicWindow
+    def initialize
+      super("Button Boxes")
+      set_border_width(10)
+
+      main_vbox = Gtk::Box.new(:vertical)
+      add(main_vbox)
+
+      frame_horiz = Gtk::Frame.new("Horizontal Button Boxes")
+      main_vbox.pack_start(frame_horiz, :expand => true, :fill => true, :padding => 10)
+
+      vbox = Gtk::Box.new(:vertical)
+      vbox.set_border_width(10)
+      frame_horiz.add(vbox)
+
+      vbox.pack_start(create_bbox(true, "Spread", 40, :spread),
+                      :expand => true, :fill => true, :padding => 0)
+
+      vbox.pack_start(create_bbox(true, "Edge", 40, :edge),
+                      :expand => true, :fill => true, :padding => 5)
+
+      vbox.pack_start(create_bbox(true, "Start", 40, :start),
+                      :expand => true, :fill => true, :padding => 5)
+
+      vbox.pack_start(create_bbox(true, "End", 40, :end),
+                      :expand => true, :fill => true, :padding => 5)
+
+      frame_vert = Gtk::Frame.new("Vertical Button Boxes")
+      main_vbox.pack_start(frame_vert, :expand => true, :fill => true, :padding => 10)
+
+     hbox = Gtk::Box.new(:horizontal, 0)
+      hbox.set_border_width(10)
+      frame_vert.add(hbox)
+
+      hbox.pack_start(create_bbox(false, "Spread", 30, :spread),
+                      :expand => true, :fill => true, :padding => 0)
+
+      hbox.pack_start(create_bbox(false, "Edge", 30, :edge),
+                      :expand => true, :fill => true, :padding => 5)
+
+      hbox.pack_start(create_bbox(false, "Start", 30, :start),
+                      :expand => true, :fill => true, :padding => 5)
+
+      hbox.pack_start(create_bbox(false, "End", 30, :end),
+                      :expand => true, :fill => true, :padding => 5)
+    end
+
+    def create_bbox(horizontal, title, spacing, layout)
+      frame = Gtk::Frame.new(title)
+
+      bbox = if horizontal
+               Gtk::ButtonBox.new(:horizontal)
+             else
+               Gtk::ButtonBox.new(:vertical)
+             end
+
+      bbox.set_border_width(5)
+      frame.add(bbox)
+
+      bbox.layout_style = layout
+      bbox.set_spacing(spacing)
+
+      %w(OK(_O) Cancel(_C) Help(_H)).each do |name|
+        button = Gtk::Button.new(:label => name, :use_underline => true)
+        bbox.add(button)
+      end
+
+      frame
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/common.rb b/gtk3/sample/gtk-demo/common.rb
index 94a71b2..d58b30c 100644
--- a/gtk3/sample/gtk-demo/common.rb
+++ b/gtk3/sample/gtk-demo/common.rb
@@ -29,7 +29,7 @@ module Demo
       end
 
       signal_connect("key_press_event") do |widget, event|
-        if event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_q
+        if event.state.control_mask? and event.keyval == Gdk::Keyval::KEY_q
           destroy
           true
         else
diff --git a/gtk3/sample/gtk-demo/css_accordion.rb b/gtk3/sample/gtk-demo/css_accordion.rb
index c9b1946..32060e2 100644
--- a/gtk3/sample/gtk-demo/css_accordion.rb
+++ b/gtk3/sample/gtk-demo/css_accordion.rb
@@ -1,11 +1,9 @@
-#!/usr/bin/env ruby
-#
 # This sample code is a port of gtk3/demos/gtk-demo/css_accordion.c. The
 # CSS files used in this sample code are copied from gtk3/demos/gtk-demo.
 # They are licensed under the terms of the GNU Lesser General Public
 # License, version 2.1 or (at your option) later.
 #
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -58,7 +56,9 @@ module Demo
       container.add(child)
 
       provider = Gtk::CssProvider.new
-      provider.load(:data => File.read("css_accordion.css"))
+      Dir.chdir(__dir__) do
+        provider.load(:data => File.read("css_accordion.css"))
+      end
 
       apply_css(self, provider)
     end
@@ -66,7 +66,7 @@ module Demo
     def apply_css(widget, provider)
       widget.style_context.add_provider(provider, GLib::MAXUINT)
       if widget.is_a?(Gtk::Container)
-        widget.each_forall do |child|
+        widget.each_all do |child|
           apply_css(child, provider)
         end
       end
diff --git a/gtk3/sample/gtk-demo/css_basics.css b/gtk3/sample/gtk-demo/css_basics.css
new file mode 100644
index 0000000..bd6a694
--- /dev/null
+++ b/gtk3/sample/gtk-demo/css_basics.css
@@ -0,0 +1,22 @@
+/* You can edit the text in this window to change the
+ * appearance of this Window.
+ * Be careful, if you screw it up, nothing might be visible
+ * anymore. :)
+ */
+
+/* This CSS resets all properties to their defaults values
+ *    and overrides all user settings and the theme in use */
+ at import url("reset.css");
+
+/* Set a very futuristic style by default */
+* {
+  color: green;
+  font-family: Monospace;
+  border: 1px solid;
+}
+
+/* Make sure selections are visible */
+:selected {
+  background-color: darkGreen;
+  color: black;
+}
diff --git a/gtk3/sample/gtk-demo/css_basics.rb b/gtk3/sample/gtk-demo/css_basics.rb
new file mode 100644
index 0000000..00d1a1f
--- /dev/null
+++ b/gtk3/sample/gtk-demo/css_basics.rb
@@ -0,0 +1,103 @@
+#
+# This sample code is a port of gtk3/demos/gtk-demo/css_basic.c. The
+# CSS file used in this sample code is copied from gtk3/demos/gtk-demo.
+# They are licensed under the terms of the GNU Lesser General Public
+# License, version 2.1 or (at your option) later.
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+=begin
+= CSS Theming/CSS Basics
+
+Gtk themes are written using CSS. Every widget is build of multiple items
+that you can style very similarly to a regular website.
+=end
+
+require "common"
+
+module Demo
+  class CssBasics < BasicWindow
+    def initialize
+      super("CSS Basics")
+      set_default_size(400, 300)
+
+      text = Gtk::TextBuffer.new
+      text.create_tag("warning", "underline" => Pango::AttrUnderline::SINGLE)
+      text.create_tag("error", "underline" => Pango::AttrUnderline::ERROR)
+
+      provider = Gtk::CssProvider.new
+
+      container = Gtk::ScrolledWindow.new(nil, nil)
+      add(container)
+      child = Gtk::TextView.new(text)
+      container.add(child)
+      text.signal_connect("changed") do |_text|
+        css_text_changed(_text, provider)
+      end
+
+      text.text = File.read(File.join(__dir__, "css_basics.css"))
+
+      provider.signal_connect("parsing-error") do |_provider, section, error|
+        p section
+        p error
+        show_parsing_error(section, error, child.buffer)
+      end
+
+      apply_css(self, provider)
+    end
+
+    private
+    def show_parsing_error(section, error, buffer)
+      p buffer.methods.grep /iter/
+      start = buffer.get_iter_at_line_index(section.start_line,
+                                            section.start_position)
+
+      end_ = buffer.get_iter_at_line_index(section.end_line,
+                                           section.end_position)
+
+      if error == Gtk::CssProvider::ERROR ||
+          error ==  Gtk::CssProvider::ERROR_DEPRECATED
+        tag_name = "warning"
+      else
+        tag_name = "error"
+      end
+
+      buffer.apply_tag_by_name(buffer, tag_name, start, end_)
+    end
+
+    def css_text_changed(buffer, provider)
+      start = buffer.start_iter
+      end_ = buffer.end_iter
+      buffer.remove_all_tags(start, end_)
+
+      text = buffer.get_text(start, end_, false)
+      Dir.chdir(__dir__) do
+        provider.load(:data => text)
+      end
+
+      Gtk::StyleContext.reset_widgets
+    end
+
+    def apply_css(widget, provider)
+      widget.style_context.add_provider(provider, GLib::MAXUINT)
+      if widget.is_a?(Gtk::Container)
+        widget.each_all do |child|
+          apply_css(child, provider)
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/sample/gtk-demo/dialog.rb b/gtk3/sample/gtk-demo/dialog.rb
index 3abcd76..7fb1bda 100644
--- a/gtk3/sample/gtk-demo/dialog.rb
+++ b/gtk3/sample/gtk-demo/dialog.rb
@@ -91,8 +91,8 @@ EOS
                                self,
                                Gtk::Dialog::MODAL |
                                Gtk::Dialog::DESTROY_WITH_PARENT,
-                               [Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK],
-                               ["_Non-stock Button", Gtk::Dialog::RESPONSE_CANCEL]
+                               [Gtk::Stock::OK, Gtk::ResponseType::OK],
+                               ["_Non-stock Button", Gtk::ResponseType::CANCEL]
                                )
 
       hbox = Gtk::Box.new(:horizontal, 0)
@@ -126,7 +126,7 @@ EOS
       hbox.show_all
       response = dialog.run
 
-      if response == Gtk::Dialog::RESPONSE_OK
+      if response == Gtk::ResponseType::OK
         @entry1.text = local_entry1.text
         @entry2.text = local_entry2.text
       end
diff --git a/gtk3/sample/gtk-demo/entry_completion.rb b/gtk3/sample/gtk-demo/entry_completion.rb
index 0522664..f26860c 100644
--- a/gtk3/sample/gtk-demo/entry_completion.rb
+++ b/gtk3/sample/gtk-demo/entry_completion.rb
@@ -16,7 +16,7 @@ module Demo
       super('GtkEntryCompletion',
             nil, # parent
             0,
-            [Gtk::Stock::CLOSE, Gtk::Dialog::RESPONSE_NONE])
+            [Gtk::Stock::CLOSE, Gtk::ResponseType::NONE])
 
       self.resizable = false
 
diff --git a/gtk3/sample/gtk-demo/hypertext.rb b/gtk3/sample/gtk-demo/hypertext.rb
index 69f2b34..6087d3f 100644
--- a/gtk3/sample/gtk-demo/hypertext.rb
+++ b/gtk3/sample/gtk-demo/hypertext.rb
@@ -120,7 +120,7 @@ module Demo
     # Links can be activated by pressing Enter.
     def key_press_event(text_view, event)
       case event.keyval
-      when Gdk::Keyval::GDK_Return, Gdk::Keyval::GDK_KP_Enter
+      when Gdk::Keyval::KEY_Return, Gdk::Keyval::KEY_KP_Enter
         buffer = text_view.buffer
         iter = buffer.get_iter_at_mark(buffer.get_mark("insert"))
         follow_if_link(text_view, iter)
diff --git a/gtk3/sample/gtk-demo/main.rb b/gtk3/sample/gtk-demo/main.rb
index 0705cc5..abc3f6e 100755
--- a/gtk3/sample/gtk-demo/main.rb
+++ b/gtk3/sample/gtk-demo/main.rb
@@ -2,18 +2,15 @@
 =begin
   main.rb - Main class of gtk-demo.
 
-  Copyright (c) 2003-2013 Ruby-GNOME2 Project Team
+  Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: main.rb,v 1.20 2007/07/09 13:21:54 ggc Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
-$:.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
 
 module Demo
-
   class Main < Gtk::Window
     TITLE_COLUMN, FILENAME_COLUMN, CLASS_COLUMN, ITALIC_COLUMN = 0, 1, 2, 3
 
@@ -25,13 +22,11 @@ module Demo
       @info_buffer = Gtk::TextBuffer.new
       @source_buffer = Gtk::TextBuffer.new
 
-      set_title('Ruby/GTK+ Code Demos')
-      signal_connect('destroy') do
-        Gtk.main_quit
-      end
+      set_title("Ruby/GTK+ Code Demos")
+      signal_connect("destroy") { Gtk.main_quit }
 
-      signal_connect("key_press_event") do |widget, event|
-        if event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_KEY_q
+      signal_connect("key_press_event") do |_widget, event|
+        if event.state.control_mask? && event.keyval == Gdk::Keyval::KEY_q
           destroy
           true
         else
@@ -52,25 +47,24 @@ module Demo
       hbox.pack_start(notebook, :expand => true, :fill => true, :padding => 0)
 
       notebook.append_page(create_text(@info_buffer, false),
-                           Gtk::Label.new('_Info', true))
+                           Gtk::Label.new("_Info", :use_underline => true))
 
       notebook.append_page(create_text(@source_buffer, true),
-                           Gtk::Label.new('_Source', true))
-
-      @info_buffer.create_tag('title',
-                             {'font' => 'Sans 18'})
-
-      @source_buffer.create_tag('comment',
-                               {'foreground' => 'red'})
-      @source_buffer.create_tag('const',
-                               {'foreground' => 'ForestGreen'})
-      @source_buffer.create_tag('string',
-                               {
-                                  'foreground' => 'RosyBrown',
-                                  'weight' => Pango::FontDescription::WEIGHT_BOLD
-                                })
-      @source_buffer.create_tag('reserved',
-                               {'foreground' => 'purple'})
+                           Gtk::Label.new("_Source", :use_underline => true))
+
+      @info_buffer.create_tag("title",
+                              "font" => "Sans 18")
+
+      @source_buffer.create_tag("comment",
+                                "foreground" => "red")
+      @source_buffer.create_tag("const",
+                                "foreground" => "ForestGreen")
+      @source_buffer.create_tag("string",
+                                "foreground" => "RosyBrown",
+                                "weight" => Pango::FontDescription::WEIGHT_BOLD
+                                )
+      @source_buffer.create_tag("reserved",
+                                "foreground" => "purple")
     end
 
     def script_info(path)
@@ -80,31 +74,27 @@ module Demo
 
       file = File.open(path)
       file.each do |ln|
-        if not title and ln =~ /^=\s+(.*)$/
-          title = $1
+        if !title && ln =~ /^=\s+(.*)$/
+          title = Regexp.last_match(1)
           if title =~ /^(.*)\((.+?)\)$/
-            title = $1
-            depend = $2
+            title = Regexp.last_match(1)
+            depend = Regexp.last_match(2)
           end
-        elsif not klass and ln =~ /\s*class\s+([A-Z][A-Za-z0-9_]*)/
-          klass = $1
+        elsif !klass && ln =~ /\s*class\s+([A-Z][A-Za-z0-9_]*)/
+          klass = Regexp.last_match(1)
         end
 
-        if title and klass
-          break
-        end
+        break if title && klass
       end
 
-      if not klass
-        raise "File not found: #{path}."
-      end
+      raise "File not found: #{path}." unless klass
 
       return title, klass.intern, depend
     end
 
     def generate_index
       # Target scripts
-      scripts = Dir.glob(File.join(File.dirname(__FILE__), '*.rb'))
+      scripts = Dir.glob(File.join(File.dirname(__FILE__), "*.rb"))
 
       # Generate index tree
       children = {}
@@ -114,13 +104,11 @@ module Demo
         next if ["common.rb", "main.rb"].include?(File.basename(script))
         title, klass, depend = script_info(script)
 
-        if depend and not Gtk.const_defined?(depend)
-          next
-        end
+        next if depend && !Gtk.const_defined?(depend)
 
         if title =~ %r{^(.+?)/(.+)$}
-          parent = $1
-          child = $2
+          parent = Regexp.last_match(1)
+          child = Regexp.last_match(2)
 
           unless children[parent]
             children[parent] = []
@@ -142,10 +130,7 @@ module Demo
 
       # Expand children
       index.collect! do |row|
-        if row[3]
-          row[3] = children[row[0]]
-        end
-
+        row[3] = children[row[0]] if row[3]
         row
       end
 
@@ -171,23 +156,22 @@ module Demo
       cell = Gtk::CellRendererText.new
       cell.style = Pango::FontDescription::STYLE_ITALIC
       column = Gtk::TreeViewColumn.new("Widget (double click for demo)", cell,
-                                       {
-                                         'text' => TITLE_COLUMN,
-                                         'style_set' => ITALIC_COLUMN,
-                                       })
+                                       "text" => TITLE_COLUMN,
+                                       "style_set" => ITALIC_COLUMN
+                                       )
 
       tree_view.append_column(column)
 
-      selection.signal_connect('changed') do |selection|
-        iter = selection.selected
+      selection.signal_connect("changed") do |changed_selection|
+        iter = changed_selection.selected
         load_file(iter.get_value(FILENAME_COLUMN)) if iter
       end
-      tree_view.signal_connect('row_activated') do |tree_view, path, column|
-        row_activated_cb(tree_view.model, path)
+      tree_view.signal_connect("row_activated") do |_tree_view, path, _column|
+        row_activated_cb(_tree_view.model, path)
       end
 
       tree_view.expand_all
-      return tree_view
+      tree_view
     end
 
     def append_children(model, source, parent = nil)
@@ -195,15 +179,11 @@ module Demo
         iter = model.append(parent)
 
         [title, filename, klass].each_with_index do |value, i|
-          if value
-            iter.set_value(i, value)
-          end
+          iter.set_value(i, value) if value
         end
         iter.set_value(ITALIC_COLUMN, false)
 
-        if children
-          append_children(model, children, iter)
-        end
+        append_children(model, children, iter) if children
       end
     end
 
@@ -213,11 +193,11 @@ module Demo
 
       lib = iter.get_value(FILENAME_COLUMN)
       if lib
-        require(lib)
+        require_relative(File.basename(lib))
 
         klass = Demo.const_get(iter.get_value(CLASS_COLUMN))
         window = klass.new
-        window.signal_connect('destroy') do
+        window.signal_connect("destroy") do
           iter.set_value(ITALIC_COLUMN, false)
         end
         window.show_all
@@ -240,7 +220,7 @@ module Demo
       scrolled_window.add(text_view)
 
       if is_source
-        font_desc = Pango::FontDescription.new('Monospace 12')
+        font_desc = Pango::FontDescription.new("Monospace 12")
         text_view.override_font(font_desc)
 
         text_view.set_wrap_mode(:none)
@@ -250,7 +230,7 @@ module Demo
         text_view.set_pixels_below_lines(2)
       end
 
-      return scrolled_window
+      scrolled_window
     end
 
     def fontify(start_iter = @source_buffer.start_iter,
@@ -265,11 +245,8 @@ module Demo
       end
     end
 
-
     def load_file(filename)
-      if filename == @current_file
-        return
-      end
+      return if filename == @current_file
 
       @info_buffer.delete(*@info_buffer.bounds)
 
@@ -278,7 +255,7 @@ module Demo
       file = begin
                File.open(filename)
              rescue
-               $stderr.puts "Cannot open: #{$!}" if $DEBUG
+               $stderr.puts "Cannot open: #{$ERROR_INFO}" if $DEBUG
                return
              end
       start = @info_buffer.get_iter_at(:offset => 0)
@@ -287,16 +264,14 @@ module Demo
       file.each do |line|
         case state
         when :before_header
-          if line =~ /^=begin$/
-            state = :in_header
-          end
+          state = :in_header if line =~ /^=begin$/
         when :in_header
           if line =~ /^=end$/
             state = :body
             start = @source_buffer.get_iter_at(:offset => 0)
           elsif line =~ /^=\s+(.*)$/
-            title = $1
-            title.gsub!(/\s*\(.*\)$/, '') # Delete depend field
+            title = Regexp.last_match(1)
+            title.gsub!(/\s*\(.*\)$/, "") # Delete depend field
 
             last = start
 
@@ -304,7 +279,7 @@ module Demo
             start = last.clone
 
             start.backward_chars(title.length)
-            @info_buffer.apply_tag('title', start, last)
+            @info_buffer.apply_tag("title", start, last)
 
             start = last
           else
@@ -323,14 +298,14 @@ module Demo
 
   class RubyTokonizer
     RESERVED_WORDS = %w(begin end module class def if then else while unless do case when require yield)
-    RESERVED_WORDS_PATTERN = Regexp.compile(/(^|\s+)(#{RESERVED_WORDS.collect do |pat| Regexp.quote(pat) end.join('|')})(\s+|$)/)
+    RESERVED_WORDS_PATTERN = Regexp.compile(/(^|\s+)(#{RESERVED_WORDS.collect { |pat| Regexp.quote(pat) }.join("|")})(\s+|$)/)
 
     def tokenize(str, index = 0)
       until str.empty?
         tag = nil
 
         case str
-        when /".+?"/, /'.+?'/
+        when /".+?"/, /".+?"/
           tag = :string
         when /#.*$/
           tag = :comment
@@ -341,26 +316,25 @@ module Demo
         end
 
         if tag
-          tokenize($~.pre_match, index) do |*args|
+          tokenize($LAST_MATCH_INFO.pre_match, index) do |*args|
             yield(*args)
           end
-          yield(tag, index + $~.begin(0), index + $~.end(0))
-          index += (str.length - $~.post_match.length)
-          str = $~.post_match
+          yield(tag, index + $LAST_MATCH_INFO.begin(0), index + $LAST_MATCH_INFO.end(0))
+          index += (str.length - $LAST_MATCH_INFO.post_match.length)
+          str = $LAST_MATCH_INFO.post_match
         else
           index += str.length
-          str = ''
+          str = ""
         end
       end
     end
   end
 end
 
-
 target = ARGV.shift
 if target
-  Demo::INDEX.each do |title, filename, klass_symbol, children|
-    if target == filename or target == klass_symbol.id2name
+  Demo::INDEX.each do |_title, filename, klass_symbol, _children|
+    if target == filename || target == klass_symbol.id2name
       require filename
 
       window = Demo.const_get(klass_symbol).new
diff --git a/gtk3/sample/gtk-demo/menus.rb b/gtk3/sample/gtk-demo/menus.rb
index e6ac53b..1d2c968 100644
--- a/gtk3/sample/gtk-demo/menus.rb
+++ b/gtk3/sample/gtk-demo/menus.rb
@@ -84,7 +84,7 @@ module Demo
       menuitem.show
       menuitem.add_accelerator('activate',
                                accel_group,
-                               Gdk::Keyval::GDK_F1,
+                               Gdk::Keyval::KEY_F1,
                                0,
                                Gtk::ACCEL_VISIBLE)
       menuitem = Gtk::CheckMenuItem.new('Accelerator Locked')
@@ -92,7 +92,7 @@ module Demo
       menuitem.show
       menuitem.add_accelerator('activate',
                                accel_group,
-                               Gdk::Keyval::GDK_F2,
+                               Gdk::Keyval::KEY_F2,
                                0,
                                Gtk::ACCEL_VISIBLE | Gtk::ACCEL_LOCKED)
       menuitem = Gtk::CheckMenuItem.new('Accelerators Frozen')
@@ -100,12 +100,12 @@ module Demo
       menuitem.show
       menuitem.add_accelerator('activate',
                                accel_group,
-                               Gdk::Keyval::GDK_F2,
+                               Gdk::Keyval::KEY_F2,
                                0,
                                Gtk::ACCEL_VISIBLE)
       menuitem.add_accelerator('activate',
                                accel_group,
-                               Gdk::Keyval::GDK_F3,
+                               Gdk::Keyval::KEY_F3,
                                0,
                                Gtk::ACCEL_VISIBLE)
 
diff --git a/gtk3/sample/gtk-demo/menus.ui b/gtk3/sample/gtk-demo/menus.ui
new file mode 100644
index 0000000..0bbe11a
--- /dev/null
+++ b/gtk3/sample/gtk-demo/menus.ui
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<interface>
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_New</attribute>
+        <attribute name="action">app.new</attribute>
+        <attribute name="accel"><Primary>n</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Open</attribute>
+        <attribute name="action">app.open</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Save</attribute>
+        <attribute name="action">app.save</attribute>
+        <attribute name="accel"><Primary>s</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Save _As...</attribute>
+        <attribute name="action">app.save-as</attribute>
+        <attribute name="accel"><Primary>s</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+        <attribute name="accel"><Primary>q</attribute>
+      </item>
+    </section>
+  </menu>
+  <menu id="menubar">
+    <submenu>
+      <attribute name="label" translatable="yes">_Preferences</attribute>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Prefer Dark Theme</attribute>
+          <attribute name="action">app.dark</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Hide Titlebar when maximized</attribute>
+          <attribute name="action">win.titlebar</attribute>
+        </item>
+        <submenu>
+          <attribute name="label" translatable="yes">_Color</attribute>
+          <section>
+            <item>
+              <attribute name="label" translatable="yes">_Red</attribute>
+              <attribute name="action">app.color</attribute>
+              <attribute name="target">red</attribute>
+              <attribute name="accel"><Primary>r</attribute>
+            </item>
+            <item>
+              <attribute name="label" translatable="yes">_Green</attribute>
+              <attribute name="action">app.color</attribute>
+              <attribute name="target">green</attribute>
+              <attribute name="accel"><Primary>g</attribute>
+            </item>
+            <item>
+              <attribute name="label" translatable="yes">_Blue</attribute>
+              <attribute name="action">app.color</attribute>
+              <attribute name="target">blue</attribute>
+              <attribute name="accel"><Primary>b</attribute>
+            </item>
+          </section>
+        </submenu>
+        <submenu>
+          <attribute name="label" translatable="yes">_Shape</attribute>
+          <section>
+            <item>
+              <attribute name="label" translatable="yes">_Square</attribute>
+              <attribute name="action">win.shape</attribute>
+              <attribute name="target">square</attribute>
+              <attribute name="accel"><Primary>s</attribute>
+            </item>
+            <item>
+              <attribute name="label" translatable="yes">_Rectangle</attribute>
+              <attribute name="action">win.shape</attribute>
+              <attribute name="target">rectangle</attribute>
+              <attribute name="accel"><Primary>r</attribute>
+            </item>
+            <item>
+              <attribute name="label" translatable="yes">_Oval</attribute>
+              <attribute name="action">win.shape</attribute>
+              <attribute name="target">oval</attribute>
+              <attribute name="accel"><Primary>o</attribute>
+            </item>
+          </section>
+        </submenu>
+        <item>
+          <attribute name="label" translatable="yes">_Bold</attribute>
+          <attribute name="action">win.bold</attribute>
+          <attribute name="accel"><Primary>b</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      <attribute name="label" translatable="yes">_Help</attribute>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">win.about</attribute>
+        <attribute name="accel"><Primary>a</attribute>
+      </item>
+    </submenu>
+  </menu>
+</interface>
diff --git a/gtk3/sample/gtk-demo/sizegroup.rb b/gtk3/sample/gtk-demo/sizegroup.rb
index 6f0e6d3..436e998 100644
--- a/gtk3/sample/gtk-demo/sizegroup.rb
+++ b/gtk3/sample/gtk-demo/sizegroup.rb
@@ -23,7 +23,7 @@ module Demo
   class SizeGroup < Gtk::Dialog
     def initialize
       super('GtkSizeGroup', nil, 0,
-            [Gtk::Stock::CLOSE, Gtk::Dialog::RESPONSE_NONE])
+            [Gtk::Stock::CLOSE, Gtk::ResponseType::NONE])
 
       color_options = %w(Red Green Blue)
       dash_options = %w(Solid Dashed Dotted)
diff --git a/gtk3/sample/misc/aboutdialog.rb b/gtk3/sample/misc/aboutdialog.rb
old mode 100644
new mode 100755
index fce9719..7bee790
--- a/gtk3/sample/misc/aboutdialog.rb
+++ b/gtk3/sample/misc/aboutdialog.rb
@@ -2,28 +2,16 @@
 =begin
   aboutdialog.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2005,2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2005-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: aboutdialog.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
 =end
-require 'gtk3'
+require "gtk3"
 
-if str = Gtk.check_version(2, 6, 0)
-  puts "This sample requires GTK+ 2.6.0 or later"
-  puts str
+unless Gtk::Version.or_later?(3, 4, 2)
+  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
   exit
 end
 
-Gtk::AboutDialog.set_email_hook {|about, link|
-  p "email_hook"
-  p link
-}
-Gtk::AboutDialog.set_url_hook {|about, link|
-  p "url_hook"
-  p link
-}
-
 a = Gtk::AboutDialog.new
 a.artists   = ["Artist 1 <no1 at foo.bar.com>", "Artist 2 <no2 at foo.bar.com>"]
 a.authors = ["Author 1 <no1 at foo.bar.com>", "Author 2 <no2 at foo.bar.com>"]
@@ -31,12 +19,16 @@ a.comments  = "This is a sample script for Gtk::AboutDialog"
 a.copyright = "Copyright (C) 2005 Ruby-GNOME2 Project"
 a.documenters = ["Documenter 1 <no1 at foo.bar.com>", "Documenter 2 <no2 at foo.bar.com>"]
 a.license   = "This program is licenced under the same licence as Ruby-GNOME2."
-a.logo      = Gdk::Pixbuf.new("gnome-logo-icon.png")
+a.logo      = Gdk::Pixbuf.new(File.join(__dir__, "gnome-logo-icon.png"))
 a.program_name = "Gtk::AboutDialog sample"
 a.translator_credits = "Translator 1\nTranslator 2\n"
 a.version   = "1.0.0"
 a.website   = "http://ruby-gnome2.sourceforge.jp"
 a.website_label = "Ruby-GNOME2 Project Website"
 
-p a.run
+a.signal_connect("activate-link") do |about_dialog, uri|
+  p widget.class
+  p uri
+end
 
+p a.run
diff --git a/gtk3/sample/misc/aboutdialog2.rb b/gtk3/sample/misc/aboutdialog2.rb
index 8c54252..cb2aec3 100644
--- a/gtk3/sample/misc/aboutdialog2.rb
+++ b/gtk3/sample/misc/aboutdialog2.rb
@@ -2,28 +2,16 @@
 =begin
   aboutdialog2.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2005,2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2005-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: aboutdialog2.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
 =end
-require 'gtk3'
+require "gtk3"
 
-if str = Gtk.check_version(2, 6, 0)
-  puts "This sample requires GTK+ 2.6.0 or later"
-  puts str
+unless Gtk::Version.or_later?(3, 4, 2)
+  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
   exit
 end
 
-Gtk::AboutDialog.set_email_hook {|about, link|
-  p "email_hook"
-  p link
-}
-Gtk::AboutDialog.set_url_hook {|about, link|
-  p "url_hook"
-  p link
-}
-
 Gtk::AboutDialog.show(nil,
 		      "artists" => ["Artist 1 <no1 at foo.bar.com>", "Artist 2 <no2 at foo.bar.com>"],
 		      "authors" => ["Author 1 <no1 at foo.bar.com>", "Author 2 <no2 at foo.bar.com>"],
diff --git a/gtk3/sample/misc/alpha-demo.rb b/gtk3/sample/misc/alpha-demo.rb
index 77beb4f..cabe5bf 100755
--- a/gtk3/sample/misc/alpha-demo.rb
+++ b/gtk3/sample/misc/alpha-demo.rb
@@ -8,18 +8,15 @@
 
   Translated to Ruby by Juergen Mangler <juergen.mangler at univie.ac.at>
 
-  Copyright (c) 2006  Ruby-GNOME2 Project Team
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: alpha-demo.rb,v 1.1 2007/01/06 03:55:44 ktou Exp $
 =end
 
-require 'gtk3'
-require 'cairo'
+require "gtk3"
+require "cairo"
 
 class AlphaDemo < Gtk::Window
-
-  def initialize()
+  def initialize
     super()
 
     set_app_paintable(true)
@@ -31,7 +28,7 @@ class AlphaDemo < Gtk::Window
     end
     set_double_buffered(false)
 
-    signal_connect('draw') do |widget, event|
+    signal_connect("draw") do |widget, _event|
       cr = widget.window.create_cairo_context
 
       rgba = [1.0, 1.0, 1.0]
@@ -49,22 +46,26 @@ class AlphaDemo < Gtk::Window
       cr.fill_preserve
       cr.stroke
     end
-    signal_connect('screen-changed') do |widget, old_screen|
-      screen_changed(widget, old_screen)
+    signal_connect("screen-changed") do |widget, _old_screen|
+      screen_changed(widget)
     end
 
     screen_changed(self)
   end
 
-  def screen_changed(widget,old_screen=nil)
-    tcolormap = widget.screen.rgba_colormap
-    @supports_alpha = !tcolormap.nil?
-    tcolormap ||= widget.screen.rgb_colormap
-    widget.set_colormap(tcolormap)
+  def screen_changed(widget)
+    visual = widget.screen.rgba_visual
+    if visual && widget.screen.composited?
+      set_visual(visual)
+      @supports_alpha = true
+    else
+      set_visual(widget.screen.system_visual)
+      @supports_alpha = false
+    end
   end
 end
 
 alpha = AlphaDemo.new
 alpha.show
 
-Gtk.main()
+Gtk.main
diff --git a/gtk3/sample/misc/application.rb b/gtk3/sample/misc/application.rb
new file mode 100644
index 0000000..6564bfc
--- /dev/null
+++ b/gtk3/sample/misc/application.rb
@@ -0,0 +1,31 @@
+#!/usr/bin/env ruby
+=begin
+  application.rb - Ruby/GTK version of the example-1.c at
+  https://developer.gnome.org/gtk3/stable/gtk-getting-started.html
+  Copyright (c) 2015  Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+myapp = Gtk::Application.new("org.gtk.example", :flags_none)
+
+myapp.signal_connect "activate" do |app|
+  win = Gtk::ApplicationWindow.new(app)
+  win.set_title("window")
+  win.set_default_size 200, 200
+
+  button_box = Gtk::ButtonBox.new(:horizontal)
+  win.add(button_box)
+
+  button = Gtk::Button.new(:label => "Hello World")
+  button.signal_connect "clicked" do
+    puts "Hello World"
+    win.destroy
+  end
+
+  button_box.add(button)
+
+  win.show_all
+end
+
+myapp.run
diff --git a/gtk3/sample/misc/assistant.rb b/gtk3/sample/misc/assistant.rb
index e0719d8..c16df84 100755
--- a/gtk3/sample/misc/assistant.rb
+++ b/gtk3/sample/misc/assistant.rb
@@ -4,10 +4,8 @@
 
   Guillaume Cottenceau for the ruby-gnome2 project.
 
-  Copyright (c) 2005,2006  Ruby-GNOME2 Project Team
+  Copyright (c) 2005-2015  Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: assistant.rb,v 1.1 2006/11/23 08:39:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -215,13 +213,13 @@ class AssistantRunner
     end
 
     page = Gtk::Box.new(:vertical, 6)
-    button = Gtk::RadioButton.new("branch A")
+    button = Gtk::RadioButton.new(:label => "branch A")
     page.pack_start(button, :expand => false, :fill => false, :padding => 0)
     button.signal_connect("toggled") do
       @selected_branch = "A"
     end
     button.active = true
-    button = Gtk::RadioButton.new(button, "branch B")
+    button = Gtk::RadioButton.new(:label => "branch B")
     page.pack_start(button, :expand => false, :fill => false, :padding => 0)
     button.signal_connect("toggled") do
       @selected_branch = "B"
diff --git a/gtk3/sample/misc/bindings.rb b/gtk3/sample/misc/bindings.rb
old mode 100755
new mode 100644
index 4c0be18..ad91c9d
--- a/gtk3/sample/misc/bindings.rb
+++ b/gtk3/sample/misc/bindings.rb
@@ -2,10 +2,8 @@
 =begin
   bindings.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: bindings.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 =begin
@@ -13,85 +11,101 @@ Usage:
   bindings.rb <filename>
 
   Following key bindings are effective in the TextView area.
-  
-    <space>      : scroll down by one page
-    <backspace>  : scroll up by one page
-    j            : move cursor donw by one line
-    k            : move cursor up by one line
+
+    <Control> + l     : scroll down by one page
+    <Control> + m     : scroll up by one page
+    <Control> + j     : move cursor donw by one line
+    <Control> + k     : move cursor up by one line
 
   clicking buttons cause following effect
 
-    "space"      : same as pressing <space> in text view area.
-    "back_space" : same as pressing <backspace> in text view area.
-    "cancel j/k" : disable 'j' and 'k' binding
+    "Ctrl + l"          : same as pressing <Control> + l in text view area.
+    "Ctrl + m"          : same as pressing <Control> + m in text view area.
+    "cancel Ctrl +j/k"  : disable <Control> + j and <Control> + k bindings.
 =end
+
 require "gtk3"
 
 class Pager < Gtk::TextView
-  type_register
-  
-  # widget's key binding can be defined like this
-  binding_set.add_signal(Gdk::Keyval::GDK_KEY_space, 0,
-                         "move_cursor", 
-                         Gtk::MovementStep::PAGES, 1, false)
-  binding_set.add_signal(Gdk::Keyval::GDK_KEY_BackSpace, 0,
-                         "move_cursor", 
-                         Gtk::MovementStep::PAGES, -1, false)
-  binding_set.add_signal(Gdk::Keyval::GDK_KEY_j, 0,
-                         "move_cursor",
-                         Gtk::MovementStep::DISPLAY_LINES, 1, false)
-  binding_set.add_signal(Gdk::Keyval::GDK_KEY_k, 0,
-                         "move_cursor",
-                         Gtk::MovementStep::DISPLAY_LINES, -1, false)
-
   def initialize(path)
     @path = path
     super()
-    @buffer = self.buffer
     load
     set_editable(false)
     set_size_request(400, 400)
   end
 
+  private
   def load
     open(@path).read.each_line do |line|
-      @buffer.insert_at_cursor(line)
+      buffer.insert_at_cursor(line)
     end
-    @buffer.place_cursor(@buffer.start_iter)
+    buffer.place_cursor(buffer.start_iter)
   end
 end
 
-path = ARGV[0] || __FILE__
+file_path = ARGV[0] || __FILE__
 
 window = Gtk::Window.new
 window.name = "pager_window"
-sw = Gtk::ScrolledWindow.new
-vbox = Gtk::Box.new(:vertical)
+
+css_provider = Gtk::CssProvider.new
+css_provider.load(:data => <<CSS) 
+ at binding-set MoveCursor {
+  bind "<Control>j" { "move-cursor" (display-lines, 1, 0) };
+  bind "<Control>k" { "move-cursor" (display-lines, -1, 0) };
+  bind "<Control>l" { "move-cursor" (buffer-ends, 1, 0) };
+  bind "<Control>m" { "move-cursor" (buffer-ends, -1, 0) };
+}
+GtkTextView {
+  -GtkWidget-cursor-color: green;
+  -GtkWidget-aspect-ratio: 1.0;
+  font: 20 Sans;
+  color: #aaa;
+  background-color: #333 ;
+  gtk-key-bindings: MoveCursor;
+}
+CSS
 hbox = Gtk::Box.new(:horizontal)
-pager = Pager.new(path)
 
-hbox.add(button1 = Gtk::Button.new(:label => "space"))
-hbox.add(button2 = Gtk::Button.new(:label => "back_space"))
-hbox.add(button3 = Gtk::Button.new(:label => "cancel j/k"))
+hbox.add(button1 = Gtk::Button.new(:label => "Ctrl + l"))
+hbox.add(button2 = Gtk::Button.new(:label => "Ctrl + m"))
+hbox.add(button3 = Gtk::Button.new(:label => "Cancel Ctrl + j/k"))
 
-button1.signal_connect("clicked") do
-  Pager.binding_set.activate(Gdk::Keyval::GDK_KEY_space, 0, pager)
-end
-button2.signal_connect("clicked") do
-  pager.bindings_activate(Gdk::Keyval::GDK_KEY_BackSpace, 0)
-end
-button3.signal_connect("clicked") do
-  Pager.binding_set.entry_remove(Gdk::Keyval::GDK_KEY_j, 0)
-  Pager.binding_set.entry_remove(Gdk::Keyval::GDK_KEY_k, 0)
-end
+vbox = Gtk::Box.new(:vertical)
+sw = Gtk::ScrolledWindow.new
+sw.set_size_request(500, 500)
 
+pager = Pager.new(file_path)
+pager.style_context.add_provider(css_provider, Gtk::StyleProvider::PRIORITY_USER)
 sw.add(pager)
-vbox.add(hbox).add(sw)
+
+vbox.add(hbox)
+vbox.add(sw)
+
 window.add(vbox)
 window.show_all
 
-pager.grab_focus
+window.signal_connect("destroy") { Gtk.main_quit }
+
+binding_set = Gtk::BindingSet.find("MoveCursor")
+
+button1.signal_connect "clicked" do
+  binding_set.activate(Gdk::Keyval::KEY_l, Gdk::ModifierType::CONTROL_MASK, pager)
+  pager.grab_focus
+end
 
-window.signal_connect("destroy") {Gtk.main_quit}
+button2.signal_connect "clicked" do
+  binding_set.activate(Gdk::Keyval::KEY_m, Gdk::ModifierType::CONTROL_MASK, pager)
+  pager.grab_focus
+end
+
+button3.signal_connect "clicked" do
+  binding_set.remove(Gdk::Keyval::KEY_j, Gdk::ModifierType::CONTROL_MASK)
+  binding_set.remove(Gdk::Keyval::KEY_k, Gdk::ModifierType::CONTROL_MASK)
+  pager.grab_focus
+end
+
+pager.grab_focus
 
 Gtk.main
diff --git a/gtk3/sample/misc/builder-from-resource.rb b/gtk3/sample/misc/builder-from-resource.rb
new file mode 100755
index 0000000..92ecfbc
--- /dev/null
+++ b/gtk3/sample/misc/builder-from-resource.rb
@@ -0,0 +1,53 @@
+#!/usr/bin/env ruby
+=begin
+  builder_from_resource.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+
+# The gresource file name
+gresource_bin = "#{current_path}/simple_window.gresource"
+
+# The gresource xml file name
+# see here https://developer.gnome.org/gio/stable/GResource.html
+gresource_xml = "#{current_path}/simple_window.gresource.xml"
+
+# Generate the resource file:
+# see here https://developer.gnome.org/gio/stable/glib-compile-resources.html
+Dir.chdir(File.dirname(gresource_xml)) do
+  system("glib-compile-resources",
+         "--target", gresource_bin,
+         File.basename(gresource_xml))
+end
+
+at_exit do
+  FileUtils.rm_f(gresource_bin)
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+# Reference:
+# https://developer.gnome.org/gtk3/stable/GtkBuilder.html
+builder = Gtk::Builder.new(:resource => "/simple_window/simple_window.ui")
+
+window = builder.get_object("window")
+window.set_title "Build interface from resource"
+window.set_default_size 300, 300
+
+label = builder["label"]
+label.text = "My UI was created with Glade"
+
+window.show_all
+
+window.signal_connect "destroy" do
+  Gtk.main_quit
+  Gio::Resources.unregister(resource)
+end
+Gtk.main
diff --git a/gtk3/sample/misc/builder.rb b/gtk3/sample/misc/builder.rb
new file mode 100644
index 0000000..edf29e2
--- /dev/null
+++ b/gtk3/sample/misc/builder.rb
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+=begin
+  builder.rb - Ruby/GTK version of gtk+/examples/builder.c.
+  https://git.gnome.org/browse/gtk+/tree/examples/builder.c?h=gtk-3-16
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+require "gtk3"
+ui_file = "#{File.expand_path(File.dirname(__FILE__))}/builder.ui"
+builder = Gtk::Builder.new
+builder.add_from_file(ui_file)
+
+win = builder.get_object("window")
+win.signal_connect("delete-event") { Gtk.main_quit }
+
+button = builder.get_object("button1")
+button.signal_connect "clicked" do
+  puts "Hello World!"
+end
+
+button = builder.get_object("button2")
+button.signal_connect "clicked" do
+  puts "Hello World!"
+end
+
+button = builder.get_object("quit")
+button.signal_connect("clicked") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/builder.ui b/gtk3/sample/misc/builder.ui
new file mode 100644
index 0000000..510fa3a
--- /dev/null
+++ b/gtk3/sample/misc/builder.ui
@@ -0,0 +1,46 @@
+<interface>
+  <object id="window" class="GtkWindow">
+    <property name="visible">True</property>
+    <property name="title">Grid</property>
+    <property name="border-width">10</property>
+    <child>
+      <object id="grid" class="GtkGrid">
+        <property name="visible">True</property>
+        <child>
+          <object id="button1" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 1</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="button2" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 2</property>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="quit" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Quit</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">1</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+      </packing>
+    </child>
+  </object>
+</interface>
+
diff --git a/gtk3/sample/misc/button.rb b/gtk3/sample/misc/button.rb
index 531abd5..a9e9f5e 100644
--- a/gtk3/sample/misc/button.rb
+++ b/gtk3/sample/misc/button.rb
@@ -2,10 +2,8 @@
 =begin
   button.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: button.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -19,18 +17,18 @@ end
 box1 = Gtk::Box.new(:vertical, 0)
 window.add(box1)
 
-table = Gtk::Table.new(3, 3, false)
-table.set_row_spacings(5)
-table.set_column_spacings(5)
-table.set_border_width(10)
-box1.pack_start(table, :expand => true, :fill => true, :padding => 0)
+grid = Gtk::Grid.new
+grid.set_row_spacing(5)
+grid.set_column_spacing(5)
+grid.set_border_width(10)
+box1.pack_start(grid, :expand => true, :fill => true, :padding => 0)
 
 button = []
 0.upto(8) do |i|
-  button.push Gtk::Button.new(:label => "button"+(i+1).to_s)
+  button.push Gtk::Button.new(:label => "button" + (i + 1).to_s)
 end
 0.upto(8) do |i|
-  button[i].signal_connect("clicked") do |w|
+  button[i].signal_connect("clicked") do
     p [i]
     j = (i + 1) % 9
     if button[j].visible?
@@ -41,15 +39,16 @@ end
   end
   button[i].show
 end
-table.attach(button[0], 0, 1, 0, 1, nil, nil, 0, 0)
-table.attach(button[1], 1, 2, 1, 2, nil, nil, 0, 0)
-table.attach(button[2], 2, 3, 2, 3, nil, nil, 0, 0)
-table.attach(button[3], 0, 1, 2, 3, nil, nil, 0, 0)
-table.attach(button[4], 2, 3, 0, 1, nil, nil, 0, 0)
-table.attach(button[5], 1, 2, 2, 3, nil, nil, 0, 0)
-table.attach(button[6], 1, 2, 0, 1, nil, nil, 0, 0)
-table.attach(button[7], 2, 3, 1, 2, nil, nil, 0, 0)
-table.attach(button[8], 0, 1, 1, 2, nil, nil, 0, 0)
+
+grid.attach(button[0], 0, 0, 1, 1)
+grid.attach(button[1], 1, 1, 1, 1)
+grid.attach(button[2], 2, 2, 1, 1)
+grid.attach(button[3], 0, 2, 1, 1)
+grid.attach(button[4], 2, 0, 1, 1)
+grid.attach(button[5], 1, 1, 1, 1)
+grid.attach(button[6], 1, 0, 1, 1)
+grid.attach(button[7], 2, 1, 1, 1)
+grid.attach(button[8], 0, 1, 1, 1)
 
 separator = Gtk::Separator.new(:vertical)
 box1.pack_start(separator, :expand => false, :fill => true, :padding => 0)
diff --git a/gtk3/sample/misc/button2.rb b/gtk3/sample/misc/button2.rb
index 87deb7c..3f72e99 100644
--- a/gtk3/sample/misc/button2.rb
+++ b/gtk3/sample/misc/button2.rb
@@ -2,13 +2,11 @@
 =begin
   button2.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: button2.rb,v 1.4 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::Button sample")
 
@@ -23,6 +21,8 @@ box.add(button1)
 box.add(button2)
 box.add(button3)
 
-window.add(box).set_default_size(100,100).show_all
+window.add(box)
+window.set_default_size(100,100)
+window.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/buttonbox.rb b/gtk3/sample/misc/buttonbox.rb
index a692344..8e4cec2 100644
--- a/gtk3/sample/misc/buttonbox.rb
+++ b/gtk3/sample/misc/buttonbox.rb
@@ -1,11 +1,9 @@
 #!/usr/bin/env ruby
 =begin
-  buttonbox.rb - Ruby/GTK2 sample script.
+  buttonbox.rb - Ruby/GTK3 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: buttonbox.rb,v 1.9 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
diff --git a/gtk3/sample/misc/cairo-cursor.rb b/gtk3/sample/misc/cairo-cursor.rb
new file mode 100644
index 0000000..126f5b5
--- /dev/null
+++ b/gtk3/sample/misc/cairo-cursor.rb
@@ -0,0 +1,37 @@
+=begin
+  cairo_cursor.rb Ruby/GTK3 script
+  Adapted from https://developer.gnome.org/gtk3/stable/ch25s02.html#id-1.6.3.4.5
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new("Gdk cursor sample")
+window.signal_connect("destroy") { Gtk.main_quit }
+
+# see cairo formats information here:
+# http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t
+surface = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32, 6, 6)
+
+cr = Cairo::Context.new(surface)
+cr.set_source_rgba(0, 1, 0, 0.7)
+cr.arc(3, 3, 3, 0, 2 * Math::PI)
+cr.fill
+cr.destroy
+
+pixbuf = surface.to_pixbuf(0, 0, 6, 6)
+cursor = Gdk::Cursor.new(pixbuf, 0, 0)
+
+# generate the underlaying GDK resource associated with the window widget.
+# Here just create window.window without calling #show_all method.
+window.realize
+window.window.set_cursor(cursor)
+
+label = Gtk::Label.new("Put your cursor on this window.")
+window.add(label)
+
+window.set_default_size(200, 100)
+window.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/cairo-pong.rb b/gtk3/sample/misc/cairo-pong.rb
index 83d3957..6826dfb 100755
--- a/gtk3/sample/misc/cairo-pong.rb
+++ b/gtk3/sample/misc/cairo-pong.rb
@@ -4,10 +4,8 @@
 
   Original: gtkcairo sample by Evan Martins.
 
-  Copyright (c) 2005,2006  Ruby-GNOME2 Project Team
+  Copyright (c) 2005-2015  Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: cairo-pong.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -65,7 +63,7 @@ module Pong
 
   class Ball < CenteredCircle
     attr_accessor :dx, :dy
-    def initialize(dx=0.02, dy=0.02)
+    def initialize(dx = 0.02, dy = 0.02)
       super(0.8, 0.5, 0.04, 0.04)
       @dx = dx
       @dy = dy
@@ -102,23 +100,23 @@ module Pong
 
     def update(ball)
       # is the ball coming towards us?
-      if (ball.x < @x and ball.dx > 0) or
-          (ball.x > @x and ball.dx < 0)
+      if (ball.x < @x && ball.dx > 0) ||
+          (ball.x > @x && ball.dx < 0)
         # move to intercept it
         @y = ball.y
       end
     end
 
     def ball_hit?(ball)
-      ball.y > min_y and ball.y < max_y
+      ball.y > min_y && ball.y < max_y
     end
 
     def update_ball(ball)
       if ball_hit?(ball)
-        if ball.min_x < @x and ball.max_x > min_x # hit our left side
+        if ball.min_x < @x && ball.max_x > min_x # hit our left side
           ball.x -= (ball.max_x - min_x)
           ball.dx = -ball.dx
-        elsif ball.max_x > @x and ball.min_x < max_x # hit our right side
+        elsif ball.max_x > @x && ball.min_x < max_x # hit our right side
           ball.x += (max_x - ball.min_x)
           ball.dx = -ball.dx
         end
@@ -129,7 +127,7 @@ module Pong
   class Field
     attr_accessor :width, :height
 
-    def initialize(margin=0.05)
+    def initialize(margin = 0.05)
       @margin = margin
 
       @left_paddle = Paddle.new(self, @margin, 0.5)
@@ -149,7 +147,7 @@ module Pong
     end
 
     def draw(cr)
-      cr.set_source_rgba(1, 1, 1)
+      cr.set_source_rgb(1, 1, 1)
       cr.rectangle(0, 0, 1, 1)
       cr.fill
 
@@ -157,24 +155,24 @@ module Pong
         cr.set_source_rgba(0.8, 0.8, 0.8, 0.8)
         cr.set_line_join(Cairo::LINE_JOIN_ROUND)
         @paddles.each do |paddle|
-          cr.save {paddle.draw(cr)}
+          cr.save { paddle.draw(cr) }
         end
       end
 
-      cr.set_source_rgba(0, 0, 0)
-      cr.save {@ball.draw(cr)}
+      cr.set_source_rgb(0, 0, 0)
+      cr.save { @ball.draw(cr) }
     end
   end
 
   class Window < Gtk::Window
-    def initialize(speed=30)
+    def initialize(speed = 30)
       super()
       @speed = speed
 
       self.title = "Pong Demonstration"
       signal_connect("destroy") { Gtk.main_quit }
       signal_connect("key_press_event") do |widget, event|
-        if event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_q
+        if event.state.control_mask? && event.keyval == Gdk::Keyval::KEY_q
           destroy
           true
         else
@@ -213,5 +211,7 @@ module Pong
   end
 end
 
-Pong::Window.new.show_all
+window = Pong::Window.new
+window.show_all
+
 Gtk.main
diff --git a/gtk3/sample/misc/calendar.rb b/gtk3/sample/misc/calendar.rb
index ef7532b..d6b7318 100644
--- a/gtk3/sample/misc/calendar.rb
+++ b/gtk3/sample/misc/calendar.rb
@@ -1,18 +1,18 @@
 =begin
   calendar.rb - Gtk::Calendar sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: calendar.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 cal = Gtk::Calendar.new
 
-w = Gtk::Window.new("Calendar sample")
-w.add(cal).show_all.signal_connect('delete_event') do
+window = Gtk::Window.new("Calendar sample")
+window.add(cal)
+window.show_all
+window.signal_connect("delete_event") do
   Gtk.main_quit
 end
 
@@ -24,41 +24,41 @@ cal.mark_day(date.day)
 #cal.clear_marks
 
 #
-# Gtk::Calendar::DisplayOptions::WEEK_START_MONDAY does not exist anymore
+# Gtk::CalendarDisplayOptions::WEEK_START_MONDAY does not exist anymore
 #
 
-cal.set_display_options(Gtk::Calendar::DisplayOptions::SHOW_HEADING |
-                Gtk::Calendar::DisplayOptions::SHOW_DAY_NAMES |
-                Gtk::Calendar::DisplayOptions::NO_MONTH_CHANGE |
-                Gtk::Calendar::DisplayOptions::SHOW_WEEK_NUMBERS)
+cal.set_display_options(Gtk::CalendarDisplayOptions::SHOW_HEADING |
+                        Gtk::CalendarDisplayOptions::SHOW_DAY_NAMES |
+                        Gtk::CalendarDisplayOptions::NO_MONTH_CHANGE |
+                        Gtk::CalendarDisplayOptions::SHOW_WEEK_NUMBERS)
 year, month, day = cal.date
 puts "this is #{month} #{day}, #{year}"
 
-cal.signal_connect('day_selected') do
+cal.signal_connect("day_selected") do
   year, month, day = cal.date
   puts "selected day: #{day}"
 end
-cal.signal_connect('month_changed') do
+cal.signal_connect("month_changed") do
   year, month, day = cal.date
   puts "changed month: #{month}"
 end
-cal.signal_connect('day_selected_double_click') do
+cal.signal_connect("day_selected_double_click") do
   year, month, day = cal.date
   puts "dclicked day: #{day}"
 end
-cal.signal_connect('prev_month') do
+cal.signal_connect("prev_month") do
   year, month, day = cal.date
   puts "prev month: #{month}"
 end
-cal.signal_connect('next_month') do
+cal.signal_connect("next_month") do
   year, month, day = cal.date
   puts "next_month: #{month}"
 end
-cal.signal_connect('prev_year') do
+cal.signal_connect("prev_year") do
   year, month, day = cal.date
   puts "prev_year: #{year}"
 end
-cal.signal_connect('next_year') do
+cal.signal_connect("next_year") do
   year, month, day = cal.date
   puts "next year: #{year}"
 end
diff --git a/gtk3/sample/misc/checkbutton.rb b/gtk3/sample/misc/checkbutton.rb
index c538d09..8c1f35b 100644
--- a/gtk3/sample/misc/checkbutton.rb
+++ b/gtk3/sample/misc/checkbutton.rb
@@ -2,10 +2,8 @@
 =begin
   checkbutton.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team 
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: checkbutton.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -24,7 +22,8 @@ box2.border_width = 10
 box1.pack_start(box2)
 
 button1 = Gtk::CheckButton.new("_button1")
-button2 = Gtk::CheckButton.new("_button2", false)
+button1.set_use_underline(true)
+button2 = Gtk::CheckButton.new("_button2")
 button3 = Gtk::CheckButton.new(Gtk::Stock::QUIT)
 box2.add(button1)
 box2.add(button2)
diff --git a/gtk3/sample/misc/colorselection.rb b/gtk3/sample/misc/colorselection.rb
index 6117ea1..9f85678 100644
--- a/gtk3/sample/misc/colorselection.rb
+++ b/gtk3/sample/misc/colorselection.rb
@@ -1,22 +1,23 @@
 =begin
   colorselection.rb - Gtk::ColorSelection sample script.
 
-  Copyright (C) 2005,2006  Masao Mutoh
+  Copyright (C) 2005-2015  Masao Mutoh
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: colorselection.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
 
-a = Gtk::ColorSelection.new
-a.has_palette = true
-a.signal_connect("color_changed") do |w|
-  unless w.adjusting?
-    p w.current_rgba.to_s
+color_selection = Gtk::ColorSelection.new
+color_selection.has_palette = true
+color_selection.signal_connect("color_changed") do |widget|
+  unless widget.adjusting?
+    p widget.current_rgba.to_s
   end
 end
 
-Gtk::Window.new.add(a).show_all.signal_connect("destroy") {Gtk.main_quit}
+window = Gtk::Window.new
+window.add(color_selection)
+window.show_all
+window.signal_connect("destroy") {Gtk.main_quit}
 
 Gtk.main
diff --git a/gtk3/sample/misc/combo-check.rb b/gtk3/sample/misc/combo-check.rb
new file mode 100644
index 0000000..bc5e625
--- /dev/null
+++ b/gtk3/sample/misc/combo-check.rb
@@ -0,0 +1,77 @@
+#!/usr/bin/env ruby
+=begin
+  combo_check.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new("entry")
+window.border_width = 0
+window.signal_connect("destroy") do
+  Gtk.main_quit
+end
+
+box1 = Gtk::Box.new(:vertical)
+window.add(box1)
+
+box2 = Gtk::Box.new(:vertical, 10)
+box2.border_width = 10
+box1.pack_start(box2)
+
+entry = Gtk::Entry.new
+entry.text = "hello world"
+entry.set_editable(false)
+entry.select_region(0, -1)
+box2.pack_start(entry)
+
+## Gtk::ComboBoxText is simpler than Gtk::ComboBox, but has less functions.
+## Gtk::Combo has been deprecated.
+cb = Gtk::ComboBoxText.new(:entry => true)
+cb.append_text("item0")
+cb.append_text("item1 item1")
+cb.append_text("item2 item2 item2")
+cb.append_text("item3 item3 item3 item3")
+cb.append_text("item4 item4 item4 item4 item4")
+cb.append_text("item5 item5 item5 item5 item5 item5")
+cb.append_text("item6 item6 item6 item6 item6")
+cb.append_text("item7 item7 item7 item7")
+cb.append_text("item8 item8 item8")
+cb.append_text("item9 item9")
+cb.child.text = "hello world"
+cb.child.select_region(0, -1)
+cb.child.set_editable(false)
+box2.pack_start(cb, :expand => true, :fill => true, :padding => 0)
+
+check = Gtk::CheckButton.new("Editable")
+box2.pack_start(check, :expand => false, :fill => true, :padding => 0)
+check.signal_connect("toggled") do
+  cb.child.set_editable(check.active?)
+  entry.set_editable(check.active?)
+end
+check.set_state_flags(Gtk::StateFlags::NORMAL, true)
+## Run this code to see all of GtkStateFlags ##
+#  Gtk::StateFlags.constants.each do |i|
+#    p i
+#  end
+
+box1.pack_start(Gtk::Separator.new(:horizontal))
+
+box2 = Gtk::Box.new(:vertical, 10)
+box2.border_width = 10
+box1.pack_start(box2)
+
+button = Gtk::Button.new(:label => "close")
+button.signal_connect("clicked") do
+  Gtk.main_quit
+end
+box2.pack_start(button)
+
+button.can_default = true
+button.grab_default
+
+window.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/combobox-from-cellrender.rb b/gtk3/sample/misc/combobox-from-cellrender.rb
new file mode 100644
index 0000000..d8ee632
--- /dev/null
+++ b/gtk3/sample/misc/combobox-from-cellrender.rb
@@ -0,0 +1,48 @@
+#!/usr/bin/env ruby
+=begin
+  combobox_from_cellrender.rb - Ruby/GTK sample script
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new "Combobox with CellRender"
+
+lstore = Gtk::ListStore.new(TrueClass, String)
+
+(1..5).each do |i|
+  lstore.append.set_values([false, "item#{i}"])
+end
+
+combobox = Gtk::ComboBox.new(:model => lstore, :entry => true)
+
+toggle = Gtk::CellRendererToggle.new
+
+toggle.signal_connect "toggled" do |widget, path|
+  puts widget.class
+  puts path.class
+end
+
+combobox.pack_start(toggle, true)
+combobox.add_attribute(toggle, "active", 0)
+combobox.set_entry_text_column(1)
+
+window.add combobox
+
+combobox.signal_connect("changed") do |widget|
+  list = widget.model
+  list.each do |_model, _path, iter|
+    iter[0] = false
+  end
+  iter = widget.active_iter
+  puts iter.inspect
+  puts "#{iter[0]} #{iter[1]}"
+
+  iter[0] = true
+end
+
+window.signal_connect("destroy") { Gtk.main_quit }
+
+window.show_all
+Gtk.main
diff --git a/gtk3/sample/misc/combobox.rb b/gtk3/sample/misc/combobox.rb
index 1016e6d..d4354be 100644
--- a/gtk3/sample/misc/combobox.rb
+++ b/gtk3/sample/misc/combobox.rb
@@ -2,17 +2,14 @@
 =begin
   combobox.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: combobox.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
 
-if str = Gtk.check_version(3, 10, 7)
+unless Gtk::Version.or_later?(3, 10, 7)
   puts "This sample requires GTK+ 3.10.7 or later"
-  puts str
   exit
 end
 
@@ -40,7 +37,7 @@ model = Gtk::ListStore.new(Gdk::Pixbuf, String)
  [Gtk::Stock::CANCEL, "cancel"],
  [Gtk::Stock::OK, "ok"]].each do |stock, name|
   iter = model.append
-  iter[0] = window.render_icon_pixbuf(stock, Gtk::IconSize::IconSize::MENU)
+  iter[0] = window.render_icon_pixbuf(stock, Gtk::IconSize::MENU)
   iter[1] = name
 end
 
@@ -49,12 +46,12 @@ combo2 = Gtk::ComboBox.new(:model => model)
 # column 1
 renderer = Gtk::CellRendererPixbuf.new
 combo2.pack_start(renderer, false)
-combo2.set_attributes(renderer, :pixbuf => 0)
+combo2.add_attribute(renderer, "pixbuf", 0)
 
 # column 2
 renderer = Gtk::CellRendererText.new
 combo2.pack_start(renderer, true)
-combo2.set_attributes(renderer, :text => 1)
+combo2.add_attribute(renderer, "text", 1)
 
 combo2.active = 2
 
@@ -79,7 +76,10 @@ end
 
 # Show main window
 vbox = Gtk::Box.new(:vertical)
-vbox.add(combo1).add(combo2).add(combo3)
-window.add(vbox).show_all
+vbox.add(combo1)
+vbox.add(combo2)
+vbox.add(combo3)
+window.add(vbox)
+window.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/cursor.rb b/gtk3/sample/misc/cursor.rb
index b1bacf7..335fa2f 100644
--- a/gtk3/sample/misc/cursor.rb
+++ b/gtk3/sample/misc/cursor.rb
@@ -2,9 +2,8 @@
   cursor.rb - Gdk::Cursor sample script.
 
   Copyright (C) 2001-2006 Masao Mutoh
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: cursor.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -16,8 +15,8 @@ window.realize
 button = Gtk::Button.new(:label => "Click!")
 button.use_underline = false
 
-cursors = Gdk::Cursor::Type.values - [Gdk::Cursor::Type::CURSOR_IS_PIXMAP]
-cursors -= [Gdk::Cursor::Type::LAST_CURSOR]
+cursors = Gdk::CursorType.values - [Gdk::CursorType::CURSOR_IS_PIXMAP]
+cursors -= [Gdk::CursorType::LAST_CURSOR]
 
 cnt = 0
 button.signal_connect('clicked') do
@@ -29,6 +28,7 @@ p cursor.inspect
   cnt = 0 if cnt == cursors.size
 end
 window.add(button)
-window.set_default_size(400,100).show_all
+window.set_default_size(400,100)
+window.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/dialog.rb b/gtk3/sample/misc/dialog.rb
index 2139f9d..c2ec3ce 100644
--- a/gtk3/sample/misc/dialog.rb
+++ b/gtk3/sample/misc/dialog.rb
@@ -4,8 +4,6 @@
 
   Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: dialog.rb,v 1.6 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -39,6 +37,7 @@ button.signal_connect("clicked") do
   dialog.show_all
 end
 
-window.add(button).show_all.signal_connect("destroy") {Gtk.main_quit}
-
+window.add(button)
+window.signal_connect("destroy") {Gtk.main_quit}
+window.show_all
 Gtk.main
diff --git a/gtk3/sample/misc/dialog2.rb b/gtk3/sample/misc/dialog2.rb
old mode 100644
new mode 100755
index 3e7e841..2896265
--- a/gtk3/sample/misc/dialog2.rb
+++ b/gtk3/sample/misc/dialog2.rb
@@ -2,10 +2,8 @@
 =begin
   dialog2.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: dialog2.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -15,7 +13,7 @@ button = Gtk::Button.new(:label => "Create Dialog")
 button.signal_connect("clicked") do
   dialog = Gtk::Dialog.new(:title =>"Gtk::Dialog Sample 2",
                            :parent => window,
-                           :flags => Gtk::Dialog::Flags::MODAL,
+                           :flags => :modal,
                            :buttons => [[Gtk::Stock::OK, Gtk::ResponseType::OK],
                            [Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL]])
   dialog.child.add(Gtk::Label.new("Gtk::Dialog Sample 2"))
@@ -31,6 +29,7 @@ button.signal_connect("clicked") do
   dialog.destroy
 end
 
-window.add(button).show_all.signal_connect("destroy") {Gtk.main_quit}
-
+window.add(button)
+window.signal_connect("destroy") {Gtk.main_quit}
+window.show_all
 Gtk.main
diff --git a/gtk3/sample/misc/dnd.rb b/gtk3/sample/misc/dnd.rb
index 9687c04..caad2d1 100644
--- a/gtk3/sample/misc/dnd.rb
+++ b/gtk3/sample/misc/dnd.rb
@@ -1,11 +1,9 @@
 =begin
   dnd.rb - Drag and Drop sample script.
 
-  Copyright (C) 2002-2006 Masao Mutoh
+  Copyright (C) 2002-2015 Masao Mutoh
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Date: 2006/06/17 13:18:12 $
-  $Id: dnd.rb,v 1.9 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -16,16 +14,17 @@ class SrcWindow < Gtk::Window
     @label = Gtk::Label.new("Drag here!")
     add(@label)
     set_default_size(100, 100)
-    drag_source_set(Gdk::Window::ModifierType::BUTTON1_MASK |
-                    Gdk::Window::ModifierType::BUTTON2_MASK,
-                    [["test", Gtk::Drag::TargetFlags::SAME_APP, 12345]],
-                    Gdk::DragContext::Action::COPY |
-                    Gdk::DragContext::Action::MOVE)
-    signal_connect("drag-data-get") do |widget, context, selection_data, info, time|
-#      selection_data.set("text/uri-list", 8, "hoge.txt")
-      selection_data.set(Gdk::Selection::TYPE_STRING, "hoge.txt")
+    drag_source_set(Gdk::ModifierType::BUTTON1_MASK |
+                    Gdk::ModifierType::BUTTON2_MASK,
+                    [["test", Gtk::TargetFlags::SAME_APP, 12_345]],
+                    Gdk::DragAction::COPY |
+                    Gdk::DragAction::MOVE)
+    signal_connect("drag-data-get") do |_widget, _context, selection_data, _info, _time|
+      selection_data.set(Gdk::Selection::TYPE_STRING, "this is a test")
+      puts "drag-data-get signal:"
+      puts selection_data.text
     end
- end
+  end
 end
 
 class DestWindow < Gtk::Window
@@ -35,21 +34,26 @@ class DestWindow < Gtk::Window
     @label = Gtk::Label.new("Drop here!")
     add(@label)
     set_default_size(100, 100)
-    drag_dest_set(Gtk::Drag::DestDefaults::MOTION |
-                  Gtk::Drag::DestDefaults::HIGHLIGHT,
-                  [["test", :same_app, 12345]],
-                  Gdk::DragContext::Action::COPY |
-                  Gdk::DragContext::Action::MOVE)
+    drag_dest_set(Gtk::DestDefaults::MOTION |
+                  Gtk::DestDefaults::HIGHLIGHT,
+                  [["test", :same_app, 12_345]],
+                  Gdk::DragAction::COPY |
+                  Gdk::DragAction::MOVE)
 
-    signal_connect("drag-data-received") do |widget, context, x, y, selection_data, info, time|
+    signal_connect("drag-data-received") do |_widget, context, _x, _y, selection_data, _info, _time|
       context.targets.each do |target|
         if target.name == "test" ||
            selection_data.type == Gdk::Selection::TYPE_STRING
-          puts selection_data.data
+          data_len = selection_data.data[1]
+          puts "drag-data-received signal:"
+          puts selection_data.data[0].pack("C#{data_len}")
+          puts selection_data.text
+        else
+          next
         end
       end
     end
-    signal_connect("drag-drop") do |widget, context, x, y, time|
+    signal_connect("drag-drop") do |widget, context, _x, _y, time|
       widget.drag_get_data(context, context.targets[0], time)
     end
   end
@@ -58,7 +62,7 @@ end
 win1 = SrcWindow.new
 win2 = DestWindow.new
 
-win1.show_all.signal_connect("destroy") {Gtk.main_quit}
-win2.show_all.signal_connect("destroy") {Gtk.main_quit}
+win1.show_all.signal_connect("destroy") { Gtk.main_quit }
+win2.show_all.signal_connect("destroy") { Gtk.main_quit }
 
 Gtk.main
diff --git a/gtk3/sample/misc/dndtreeview.rb b/gtk3/sample/misc/dndtreeview.rb
index 98878b8..0fc44b5 100644
--- a/gtk3/sample/misc/dndtreeview.rb
+++ b/gtk3/sample/misc/dndtreeview.rb
@@ -1,36 +1,34 @@
 =begin
   dndtreeview.rb - Drag and Drop sample script.
 
-  Copyright (C) 2003-2006 Masao Mutoh
+  Copyright (C) 2003-2015 Masao Mutoh
+  Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Date: 2006/06/17 13:18:12 $
-  $Id: dndtreeview.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 class TestWindow < Gtk::Window
   attr_reader :list
 
   TARGET_TABLE = [["GTK_TREE_MODEL_ROW", 0, 0]]
 
-  def initialize()
+  def initialize
     super("Drag and Drop Gtk::TreeView")
 
-    set_default_size(300,128)
+    set_default_size(300, 128)
     signal_connect("destroy") { Gtk.main_quit }
 
     data = [["Hello", "KON-NI-CHIWA"],
-      ["Goodbye", "SAYO-NARA"],
-      ["Good morning", "OHA-YO-GOZAI-MASU"],
-      ["Good evening", "KON-BAN-WA"]]
+            ["Goodbye", "SAYO-NARA"],
+            ["Good morning", "OHA-YO-GOZAI-MASU"],
+            ["Good evening", "KON-BAN-WA"]]
 
     model = Gtk::ListStore.new(String, String)
     view = Gtk::TreeView.new(model)
     renderer = Gtk::CellRendererText.new
-    col1 = Gtk::TreeViewColumn.new("Data", renderer, {:text => 0})
-    col2 = Gtk::TreeViewColumn.new("Data", renderer, {:text => 1})
+    col1 = Gtk::TreeViewColumn.new("Data", renderer, { :text => 0 })
+    col2 = Gtk::TreeViewColumn.new("Data", renderer, { :text => 1 })
     view.append_column(col1)
     view.append_column(col2)
 
@@ -40,17 +38,17 @@ class TestWindow < Gtk::Window
       iter.set_value(1, v2)
     end
 
-    view.enable_model_drag_source(Gdk::Window::ModifierType::BUTTON1_MASK,
-                                  TARGET_TABLE, 
-                                  Gdk::DragContext::Action::COPY|Gdk::DragContext::Action::MOVE)
+    view.enable_model_drag_source(Gdk::ModifierType::BUTTON1_MASK,
+                                  TARGET_TABLE,
+                                  Gdk::DragAction::COPY | Gdk::DragAction::MOVE)
     view.enable_model_drag_dest(TARGET_TABLE,
-                                 Gdk::DragContext::Action::COPY|Gdk::DragContext::Action::MOVE) 
+                                 Gdk::DragAction::COPY | Gdk::DragAction::MOVE)
 
     add(view)
   end
 end
 
-win = TestWindow.new.show_all
+win = TestWindow.new
+win.show_all
 
 Gtk.main
-
diff --git a/gtk3/sample/misc/drag-move.rb b/gtk3/sample/misc/drag-move.rb
index f839e73..ce02414 100644
--- a/gtk3/sample/misc/drag-move.rb
+++ b/gtk3/sample/misc/drag-move.rb
@@ -1,12 +1,9 @@
 =begin
   drag-move.rb - Move widget by drag sample script.
 
-  Copyright (C) 2011-2014 Ruby-GNOME2 Project Team
+  Copyright (C) 2011-2015 Ruby-GNOME2 Project Team
   Copyright (C) 2006 Kouhei Sutou
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Date: 2006/06/17 13:18:12 $
-  $Id: drag-move.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
@@ -43,7 +40,7 @@ class DraggableWidget < Gtk::EventBox
   def set_button_press_event
     signal_connect("button-press-event") do |widget, event|
       if event.button == @drag_button
-        Gtk.grab_add(widget)
+        widget.grab_add
         x, y, w, h = widget.allocation.to_a
         drag_start(x, y, event.x_root, event.y_root)
       else
@@ -65,7 +62,7 @@ class DraggableWidget < Gtk::EventBox
   def set_button_release_event
     signal_connect("button-release-event") do |widget, event|
       if event.button == @drag_button
-        Gtk.grab_remove(widget)
+        widget.grab_remove
         drag_end
       else
         false
diff --git a/gtk3/sample/misc/drawing.rb b/gtk3/sample/misc/drawing.rb
index 45efb85..979b926 100644
--- a/gtk3/sample/misc/drawing.rb
+++ b/gtk3/sample/misc/drawing.rb
@@ -1,109 +1,97 @@
 =begin
-  drawing.rb - Gtk::Drawing sample script.
-
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  drawing.rb - Ruby/GTK version of gtk+/examples/drawing.c.
+  https://git.gnome.org/browse/gtk+/tree/examples/drawing.c?h=gtk-3-16
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: drawing.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
-class Canvas < Gtk::DrawingArea
-  def initialize
-    super
-    signal_connect("draw") do |w, e|
-      expose_event(w, e)
-    end
-    signal_connect("configure_event") do |w, e|
-      configure_event(w, e)
-    end
-    @buffer = nil
-    @bgc = nil
-  end
+surface = nil
 
-  def expose_event(w, e)
-    unless @buffer.nil?
-      rec = e.area
-      w.window.draw_drawable(@bgc,
-                             @buffer,
-                             rec.x, rec.y,
-                             rec.x, rec.y,
-                             rec.width, rec.height)
-    end
-    false
+def clear_surface(surface)
+  cr = Cairo::Context.new(surface)
+  cr.set_source_rgb(1, 1, 1)
+  cr.paint
+  cr.destroy
+end
+
+def draw_brush(widget, surface, x, y)
+  cr = Cairo::Context.new(surface)
+  cr.rectangle(x - 3, y - 3, 6, 6)
+  cr.fill
+  cr.destroy
+  widget.queue_draw_area(x - 3, y - 3, 6, 6)
+end
+
+myapp = Gtk::Application.new "org.gtk.example", :flags_none 
+
+myapp.signal_connect "activate" do |app|
+  win = Gtk::ApplicationWindow.new app
+  win.set_title "Drawing Area"
+
+  win.signal_connect "delete-event" do
+    win.destroy
   end
 
-  def clear(b = @buffer)
-    return if b.nil?
+  win.set_border_width 8
 
-    g = b.size
-    @bgc = self.style.bg_gc(self.state) if @bgc.nil?
-    if (g[0] > 0 && g[1] > 0)
-      b.draw_rectangle(@bgc, true, 0, 0, g[0], g[1])
-    end
+  frame = Gtk::Frame.new
+  frame.shadow_type = Gtk::ShadowType::IN
+  win.add frame
+
+  drawing_area = Gtk::DrawingArea.new
+  # Set a minimum size
+  drawing_area.set_size_request 100, 100
+  frame.add drawing_area
+
+  # Signals used to handle the backing surface
+  drawing_area.signal_connect "draw" do |_da, cr|
+    cr.set_source(surface, 0, 0)
+    cr.paint
+    false
   end
 
-  def configure_event(w, e)
-    g = w.window.geometry
-    if (g[2] > 0 && g[3] > 0)
-      b = Gdk::Pixmap::new(w.window, g[2], g[3], -1)
-      clear(b)
-      if not @buffer.nil?
-        g = @buffer.size
-        b.draw_drawable(@bgc,
-                        @buffer,
-                        0, 0,
-                        0, 0,
-                        g[0], g[1])
-      end
-      @buffer = b
-    end
+  drawing_area.signal_connect "configure-event" do |da, _ev|
+    surface.destroy if surface
+    surface = win.window.create_similar_surface(Cairo::CONTENT_COLOR,
+                                                da.allocated_width,
+                                                da.allocated_height)
+    # Initialize the surface to white
+    clear_surface(surface)
+
+    # the configure event have been handled, no need for further
+    # processing
     true
   end
-end
 
-class A < Canvas
-  def initialize
-    super
-    signal_connect("button_press_event") do |w, e|
-      pressed(w, e)
+  # Event signals
+  drawing_area.signal_connect "motion-notify-event" do |da, ev|
+    return false unless surface
+
+    if ((ev.state & Gdk::EventMask::BUTTON_PRESS_MASK.to_i) != 0)
+      draw_brush(da, surface, ev.x, ev.y)
     end
-    set_events(Gdk::Event::BUTTON_PRESS_MASK)
   end
 
-  def pressed(widget, ev)
-    if not @last.nil?
-      @buffer.draw_line(widget.style.fg_gc(widget.state),
-                        @last.x, @last.y,
-                        ev.x, ev.y)
-
-      x1, x2 = if (@last.x < ev.x)
-                 [@last.x, ev.x]
-               else
-                 [ev.x,    @last.x]
-               end
-      y1, y2 = if (@last.y < ev.y)
-                 [@last.y, ev.y]
-               else
-                 [ev.y,    @last.y]
-               end
-      widget.queue_draw_area(x1, y1,
-                             x2 - x1 + 1, y2 - y1 + 1)
+  drawing_area.signal_connect "button-press-event" do |da, ev|
+    return false unless surface
+
+    if (ev.button == Gdk::BUTTON_PRIMARY)
+      draw_brush(da, surface, ev.x, ev.y)
+    elsif (ev.button == Gdk::BUTTON_SECONDARY)
+      clear_surface(surface)
+      da.queue_draw
     end
-    @last = nil
-    @last = ev
+
     true
   end
-end
+  # Ask to receive events the drawing area doesn't normally
+  # subscribe to. In particular, we need to ask for the
+  # button press and motion notify events that we want to handle.
+  drawing_area.add_events([:button_press_mask, :pointer_motion_mask])
 
-window = Gtk::Window.new("drawing test")
-window.signal_connect("destroy") do
-  Gtk.main_quit
+  win.show_all
 end
 
-canvas = A.new
-window.add(canvas)
-
-window.show_all
-Gtk::main
+myapp.run ARGV
diff --git a/gtk3/sample/misc/entry.rb b/gtk3/sample/misc/entry.rb
index 5efc8c2..b09c10f 100644
--- a/gtk3/sample/misc/entry.rb
+++ b/gtk3/sample/misc/entry.rb
@@ -2,13 +2,11 @@
 =begin
   entry.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: entry.rb,v 1.9 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("entry")
 window.border_width = 0
diff --git a/gtk3/sample/misc/entrycompletion.rb b/gtk3/sample/misc/entrycompletion.rb
index ea62434..d57cbef 100644
--- a/gtk3/sample/misc/entrycompletion.rb
+++ b/gtk3/sample/misc/entrycompletion.rb
@@ -2,15 +2,13 @@
 =begin
   entrycompletion.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
 
   Enter "G", "t" on the entry box.
-
-  $Id: entrycompletion.rb,v 1.4 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new
 window.set_default_size(200, 200)
@@ -28,6 +26,8 @@ end
 completion.model = model
 completion.text_column = 0
 
-window.add(entry).show_all.signal_connect("destroy"){Gtk.main_quit}
+window.add(entry)
+window.show_all
+window.signal_connect("destroy"){Gtk.main_quit}
 
 Gtk.main
diff --git a/gtk3/sample/misc/eventbox.rb b/gtk3/sample/misc/eventbox.rb
new file mode 100644
index 0000000..b96a7c4
--- /dev/null
+++ b/gtk3/sample/misc/eventbox.rb
@@ -0,0 +1,58 @@
+=begin
+  eventbox.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+# https://developer.gnome.org/gtk3/unstable/GtkEventBox.html
+# https://developer.gnome.org/gtk3/stable/GtkImage.html
+
+# Gtk::EventBox are widgets container used to catch events for widgets that
+# do not have their own window (Gdk::Window) like Gtk::Image for example.
+
+require "gtk3"
+
+window = Gtk::Window.new("Event Box example")
+
+surface = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32, 265, 95)
+cr = Cairo::Context.new(surface)
+r1 = [10, 10, 75, 75]
+r2 = [95, 10, 75, 75]
+r3 = [180, 10, 75, 75]
+
+cr.set_source_rgb(1, 0, 0)
+cr.rectangle(*r1)
+cr.fill
+cr.set_source_rgb(0, 1, 0)
+cr.rectangle(*r2)
+cr.fill
+cr.set_source_rgb(0, 0, 1)
+cr.rectangle(*r3)
+cr.fill
+
+image = Gtk::Image.new(:pixbuf => surface.to_pixbuf(0, 0, 265, 95))
+
+event_box = Gtk::EventBox.new
+
+event_box.add(image)
+
+event_box.signal_connect "button-press-event" do |_widget, event|
+  if event.y >= 10 && event.y <= 85
+    if event.x >= 10 && event.x <= 85
+      puts "red x = #{event.x} y = #{event.y}"
+    elsif event.x >= 95 && event.x <= 180
+      puts "green x = #{event.x} y = #{event.y}"
+    elsif event.x >= 190 && event.x <= 255
+      puts "blue x = #{event.x} y = #{event.y}"
+    end
+  end
+end
+
+window.add(event_box)
+
+window.show_all
+
+window.signal_connect("delete-event") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/expander.rb b/gtk3/sample/misc/expander.rb
index 1641ebb..70b9273 100644
--- a/gtk3/sample/misc/expander.rb
+++ b/gtk3/sample/misc/expander.rb
@@ -2,13 +2,11 @@
 =begin
   expander.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: expander.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 expander = Gtk::Expander.new("Expander Sample")
 expander.expanded = true
@@ -21,7 +19,10 @@ end
 button.set_size_request(200, 200)
 expander.add(button)
 
-Gtk::Window.new.add(expander).show_all.signal_connect("destroy"){Gtk.main_quit}
+win = Gtk::Window.new
+win.add(expander)
+win.show_all
+win.signal_connect("destroy"){Gtk.main_quit}
 
 Gtk.main
 
diff --git a/gtk3/sample/misc/filechooser.rb b/gtk3/sample/misc/filechooser.rb
index ff4449c..1a0c0c2 100644
--- a/gtk3/sample/misc/filechooser.rb
+++ b/gtk3/sample/misc/filechooser.rb
@@ -2,18 +2,16 @@
 =begin
   filechooser.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: filechooser.rb,v 1.5 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
 
 dialog =  Gtk::FileChooserDialog.new(:title => "Gtk::FileChooser sample", 
-				     :action => Gtk::FileChooser::Action::OPEN,                                 
-				     :buttons => [[Gtk::Stock::OPEN, Gtk::Dialog::ResponseType::ACCEPT],
-				     [Gtk::Stock::CANCEL, Gtk::Dialog::ResponseType::CANCEL]])
+				     :action => Gtk::FileChooserAction::OPEN,                                 
+				     :buttons => [[Gtk::Stock::OPEN, Gtk::ResponseType::ACCEPT],
+				     [Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL]])
 
 extra_button = Gtk::Button.new(:label => "Extra button")
 extra_button.signal_connect("clicked") do
@@ -35,7 +33,7 @@ dialog.add_filter(filter_c)
 
 dialog.add_shortcut_folder("/tmp")
 
-if dialog.run == Gtk::Dialog::ResponseType::ACCEPT
+if dialog.run == Gtk::ResponseType::ACCEPT
   puts "filename = #{dialog.filename}"
   puts "uri = #{dialog.uri}"
 end
diff --git a/gtk3/sample/misc/flowbox.rb b/gtk3/sample/misc/flowbox.rb
new file mode 100755
index 0000000..6b7f233
--- /dev/null
+++ b/gtk3/sample/misc/flowbox.rb
@@ -0,0 +1,86 @@
+#!/usr/bin/env ruby
+#
+# Copyright (c)  2014  Gian Mario Tagliaretti
+# Copyright (c)  2015  Ruby-GNOME2 Project Team
+#
+# Permission is granted to copy, distribute and/or modify this document
+# under the terms of the GNU Free Documentation License, Version 1.3
+# or any later version published by the Free Software Foundation;
+# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+# A copy of the license is included in the section entitled "GNU
+# Free Documentation License".
+#
+# Original code: https://github.com/sebp/PyGObject-Tutorial/blob/master/examples/layout_flowbox_example.py
+
+require "gtk3"
+
+unless Gtk::Version.or_later?(3, 12, 1)
+  puts "This sample requires GTK+ 3.12.1 or later: #{Gtk::Version::STRING}"
+  exit
+end
+
+COLORS = %w(AliceBlue AntiqueWhite AntiqueWhite1 AntiqueWhite2 AntiqueWhite3
+            AntiqueWhite4 aqua aquamarine aquamarine1 aquamarine2 aquamarine3
+            aquamarine4 azure azure1 azure2 azure3 azure4 beige bisque bisque1
+            bisque2 bisque3 bisque4 black BlanchedAlmond blue blue1 blue2
+            blue3 blue4 BlueViolet brown brown1 brown2 brown3 brown4 burlywood
+            burlywood1 burlywood2 burlywood3 burlywood4 CadetBlue CadetBlue1
+            CadetBlue2 CadetBlue3 CadetBlue4 chartreuse chartreuse1 chartreuse2
+            chartreuse3 chartreuse4 chocolate chocolate1 chocolate2 chocolate3
+            chocolate4 coral coral1 coral2 coral3 coral4)
+
+class FlowBoxWindow < Gtk::Window
+  def initialize
+    super
+
+    set_border_width(10)
+    set_default_size(300, 250)
+
+    header = Gtk::HeaderBar.new
+    header.set_title("Flow Box")
+    header.subtitle = "Sample FlowBox app"
+    header.show_close_button = true
+
+    set_titlebar(header)
+
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.set_policy(Gtk::PolicyType::NEVER, Gtk::PolicyType::AUTOMATIC)
+
+    @flowbox = Gtk::FlowBox.new
+    @flowbox.set_valign(Gtk::Align::START)
+    @flowbox.set_max_children_per_line(30)
+    @flowbox.set_selection_mode(Gtk::SelectionMode::NONE)
+    fill_flowbox
+
+    scrolled.add(@flowbox)
+    add(scrolled)
+
+    signal_connect("destroy") { Gtk.main_quit }
+  end
+
+  private
+
+  def color_swatch_new(color_name)
+    color = Gdk::RGBA.parse(color_name)
+    button = Gtk::Button.new
+
+    area = Gtk::DrawingArea.new
+    area.set_size_request(24, 24)
+    area.override_background_color(0, color)
+
+    button.add(area)
+
+    button
+  end
+
+  def fill_flowbox
+    COLORS.each do |color|
+      @flowbox.add(color_swatch_new(color))
+    end
+  end
+end
+
+win = FlowBoxWindow.new
+win.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/frame.rb b/gtk3/sample/misc/frame.rb
index e9b177f..3ce0917 100644
--- a/gtk3/sample/misc/frame.rb
+++ b/gtk3/sample/misc/frame.rb
@@ -2,13 +2,11 @@
 =begin
   frame.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: frame.rb,v 1.9 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("buttons")
 window.signal_connect("destroy") do
@@ -21,11 +19,11 @@ window.add(box1)
 
 box2 = Gtk::Box.new(:horizontal, 5)
 box2.border_width = 10
-box1.pack_start(box2, true, true, 0)
+box1.pack_start(box2, :expand => true, :fill => true, :padding => 0)
 
 label = Gtk::Label.new("Hello World")
 frame = Gtk::Frame.new("Frame 1")
-box2.pack_start(frame, true, true, 0)
+box2.pack_start(frame, :expand => true, :fill => true, :padding => 0)
 
 box3 = Gtk::Box.new(:vertical, 5)
 box3.border_width = 5
@@ -35,11 +33,11 @@ button = Gtk::Button.new(:label => "switch")
 button.signal_connect("clicked") do
   label.reparent(box3)
 end
-box3.pack_start(button, false, true, 0)
-box3.pack_start(label, false, true, 0)
+box3.pack_start(button, :expand => false, :fill => true, :padding => 0)
+box3.pack_start(label, :expand => false, :fill => true, :padding => 0)
 
 frame = Gtk::Frame.new("Frame 2")
-box2.pack_start(frame, true, true, 0)
+box2.pack_start(frame, :expand => true, :fill => true, :padding => 0)
 
 box4 = Gtk::Box.new(:vertical, 5)
 box4.border_width = 5
@@ -49,14 +47,14 @@ button = Gtk::Button.new(:label => "switch")
 button.signal_connect("clicked") do
   label.reparent(box4)
 end
-box4.pack_start(button, false, true, 0)
+box4.pack_start(button, :expand => false, :fill => true, :padding => 0)
 
 separator = Gtk::Separator.new(:horizontal)
-box1.pack_start(separator, false, true, 0)
+box1.pack_start(separator, :expand => false, :fill => true, :padding => 0)
 
 box2 = Gtk::Box.new(:horizontal, 10)
 box2.border_width = 10
-box1.pack_start(box2, false, true, 0)
+box1.pack_start(box2, :expand => false, :fill => true, :padding => 0)
 
 button = Gtk::Button.new(:label => "close")
 button.signal_connect("clicked") do
diff --git a/gtk3/sample/misc/gdkscreen.rb b/gtk3/sample/misc/gdkscreen.rb
index f8b9de1..b51f1a8 100644
--- a/gtk3/sample/misc/gdkscreen.rb
+++ b/gtk3/sample/misc/gdkscreen.rb
@@ -2,13 +2,13 @@
   gdkscreen.rb - Gdk::Screen sample script.
 
   Copyright (C) 2004-2006  Masao Mutoh
+  Copyright (C) 2007-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: gdkscreen.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
+Gtk.init
 screen = Gdk::Screen.default
 settings_map = [
   "gtk-double-click-time",
diff --git a/gtk3/sample/misc/gtkglarea1.rb b/gtk3/sample/misc/gtkglarea1.rb
new file mode 100644
index 0000000..5671837
--- /dev/null
+++ b/gtk3/sample/misc/gtkglarea1.rb
@@ -0,0 +1,114 @@
+=begin
+  gtkglarea1.rb draw a triangle on a grey background
+  this script need the opengl-bindings gem from :
+  https://github.com/vaiorabbit/ruby-opengl
+
+  gem install opengl-bindings
+
+  sources:
+  http://antongerdelan.net/opengl/hellotriangle.html
+  opengl-bindings/sample/RedBook/varray
+  opengl-bindings/sample/GLES/gles.rb
+  http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/
+  https://developer.gnome.org/gtk3/stable/GtkGLArea.html
+  https://www.bassi.io/articles/2015/02/17/using-opengl-with-gtk/
+  http://stackoverflow.com/questions/30337845/gldrawarrays-not-working-using-gtkglarea-in-gtk3
+  http://gamedev.stackexchange.com/questions/8042/vertex-array-object-opengl
+=end
+
+require "gtk3"
+require "opengl"
+
+unless Gtk::Version.or_later?(3, 16, 0)
+  puts "This sample requires GTK+ 3.16.0 or later: #{Gtk::Version::STRING}"
+  exit
+end
+
+OpenGL.load_lib
+
+include OpenGL
+
+window = Gtk::Window.new("OpenGL widget test")
+
+window.set_size_request(400, 400)
+glarea = Gtk::GLArea.new
+
+window.add(glarea)
+
+gl_vao = nil
+
+glarea.signal_connect("realize") do |widget|
+
+  widget.make_current
+
+  # Check can only be done when we have an OpenGL context
+  # https://www.opengl.org/wiki/FAQ#What_is_an_OpenGL_context_and_why_do_you_need_a_window_to_do_GL_rendering.3F
+  # https://www.opengl.org/wiki/FAQ#How_do_I_tell_what_version_of_OpenGL_I.27m_using.3F
+
+  version = glGetString(GL_VERSION).to_s.split(" ").first.split(".").collect(&:to_i)
+  unless version[0] >= 3 && version[1] >= 2
+    puts "Gtk::GLArea widget require an OpenGL version >= 3.2, your version is #{version[0]}.#{version[1]}"
+    exit 1
+  end
+
+  puts "realize"
+  # Define a triangle in a vertex buffer ( Vertex Buffer Object)
+
+  points = [
+    0.0, 0.5, 0.0,  # x1, y1, z1
+    0.5, -0.5, 0.0, # x2, y2, z2
+    -0.5, -0.5, 0.0 # x3, y3, z3
+  ]
+  # Create a vertex array object (VAO) and "bind" it (set it as the current VAO)
+  vao_buf = "    "
+  glGenVertexArrays(1, vao_buf)
+  gl_vao = vao_buf.unpack("L")[0]
+  glBindVertexArray(gl_vao)
+
+  # We copy points onto the graphics card in a unit called vertex buffer object (vbo).
+  # Create an empty buffer
+  vbo_buf = "    "
+  glGenBuffers(1, vbo_buf)
+  g_vbo = vbo_buf.unpack("L")[0]
+  # Set the empty buffer as the current OpenGL's state machine by "binding"
+  glBindBuffer(GL_ARRAY_BUFFER, g_vbo)
+  # Copy the points in the currently bound buffer
+  glBufferData(GL_ARRAY_BUFFER,
+               3 * 4 * Fiddle::SIZEOF_FLOAT,
+               points.pack("F*"),
+               GL_STATIC_DRAW
+              )
+
+  # First attribute buffer : vertices
+  glEnableVertexAttribArray(0)
+  glVertexAttribPointer(0,        # No particular reason for 0
+                        3,        # size
+                        GL_FLOAT, # type
+                        GL_FALSE, # normalized?
+                        0,        # stride
+                        0         # array buffer offset
+                       )
+  # Clear the current VAO
+  glBindVertexArray(0)
+end
+
+glarea.signal_connect("render") do |_widget, _context|
+  puts "render"
+  glClearColor(0.3, 0.3, 0.3, 1)
+  glClear(GL_COLOR_BUFFER_BIT)
+  # Reload the VAO we created previously
+  glBindVertexArray(gl_vao)
+  glDrawArrays(GL_TRIANGLES, 0, 3)
+
+  # we completed our drawing; the draw commands will be
+  # flushed at the end of the signal emission chain, and
+  # the buffers will be drawn on the window
+  true # to stop other handlers from being invoked for the event.
+  # false to propagate the event further.
+end
+
+window.signal_connect("destroy") { Gtk.main_quit }
+
+window.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/gtkglarea2.rb b/gtk3/sample/misc/gtkglarea2.rb
new file mode 100644
index 0000000..d8a26b1
--- /dev/null
+++ b/gtk3/sample/misc/gtkglarea2.rb
@@ -0,0 +1,194 @@
+=begin
+  gtkglarea2.rb draw a triangle using shaders on a grey background
+  this script need the opengl-bindings gem from :
+  https://github.com/vaiorabbit/ruby-opengl
+
+  gem install opengl-bindings
+
+  sources:
+  http://antongerdelan.net/opengl/hellotriangle.html
+  opengl-bindings/sample/RedBook/varray
+  opengl-bindings/sample/GLES/gles.rb
+  http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/
+  https://developer.gnome.org/gtk3/stable/GtkGLArea.html
+  https://www.bassi.io/articles/2015/02/17/using-opengl-with-gtk/
+  http://stackoverflow.com/questions/30337845/gldrawarrays-not-working-using-gtkglarea-in-gtk3
+=end
+
+require "gtk3"
+require "opengl"
+
+unless Gtk::Version.or_later?(3, 16, 0)
+  puts "This sample requires GTK+ 3.16.0 or later: #{Gtk::Version::STRING}"
+  exit
+end
+
+OpenGL.load_lib
+
+include OpenGL
+
+window = Gtk::Window.new("OpenGL widget shaders test")
+
+window.set_size_request(400, 400)
+glarea = Gtk::GLArea.new
+
+window.add(glarea)
+
+vertex_shader = <<EOF
+#version 400
+in vec3 vp;
+void main () {
+  gl_Position = vec4 (vp, 1.0);
+};
+EOF
+
+fragment_shader = <<EOF
+#version 400
+out vec4 frag_colour;
+void main () {
+  frag_colour = vec4 (0.5, 0.0, 0.5, 1.0);
+};
+EOF
+
+def display_compile_shader_log(shader_handle)
+  info_log = " " * 1024
+  glGetShaderInfoLog(shader_handle, 1023, nil, info_log)
+  puts "Shader InfoLog:\n#{info_log}\n"
+end
+
+def compile_shader(shader_handle)
+  # Compile the vertex shader
+  glCompileShader(shader_handle)
+  # Check the vertex shader compilation
+  compiled_buf = "    "
+  glGetShaderiv(shader_handle, GL_COMPILE_STATUS, compiled_buf)
+  compiled = compiled_buf.unpack("L")[0]
+  compiled
+end
+
+def setup_shaders(vertex, fragment)
+  # Load the shaders sources
+  vs_handle = glCreateShader(GL_VERTEX_SHADER)
+  fs_handle = glCreateShader(GL_FRAGMENT_SHADER)
+
+  glShaderSource(vs_handle,
+                 1,
+                 [vertex].pack("p"),
+                 [vertex.bytesize].pack("I")
+                )
+
+  glShaderSource(fs_handle,
+                 1,
+                 [fragment].pack("p"),
+                 [fragment.bytesize].pack("I")
+                )
+
+  vert_compiled = compile_shader(vs_handle)
+  display_compile_shader_log(vs_handle) if vert_compiled == 0
+
+  frag_compiled = compile_shader(fs_handle)
+  display_compile_shader_log(fs_handle) if frag_compiled == 0
+
+  return false if vert_compiled == 0 || frag_compiled == 0
+
+  # Load those 2 shaders (vertex and fragment) into a GPU shader program
+  prog_handle = glCreateProgram
+  glAttachShader(prog_handle, vs_handle)
+  glAttachShader(prog_handle, fs_handle)
+
+  glLinkProgram(prog_handle)
+
+  # Check if the program is valid
+  linked_buf = "    "
+  glGetProgramiv(prog_handle, GL_LINK_STATUS, linked_buf)
+  linked = linked_buf.unpack("L")[0]
+  if linked == 0
+    info_log = " " * 1024
+    glGetProgramInfoLog(prog_handle, 1023, nil, info_log)
+    puts "Program InfoLog:\n#{info_log}\n"
+  end
+  return false if linked == 0
+
+  return true, prog_handle
+end
+
+shader_program = nil
+gl_vao = nil
+
+glarea.signal_connect("realize") do |widget|
+  widget.make_current
+
+  # Check can only be done when we have an OpenGL context
+  # https://www.opengl.org/wiki/FAQ#What_is_an_OpenGL_context_and_why_do_you_need_a_window_to_do_GL_rendering.3F
+  # https://www.opengl.org/wiki/FAQ#How_do_I_tell_what_version_of_OpenGL_I.27m_using.3F
+
+  version = glGetString(GL_VERSION).to_s.split(" ").first.split(".").collect(&:to_i)
+  unless version[0] >= 3 && version[1] >= 2
+    puts "Gtk::GLArea widget require an OpenGL version >= 3.2, your version is #{version[0]}.#{version[1]}"
+    exit 1
+  end
+
+  puts "realize"
+  # Define a triangle in a vertex buffer ( Vertex Buffer Object)
+
+  points = [
+    0.0, 0.5, 0.0,  # x1, y1, z1
+    0.5, -0.5, 0.0, # x2, y2, z2
+    -0.5, -0.5, 0.0 # x3, y3, z3
+  ]
+  vao_buf = "    "
+  glGenVertexArrays(1, vao_buf)
+  gl_vao = vao_buf.unpack("L")[0]
+  glBindVertexArray(gl_vao)
+  # We copy those points onto the graphics card in a unit called vertex buffer object (vbo).
+  # Create an empty buffer
+  vbo_buf = "    "
+  glGenBuffers(1, vbo_buf)
+  g_vbo = vbo_buf.unpack("L")[0]
+  # Set the empty buffer as the current OpenGL's state machine by "binding"
+  glBindBuffer(GL_ARRAY_BUFFER, g_vbo)
+  # Copy the points in the currently bound buffer
+  glBufferData(GL_ARRAY_BUFFER,
+               3 * 4 * Fiddle::SIZEOF_FLOAT,
+               points.pack("F*"),
+               GL_STATIC_DRAW
+              )
+
+  # First attribute buffer : vertices
+  glEnableVertexAttribArray(0)
+  glVertexAttribPointer(0,        # No particular reason for 0
+                        3,        # size
+                        GL_FLOAT, # type
+                        GL_FALSE, # normalized?
+                        0,        # stride
+                        0         # array buffer offset
+                       )
+
+  glBindVertexArray(0)
+  # Load the shaders:
+  _ok, shader_program = setup_shaders(vertex_shader, fragment_shader)
+end
+
+glarea.signal_connect("render") do |_widget, _context|
+  puts "render"
+  glClearColor(0.3, 0.3, 0.3, 1)
+  glClear(GL_COLOR_BUFFER_BIT)
+  # Set the created shader program as current
+  glUseProgram(shader_program)
+  glBindVertexArray(gl_vao)
+  glDrawArrays(GL_TRIANGLES, 0, 3)
+  true
+end
+
+glarea.signal_connect("unrealize") do |widget|
+  puts "unrealize"
+  widget.make_current
+  glDeleteVertexArrays(1, [gl_vao].pack("L"))
+  glDeleteProgram(shader_program)
+end
+
+window.signal_connect("destroy") { Gtk.main_quit }
+
+window.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/helloworld.rb b/gtk3/sample/misc/helloworld.rb
index 610e64f..854647d 100644
--- a/gtk3/sample/misc/helloworld.rb
+++ b/gtk3/sample/misc/helloworld.rb
@@ -2,13 +2,11 @@
 =begin
   helloworld.rb - Ruby/GTK2 first sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: helloworld.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 button = Gtk::Button.new(:label => "Hello World")
 button.signal_connect("clicked") {
@@ -18,7 +16,6 @@ button.signal_connect("clicked") {
 window = Gtk::Window.new("Hello World sample")
 window.signal_connect("delete_event") {
   puts "delete event occurred"
-  #true
   false
 }
 
diff --git a/gtk3/sample/misc/iconview.rb b/gtk3/sample/misc/iconview.rb
index a627f8d..beb63e8 100644
--- a/gtk3/sample/misc/iconview.rb
+++ b/gtk3/sample/misc/iconview.rb
@@ -1,26 +1,24 @@
 #!/usr/bin/env ruby
 =begin
-  iconview.rb - Ruby/GTK2 sample script.
+  iconview.rb - Ruby/GTK3 sample script.
 
-  Copyright (c) 2005,2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2005-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: iconview.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 TEXT_COLUMN   = 0
 PIXBUF_COLUMN = 1
 
 model = Gtk::ListStore.new(String, Gdk::Pixbuf)
 
-iv = Gtk::IconView.new(model)
-
+iv = Gtk::IconView.new
+iv.set_model(model)
 iv.text_column   = TEXT_COLUMN
 iv.pixbuf_column = PIXBUF_COLUMN
 
-Dir.glob("../gtk-demo/gnome*.png").each do |f|
+Dir.glob("#{File.expand_path(File.dirname(__FILE__))}/../gtk-demo/gnome*.png").each do |f|
   iter = model.append
   iter[TEXT_COLUMN]   = File.basename(f)
   iter[PIXBUF_COLUMN] = Gdk::Pixbuf.new(f)
@@ -33,6 +31,8 @@ end
 
 win = Gtk::Window.new("Gtk::IconView sample")
 win.signal_connect("destroy"){Gtk.main_quit}
-win.add(iv).set_default_size(300,300).show_all
+win.add(iv)
+win.set_default_size(300,300)
+win.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/image.rb b/gtk3/sample/misc/image.rb
index 3b3e8c6..939c51e 100644
--- a/gtk3/sample/misc/image.rb
+++ b/gtk3/sample/misc/image.rb
@@ -2,13 +2,11 @@
 =begin
   image.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: image.rb,v 1.9 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Image")
 window.signal_connect("destroy") do
@@ -25,7 +23,9 @@ box1.add(button)
 label = Gtk::Label.new("Gtk::Image\ntest")
 image = Gtk::Image.new(:file => "test.xpm")
 
-box2 = Gtk::Box.new(:horizontal, 5).add(image).add(label)
+box2 = Gtk::Box.new(:horizontal, 5)
+box2.add(image)
+box2.add(label)
 
 button.add(box2)
 
@@ -37,6 +37,7 @@ button.signal_connect("clicked") do
 end
 box1.add(button)
 
-window.add(box1).show_all
+window.add(box1)
+window.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/keyboard-grab.rb b/gtk3/sample/misc/keyboard-grab.rb
new file mode 100644
index 0000000..316b47c
--- /dev/null
+++ b/gtk3/sample/misc/keyboard-grab.rb
@@ -0,0 +1,34 @@
+=begin
+  keyboard_grab.rb - Gdk::Window#keyboard_grab/ungrab sample script.
+
+  Copyright (C) 2001-2006 Masao Mutoh
+  This program is licenced under the same licence as Ruby-GNOME.
+
+  $Date: 2006/06/17 13:18:12 $
+  $Id: keyboard_grab.rb,v 1.5 2006/06/17 13:18:12 mutoh Exp $
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new("Keyboard Grab/Ungrab sample")
+
+button1 = Gtk::Button.new(:label => "Grab Keyboard!")
+button2 = Gtk::Button.new(:label => "Ungrab Keyboard!")
+
+button1.signal_connect("clicked") do
+  Gdk.keyboard_grab(window.window, true, Gdk::CURRENT_TIME)
+end
+
+button2.signal_connect("clicked") do
+  Gdk.keyboard_ungrab(Gdk::CURRENT_TIME)
+end
+
+vbox = Gtk::Box.new(:vertical, 0)
+vbox.add(button1)
+vbox.add(button2)
+window.add(vbox)
+window.set_default_size(200, 100)
+window.show_all
+window.signal_connect("destroy") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/label.rb b/gtk3/sample/misc/label.rb
index e3f113a..af8091c 100644
--- a/gtk3/sample/misc/label.rb
+++ b/gtk3/sample/misc/label.rb
@@ -1,23 +1,21 @@
 #!/usr/bin/env ruby
 =begin
-  label.rb - Ruby/GTK2 sample script.
+  label.rb - Ruby/GTK3 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: label.rb,v 1.8 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 win = Gtk::Window.new("Gtk::Label sample")
 win.signal_connect("destroy"){Gtk.main_quit}
-label1 = Gtk::Label.new("_Not Use Mnemonic")
+label1 = Gtk::Label.new("_Not Use Mnemonic", :use_underline => false)
 label1.selectable = true
-label2 = Gtk::Label.new("_Use Mnemonic", true)
-label3 = Gtk::Label.new.set_markup(%Q[<markup><span size="xx-large" weight="bold" foreground="blue"><u>Ruby-GNOME2</u></span> is <span foreground="red" size="x-large"><i>cool</i></span>!</markup>], true)
-label4 = Gtk::Label.new.set_markup(%Q[<span foreground="#999900">_Not Use Mnemonic</span>])
-label5 = Gtk::Label.new.set_markup(%Q[<span foreground="#009999">_Use Mnemonic</span>], true)
+label2 = Gtk::Label.new("_Use Mnemonic", :use_underline => true)
+label3 = Gtk::Label.new.set_markup(%Q[<markup><span size="xx-large" weight="bold" foreground="blue"><u>Ruby-GNOME2</u></span> is <span foreground="red" size="x-large"><i>cool</i></span>!</markup>])
+label4 = Gtk::Label.new.set_markup(%Q[<span foreground="#999900">_Not Use Mnemonic</span>], :use_underline => false)
+label5 = Gtk::Label.new.set_markup(%Q[<span foreground="#009999">_Use Mnemonic</span>], :use_underline => true)
 
 box = Gtk::Box.new(:vertical)
 box.add(label1)
@@ -25,7 +23,8 @@ box.add(label2)
 box.add(label3)
 box.add(label4)
 box.add(label5)
-win.add(box).show_all
+win.add(box)
+win.show_all
 
 # This can be called after realized only.
 label1.select_region(3, 8)
diff --git a/gtk3/sample/misc/linkbutton.rb b/gtk3/sample/misc/linkbutton.rb
old mode 100644
new mode 100755
index 26985e9..2f0ea80
--- a/gtk3/sample/misc/linkbutton.rb
+++ b/gtk3/sample/misc/linkbutton.rb
@@ -2,18 +2,16 @@
 =begin
   linkbutton.rb - Gtk::LinkButton sample.
 
-  Copyright (c) 2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: linkbutton.rb,v 1.1 2006/10/21 16:58:00 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::LinkButton sample")
 window.signal_connect("destroy"){Gtk.main_quit}
 
-vbox = Gtk::VBox.new
+vbox = Gtk::Box.new(:vertical)
 
 # URI only
 button1 = Gtk::LinkButton.new("http://ruby-gnome2.sourceforge.jp/")
@@ -29,11 +27,6 @@ button2.signal_connect("clicked") do
   puts button2.uri
 end
 
-# Global setting instead of using clicked signals.
-Gtk::LinkButton.set_uri_hook {|button, link|
-  puts "set_uri_hook: " + link
-}
-
 vbox.pack_start(button2)
 
 window.add(vbox)
diff --git a/gtk3/sample/misc/list-store-usage.rb b/gtk3/sample/misc/list-store-usage.rb
new file mode 100644
index 0000000..d0c8269
--- /dev/null
+++ b/gtk3/sample/misc/list-store-usage.rb
@@ -0,0 +1,96 @@
+#!/usr/bin/env ruby
+=begin
+  list_store_usage.rb - Ruby/GTK script 
+  http://ruby-gnome2.osdn.jp/hiki.cgi?Gtk%3A%3AListStore
+  https://developer.gnome.org/gtk3/stable/GtkListStore.html
+
+  Copyright (c) 2015  Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+require "gtk3"
+
+def print_list(list)
+  puts ""
+  print "\t"
+  list.each do |_model, _path, iter|
+    print iter[1] + "  "
+  end
+  print "\n"
+  puts ""
+end
+
+def load_list
+  model = Gtk::ListStore.new(TrueClass, String)
+
+  4.times do |i|
+    model.append.set_values([false, "index#{i}"])
+  end
+  model
+end
+NOTCH = "-[|]-"
+
+# Insert data
+puts "Initial state of the model build with append method"
+model = load_list
+print_list(model)
+
+puts "Prepend #{NOTCH}"
+model = load_list
+model.prepend.set_values([true, NOTCH])
+print_list(model)
+
+puts "Insert #{NOTCH} at position 3"
+model = load_list
+model.insert(3).set_values([true, NOTCH])
+print_list(model)
+
+puts "Insert #{NOTCH} before item at index 2"
+model = load_list
+model.insert_before(model.get_iter("2")).set_values([true, NOTCH])
+print_list(model)
+
+puts "Insert #{NOTCH} after item at index 2"
+model = load_list
+model.insert_after(model.get_iter("2")).set_values([true, NOTCH])
+print_list(model)
+
+puts "Move iter before position 2 and set #{NOTCH}"
+model = load_list
+iter = model.iter_first
+iter2 = model.get_iter("2")
+model.move_before(iter, iter2)
+iter.set_values([true, NOTCH])
+print_list(model)
+
+puts "Move iter after position 2 and set #{NOTCH}"
+model = load_list
+iter = model.iter_first
+iter2 = model.get_iter("2")
+model.move_after(iter, iter2)
+iter.set_values([true, NOTCH])
+print_list(model)
+
+# Move data
+puts "Reorder the list"
+model = load_list
+model.reorder([3, 2, 1, 0])
+print_list(model)
+
+puts "Swap item at index 1 with item at index 3"
+model = load_list
+model.swap(model.get_iter("1"), model.get_iter("3"))
+print_list(model)
+
+# Remove data
+
+puts "Remove data at index 2"
+model = load_list
+iter = model.get_iter("2")
+model.remove(iter)
+print_list(model)
+
+puts "Clear and add #{NOTCH}"
+model = load_list
+model.clear
+model.append.set_values([true, NOTCH])
+print_list(model)
diff --git a/gtk3/sample/misc/listview.rb b/gtk3/sample/misc/listview.rb
old mode 100644
new mode 100755
index 8a06416..c2051ee
--- a/gtk3/sample/misc/listview.rb
+++ b/gtk3/sample/misc/listview.rb
@@ -2,13 +2,11 @@
 =begin
   listview.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: listview.rb,v 1.11 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::ListStore sample")
 window.border_width = 0
@@ -18,11 +16,11 @@ window.add(box1)
 
 box2 = Gtk::Box.new(:vertical, 10)
 box2.border_width = 10
-box1.pack_start(box2, true, true, 0)
+box1.pack_start(box2, :expand => true, :fill => true, :padding => 0)
 
 scrolled_win = Gtk::ScrolledWindow.new
 scrolled_win.set_policy(:automatic,:automatic)
-box2.pack_start(scrolled_win, true, true, 0)
+box2.pack_start(scrolled_win, :expand => true, :fill => true, :padding => 0)
 
 data = [
     "hello",
@@ -60,7 +58,7 @@ button.signal_connect("clicked") do
   i += 1
 end
 
-box2.pack_start(button, false, true, 0)
+box2.pack_start(button, :expand => false, :fill => true, :padding => 0)
 
 button = Gtk::Button.new(:label => "remove")
 button.can_focus=true
@@ -68,21 +66,21 @@ button.signal_connect("clicked") do
   iter = treeview.selection.selected
   model.remove(iter) if iter
 end
-box2.pack_start(button, false, true, 0)
+box2.pack_start(button, :expand => false, :fill => true, :padding => 0)
 
 separator = Gtk::Separator.new(:horizontal)
-box1.pack_start(separator, false, true, 0)
+box1.pack_start(separator, :expand => false, :fill => true, :padding => 0)
 separator.show
 
 box2 = Gtk::Box.new(:vertical, 10)
 box2.border_width = 10
-box1.pack_start(box2, false, true, 0)
+box1.pack_start(box2, :expand => false, :fill => true, :padding => 0)
 
 button = Gtk::Button.new(:label => "close")
 button.signal_connect("clicked") do
   Gtk.main_quit
 end
-box2.pack_start(button, true, true, 0)
+box2.pack_start(button, :expand => true, :fill => true, :padding => 0)
 button.can_default=true
 button.grab_default
 
diff --git a/gtk3/sample/misc/menu.rb b/gtk3/sample/misc/menu.rb
index 4068c03..dfaf438 100644
--- a/gtk3/sample/misc/menu.rb
+++ b/gtk3/sample/misc/menu.rb
@@ -2,44 +2,66 @@
 =begin
   menu.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: menu.rb,v 1.8 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 def create_menu(depth)
   return nil if depth < 1
-  
+
   menu = Gtk::Menu.new
   group = nil
-  submenu = nil
 
-  for i in 0..4
-    buf = sprintf("item %2d - %d", depth, i + 1)
+  (0..4).each do |i|
+    buf = format("item %2d - %d", depth, i + 1)
     menuitem = Gtk::RadioMenuItem.new(group, buf)
     group = menuitem.group
     menu.append(menuitem)
-    if depth > 1
-      menuitem.set_submenu create_menu(depth - 1)
-    end
+
+    menuitem.set_submenu create_menu(depth - 1) if depth > 1
   end
   menu
 end
 
+def create_option_menu
+  lstore = Gtk::ListStore.new(TrueClass, String)
+  (1..5).each do |i|
+    lstore.append.set_values([false, "item #{i}"])
+  end
+
+  combobox = Gtk::ComboBox.new(:model => lstore, :entry => true)
+
+  toggle = Gtk::CellRendererToggle.new
+
+  combobox.pack_start(toggle, true)
+  combobox.add_attribute(toggle, "active", 0)
+  combobox.set_entry_text_column(1)
+
+  combobox.signal_connect("changed") do |widget|
+    list = widget.model
+    list.each do |model, _path, iter|
+      model.set_value(iter, 0, false)
+    end
+    iter = widget.active_iter
+    list.set_value(iter, 0, true)
+  end
+
+  combobox
+end
+
 window = Gtk::Window.new("menus")
 window.signal_connect("destroy") do
   Gtk.main_quit
 end
 window.border_width = 0
 
-box1 = Gtk::VBox.new(false, 0)
+box1 = Gtk::Box.new(:vertical, 0)
 window.add(box1)
 
 menubar = Gtk::MenuBar.new
-box1.pack_start(menubar, false, true, 0)
+box1.pack_start(menubar, :expand => false, :fill => true, :padding => 0)
 
 menu = create_menu(2)
 menuitem = Gtk::MenuItem.new("test\nline2")
@@ -54,27 +76,25 @@ menuitem = Gtk::MenuItem.new("bar")
 menuitem.set_submenu(create_menu(4))
 menubar.append(menuitem)
 
-box2 = Gtk::VBox.new(false, 10)
+box2 = Gtk::Box.new(:vertical, 10)
 box2.border_width = 10
-box1.pack_start(box2, true, true, 0)
+box1.pack_start(box2, :expand => true, :fill => true, :padding => 0)
 
-optionmenu = Gtk::OptionMenu.new
-optionmenu.set_menu(create_menu(1))
-optionmenu.set_history(4)
-box2.pack_start(optionmenu, true, true, 0)
+optionmenu = create_option_menu
+box2.pack_start(optionmenu, :expand => true, :fill => true, :padding => 0)
 
-separator = Gtk::HSeparator.new
-box1.pack_start(separator, false, true, 0)
+separator = Gtk::Separator.new(:horizontal)
+box1.pack_start(separator, :expand => false, :fill => true, :padding => 0)
 
-box2 = Gtk::HBox.new(false, 10)
+box2 = Gtk::Box.new(:horizontal, 10)
 box2.border_width = 10
-box1.pack_start(box2, false, true, 0)
+box1.pack_start(box2, :expand => false, :fill => true, :padding => 0)
 
-button = Gtk::Button.new("close")
+button = Gtk::Button.new(:label => "close")
 button.signal_connect("clicked") do
   window.destroy
 end
-box2.pack_start(button, true, true, 0)
+box2.pack_start(button, :expand => true, :fill => true, :padding => 0)
 
 window.show_all
 
diff --git a/gtk3/sample/misc/misc-button.rb b/gtk3/sample/misc/misc-button.rb
new file mode 100644
index 0000000..3e7e644
--- /dev/null
+++ b/gtk3/sample/misc/misc-button.rb
@@ -0,0 +1,50 @@
+#!/usr/bin/env ruby
+=begin
+  misc_button.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+box = Gtk::Box.new(:vertical)
+
+# Gtk::ColorButton
+colorbutton = Gtk::ColorButton.new
+colorbutton.signal_connect("color-set") do
+  p colorbutton.color.to_s
+end
+box.add(colorbutton)
+
+# Gtk::FontButton
+fontbutton = Gtk::FontButton.new
+fontbutton.signal_connect("font-set") do
+  p fontbutton.font_name
+end
+box.add(fontbutton)
+
+# Gtk::FileChooserButton
+filebutton = Gtk::FileChooserButton.new("Gtk::FileChooserButton",
+                                    Gtk::FileChooserAction::OPEN)
+filebutton.filename = GLib.home_dir
+filebutton.signal_connect("current-folder-changed") do |w, e|
+  p filebutton.filename
+end
+
+box.add(filebutton)
+
+# Quit
+quitbutton = Gtk::Button.new(:label => "Quit")
+quitbutton.signal_connect("clicked") do
+  Gtk.main_quit
+end
+box.add(quitbutton)
+
+win = Gtk::Window.new
+win.add(box)
+win.set_default_size(200, 100)
+win.show_all
+win.signal_connect("delete-event") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/mouse-gesture.rb b/gtk3/sample/misc/mouse-gesture.rb
index b1a23ac..5b123e9 100644
--- a/gtk3/sample/misc/mouse-gesture.rb
+++ b/gtk3/sample/misc/mouse-gesture.rb
@@ -1,28 +1,21 @@
 =begin
   mouse-gesture.rb - mouse gesture sample script.
 
-  Copyright (C) 2005,2006 Kouhei Sutou 
+  Copyright (C) 2005,2006 Kouhei Sutou
+  Copyright (c) 2005-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Date: 2006/06/17 13:18:12 $
-  $Id: mouse-gesture.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
-
-unless Gdk.cairo_available?
-  STDERR.puts("need cairo and rcairo support for this sample")
-  exit 1
-end
+require "gtk3"
 
 class GestureProcessor
   DEFAULT_THRESHOLD = 16
   DEFAULT_SKEW_THRESHOLD_ANGLE = 30
-    
+
   attr_accessor :threshold, :skew_threshold_angle
   attr_reader :motions
 
-  def initialize(threshold=nil, skew_threshold_angle=nil)
+  def initialize(threshold = nil, skew_threshold_angle = nil)
     @threshold = threshold || DEFAULT_THRESHOLD
     @skew_threshold_angle = skew_threshold_angle
     @skew_threshold_angle ||= DEFAULT_SKEW_THRESHOLD_ANGLE
@@ -34,22 +27,22 @@ class GestureProcessor
   end
 
   MOTIONS = %w(L R U D UL UR LL LR)
-  
+
   def available_motion?(motion)
     MOTIONS.include?(motion)
   end
-  
+
   def start(x, y)
     @prev_x = @x = x
     @prev_y = @y = y
     @started = true
     @motions = []
   end
-    
+
   def update_position(x, y)
     mx = x - @prev_x
     my = y - @prev_y
-    
+
     motion = judge_motion(mx, my)
     if motion
       @prev_x = @x = x
@@ -64,7 +57,7 @@ class GestureProcessor
       false
     end
   end
-    
+
   def reset
     @started = false
     @x = @y = -1
@@ -135,7 +128,7 @@ class Gesture < Gtk::EventBox
   DEFAULT_LINE_RGBA = [1, 0, 0, 1]
   DEFAULT_NEXT_RGBA = [0, 1, 0, 0.8]
   DEFAULT_CURRENT_RGBA = [1, 0, 1, 0.8]
-  
+
   def initialize(conf={})
     super()
     set_visible_window(false)
@@ -152,7 +145,7 @@ class Gesture < Gtk::EventBox
     set_button_release_event
   end
 
-  def add_action(sequence, action=Proc.new)
+  def add_action(sequence, action = proc)
     invalid_motion = sequence.find do |motion|
       not @processor.available_motion?(motion)
     end
@@ -161,7 +154,7 @@ class Gesture < Gtk::EventBox
   end
 
   def start(widget, button, x, y, base_x, base_y)
-    Gtk.grab_add(self)
+    self.grab_add
     @widget = widget
     @button = button
     @processor.start(x, y)
@@ -197,7 +190,7 @@ class Gesture < Gtk::EventBox
       end
     end.compact.uniq
   end
-    
+
   def next_available_motions
     motions = @processor.motions
     @actions.collect do |sequence, act|
@@ -208,11 +201,11 @@ class Gesture < Gtk::EventBox
       end
     end.compact.uniq
   end
-    
+
   def match?
     not action.nil?
   end
-    
+
   def set_expose_event
     signal_connect("draw") do |widget, event|
       if @processor.started?
@@ -231,7 +224,7 @@ class Gesture < Gtk::EventBox
         end
 
         @cr.stroke_preserve
-        
+
         true
       else
         false
@@ -239,7 +232,7 @@ class Gesture < Gtk::EventBox
     end
   end
 
-  def draw_mark(cr, x=nil, y=nil, radius=nil)
+  def draw_mark(cr, x = nil, y = nil, radius = nil)
     x ||= @processor.position[0]
     y ||= @processor.position[1]
     radius ||= @processor.threshold
@@ -250,7 +243,7 @@ class Gesture < Gtk::EventBox
       cr.fill
     end
   end
-  
+
   def draw_available_marks(cr, motions)
     motions.each do |motion|
       adjust_x = calc_position_ratio(motion, %w(R), %w(L), %w(UR LR), %w(UL LL))
@@ -278,7 +271,7 @@ class Gesture < Gtk::EventBox
       0
     end
   end
-  
+
   def set_motion_notify_event
     signal_connect("motion_notify_event") do |widget, event|
       if @processor.started?
@@ -301,7 +294,7 @@ class Gesture < Gtk::EventBox
   def set_button_release_event
     signal_connect("button_release_event") do |widget, event|
       if event.button == @button and @processor.started?
-        Gtk.grab_remove(self)
+        self.grab_remove
         perform_action
         hide
         true
@@ -314,8 +307,8 @@ end
 
 class GesturedWidget < Gtk::EventBox
   DEFAULT_GESTURE_BUTTON = 3
-  
-  def initialize(gesture_button=nil)
+
+  def initialize(gesture_button = nil)
     super()
     set_visible_window(false)
     @gesture_button = gesture_button || DEFAULT_GESTURE_BUTTON
@@ -346,9 +339,9 @@ class GesturedWidget < Gtk::EventBox
 end
 
 class Layout < Gtk::Layout
-  def initialize()
+  def initialize
     super()
-    @gesture = Gesture.new()
+    @gesture = Gesture.new
     put(@gesture, 0, 0)
   end
 
@@ -361,7 +354,7 @@ class Layout < Gtk::Layout
     @gesture.start(widget, button, x, y, base_x, base_y)
   end
 
-  def add_gesture_action(sequence, action=Proc.new)
+  def add_gesture_action(sequence, action = proc)
     @gesture.add_action(sequence, action)
   end
 end
@@ -405,38 +398,38 @@ layout.put(gestured_widget2, 0, 25)
 # gesture handlers
 expand_size = 20
 
-expand_left = Proc.new do |widget|
+expand_left = proc do |widget|
   x = layout.child_get_property(widget, :x)
   y = layout.child_get_property(widget, :y)
   w, h = widget.size_request
   layout.move(widget, x - expand_size, y)
   widget.set_size_request(w + expand_size, h)
 end
-  
-expand_right = Proc.new do |widget|
+
+expand_right = proc do |widget|
   x = layout.child_get_property(widget, :x)
   y = layout.child_get_property(widget, :y)
   w, h = widget.size_request
   layout.move(widget, x, y)
   widget.set_size_request(w + expand_size, h)
 end
-  
-expand_top = Proc.new do |widget|
+
+expand_top = proc do |widget|
   x = layout.child_get_property(widget, :x)
   y = layout.child_get_property(widget, :y)
   w, h = widget.size_request
   layout.move(widget, x, y - expand_size)
   widget.set_size_request(w, h + expand_size)
 end
-  
-expand_bottom = Proc.new do |widget|
+
+expand_bottom = proc do |widget|
   x = layout.child_get_property(widget, :x)
   y = layout.child_get_property(widget, :y)
   w, h = widget.size_request
   layout.move(widget, x, y)
   widget.set_size_request(w, h + expand_size)
 end
-  
+
 layout.add_gesture_action(["L"]) do |widget|
   expand_left.call(widget)
 end
@@ -458,7 +451,7 @@ end
 
 
 window.add(layout)
-window.signal_connect("destroy"){Gtk.main_quit}
+window.signal_connect("destroy") { Gtk.main_quit }
 
 window.show_all
 
diff --git a/gtk3/sample/misc/pango-layout.rb b/gtk3/sample/misc/pango-layout.rb
new file mode 100755
index 0000000..72a4414
--- /dev/null
+++ b/gtk3/sample/misc/pango-layout.rb
@@ -0,0 +1,100 @@
+#!/usr/bin/env ruby
+=begin
+  pangolayout.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2005-2015  Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+RADIUS =  80
+N_WORDS = 16
+HEIGHT = 400
+WIDTH = 400
+
+class PaintableWindow < Gtk::Window
+  attr_reader :x, :y, :width, :height
+
+  def initialize(name)
+    super(name)
+    set_app_paintable(true)
+    set_decorated(true)
+    set_default_size(WIDTH, HEIGHT)
+    signal_connect("destroy") { Gtk.main_quit }
+    set_double_buffered(false)
+
+    # Get the size attributes when the window is resized
+    signal_connect "size-allocate" do |_widget, rectangle|
+      @x = rectangle.x
+      @y = rectangle.y
+      @width = rectangle.width
+      @height = rectangle.height
+    end
+
+    signal_connect "screen-changed" do |widget, _old_screen|
+      screen_changed(widget)
+    end
+
+    screen_changed(self)
+  end
+
+  def supports_alpha?
+    @supports_alpha
+  end
+
+  private
+
+  def screen_changed(widget)
+    visual = widget.screen.rgba_visual
+    if visual && widget.screen.composited?
+      set_visual(visual)
+      @supports_alpha = true
+    else
+      set_visual(widget.screen.system_visual)
+      @supports_alpha = false
+    end
+  end
+end
+
+pangolayout = PaintableWindow.new("Pango Render")
+
+pangolayout.signal_connect "draw" do |widget, cr|
+  # Redraw on a clean destination
+  # http://cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
+  cr.set_operator(Cairo::OPERATOR_SOURCE)
+
+  if widget.supports_alpha?
+    cr.set_source_rgba(0, 0, 0, 0.3)
+  else
+    cr.set_source_rgb(1, 1, 1)
+  end
+
+  cr.paint
+
+  device_radius = [widget.width, widget.height].min / 6.0
+  cr.translate(device_radius + (widget.width - 2 * device_radius) / 2.0,
+               device_radius + (widget.height - 2 * device_radius) / 2.0)
+  cr.scale(device_radius / RADIUS, device_radius / RADIUS)
+
+  pango_layout = cr.create_pango_layout
+  pango_layout.text = "Ruby-GNOME2"
+  pango_layout.font_description = Pango::FontDescription.new("Sans Bold 14")
+
+  N_WORDS.times do |i|
+    angle = 360 * i / N_WORDS.to_f
+    cr.set_source_rgb((65_535 * rand) / 65_355,
+                      (65_535 * rand) / 65_355,
+                      (65_535 * rand) / 65_355)
+
+    cr.rotate((angle * Math::PI) / 180.0)
+    cr.update_pango_layout(pango_layout)
+    width, _height = pango_layout.size
+    cr.move_to((width / 2) / Pango::SCALE, RADIUS)
+    cr.show_pango_layout(pango_layout)
+  end
+end
+
+pangolayout.show
+
+Gtk.main
diff --git a/gtk3/sample/misc/pointer-grab.rb b/gtk3/sample/misc/pointer-grab.rb
new file mode 100644
index 0000000..841f276
--- /dev/null
+++ b/gtk3/sample/misc/pointer-grab.rb
@@ -0,0 +1,36 @@
+=begin
+  pointer_grab.rb - Gdk::Window#pointer_grab/ungrab sample script.
+
+  Copyright (C) 2001-2015 Masao Mutoh<mutoh at highway.ne.jp>
+  This program is licenced under the same licence as Ruby-GNOME.
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new("Pointer grab/ungrab sample")
+
+cursor = Gdk::Cursor.new(:watch)
+button1 = Gtk::Button.new(:label => "Grab Window!")
+button2 = Gtk::Button.new(:label => "Ungrab Window!")
+
+button1.signal_connect("clicked") do
+  Gdk.pointer_grab(window.window, true, :button_press_mask,
+                   window.window, cursor, Gdk::CURRENT_TIME)
+  p Gdk.pointer_is_grabbed?
+end
+
+button2.signal_connect("clicked") do
+  Gdk.pointer_ungrab(Gdk::CURRENT_TIME)
+  p Gdk.pointer_is_grabbed?
+end
+
+vbox = Gtk::Box.new(:vertical, 0)
+vbox.add(button1)
+vbox.add(button2)
+
+window.add(vbox)
+window.set_default_size(200, 100)
+window.show_all
+window.signal_connect("destroy") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/print.rb b/gtk3/sample/misc/print.rb
index 05ddc50..a63a834 100644
--- a/gtk3/sample/misc/print.rb
+++ b/gtk3/sample/misc/print.rb
@@ -1,245 +1,246 @@
 #!/usr/bin/env ruby
 =begin
-  print.rb - Gtk::Print* sample
+   print.rb - Gtk::Print* sample
 
-  Copyright (C) 2007 Mathieu Blondel
-  This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: print.rb,v 1.1 2007/08/05 15:41:31 mutoh Exp $
+   Copyright (C) 2007 Mathieu Blondel
+   Copyright (C) 2007-2015 Ruby-GNOME2 Project Team
+   This program is licenced under the same licence as Ruby-GNOME2.
 =end
 
-require 'gtk3'
+require "gtk3"
 
 # Values returned by a Pango::Layout or set in a Pango::Layout
 # are always multiple of Pango::SCALE. Those are convenience methods to
 # deal with that.
 class Pango::Layout
-    def size_in_points
-        self.size.collect { |v| v / Pango::SCALE }
-    end
+  def size_in_points
+    size.collect { |v| v / Pango::SCALE }
+  end
 
-    def width_in_points
-        self.size[0] / Pango::SCALE
-    end
+  def width_in_points
+    size[0] / Pango::SCALE
+  end
 
-    def height_in_points
-        self.size[1] / Pango::SCALE
-    end
+  def height_in_points
+    size[1] / Pango::SCALE
+  end
 
-    def width_in_points=(width)
-        self.width = width * Pango::SCALE
-    end
+  def width_in_points=(width)
+    self.width = width * Pango::SCALE
+  end
 end
 
 class Print < Gtk::PrintOperation
-
-    FONT = Pango::FontDescription.new("sans 12")
-    FONT_SMALL = Pango::FontDescription.new("sans 8")
-
-    FONT_SIZE = 12
-    FONT_SMALL_SIZE = 8
-
-    def initialize (parent_window, text)
-        super()
-        @parent_window = parent_window
-        @text = text
-
-        # with this option disabled, the origin is the the upper left corner
-        # *taking into consideration margins* !
-        self.use_full_page = false
-        self.unit = Gtk::PaperSize::Unit::POINTS
-
-        # set default paper size
-        page_setup = Gtk::PageSetup.new
-        paper_size = Gtk::PaperSize.new(Gtk::PaperSize.default)
-        page_setup.paper_size_and_default_margins = paper_size
-        self.default_page_setup = page_setup
-
-        # show a progress bar
-        self.show_progress = true        
-
-        # You must choose between "paginate" and "begin-print".
-        # "begin-print" is emitted only once and "paginate" is emitted
-        # until the block returns true.
-        # In both cases, you must set the number of pages at the end with
-        # Gtk::PrintOperation#n_pages=
-        signal_connect("begin-print") do |pop, context|
-            puts "calls begin-print"
-            cr = context.cairo_context
-            paragraphs = @text.split("\n")
-            layouts = []
-            paragraphs.each do |para|
-                layouts << create_layout(cr, para)
-            end
-
-            # distribute paragraph layouts among pages
-            @page_layouts = []
-
-            curr_height = 0
-            n_pages = 0
-            layouts.each do |layout|
-                height = layout.height_in_points
-                if curr_height + height > real_page_height
-                    n_pages += 1
-                    curr_height = 0
-                end
-                @page_layouts[n_pages] ||= []
-                @page_layouts[n_pages] << layout
-                curr_height += height
-            end
-
-            pop.n_pages = n_pages + 1
-        end
-
-        signal_connect("draw-page") do |pop, context, page_num|
-            puts "calls draw-page %d" % page_num
-
-            cr = context.cairo_context
-
-            x, y = [0,0] # this means we start at the upper left margin  
-
-            if @page_layouts[page_num]
-                @page_layouts[page_num].each do |layout|
-                    cr.move_to(x,y)
-                    cr.show_pango_layout(layout)            
-                    y += layout.height_in_points
-                end
-                total_pages = @page_layouts.length
-            else
-                total_pages = 1
-            end
-            
-            # page_num starts at 0
-            draw_footer(cr, page_num + 1, total_pages)
+  FONT = Pango::FontDescription.new("sans 12")
+  FONT_SMALL = Pango::FontDescription.new("sans 8")
+
+  FONT_SIZE = 12
+  FONT_SMALL_SIZE = 8
+
+  def initialize(parent_window, text)
+    super()
+    @parent_window = parent_window
+    @text = text
+
+    # with this option disabled, the origin is the the upper left corner
+    # *taking into consideration margins* !
+    self.use_full_page = false
+    self.unit = Gtk::Unit::POINTS
+
+    # set default paper size
+    page_setup = Gtk::PageSetup.new
+    paper_size = Gtk::PaperSize.new(Gtk::PaperSize.default)
+    page_setup.paper_size_and_default_margins = paper_size
+    self.default_page_setup = page_setup
+
+    # show a progress bar
+    self.show_progress = true
+
+    # You must choose between "paginate" and "begin-print".
+    # "begin-print" is emitted only once and "paginate" is emitted
+    # until the block returns true.
+    # In both cases, you must set the number of pages at the end with
+    # Gtk::PrintOperation#n_pages=
+    signal_connect("begin-print") do |pop, context|
+      puts "calls begin-print"
+      cr = context.cairo_context
+      paragraphs = @text.split("\n")
+      layouts = []
+      paragraphs.each do |para|
+        layouts << create_layout(cr, para)
+      end
+
+      # distribute paragraph layouts among pages
+      @page_layouts = []
+
+      curr_height = 0
+      n_pages = 0
+      layouts.each do |layout|
+        height = layout.height_in_points
+        if curr_height + height > real_page_height
+          n_pages += 1
+          curr_height = 0
         end
-    end
-
-    def run_print_dialog
-        res = run(Action::PRINT_DIALOG, @parent_window)
-        case res
-            when RESULT_ERROR
-                puts "error"
-            when RESULT_CANCEL
-                puts "cancelled"
-            when RESULT_APPLY
-                puts "applied"
-            when RESULT_IN_PROGRESS
-                puts "in progress"
-        end
-    end
-
-    def run_preview
-        res = run(Action::PREVIEW, @parent_window)
-    end
-
-    private
-
-    def page_height
-        setup = self.default_page_setup
-        # this takes margins into consideration, contrary to get_paper_height
-        setup.get_page_height(Gtk::PaperSize::Unit::POINTS)
-    end
+        @page_layouts[n_pages] ||= []
+        @page_layouts[n_pages] << layout
+        curr_height += height
+      end
 
-    def page_width
-        setup = self.default_page_setup
-        width = setup.get_page_width(Gtk::PaperSize::Unit::POINTS)
+      pop.n_pages = n_pages + 1
     end
 
-    def real_page_height
-        page_height - footer_height
-    end
-
-    def footer_height
-        5 * FONT_SMALL_SIZE
-    end
+    signal_connect("draw-page") do |_pop, context, page_num|
+      puts format("calls draw-page %d", page_num)
+      cr = context.cairo_context
 
-    def create_layout(cr, text)
-        layout = cr.create_pango_layout
+      x, y = [0, 0] # this means we start at the upper left margin
 
-        layout.width_in_points = page_width
-        layout.font_description = FONT
-        layout.wrap = Pango::Layout::WrapMode::CHAR
-        layout.ellipsize = Pango::Layout::ELLIPSIZE_NONE
-        layout.single_paragraph_mode = false
-
-        layout.text = text
+      if @page_layouts[page_num]
+        @page_layouts[page_num].each do |layout|
+          cr.move_to(x, y)
+          cr.show_pango_layout(layout)
+          y += layout.height_in_points
+        end
+        total_pages = @page_layouts.length
+      else
+        total_pages = 1
+      end
 
-        layout
+      # page_num starts at 0
+      draw_footer(cr, page_num + 1, total_pages)
     end
-
-    def draw_footer(cr, nth_page, total_page)        
-        layout = cr.create_pango_layout
-        layout.alignment = Pango::Layout::ALIGN_RIGHT
-        layout.font_description = FONT_SMALL
-        layout.text = "Page %d/%d" % [nth_page, total_page] + "\n" + \
-            Time.now.strftime("Printed on %Y/%m/%d at %H:%M") + "\n" + \
-                "Powered by Ruby-GNOME2!"
-        width, height = layout.size_in_points
-        x, y = [page_width, page_height]
-        x -= width
-        y -= height
-        cr.move_to(x, y)
-        cr.show_pango_layout(layout)
-        cr.rel_move_to(width, -2)
-        cr.rel_line_to(-page_width, 0)
-        cr.stroke
+  end
+
+  def run_print_dialog
+    res = run(Gtk::PrintOperationAction::PRINT_DIALOG, @parent_window)
+    case res
+    when Gtk::PrintOperationResult::ERROR
+      puts "error"
+    when Gtk::PrintOperationResult::CANCEL
+      puts "cancelled"
+    when Gtk::PrintOperationResult::APPLY
+      puts "applied"
+    when Gtk::PrintOperationResult::IN_PROGRESS
+      puts "in progress"
     end
-
+  end
+
+  def run_preview
+    res = run(Gtk::PrintOperationAction::PREVIEW, @parent_window)
+  end
+
+  private
+
+  def page_height
+    setup = default_page_setup
+    # this takes margins into consideration, contrary to get_paper_height
+    setup.get_page_height(Gtk::Unit::POINTS)
+  end
+
+  def page_width
+    setup = default_page_setup
+    width = setup.get_page_width(Gtk::Unit::POINTS)
+  end
+
+  def real_page_height
+    page_height - footer_height
+  end
+
+  def footer_height
+    5 * FONT_SMALL_SIZE
+  end
+
+  def create_layout(cr, text)
+    layout = cr.create_pango_layout
+
+    layout.width_in_points = page_width
+    layout.font_description = FONT
+    layout.wrap = Pango::Layout::WrapMode::CHAR
+    layout.ellipsize = Pango::Layout::ELLIPSIZE_NONE
+    layout.single_paragraph_mode = false
+
+    layout.text = text
+
+    layout
+  end
+
+  def draw_footer(cr, nth_page, total_page)
+    layout = cr.create_pango_layout
+    layout.alignment = Pango::Layout::ALIGN_RIGHT
+    layout.font_description = FONT_SMALL
+    layout.text = format("Page %d/%d\n%s\nPowered by Ruby-GNOME2!",
+                         nth_page, total_page,
+                         Time.now.strftime("Printed on %Y/%m/%d at %H:%M"))
+    width, height = layout.size_in_points
+    x, y = [page_width, page_height]
+    x -= width
+    y -= height
+    cr.move_to(x, y)
+    cr.show_pango_layout(layout)
+    cr.rel_move_to(width, -2)
+    cr.rel_line_to(-page_width, 0)
+    cr.stroke
+  end
 end
 
 class Window < Gtk::Window
+  def initialize
+    super
 
-    def initialize
-        super
+    signal_connect("delete-event") { Gtk.main_quit }
 
-        signal_connect("delete-event") { Gtk.main_quit }
+    set_default_size(600, 600)
 
-        set_default_size(600, 600)
+    @textview = Gtk::TextView.new
+    @textview.wrap_mode = Gtk::WrapMode::WORD
+    fill_buffer
 
-        @textview = Gtk::TextView.new
-        @textview.wrap_mode = Gtk::TextTag::WrapMode::WORD
+    hbox = Gtk::Box.new(:horizontal)
 
-        hbox = Gtk::Box.new(:horizontal)
-
-        page_setup_button = Gtk::Button.new
-        page_setup_button.label = "Page setup"
-        page_setup_button.signal_connect("clicked") do
-            @page_setup = Print::run_page_setup_dialog(self, # parent window
-                                                       @page_setup)
-        end
+    page_setup_button = Gtk::Button.new(:label => "Page setup")
+    page_setup_button.signal_connect("clicked") do
+      @page_setup = Gtk.print_run_page_setup_dialog(self, # parent window
+                                                    @page_setup)
+    end
+    print_preview_button = Gtk::Button.new(:label => "Print Preview")
+    print_preview_button.signal_connect("clicked") do
+      printop = Print.new(self, @textview.buffer.text)
+      printop.default_page_setup = @page_setup if @page_setup
+      printop.run_preview
+    end
 
-        print_preview_button = Gtk::Button.new(:stock_id => Gtk::Stock::PRINT_PREVIEW)
-        print_preview_button.signal_connect("clicked") do
-            printop = Print.new(self, @textview.buffer.text)
-            printop.default_page_setup = @page_setup if @page_setup
-            printop.run_preview
-        end
+    print_button = Gtk::Button.new(:label => "Print")
+    print_button.signal_connect("clicked") do
+      printop = Print.new(self, @textview.buffer.text)
+      printop.default_page_setup = @page_setup if @page_setup
+      printop.run_print_dialog
+    end
 
-        print_button = Gtk::Button.new(:stock_id => Gtk::Stock::PRINT)
-        print_button.signal_connect("clicked") do
-            printop = Print.new(self, @textview.buffer.text)
-            printop.default_page_setup = @page_setup if @page_setup
-            printop.run_print_dialog
-        end
+    [page_setup_button, print_preview_button, print_button].each do |b|
+      hbox.pack_start(b, :expand => true, :fill => true)  # expand, fill
+    end
 
-        [page_setup_button, print_preview_button, print_button].each do |b|
-            hbox.pack_start(b, true, true)  # expand, fill
-        end
+    vbox = Gtk::Box.new(:vertical)
+    scroll = Gtk::ScrolledWindow.new
+    @textview.show
+    scroll.add(@textview)
+    scroll.set_policy(:automatic, :automatic)
+    vbox.pack_start(scroll, :expand => true, :fill => true)
+    vbox.pack_end(hbox, :expand => false, :fill => false)
 
-        scrollbar = Gtk::Scrollbar.new(:vertical)
+    add(vbox)
 
-        vbox = Gtk::Box.new(:vertical)
-        scroll = Gtk::ScrolledWindow.new.add(@textview)        
-        scroll.set_policy(:automatic, :automatic)
-        vbox.pack_start(scroll)
-        vbox.pack_end(hbox, false, false)
+    show_all
+  end
 
-        add(vbox)
+  private
 
-        show_all
-        
+  def fill_buffer
+    open(__FILE__).read.each_line do |line|
+      @textview.buffer.insert_at_cursor(line)
     end
-
+    @textview.buffer.place_cursor(@textview.buffer.start_iter)
+  end
 end
 
 Window.new
diff --git a/gtk3/sample/misc/properties.rb b/gtk3/sample/misc/properties.rb
index d71294a..926865f 100755
--- a/gtk3/sample/misc/properties.rb
+++ b/gtk3/sample/misc/properties.rb
@@ -1,23 +1,22 @@
 #!/usr/bin/env ruby
 =begin
-  properties.rb - 
+  properties.rb -
 
   GLib::Object#properties and Gtk::Container#child_properties sample script.
 
   Copyright (C) 2004-2006 Masao Mutoh
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
 
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: properties.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 class MyButton < Gtk::Button
   type_register
 
   def initialize(label = nil)
-    # XXX: 
+    # XXX:
     # When type_register() is used.
     # super is equivalent to GLib::Object#initialize.
     super("label" => label)
@@ -30,26 +29,28 @@ class MyButton < Gtk::Button
                                         "Fuga", # nick
                                         "fuga fuga", # blurb
                                         0,     # min
-                                        10000, # max
+                                        10_000,# max
                                         0,     # default
                                         GLib::Param::READABLE |
                                         GLib::Param::WRITABLE))
 
   # define new property "hoge"
-  install_child_property(GLib::Param::Int.new("hoge", # name
-                                      "Hoge", # nick
-                                      "hoge hoge", # blurb
-                                      0,     # min
-                                      10000, # max
-                                      0,     # default
-                                      GLib::Param::READABLE |
-                                      GLib::Param::WRITABLE))
+  install_child_property(1,GLib::Param::Int.new("hoge", # name
+                                                "Hoge", # nick
+                                                "hoge hoge", # blurb
+                                                0,     # min
+                                                10_000,# max
+                                                0,     # default
+                                                GLib::Param::READABLE |
+                                                GLib::Param::WRITABLE)
+                        )
 
   # implementation of the property "fuga"
   def fuga
     puts "MyButton#fuga is called"
     @fuga
   end
+
   def fuga=(arg)
     puts "MyButton#fuga= is called"
     @fuga = arg
@@ -61,6 +62,7 @@ class MyButton < Gtk::Button
     puts "MyButton#get_hoge is called"
     @hoge
   end
+
   def set_hoge(child, arg)
     puts "MyButton#set_hoge is called"
     @hoge = arg
diff --git a/gtk3/sample/misc/radiobutton.rb b/gtk3/sample/misc/radiobutton.rb
index 95fb927..bfbba50 100644
--- a/gtk3/sample/misc/radiobutton.rb
+++ b/gtk3/sample/misc/radiobutton.rb
@@ -2,46 +2,44 @@
 =begin
   radiobutton.rb - Ruby/GTK2 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team 
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: radiobutton.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::RadioButton sample")
-window.signal_connect("destroy"){Gtk.main_quit}
+window.signal_connect("destroy") { Gtk.main_quit }
 
-box1 = Gtk::Box.new(:vertical)
-window.add(box1)
+main_vbox = Gtk::Box.new(:vertical)
+window.add(main_vbox)
 
-box2 = Gtk::Box.new(:vertical, 10)
-box2.border_width = 10
-box1.add(box2)
+top_box = Gtk::Box.new(:vertical, 10)
+top_box.border_width = 10
+main_vbox.add(top_box)
 
-button1 = Gtk::RadioButton.new("_button1")
-button2 = Gtk::RadioButton.new(button1, "_button2", false)
-button3 = Gtk::RadioButton.new(button1, Gtk::Stock::QUIT)
+button1 = Gtk::RadioButton.new(:label => "_button1", :use_underline => true)
+button2 = Gtk::RadioButton.new(:member => button1, :label => "_button2", :use_underline => false)
 
-box2.add(button1).add(button2).add(button3)
+top_box.add(button1)
+top_box.add(button2)
 
-box1.add(Gtk::Separator.new(:horizontal))
+main_vbox.add(Gtk::Separator.new(:horizontal))
 
-box2 = Gtk::Box.new(:vertical, 10)
-box2.border_width = 10
-box1.add(box2)
+bottom_box = Gtk::Box.new(:vertical, 10)
+bottom_box.border_width = 10
+main_vbox.add(bottom_box)
 
 close = Gtk::Button.new(:label => "close")
 close.signal_connect("clicked") do
   Gtk.main_quit
 end
-box2.add(close)
+
+bottom_box.add(close)
 
 close.can_default = true
 close.grab_default
 
-window.signal_connect("destroy"){Gtk.main_quit}
 window.show_all
 
 Gtk.main
diff --git a/gtk3/sample/misc/recentchooserdialog.rb b/gtk3/sample/misc/recentchooserdialog.rb
index d711363..00f0e23 100644
--- a/gtk3/sample/misc/recentchooserdialog.rb
+++ b/gtk3/sample/misc/recentchooserdialog.rb
@@ -1,22 +1,20 @@
 #!/usr/bin/env ruby
 =begin
-  recentchooserdialog.rb - Ruby/GTK2 sample script.
+  recentchooserdialog.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: recentchooserdialog.rb,v 1.2 2006/11/15 23:46:13 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 dialog = Gtk::RecentChooserDialog.new(:title => "Recent Chooser Dialog Sample",
-                                      :buttons => [[Gtk::Stock::CANCEL, Gtk::Dialog::ResponseType::CANCEL], 
-                                        [Gtk::Stock::OPEN, Gtk::Dialog::ResponseType::ACCEPT]])
+                                      :buttons => [["_Cancel", Gtk::ResponseType::CANCEL],
+                                                   ["_Accept", Gtk::ResponseType::ACCEPT]])
 
-dialog.signal_connect("response") do |widget, response|
+dialog.signal_connect("response") do |_widget, response|
   case response
-  when Gtk::Dialog::ResponseType::ACCEPT
+  when Gtk::ResponseType::ACCEPT
     info = dialog.current_item
     if info
       puts "----"
@@ -28,7 +26,7 @@ dialog.signal_connect("response") do |widget, response|
       puts info.modified
       puts info.visited
       puts info.private_hint?
-      p    info.application_info("gedit")
+      p    info.get_application_info("gedit")
       p    info.applications
       puts info.last_application
       p    info.groups
diff --git a/gtk3/sample/misc/rgtk+cairo.rb b/gtk3/sample/misc/rgtk+cairo.rb
index e11d369..75c0d6e 100755
--- a/gtk3/sample/misc/rgtk+cairo.rb
+++ b/gtk3/sample/misc/rgtk+cairo.rb
@@ -2,41 +2,40 @@
 =begin
   rgtk+cairo.rb - Ruby/GTK2 using Ruby/Cairo sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
 
   Heavily inspired from png.rb example of rcairo.
-
-  $Id: rgtk+cairo.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
-require 'cairo'
+require "gtk3"
 
-w = Gtk::Window.new.add(vb = Gtk::Box.new(:vertical))
+w = Gtk::Window.new
+w.add(vb = Gtk::Box.new(:vertical))
 vb.add(da = Gtk::DrawingArea.new)
+
 da.set_size_request(200, 200)
 
-da.signal_connect('draw') { |widget, cr|
-   # fill background with white
-   cr.set_source_rgba(1.0, 1.0, 1.0)
-   cr.paint
-
-   # create shape
-   cr.move_to(50, 50)
-   cr.curve_to(100, 25, 100, 75, 150, 50)
-   cr.line_to(150, 150)
-   cr.line_to(50, 150)
-   cr.close_path
-
-   cr.set_source_rgb(0.0, 0.0, 0.0)
-   cr.fill_preserve
-   cr.set_source_rgb(1.0, 0.0, 0.0)
-   cr.set_line_join(Cairo::LINE_JOIN_MITER)
-   cr.set_line_width(4)
-   cr.stroke
-}
-
-w.signal_connect("destroy"){Gtk.main_quit}
+da.signal_connect "draw"  do |_widget, cr|
+  # fill background with white
+  cr.set_source_rgba(1.0, 1.0, 1.0, 1.0)
+  cr.paint
+
+  # create shape
+  cr.move_to(50, 50)
+  cr.curve_to(100, 25, 100, 75, 150, 50)
+  cr.line_to(150, 150)
+  cr.line_to(50, 150)
+  cr.close_path
+
+  cr.set_source_rgb(0.0, 0.0, 0.0)
+  cr.fill_preserve
+  cr.set_source_rgb(1.0, 0.0, 0.0)
+  cr.set_line_join(Cairo::LINE_JOIN_MITER)
+  cr.set_line_width(4)
+  cr.stroke
+end
+
+w.signal_connect("destroy") { Gtk.main_quit }
 w.show_all
 Gtk.main
diff --git a/gtk3/sample/misc/scalebutton.rb b/gtk3/sample/misc/scalebutton.rb
index ccddf8b..8e10424 100644
--- a/gtk3/sample/misc/scalebutton.rb
+++ b/gtk3/sample/misc/scalebutton.rb
@@ -2,18 +2,30 @@
 =begin
   scalebutton.rb - Very simple Gtk::ScaleButton example.
 
-  Copyright (c) 2007 Ruby-GNOME2 Project Team 
+  Copyright (c) 2007-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: scalebutton.rb,v 1.1 2007/07/12 14:04:54 ggc Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new
-window.add(scale = Gtk::ScaleButton.new(Gtk::IconSize::IconSize::BUTTON))
-scale.set_icons(['gtk-goto-bottom', 'gtk-goto-top', 'gtk-execute'])
-scale.signal_connect('value-changed') { |widget, value| puts "value changed: #{value}" }
+window.set_size_request(300, 300)
+scale = Gtk::ScaleButton.new
+scale.set_value(30)
+scale.set_valign(Gtk::Align::END)
+scale.set_halign(Gtk::Align::END)
+box = Gtk::Box.new(:vertical)
+box.add(scale)
+box.vexpand = true
+box.hexpand = true
+
+window.add(box)
+# see here for an explication  on icons order
+# https://developer.gnome.org/gtk3/stable/GtkScaleButton.html#GtkScaleButton--icons
+scale.set_icons(%w(gtk-goto-bottom gtk-goto-top gtk-execute))
+scale.signal_connect("value-changed") { |_widget, value| puts "value changed: #{value}" }
+
 window.show_all
 
+window.signal_connect("destroy") { Gtk.main_quit }
 Gtk.main
diff --git a/gtk3/sample/misc/simple_window.gresource.xml b/gtk3/sample/misc/simple_window.gresource.xml
new file mode 100644
index 0000000..970381d
--- /dev/null
+++ b/gtk3/sample/misc/simple_window.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/simple_window">
+    <file>simple_window.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/misc/simple_window.ui b/gtk3/sample/misc/simple_window.ui
new file mode 100644
index 0000000..2e6ea5b
--- /dev/null
+++ b/gtk3/sample/misc/simple_window.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkWindow" id="window">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">label</property>
+        <property name="ellipsize">end</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk3/sample/misc/statusicon.rb b/gtk3/sample/misc/statusicon.rb
old mode 100644
new mode 100755
index 1661407..ac09232
--- a/gtk3/sample/misc/statusicon.rb
+++ b/gtk3/sample/misc/statusicon.rb
@@ -4,17 +4,14 @@
 
   This sample refers gtk/tests/teststatusicon.c of GTK+-2.10.x.
 
-  Copyright (c) 2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: statusicon.rb,v 1.1 2006/11/17 18:12:41 mutoh Exp $
 =end
 
 require "gtk3"
 
-if str = Gtk.check_version(3, 10, 7)
+unless Gtk::Version.or_later?(3, 10, 7)
   puts "This sample requires GTK+ 3.10.7 or later"
-  puts str
   exit
 end
 
@@ -30,7 +27,7 @@ class StatusIconSample < Gtk::StatusIcon
     signal_connect("activate") {icon_activated}
     signal_connect("popup-menu") do |w, button, activate_time|
       menu = Gtk::Menu.new
-      
+
       menuitem = Gtk::MenuItem.new("Quit")
       menuitem.signal_connect("activate") do
         set_visible(false)
@@ -70,28 +67,28 @@ class StatusIconSample < Gtk::StatusIcon
     unless @dialog
       @dialog = Gtk::MessageDialog.new(:parent => nil, :flags => 0,
                                        :type => Gtk::MessageType::QUESTION,
-                                       :buttons_type => Gtk::MessageDialog::ButtonsType::CLOSE,
+                                       :buttons_type => Gtk::ButtonsType::CLOSE,
                                        :message => "You wanna test the status icon?")
-      @dialog.window_position = Gtk::Window::Position::CENTER
-      
+      @dialog.window_position = Gtk::WindowPosition::CENTER
+
       @dialog.signal_connect("response") {@dialog.hide}
       @dialog.signal_connect("delete_event") {@dialog.hide_on_delete}
-      
-      toggle = Gtk::ToggleButton.new("_Show the icon")
+
+      toggle = Gtk::ToggleButton.new(:label => "_Show the icon", :use_underline => true)
       @dialog.child.pack_end(toggle, :expand => true, :fill => true, :padding => 6)
       toggle.active = visible?
       toggle.signal_connect("toggled") do |w|
         set_visible(w.active?)
       end
 
-      toggle = Gtk::ToggleButton.new("_Change the icon")
+      toggle = Gtk::ToggleButton.new(:label => "_Change the icon", :use_underline => true)
       @dialog.child.pack_end(toggle, :expand => true, :fill => true, :padding => 6)
       toggle.active = (@timeout != 0)
       toggle.signal_connect("toggled") do
         if @timeout and @timeout > 0
           GLib::Source.remove(@timeout)
           @timeout = 0
-        else 
+        else
           @timeout = timeout_func
         end
       end
@@ -102,5 +99,5 @@ class StatusIconSample < Gtk::StatusIcon
 end
 
 StatusIconSample.new
-  
+
 Gtk.main
diff --git a/gtk3/sample/misc/stock.rb b/gtk3/sample/misc/stock.rb
index 437081a..638ae99 100644
--- a/gtk3/sample/misc/stock.rb
+++ b/gtk3/sample/misc/stock.rb
@@ -2,26 +2,25 @@
   stock.rb - Gtk::Stock sample script.
 
   Copyright (C) 2001-2006 Masao Mutoh
+  Copyright (c) 2001-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: stock.rb,v 1.7 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::Stock sample")
-window.signal_connect("destroy"){Gtk.main_quit}
+window.signal_connect("destroy") { Gtk.main_quit }
 
 stocks = Gtk::Stock.constants.sort
 
-image = Gtk::Image.new
-label = Gtk::Label.new
-button = Gtk::Button.new("Click!")
+image = Gtk::Image.new(:stock => Gtk::Stock::OK, :size => :dialog)
+label = Gtk::Label.new("Gtk::Stock::OK")
+button = Gtk::Button.new(:label => "Click!")
 cnt = 0
 button.signal_connect("clicked") do
   stock_name = "Gtk::Stock::#{stocks[cnt]}"
   label.set_text(stock_name)
-  image.set(eval(stock_name), Gtk::IconSize::DIALOG)
+  image.set_stock(eval(stock_name))
   if cnt < stocks.size - 1
     cnt += 1
   else
@@ -29,8 +28,12 @@ button.signal_connect("clicked") do
   end
 end
 
-box = Gtk::VBox.new.add(image).add(label).add(button)
-window.add(box).set_default_size(200,200).show_all
+box = Gtk::Box.new(:vertical, 0)
+box.add(image)
+box.add(label)
+box.add(button)
+window.add(box)
+window.set_default_size(200, 200)
+window.show_all
 
 Gtk.main
-
diff --git a/gtk3/sample/misc/style-property.rb b/gtk3/sample/misc/style-property.rb
new file mode 100755
index 0000000..c9f0557
--- /dev/null
+++ b/gtk3/sample/misc/style-property.rb
@@ -0,0 +1,76 @@
+#!/usr/bin/env ruby
+=begin
+  style_property.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+class MyButton < Gtk::Button
+  type_register
+
+  def initialize(label = nil)
+    # When type_register() is used.
+    # super is equivalent to GLib::Object#initialize.
+    super("label" => label)
+  end
+
+  install_style_property(GLib::Param::Int.new("foo", # name
+                                              "Foo", # nick
+                                              "FOO", # blurb
+                                              0,     # min
+                                              100,   # max
+                                              5,     # default
+                                              GLib::Param::READABLE |
+                                              GLib::Param::WRITABLE)) do |pspec, str|
+    p pspec, str
+    str.to_i + 10  # return the converted value.
+  end
+
+  install_style_property(GLib::Param::Enum.new("bar", # name
+                                               "Bar", # nick
+                                               "BAR", # blurb
+                                               GLib::Type["GdkCursorType"], # Enum type
+                                               Gdk::CursorType::ARROW, # default
+                                               GLib::Param::READABLE |
+                                               GLib::Param::WRITABLE)) do |pspec, str|
+    p pspec, str
+    if str.strip! == "boat"
+      Gdk::Cursor::BOAT
+    else
+      pspec.default
+    end
+  end
+end
+
+provider = Gtk::CssProvider.new
+provider.load(:data => <<-CSS)
+* {
+  -MyButton-foo: 30;
+  -MyButton-bar: boat;
+}
+CSS
+
+display = Gdk::Display.default
+screen = display.default_screen
+Gtk::StyleContext.add_provider_for_screen(screen, provider, Gtk::StyleProvider::PRIORITY_USER)
+
+win = Gtk::Window.new("Custom style properties")
+b = MyButton.new("Hello")
+b.signal_connect("clicked") { Gtk.main_quit }
+
+p MyButton.style_properties
+
+win.set_default_size(100, 100)
+win.add(b)
+win.show_all
+win.signal_connect("destroy") { Gtk.main_quit }
+
+# You need to call them after "Gtk::Widget#show"
+# (Or in expose event).
+p b.style_get_property("foo")
+p b.style_get_property("bar")
+
+Gtk.main
diff --git a/gtk3/sample/misc/t-gtkplug.rb b/gtk3/sample/misc/t-gtkplug.rb
index 56b66d1..1d4f85f 100644
--- a/gtk3/sample/misc/t-gtkplug.rb
+++ b/gtk3/sample/misc/t-gtkplug.rb
@@ -1,5 +1,4 @@
 #!/usr/bin/env ruby
-
 =begin
   Sample script using Gtk::Socket and Gtk::Plug.
 
@@ -7,13 +6,11 @@
 
   Written by Alex Boussinet <mailto:dbug at wanadoo.fr> for testing purpose only.
 
-  Copyright (c) 2003-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: t-gtkplug.rb,v 1.5 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 class MyGtkPlug
   def initialize(xid, plug)
@@ -24,23 +21,23 @@ class MyGtkPlug
     else
       @window = Gtk::Plug.new(xid.to_i)
     end
-    @window.window_position = Gtk::Window::Position::CENTER
-    @window.signal_connect("delete_event"){Gtk.main_quit}
+    @window.window_position = Gtk::WindowPosition::CENTER
+    @window.signal_connect("delete_event") { Gtk.main_quit }
     @vbox = Gtk::Box.new(:vertical, 5)
     @window.add(@vbox)
     @button1 = Gtk::Button.new(:label => plug)
-    @button1.signal_connect("clicked"){ $stderr.puts plug}
+    @button1.signal_connect("clicked") { $stderr.puts plug }
     @button2 = Gtk::Button.new(:label => "Exit")
-    @button2.signal_connect("clicked"){Gtk.main_quit}
+    @button2.signal_connect("clicked") { Gtk.main_quit }
     # Exit button to test an unexpected end of child process by Gtk::Socket
-    @vbox.pack_start(@button1, true, true)
-    @vbox.pack_start(@button2, true, true)
+    @vbox.pack_start(@button1, :expand => true, :fill => true)
+    @vbox.pack_start(@button2, :expand => true, :fill => true)
     @window.show_all
   end
 end
 
 xid = nil
-ARGV.each_index { |i|
+ARGV.each_index do |i|
   arg = ARGV.at(i)
   if arg == "-x"
     if arg.length > 2
@@ -51,8 +48,8 @@ ARGV.each_index { |i|
     end
     xid = nil if xid.to_i <= 0
     ARGV.delete_at(i)
-  end 
-}
+  end
+end
 
 MyGtkPlug.new(xid, ARGV.shift)
 Gtk.main
diff --git a/gtk3/sample/misc/t-gtksocket.rb b/gtk3/sample/misc/t-gtksocket.rb
index 6ffa931..8b0a6d5 100644
--- a/gtk3/sample/misc/t-gtksocket.rb
+++ b/gtk3/sample/misc/t-gtksocket.rb
@@ -6,35 +6,35 @@
 
   Written by Alex Boussinet <mailto:dbug at wanadoo.fr> for testing purpose only.
 
-  Copyright (c) 2003-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: t-gtksocket.rb,v 1.5 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 class MyGtkSocket < Gtk::Window
   def initialize
     super("Gtk::Socket Test")
-    set_window_position(Gtk::Window::Position::CENTER)
-    signal_connect("delete_event"){Gtk::main_quit}
+    set_window_position(Gtk::WindowPosition::CENTER)
+    signal_connect("delete_event") { Gtk.main_quit }
 
     @buttons = []
-    6.times {|n|
+    6.times do |n|
       @buttons << Gtk::Button.new(:label => "Plug #{n}")
-      @buttons.last.signal_connect("clicked"){ plug(n) }
-    }
-    
-    @table = Gtk::Table.new(1, 2)
-    @table.set_size_request(320, 200)
-    add(@table)
+      @buttons.last.signal_connect("clicked") { plug(n) }
+    end
+
+    @grid = Gtk::Grid.new
+    @grid.set_row_spacing(5)
+    @grid.set_column_spacing(5)
+    add(@grid)
+
     @vbox = Gtk::Box.new(:vertical, 5)
-    @buttons.each{|b| @vbox.add(b) }
+    @buttons.each { |b| @vbox.add(b) }
     @vbox.set_size_request(150, 190)
-    @table.attach(@vbox, 0, 1, 0, 1, :fill, :fill, 5, 5)
+    @grid.attach(@vbox, 0, 0, 1, 1)
     @socket = Gtk::Socket.new
-    @table.attach(@socket, 1, 2, 0, 1, :fill, :fill, 5, 5)
+    @grid.attach(@socket, 1, 0, 1, 1)
     @socket.set_size_request(150, 150)
 
     show_all
@@ -47,12 +47,13 @@ class MyGtkSocket < Gtk::Window
       Process.kill("SIGKILL", @pid)
       Process.waitpid(@pid)
       begin
-	@table.remove(@socket) unless @socket.destroyed?
+        @grid.remove(@socket) unless @socket.destroyed?
       rescue ArgumentError
         # socket has been destroyed because child process finished unexpectedly
       end
+
       @socket = Gtk::Socket.new
-      @table.attach(@socket, 1, 2, 0, 1, :fill, :fill, 5, 5)
+      @grid.attach(@socket, 1, 0, 1, 1)
       @socket.set_size_request(150, 190)
       @socket.show
       @xid = @socket.id
diff --git a/gtk3/sample/misc/template-from-resource.rb b/gtk3/sample/misc/template-from-resource.rb
new file mode 100755
index 0000000..0baca97
--- /dev/null
+++ b/gtk3/sample/misc/template-from-resource.rb
@@ -0,0 +1,59 @@
+#!/usr/bin/env ruby
+=begin
+  template_from_resource.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+
+# The gresource file name
+gresource_bin = "#{current_path}/template.gresource"
+
+# The gresource xml file name
+# see here https://developer.gnome.org/gio/stable/GResource.html
+gresource_xml = "#{current_path}/template.gresource.xml"
+
+# Generate the resource file:
+# see here https://developer.gnome.org/gio/stable/glib-compile-resources.html
+Dir.chdir(File.dirname(gresource_xml)) do
+  system("glib-compile-resources",
+         "--target", gresource_bin,
+         File.basename(gresource_xml))
+end
+
+at_exit do
+  FileUtils.rm_f(gresource_bin)
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+class MyWindow < Gtk::Window
+  class << self
+    def init
+      set_template(:resource => "/template/template.ui")
+      bind_template_child("label")
+    end
+  end
+
+  type_register
+end
+
+window = MyWindow.new
+window.set_title "Build interface from resource"
+window.set_default_size 300, 300
+
+window.label.text = "My UI was created with Glade"
+
+window.show_all
+
+window.signal_connect "destroy" do
+  Gtk.main_quit
+  Gio::Resources.unregister(resource)
+end
+Gtk.main
diff --git a/gtk3/sample/misc/template.gresource.xml b/gtk3/sample/misc/template.gresource.xml
new file mode 100644
index 0000000..a6b9efd
--- /dev/null
+++ b/gtk3/sample/misc/template.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/template">
+    <file>template.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/misc/template.ui b/gtk3/sample/misc/template.ui
new file mode 100644
index 0000000..ac6fcef
--- /dev/null
+++ b/gtk3/sample/misc/template.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <template class="MyWindow" parent="GtkWindow">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">label</property>
+        <property name="ellipsize">end</property>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/misc/textbuffer-serialize.rb b/gtk3/sample/misc/textbuffer-serialize.rb
new file mode 100644
index 0000000..0cb760e
--- /dev/null
+++ b/gtk3/sample/misc/textbuffer-serialize.rb
@@ -0,0 +1,133 @@
+#!/usr/bin/env ruby
+=begin
+  textbuffer_serialize.rb - Ruby/GTK sample script.
+
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+unless Gtk::Version.or_later?(3, 4, 2)
+  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
+  exit
+end
+
+current_folder = ENV["HOME"] || "."
+file_name = "serialized.dat"
+
+textview = Gtk::TextView.new
+textview.set_size_request(600, 400)
+buffer = textview.buffer
+buffer.text = <<TEXT
+This is a sample script for rich text serialization/deserialization.
+
+1. Edit this text using font/color buttons.
+2. Click save button and save this text (= serialize this as rich text to a file)
+3. Click clear button and clear this text buffer.
+4. Click load button and load the file which you save (= deserialize this).
+TEXT
+
+deserialize_format = buffer.register_deserialize_tagset(nil)
+format = buffer.serialize_formats[0]
+
+window = Gtk::Window.new("Gtk::TextBuffer Serialize Demo")
+vbox = Gtk::Box.new(:vertical, 0)
+
+toolbar = Gtk::Toolbar.new
+toolbar.set_style(Gtk::ToolbarStyle::BOTH)
+button_open = Gtk::ToolButton.new(:icon_widget => nil, :label => "Deserialize from a file",:stock_id => Gtk::Stock::OPEN)
+button_open.signal_connect "clicked" do
+  dialog = Gtk::FileChooserDialog.new(:title => "Deserialize from a file",
+                                      :parent => window,
+                                      :actions => :open,
+                                      :buttons => [
+                                      [Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL],
+                                      [Gtk::Stock::OPEN, Gtk::ResponseType::ACCEPT]])
+  
+  dialog.filename = File.expand_path(file_name)
+  if dialog.run == Gtk::ResponseType::ACCEPT
+    file_name = dialog.filename
+    File.open(file_name, "rb") {|io|
+      buffer.delete(buffer.start_iter, buffer.end_iter)
+      buffer.deserialize(buffer, deserialize_format, buffer.start_iter, io.read)
+    }
+  end
+  dialog.destroy
+end
+
+button_save = Gtk::ToolButton.new(:icon_widget => nil, :label => "Serialize to a file",:stock_id => Gtk::Stock::SAVE)
+button_save.signal_connect "clicked" do 
+  dialog = Gtk::FileChooserDialog.new(:title => "Serialize to a file",
+                                      :parent => window,
+                                      :action => :save, #or Gtk::FileChooserAction::SAVE,
+                                      :buttons => [
+                                        [Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL],
+                                        [Gtk::Stock::OPEN, Gtk::ResponseType::ACCEPT]
+                                      ])
+  dialog.current_name = file_name
+  if dialog.run == Gtk::ResponseType::ACCEPT
+    file_name = dialog.filename
+    File.open(file_name, "wb") {|io|
+      data = buffer.serialize(buffer, format, buffer.start_iter, buffer.end_iter)
+      io.write(data)
+    }
+  end
+  dialog.destroy
+end
+
+button_clear = Gtk::ToolButton.new(:icon_widget => nil, :label => "Clear all",:stock_id => Gtk::Stock::CLEAR)
+button_clear.signal_connect("clicked") { buffer.delete(buffer.start_iter, buffer.end_iter) }
+toolbar.insert(button_clear, 0)
+
+button_color = Gtk::ToolButton.new(:icon_widget => nil, :label => "Color the region",:stock_id => Gtk::Stock::SELECT_COLOR)
+button_color.signal_connect "clicked" do 
+  dialog = Gtk::ColorChooserDialog.new(:title => "Color the region", :parent => window)
+  if dialog.run == Gtk::ResponseType::OK
+    bounds = buffer.selection_bounds # returns an array [Gtk::TextIter, Gtk::TextIter]
+    rgba = dialog.rgba
+    color = Gdk::Color.new(rgba.red*65535, rgba.green*65535, rgba.blue*65535)
+    tag_name = color.to_s 
+    unless tag = buffer.tag_table.lookup(tag_name)
+      tag = Gtk::TextTag.new(tag_name)
+      tag.set_foreground_gdk(color)
+    end
+    buffer.tag_table.add(tag)
+    buffer.apply_tag(tag, bounds[0], bounds[1])
+  end
+  dialog.destroy  
+end
+
+button_font = Gtk::ToolButton.new(:label => "Set a font to the region", :stock_id => Gtk::Stock::SELECT_FONT)
+button_font.signal_connect "clicked" do
+  dialog = Gtk::FontChooserDialog.new(:label => "Set font to the region", :parent => window)
+  if dialog.run == Gtk::ResponseType::OK
+    bounds = buffer.selection_bounds
+    font = dialog.font
+    unless tag = buffer.tag_table.lookup(font)
+      tag = Gtk::TextTag.new(font).set_font(font)
+    end
+    buffer.tag_table.add(tag)
+    buffer.apply_tag(tag, bounds[0], bounds[1])
+  end
+  dialog.destroy  
+end
+
+button_quit = Gtk::ToolButton.new(:label => "Quit this application", :stock_id => Gtk::Stock::QUIT)
+button_quit.signal_connect("clicked") {Gtk.main_quit}
+
+toolbar.insert(button_font, 0)
+toolbar.insert(button_color,0)
+toolbar.insert(button_open, 0)
+toolbar.insert(button_save, 0)
+toolbar.insert(button_quit, -1)
+toolbar.set_style(Gtk::ToolbarStyle::BOTH)
+vbox.pack_start(toolbar, :expand => false, :fill => false)
+vbox.pack_start(textview, :expand => true, :fill => true)
+
+window.add(vbox)
+window.show_all
+window.set_default_size 400,600
+window.signal_connect("destroy") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/threads.rb b/gtk3/sample/misc/threads.rb
old mode 100644
new mode 100755
index 9ebb596..c7f373b
--- a/gtk3/sample/misc/threads.rb
+++ b/gtk3/sample/misc/threads.rb
@@ -1,41 +1,81 @@
 #!/usr/bin/env ruby
 =begin
-  threads.rb - Ruby/GTK2 sample script.
+  threads.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2003-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: threads.rb,v 1.5 2006/06/17 13:18:12 mutoh Exp $
 =end
 
 require "gtk3"
 require "thread"
 
+class GtkJobQueue
+  def initialize
+    @queue = Queue.new
+    @worker_id = nil
+  end
+
+  def push(&job)
+    @queue << job
+    if @worker_id.nil?
+      start_worker
+    end
+  end
+
+  def stop
+    return if @worker_id.nil?
+    GLib::Source.remove(@worker_id)
+    @worker_id = nil
+  end
+
+  private
+  def start_worker
+    @worker_id = GLib::Idle.add do
+      job = @queue.pop
+      job.call
+      if @queue.empty?
+        @worker_id = nil
+        GLib::Source::REMOVE
+      else
+        GLib::Source::CONTINUE
+      end
+    end
+  end
+end
+
+job_queue = GtkJobQueue.new
+
 label = Gtk::Label.new
 
 Thread.new do
   (0...1000).each do |cnt|
     p "A:" + cnt.to_s
-    label.label = "A:" + cnt.to_s
+    job_queue.push do
+      label.label = "A:" + cnt.to_s
+    end
     sleep(2)
   end
 end
 
-start_button = Gtk::Button.new("start")
-stop_button = Gtk::Button.new("stop")
+start_button = Gtk::Button.new(:label => "start")
+stop_button = Gtk::Button.new(:label => "stop")
 
 start_button.signal_connect("clicked") do
   start_button.sensitive = false
   @th = Thread.new do
     (0...10).each do |cnt|
       p "B:" + cnt.to_s
-      label.label = "B:" + cnt.to_s
+      job_queue.push do
+        label.label = "B:" + cnt.to_s
+      end
       sleep(2)
     end
     @th = nil
-    start_button.sensitive = true
-    start_button.grab_focus
-    stop_button.sensitive = false
+    job_queue.push do
+      start_button.sensitive = true
+      start_button.grab_focus
+      stop_button.sensitive = false
+    end
   end
   stop_button.sensitive = true
   stop_button.grab_focus
@@ -54,7 +94,7 @@ end
 
 stop_button.sensitive = false
 
-box = Gtk::VBox.new
+box = Gtk::Box.new(:vertical, 0)
 box.set_size_request(100, 100)
 
 box << label << start_button << stop_button
@@ -63,8 +103,9 @@ win = Gtk::Window.new << box
 
 win.show_all.signal_connect("delete_event") do
   p "Exiting..."
+  job_queue.stop
   Gtk.main_quit
-  Thread.list.each {|t| t.kill}
+  Thread.list.each { |t| t.kill if t != Thread.main }
 end
 
 Gtk.main
diff --git a/gtk3/sample/misc/to-drawable.rb b/gtk3/sample/misc/to-drawable.rb
new file mode 100755
index 0000000..fead54c
--- /dev/null
+++ b/gtk3/sample/misc/to-drawable.rb
@@ -0,0 +1,34 @@
+#!/usr/bin/env ruby
+=begin
+  to_drawable.rb - Gdk::Pixbuf(GDK methods) sample script.
+
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+filename = "#{File.expand_path(File.dirname(__FILE__))}/gnome-logo-icon.png"
+
+window = Gtk::Window.new("Drawable sample")
+window.set_border_width(10)
+
+pixbuf = Gdk::Pixbuf.new(filename)
+
+drawing_area = Gtk::DrawingArea.new
+window.add(drawing_area)
+
+drawing_area.set_size_request(pixbuf.width + 40,
+                              pixbuf.height + 40)
+drawing_area.signal_connect("draw") do |_widget, cr|
+  cr.set_source_rgb(1, 1, 1)
+  cr.paint
+  cr.set_source_pixbuf(pixbuf, 20, 20)
+  cr.paint
+  false
+end
+
+window.show_all
+window.signal_connect("delete-event") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/misc/togglebutton.rb b/gtk3/sample/misc/togglebutton.rb
index 9087f65..6100ced 100644
--- a/gtk3/sample/misc/togglebutton.rb
+++ b/gtk3/sample/misc/togglebutton.rb
@@ -2,13 +2,11 @@
 =begin
   togglebutton.rb - Ruby/GTK sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: togglebutton.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::ToggleButton sample")
 window.border_width = 10
@@ -16,10 +14,10 @@ window.border_width = 10
 box = Gtk::Box.new(:vertical, 10)
 window.add(box)
 
-button1 = Gtk::ToggleButton.new("_button1")
-button2 = Gtk::ToggleButton.new("_button2",false)
-button3 = Gtk::ToggleButton.new(Gtk::Stock::QUIT)
-box.add(button1).add(button2).add(button3)
+button1 = Gtk::ToggleButton.new(:label => "_button1", :use_underline => true)
+button2 = Gtk::ToggleButton.new(:label => "_button2", :use_underline => false)
+box.add(button1)
+box.add(button2)
 
 box.pack_start(Gtk::Separator.new(:horizontal))
 
diff --git a/gtk3/sample/misc/toolbar.rb b/gtk3/sample/misc/toolbar.rb
index c1b01b1..c8e776d 100644
--- a/gtk3/sample/misc/toolbar.rb
+++ b/gtk3/sample/misc/toolbar.rb
@@ -1,54 +1,63 @@
 #!/usr/bin/env ruby
 =begin
-  toolbar.rb - Ruby/GTK2 sample script.
+  toolbar.rb - Ruby/GTK3 sample script.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: toolbar.rb,v 1.11 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
+test_xpm_file = "#{File.expand_path(File.dirname(__FILE__))}/test.xpm"
 window = Gtk::Window.new("Gtk::Toolbar sample")
 
 window.signal_connect("destroy") do
   Gtk.main_quit
 end
+window.set_default_size 600, 600
 
 toolbar = Gtk::Toolbar.new
 
-toolbar.append("Horizontal", "Horizontal toolbar layout", "Toolbar/Horizontal",
-  Gtk::Image.new("test.xpm")) do
-  toolbar.orientation = Gtk::ORIENTATION_HORIZONTAL
-end
-toolbar.append("Vertical", "Vertical toolbar layout", "Toolbar/Vertical",
-  Gtk::Image.new("test.xpm")) do
-  toolbar.orientation = Gtk::ORIENTATION_VERTICAL
+button_horizontal = Gtk::ToolButton.new(:icon_widget => Gtk::Image.new(:file => test_xpm_file),
+                                        :label => "Horizontal toolbar layout")
+button_horizontal.tooltip_text = "Toolbar/Horizontal"
+button_horizontal.signal_connect "clicked" do 
+  toolbar.orientation = :horizontal
 end
-toolbar.append_space
-toolbar.append("Icons", "Only show toolbar icons", "Toolbar/IconsOnly",
-  Gtk::Image.new("test.xpm")) do
-  toolbar.toolbar_style = Gtk::Toolbar::ICONS
-end
-toolbar.append("Text", "Only show toolbar text", "Toolbar/TextOnly",
-  Gtk::Image.new("test.xpm")) do
-  toolbar.toolbar_style = Gtk::Toolbar::TEXT
+
+button_vertical = Gtk::ToolButton.new(:icon_widget => Gtk::Image.new(:file => test_xpm_file),
+                                      :label => "Vertical toolbar layout")
+button_vertical.tooltip_text = "Toolbar/Vertical"
+button_vertical.signal_connect "clicked" do 
+  toolbar.orientation = :vertical
 end
-toolbar.append("Both", "Show toolbar icons and text", "Toolbar/Both",
-  Gtk::Image.new("test.xpm")) do
-  toolbar.toolbar_style = Gtk::Toolbar::BOTH
+
+button_icons_only = Gtk::ToolButton.new(:icon_widget => Gtk::Image.new(:file => test_xpm_file),
+                                        :label => "Only show toolbar icons")
+button_icons_only.tooltip_text = "Toolbar/IconsOnly"
+button_icons_only.signal_connect "clicked" do
+  toolbar.style = Gtk::ToolbarStyle::ICONS
 end
-toolbar.append_space
-toolbar.append("Enable", "Enable tooltips",nil,
-  Gtk::Image.new("test.xpm")) do
-  toolbar.tooltips = true
+
+button_text_only =  Gtk::ToolButton.new(:icon_widget => Gtk::Image.new(:file => test_xpm_file),
+                                        :label => "Only show toolbar text")
+button_text_only.tooltip_text = "Toolbar/TextOnly"
+button_text_only.signal_connect "clicked" do
+  toolbar.style = Gtk::ToolbarStyle::TEXT
 end
-toolbar.append("Disable", "Disable tooltips",nil,
-  Gtk::Image.new("test.xpm")) do
-  toolbar.tooltips = false
+
+button_both = Gtk::ToolButton.new(:icon_widget => Gtk::Image.new(:file => test_xpm_file),
+                                  :label => "Show toolbar icons and text")
+button_both.tooltip_text = "Toolbar/Both"
+button_both.signal_connect "clicked" do 
+  toolbar. style = Gtk::ToolbarStyle::BOTH
 end
 
+toolbar.insert(button_both, 0)
+toolbar.insert(button_text_only, 0)
+toolbar.insert(button_icons_only, 0)
+toolbar.insert(button_vertical, 0)
+toolbar.insert(button_horizontal, 0)
 window.add(toolbar)
 window.show_all
 
diff --git a/gtk3/sample/misc/tooltips.rb b/gtk3/sample/misc/tooltips.rb
old mode 100644
new mode 100755
index c06f957..537a9ed
--- a/gtk3/sample/misc/tooltips.rb
+++ b/gtk3/sample/misc/tooltips.rb
@@ -3,82 +3,78 @@
   tooltips.rb - Demonstrates the new tooltip API of Gtk+ 2.12;
                 rg2 translation from gtk/tests/testtooltips.c.
 
-  Copyright (c) 2007 Ruby-GNOME2 Project Team 
+  Copyright (c) 2007-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: tooltips.rb,v 1.1 2007/07/10 13:17:34 ggc Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
-if str = Gtk.check_version(2, 12, 0)
-    puts "This sample requires GTK+ 2.12.0 or later"
-    puts str
-    exit
+unless Gtk::Version.or_later?(3, 4, 2)
+  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
+  exit
 end
 
+
 def treeview_query_tooltip(treeview, keyboard_tip, x, y, tooltip)
-    if keyboard_tip
-        # Keyboard mode
-        path, = treeview.cursor
-        if not path
-            return false
-        end
-    else
-        bin_x, bin_y = treeview.convert_widget_to_bin_window_coords(x, y)
-        # Mouse mode
-        path, = treeview.get_path_at_pos(bin_x, bin_y)
-        if not path
-            return false
-        end
+  if keyboard_tip
+    # Keyboard mode
+    path, = treeview.cursor
+    if not path
+      return false
     end
-    data = treeview.model.get_value(treeview.model.get_iter(path), 0)
-    tooltip.markup = "<b>Path #{path}:</b> #{data}"
-    return true
+  else
+    bin_x, bin_y = treeview.convert_widget_to_bin_window_coords(x, y)
+    # Mouse mode
+    path = treeview.get_path_at_pos(bin_x, bin_y)
+    if not path
+      return false
+    end
+  end
+  data = treeview.model.get_value(treeview.model.get_iter(path), 0)
+  tooltip.markup = "<b>Path #{path}:</b> #{data}"
+  return true
 end
 
 def textview_query_tooltip(textview, keyboard_tip, x, y, tooltip, tag)
-    if keyboard_tip
-        iter = textview.buffer.get_iter_at_offset(textview.buffer.cursor_position)
-    else
-        bx, by = textview.window_to_buffer_coords(Gtk::TextView::WINDOW_TEXT, x, y)
-        iter, = textview.get_iter_at_position(bx, by)
-    end
-    if iter.has_tag?(tag)
-        tooltip.text = 'Tooltip on text tag'
-        return true
-    else
-        return false
-    end
+  if keyboard_tip
+    iter = textview.buffer.get_iter_at_offset(textview.buffer.cursor_position)
+  else
+    bx, by = textview.window_to_buffer_coords(Gtk::TextWindowType::TEXT, x, y)
+    iter, = textview.get_iter_at_position(bx, by)
+  end
+  if iter.has_tag?(tag)
+    tooltip.text = 'Tooltip on text tag'
+    return true
+  else
+    return false
+  end
 end
 
 def drawingarea_query_tooltip(keyboard_tip, x, y, tooltip, rectangles)
-    if keyboard_tip
-        return false
-    end
-    for r in rectangles
-        if r.x < x && x < r.x + 50 && r.y < y && y < r.y + 50
-            tooltip.markup = r.tooltip
-            return true
-        end
-    end
+  if keyboard_tip
     return false
+  end
+  for r in rectangles
+    if r.x < x && x < r.x + 50 && r.y < y && y < r.y + 50
+      tooltip.markup = r.tooltip
+      return true
+    end
+  end
+  return false
 end
 
-Gtk.init
-
-window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
+window = Gtk::Window.new(:toplevel)
 window.title = 'Tooltips test'
 window.border_width = 10
 window.signal_connect('delete-event') { Gtk.main_quit }
 
-box = Gtk::VBox.new(false, 3)
+box = Gtk::Box.new(:vertical, 3)
 window.add(box)
 
 # A check button using the tooltip-markup property
 button = Gtk::CheckButton.new('This one uses the tooltip-markup property')
 button.tooltip_text = 'Hello, I am a static tooltip.'
-box.pack_start(button, false, false, 0)
+box.pack_start(button, :expand => false, :fill => false, :padding => 0)
 
 raise if button.tooltip_text != 'Hello, I am a static tooltip.'
 raise if button.tooltip_markup != 'Hello, I am a static tooltip.'
@@ -86,18 +82,18 @@ raise if button.tooltip_markup != 'Hello, I am a static tooltip.'
 # A check button using the query-tooltip signal
 button = Gtk::CheckButton.new('I use the query-tooltip signal')
 button.has_tooltip = true
-button.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
-    tooltip.markup = widget.label
-    tooltip.set_icon_from_stock(Gtk::Stock::DELETE, Gtk::IconSize::MENU)
-    true
-}
-box.pack_start(button, false, false, 0)
+button.signal_connect 'query-tooltip' do  |widget, x, y, keyboard_tip, tooltip|
+  tooltip.markup = widget.label
+  tooltip.set_icon_from_icon_name(Gtk::Stock::DELETE, Gtk::IconSize::MENU)
+  true
+end
+box.pack_start(button, :expand => false, :fill => false, :padding => 0)
 
 # A label
 label = Gtk::Label.new('I am just a label')
 label.selectable = false
 label.tooltip_text = 'Label & and tooltip'
-box.pack_start(label, false, false, 0)
+box.pack_start(label, :expand => false, :fill => false, :padding => 0)
 
 raise if label.tooltip_text != "Label & and tooltip"
 raise if label.tooltip_markup != "Label & and tooltip"
@@ -106,99 +102,94 @@ raise if label.tooltip_markup != "Label & and tooltip"
 label = Gtk::Label.new('I am a selectable label')
 label.selectable = true
 label.tooltip_markup = '<b>Another</b> Label tooltip'
-box.pack_start(label, false, false, 0)
+box.pack_start(label, :expand => false, :fill => false, :padding => 0)
 
 raise if label.tooltip_text != 'Another Label tooltip'
 raise if label.tooltip_markup != '<b>Another</b> Label tooltip'
 
 # Another one, with a custom tooltip window
 button = Gtk::CheckButton.new('This one has a custom tooltip window!')
-box.pack_start(button, false, false, 0)
+box.pack_start(button, :expand => false, :fill => false, :padding => 0)
 
-tooltip_window = Gtk::Window.new(Gtk::Window::POPUP)
+tooltip_window = Gtk::Window.new(:popup)
 tooltip_button = Gtk::Label.new('blaat!')
 tooltip_window.add(tooltip_button)
 tooltip_button.show
 
 button.tooltip_window = tooltip_window
 button.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
-    widget.tooltip_window.modify_bg(Gtk::StateType::NORMAL, Gdk::Color.new(0, 65535, 0))
-    true
+  widget.tooltip_window.override_background_color(Gtk::StateFlags::NORMAL, Gdk::RGBA.new(0, 1, 0, 1))
+  true
 }
 button.has_tooltip = true
 
 # An insensitive button
-button = Gtk::Button.new('This one is insensitive')
+button = Gtk::Button.new(:label => 'This one is insensitive')
 button.sensitive = false
 button.tooltip_text = 'Insensitive!'
-box.pack_start(button, false, false, 0)
+box.pack_start(button, :expand => false, :fill => false, :padding => 0)
 
 # Tree view
 store = Gtk::TreeStore.new(String)
-iter = store.insert(nil, 0, ['File Manager'])
-iter = store.insert(nil, 0, ['Gossip'])
-iter = store.insert(nil, 0, ['System Settings'])
-iter = store.insert(nil, 0, ['The GIMP'])
-iter = store.insert(nil, 0, ['Terminal'])
-iter = store.insert(nil, 0, ['Word Processor'])
+["File Manager", "Gossip", "System Settings", "The GIMP", "Terminal", "Word Processor"].each do |value|
+  iter = store.insert(nil, 0)
+  store.set_value(iter,0, value)
+end
+
 treeview = Gtk::TreeView.new(store)
 treeview.set_size_request(200, 240)
 treeview.append_column(Gtk::TreeViewColumn.new('Test', Gtk::CellRendererText.new, { :text => 0 }))
 treeview.has_tooltip = true
 treeview.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
-    treeview_query_tooltip(widget, keyboard_tip, x, y, tooltip)
+  treeview_query_tooltip(widget, keyboard_tip, x, y, tooltip)
 }
 treeview.selection.signal_connect('changed') { treeview.trigger_tooltip_query }
 # Set a tooltip on the column
 column = treeview.get_column(0)
 column.clickable = true
 #column.button.tooltip_text = 'Header'   .button not available
-box.pack_start(treeview, false, false, 2)
+box.pack_start(treeview, :expand => false, :fill => false, :padding => 2)
 
 # Text view
 buffer = Gtk::TextBuffer.new
 buffer.insert(buffer.end_iter, 'Hello, the text ')
 tag = buffer.create_tag('bold', { 'weight' => Pango::WEIGHT_BOLD })
-buffer.insert(buffer.end_iter, 'in bold', tag)
+buffer.insert(buffer.end_iter, 'in bold', :tags => [tag])
 buffer.insert(buffer.end_iter, ' has a tooltip!')
 textview = Gtk::TextView.new(buffer)
 textview.set_size_request(200, 50)
 textview.has_tooltip = true
 textview.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
-    textview_query_tooltip(widget, keyboard_tip, x, y, tooltip, tag)
+  textview_query_tooltip(widget, keyboard_tip, x, y, tooltip, tag)
 }
-box.pack_start(textview, false, false, 2)
+box.pack_start(textview, :expand => false, :fill => false, :padding => 2)
 
 # Drawing area
-if Gdk.cairo_available?
-    Rectangle = Struct.new("Rectangle", :x, :y, :r, :g, :b, :tooltip)
-    rectangles = [ Rectangle.new(10, 10, 0.0, 0.0, 0.9, "Blue box!"),
-                   Rectangle.new(200, 170, 1.0, 0.0, 0.0, "Red thing"),
-                   Rectangle.new(100, 50, 0.8, 0.8, 0.0, "Yellow thing") ]
-    drawingarea = Gtk::DrawingArea.new
-    drawingarea.set_size_request(320, 240)
-    drawingarea.has_tooltip = true
-    drawingarea.signal_connect('draw') {
-        cr = drawingarea.window.create_cairo_context
-        cr.rectangle(0, 0, drawingarea.allocation.width, drawingarea.allocation.height)
-        cr.set_source_rgb(1.0, 1.0, 1.0)
-        cr.fill
-        rectangles.each { |r|
-            cr.rectangle(r.x, r.y, 50, 50)
-            cr.set_source_rgb(r.r, r.g, r.b)
-            cr.stroke
-            cr.rectangle(r.x, r.y, 50, 50)
-            cr.set_source_rgba(r.r, r.g, r.b, 0.5)
-            cr.fill
-        }
-    }
-    drawingarea.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
-        drawingarea_query_tooltip(keyboard_tip, x, y, tooltip, rectangles)
-    }
-    box.pack_start(drawingarea, false, false, 2)
-else
-    warn "Part of this sample needs Cairo support. Make sure your ruby-gtk2 is compiled with Cairo support, and rcairo is installed."
-end
+Rectangle = Struct.new("Rectangle", :x, :y, :r, :g, :b, :tooltip)
+rectangles = [ Rectangle.new(10, 10, 0.0, 0.0, 0.9, "Blue box!"),
+               Rectangle.new(200, 170, 1.0, 0.0, 0.0, "Red thing"),
+               Rectangle.new(100, 50, 0.8, 0.8, 0.0, "Yellow thing") ]
+drawingarea = Gtk::DrawingArea.new
+drawingarea.set_size_request(320, 240)
+drawingarea.has_tooltip = true
+drawingarea.signal_connect('draw') {
+  cr = drawingarea.window.create_cairo_context
+  cr.rectangle(0, 0, drawingarea.allocation.width, drawingarea.allocation.height)
+  cr.set_source_rgb(1.0, 1.0, 1.0)
+  cr.fill
+  rectangles.each { |r|
+    cr.rectangle(r.x, r.y, 50, 50)
+    cr.set_source_rgb(r.r, r.g, r.b)
+    cr.stroke
+    cr.rectangle(r.x, r.y, 50, 50)
+    cr.set_source_rgba(r.r, r.g, r.b, 0.5)
+    cr.fill
+  }
+}
+drawingarea.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
+  drawingarea_query_tooltip(keyboard_tip, x, y, tooltip, rectangles)
+}
+box.pack_start(drawingarea, :expand => false, :fill => false, :padding => 2)
 
 window.show_all
 Gtk.main
diff --git a/gtk3/sample/misc/tree-combo.rb b/gtk3/sample/misc/tree-combo.rb
new file mode 100644
index 0000000..90e203e
--- /dev/null
+++ b/gtk3/sample/misc/tree-combo.rb
@@ -0,0 +1,73 @@
+=begin
+  tree_combo.rb - Gtk::TreeView and Gtk::CellRendererCombo
+  sample script.
+
+  Copyright (C) 2006-2015 Masao Mutoh
+  Copyright (c) 2006-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+T_APPLICATION       = 0
+T_COMBO_TEXT_COLUMN = 1
+T_COMBO_MODEL       = 2
+T_COMBO_HAS_ENTRY   = 3
+T_COMBO_EDITABLE    = 4
+T_COMBO_TEXT        = 5
+
+# The COMPUTER combo model
+combo_model = Gtk::ListStore.new(String)
+
+%w(Ruby Perl Python Java).each do |v|
+  iter = combo_model.append
+  iter[0] = v
+end
+
+# The table model.
+model = Gtk::ListStore.new(String,         # T_APPLICATION
+                           Integer,        # T_COMBO_TEXT_COLUMN
+                           Gtk::ListStore, # T_COMBO_MODEL
+                           TrueClass,      # T_COMBO_HAS_ENTRY
+                           TrueClass,      # T_COMBO_EDITABLE
+                           String)         # T_COMBO_TEXT
+
+view = Gtk::TreeView.new(model)
+
+# 1st column(Text)
+trenderer = Gtk::CellRendererText.new
+tcol = Gtk::TreeViewColumn.new("Application", trenderer,
+                               :text => T_APPLICATION)
+view.append_column(tcol)
+
+# 2nd column(Combo)
+crenderer = Gtk::CellRendererCombo.new
+crenderer.signal_connect("edited") do |_renderer, path, text|
+  model.get_iter(path)[T_COMBO_TEXT] = text
+end
+
+ccol = Gtk::TreeViewColumn.new("Language", crenderer,
+                               :text_column => T_COMBO_TEXT_COLUMN,
+                               :model => T_COMBO_MODEL,
+                               :has_entry => T_COMBO_HAS_ENTRY,
+                               :editable => T_COMBO_EDITABLE,
+                               :text => T_COMBO_TEXT)
+view.append_column(ccol)
+
+# Create rows.
+(1..2).each do |v|
+  iter = model.append
+  iter[T_APPLICATION] = "application #{v}"
+  iter[T_COMBO_MODEL] = combo_model
+  iter[T_COMBO_HAS_ENTRY] = false
+  iter[T_COMBO_EDITABLE] = true
+  iter[T_COMBO_TEXT] = combo_model.get_iter("0")[0]
+end
+
+win = Gtk::Window.new
+win.signal_connect("delete_event") { Gtk.main_quit }
+
+win.add(view)
+win.show_all
+
+Gtk.main
diff --git a/gtk3/sample/misc/tree-progress.rb b/gtk3/sample/misc/tree-progress.rb
new file mode 100644
index 0000000..929b4dd
--- /dev/null
+++ b/gtk3/sample/misc/tree-progress.rb
@@ -0,0 +1,56 @@
+=begin
+  tree_progress.rb - Gtk::TreeView and Gtk::CellRendererProgress
+  sample script.
+
+  Copyright (C) 2004-2015 Darren Willis, Masao Mutoh
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+win = Gtk::Window.new("Gtk::CellRendererProgress sample")
+win.set_default_size(300, 50)
+model = Gtk::ListStore.new(String, Float)
+view = Gtk::TreeView.new(model)
+
+prog = model.append
+prog[0] = "bar 1"
+prog[1] = 50
+
+prog1 = model.append
+prog1[0] = "bar 2"
+prog1[1] = 5
+
+prog2 = model.append
+prog2[0] = "bar 3"
+prog2[1] = 10
+
+arenderer = Gtk::CellRendererText.new
+acol = Gtk::TreeViewColumn.new("words", arenderer, :text  => 0)
+view.append_column(acol)
+
+prenderer = Gtk::CellRendererProgress.new
+pcol = Gtk::TreeViewColumn.new("Progress", prenderer, :value  => 1)
+view.append_column(pcol)
+
+win.signal_connect("delete_event") do
+  Gtk.main_quit
+end
+
+win.add(view)
+win.show_all
+
+dir = 1
+GLib::Timeout.add(100) do
+  value = prog2[1] + dir
+
+  dir = - dir if value > 100
+  dir = - dir if value < 0
+
+  prog2[1] += dir
+
+  GLib::Source::CONTINUE
+end
+
+Gtk.main
diff --git a/gtk3/sample/misc/treemodelfilter.rb b/gtk3/sample/misc/treemodelfilter.rb
old mode 100644
new mode 100755
index 94d6350..e6f5ba1
--- a/gtk3/sample/misc/treemodelfilter.rb
+++ b/gtk3/sample/misc/treemodelfilter.rb
@@ -2,22 +2,24 @@
 =begin
   treemodelfilter.rb - Gtk::TreeModelFilter sample
 
-  Copyright (c) 2004,2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2004-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: treemodelfilter.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
 =end
-require 'gtk3'
+
+require "gtk3"
 
 ls = Gtk::ListStore.new(String, Integer)
 
 column1 = Gtk::TreeViewColumn.new("data1",
-				 Gtk::CellRendererText.new, {:text => 0})
+                                  Gtk::CellRendererText.new,
+                                  :text => 0)
 column2 = Gtk::TreeViewColumn.new("data2",
-				 Gtk::CellRendererText.new, {:text => 1})
+                                  Gtk::CellRendererText.new,
+                                  :text => 1)
+
+mf = Gtk::TreeModelFilter.new(:child_model => ls)
 
-mf = Gtk::TreeModelFilter.new(ls)
-mf.set_visible_func do |model, iter|
+mf.set_visible_func do |_model, iter|
   /a/ =~ iter[0]
 end
 
@@ -44,6 +46,7 @@ treeview.append_column(column2)
 end
 
 win = Gtk::Window.new("Gtk::TreeModelFilter sample")
-win.signal_connect("destroy"){Gtk.main_quit}
-win.add(treeview).show_all.signal_connect("destroy"){Gtk.main_quit}
+win.signal_connect("destroy") { Gtk.main_quit }
+win.add(treeview)
+win.show_all
 Gtk.main
diff --git a/gtk3/sample/misc/treeview.rb b/gtk3/sample/misc/treeview.rb
index 00aa4ef..dcd29b6 100644
--- a/gtk3/sample/misc/treeview.rb
+++ b/gtk3/sample/misc/treeview.rb
@@ -2,47 +2,43 @@
 =begin
   treeview.rb - Gtk::TreeView sample
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: treeview.rb,v 1.8 2006/06/17 13:18:12 mutoh Exp $
 =end
 
-require 'gtk3'
-
+require "gtk3"
 window = Gtk::Window.new("Gtk::TreeView sample")
 
 # Create data
-model = Gtk::TreeStore.new(String, String, Gdk::Color, Float, Gdk::Pixbuf)
+model = Gtk::TreeStore.new(String, String, Gdk::RGBA, Float, Gdk::Pixbuf)
 
 # column 1
 root_iter = model.append(nil)
 root_iter[0] = "Root"
 root_iter[1] = "red"
-root_iter[2] = Gdk::Color.new(0, 65535, 0)
+root_iter[2] = Gdk::RGBA.new(0, 1, 0, 1)
 root_iter[3] = 5.0
- 
+
 # column 2
-root_iter[4] = window.render_icon_pixbuf(Gtk::Stock::NEW, Gtk::IconSize::IconSize::DIALOG)
+root_iter[4] = window.render_icon_pixbuf(Gtk::Stock::NEW, Gtk::IconSize::DIALOG)
 
 child_iter1 = model.append(root_iter)
 child_iter1[0] = "Child_Iter1"
 child_iter1[1] = "green"
-child_iter1[2] = Gdk::Color.new(65535, 0, 0)
+child_iter1[2] = Gdk::RGBA.new(1, 0, 0, 1)
 child_iter1[3] = 3.0
 
 # column 2
-child_iter1[4] = window.render_icon_pixbuf(Gtk::Stock::OPEN, Gtk::IconSize::IconSize::MENU)
+child_iter1[4] = window.render_icon_pixbuf(Gtk::Stock::OPEN, Gtk::IconSize::MENU)
 
 child_iter2 = model.append(root_iter)
 child_iter2[0] = "Child_Iter2"
 child_iter2[1] = "yellow"
-child_iter2[2] = Gdk::Color.new(0, 0, 65535)
+child_iter2[2] = Gdk::RGBA.new(0, 0, 1, 1)
 child_iter2[3] = 0.9
 
 # column 2
-child_iter2[4] = window.render_icon_pixbuf(Gtk::Stock::QUIT, Gtk::IconSize::IconSize::BUTTON)
-
+child_iter2[4] = window.render_icon_pixbuf(Gtk::Stock::QUIT, Gtk::IconSize::BUTTON)
 
 # Create view
 tv = Gtk::TreeView.new(model)
@@ -50,22 +46,24 @@ tv = Gtk::TreeView.new(model)
 # column 1
 renderer = Gtk::CellRendererText.new
 column = Gtk::TreeViewColumn.new("Gtk::CellRenderText", renderer, {
-                                   :text => 0, 
+                                   :text => 0,
                                    :background => 1,
-                                   :foreground_gdk => 2,
-                                   :scale => 3,
+                                   :foreground_rgba => 2,
+                                   :scale => 3
                                  })
 tv.append_column(column)
 
 # column 2
 renderer = Gtk::CellRendererPixbuf.new
 column = Gtk::TreeViewColumn.new("Gtk::CellRenderPixbuf", renderer, {
-                                   :pixbuf => 4 
+                                   :pixbuf => 4
                                  })
 
 tv.append_column(column)
 
-window.add(tv).set_default_size(300, 300).show_all
-window.signal_connect("destroy"){Gtk.main_quit}
+window.add(tv)
+window.set_default_size(300, 300)
+window.show_all
+window.signal_connect("destroy") { Gtk.main_quit }
 
 Gtk.main
diff --git a/gtk3/sample/misc/window.rb b/gtk3/sample/misc/window.rb
index 3ae373a..87ead86 100644
--- a/gtk3/sample/misc/window.rb
+++ b/gtk3/sample/misc/window.rb
@@ -2,13 +2,11 @@
 =begin
   window.rb - Gtk::Window sample.
 
-  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
+  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
   This program is licenced under the same licence as Ruby-GNOME2.
-
-  $Id: window.rb,v 1.9 2006/10/21 16:58:00 mutoh Exp $
 =end
 
-require 'gtk3'
+require "gtk3"
 
 window = Gtk::Window.new("Gtk::Window sample")
 window.signal_connect("destroy"){Gtk.main_quit}
diff --git a/gtk3/sample/misc/xbm-cursor.rb b/gtk3/sample/misc/xbm-cursor.rb
new file mode 100644
index 0000000..74d0169
--- /dev/null
+++ b/gtk3/sample/misc/xbm-cursor.rb
@@ -0,0 +1,86 @@
+=begin
+  xbm_cursor.rb - Gdk::Cursor sample script.
+
+  Copyright (C) 2001-2006 Masao Mutoh
+  Copyright (c) 2001-2015 Ruby-GNOME2 Project Team
+  This program is licenced under the same licence as Ruby-GNOME2.
+=end
+
+require "gtk3"
+
+window = Gtk::Window.new("xbm Cursor example")
+window.signal_connect("destroy") { Gtk.main_quit }
+
+width = 19
+height = 19
+format = Cairo::FORMAT_A1
+stride = Cairo::Format.stride_for_width(format, width)
+
+cursor_xbm_data = [
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0xf0, 0x3f, 0x00, 0xe0, 0x78, 0x00, 0xe0, 0x70, 0x00, 0xe0, 0x70, 0x00,
+  0xe0, 0x38, 0x00, 0xe0, 0x1f, 0x00, 0xe0, 0x1d, 0x00, 0xe0, 0x38, 0x00,
+  0xe0, 0x78, 0x00, 0xe0, 0xf0, 0x00, 0xf0, 0xf3, 0x01, 0xf0, 0xe3, 0x01,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].pack("C*")
+
+cursor_mask_xbm_data = [
+  0x63, 0x8e, 0x0f, 0x67, 0x8e, 0x0f, 0x06, 0xc6, 0x07, 0x04, 0x00, 0x00,
+  0xf0, 0x3f, 0x08, 0xe7, 0x78, 0x0e, 0xe7, 0x70, 0x0f, 0xe4, 0x70, 0x03,
+  0xe0, 0x38, 0x00, 0xe7, 0x1f, 0x0c, 0xe7, 0x1d, 0x0f, 0xe0, 0x38, 0x0e,
+  0xe0, 0x78, 0x08, 0xe7, 0xf0, 0x00, 0xf7, 0xf3, 0x01, 0xf0, 0xe3, 0x01,
+  0x04, 0x00, 0x00, 0x46, 0x24, 0x06, 0x67, 0x66, 0x0e, 0x67, 0x66, 0x0e
+].pack("C*")
+
+background_color = [0, 1, 0, 1]
+foreground_color = [1, 0, 0, 1]
+
+def xbm_data_to_cairo_data(data, width, stride)
+  n_bytes_per_row = (width / 8.0).ceil
+
+  cairo_data_bytes = []
+  data.unpack("C*").each_slice(n_bytes_per_row) do |row|
+    row.each do |byte|
+      cairo_data_bytes << byte
+    end
+    (stride - n_bytes_per_row).times do
+      cairo_data_bytes << 0b0
+    end
+  end
+  cairo_data_bytes.pack("C*")
+end
+
+cursor_data = xbm_data_to_cairo_data(cursor_xbm_data,
+                                     width, stride)
+
+cursor_mask_data = xbm_data_to_cairo_data(cursor_mask_xbm_data,
+                                          width, stride)
+
+source = Cairo::ImageSurface.new(cursor_data, format, width, height, stride)
+mask = Cairo::ImageSurface.new(cursor_mask_data, format, width, height, stride)
+
+# Append mask on the source
+Cairo::Context.new(source) do |context|
+  context.mask(mask, 0, 0)
+end
+
+# Convert the xbm FORMAT_A1 to FORMAT_ARGB32
+cursor_surface = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32, width, height)
+Cairo::Context.new(cursor_surface) do |context|
+  context.set_source(*background_color)
+  context.paint
+  context.set_source(*foreground_color)
+  context.mask(source, 0, 0)
+end
+
+offset_x = 10
+offset_y = 10
+
+cursor = Gdk::Cursor.new(cursor_surface, offset_x, offset_y)
+window.realize
+window.window.set_cursor(cursor)
+window.add(Gtk::Label.new("Put your cursor on this window."))
+window.set_default_size(200, 100)
+window.show_all
+
+Gtk.main
diff --git a/gtk3/sample/tutorial/README.md b/gtk3/sample/tutorial/README.md
new file mode 100644
index 0000000..f73ce09
--- /dev/null
+++ b/gtk3/sample/tutorial/README.md
@@ -0,0 +1,338 @@
+# Getting started with GTK+ with the ruby-gnome2 Gtk3 module.
+
+This is a ruby adaptation of the official tutorial for the C language that you can find at https://developer.gnome.org/gtk3/stable/gtk-getting-started.html.
+
+GTK+ is a widget toolkit. Each user interface created by GTK+ consists of widgets. The Gtk3 module of the ruby-gnome2 project is an implementation of the ruby bindings for GTK+.
+
+With Gtk3, Widgets are organized in a hierachy. The Gtk::Window widget is the main container. The user interface is then built by adding buttons, drop-down menus, input fields, and other widgets to the window.
+
+If you are creating complex user interfaces it is recommended to use Gtk::Builder and its GTK-specific markup description language, instead of assembling the interface manually. You can also use a visual user interface editor, like Glade.
+
+GTK+ is event-driven. The toolkit listens for events such as a click on a button, and passes the event to your application.
+
+Here is the most basic example that illustrate the principles of widget hierarchy and events management:
+
+```ruby
+require "gtk3"
+
+window = Gtk::Window.new("First example")
+window.set_request_size(400, 400)
+window.set_border_width(10)
+
+button = Gtk::Button.new(:label => "Say hello")
+button.signal_connect "clicked" do |_widget|
+  puts "Hello World!!"
+end
+
+window.add(button)
+window.signal_connect("delete-event") { |_widget| Gtk.main_quit }
+window.show_all
+
+Gtk.main
+```
+This tutorial will mainly be focused on the use of Gtk::Application, which is the best way to create an application.
+
+## Basics
+https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.5
+
+To begin our introduction to GTK, we'll start with a simple signal-based Gtk application. This program will create an empty 200 × 200 pixel window.
+
+*    example-0.rb
+```ruby
+require "gtk3"
+
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_default_size(200, 200)
+  window.show_all
+end
+
+puts app.run
+
+```
+When creating a Gtk::Application you need to pick an application identifier (a name) and input to `Gtk::Application#new` as parameter. For this example *org.gtk.example* is used but for choosing an identifier for your application see this [guide](https://wiki.gnome.org/HowDoI/ChooseApplicationID).
+Lastly `Gtk::Application#new` takes a `Gio::ApplicationFlags` constants as input for your application, if your application would have special needs (those constants can be replaced by theirs respective symbol ie. `Gio::ApplicationFlags::NONE` == `:flags_none`).
+
+Next we add instructions for the "activate" event of the `Gtk::Application` instance we created. The activate signal will be sent when your application is launched with the method `Gtk::Application#run` on the line below. This method also takes as arguments a ruby array of string. This allows GTK+ to parse specific command line arguments that control the behavior of GTK+ itself. The parsed arguments will be removed from the array, leaving the unrecognized ones for your application to parse.
+
+Inside the "activate" event block, we want to construct our GTK window, so that a window is shown when the application is launched. The call to `Gtk::ApplicationWindow#new` will create a new `Gtk::Window`. The window will have a frame, a title bar, and window controls depending on the platform.
+
+A window title is set using `Gtk::Window#set_title`. This function takes a string as input. Finally the window size is set using `Gtk::Window#set_default_size` and the window is then shown by GTK via `Gtk::Widget#show_all`.
+
+When you exit the window, by for example pressing the X, the `Gtk::Application#run` in the main loop returns with a number which is the exit status.
+
+While the program is running, GTK+ is receiving *events*. These are typically input events caused by the user interacting with your program, but also things like messages from the window manager or other applications. GTK+ processes these and as a result, signals may be emitted on your widgets. Connecting handlers for these signals is how you normally make your program do something in response to user input.
+The following example is slightly more complex, and tries to showcase some of the capabilities of GTK+.
+
+In the long tradition of programming languages and libraries, it is called *Hello, World*.
+*    example-1.rb
+```ruby
+require "gtk3"
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_default_size(200, 200)
+
+  button_box = Gtk::ButtonBox.new(:horizontal)
+  window.add(button_box)
+
+  button = Gtk::Button.new(label: "Hello World")
+  button.signal_connect "clicked" do |widget|
+    puts "Hello World"
+    window.destroy
+  end
+
+  button_box.add(button)
+
+  window.show_all
+end
+
+# Gtk::Application#run need C style argv ([prog, arg1, arg2, ...,argn]).
+# The ARGV ruby variable only contains the arguments ([arg1, arg2, ...,argb])
+# and not the program name. We have to add it explicitly.
+
+puts app.run([$0] + ARGV)
+```
+As seen above, example-1.rb builds further upon example-0.rb by adding a button to our window, with the label "Hello World". Two new variables are created to accomplish this, button and button_box.
+
+The button_box variable stores a `Gtk::ButtonBox` object, which is GTK+'s way of controlling the size and layout of buttons. The `Gtk::ButtonBox` is created with the method `Gtk::ButtonBox#new` which takes a `Gtk::Orientation `constant as parameter or the related symbols (`:vertical` or `:horizontal`).
+
+The buttons which this box will contain can either be stored horizontally or vertically but this does not matter in this particular case as we are dealing with only one button. After initializing button_box with horizontal orientation, the code adds the button_box widget to the window widget using `Gtk::ButtonBox#add`.
+
+Next the button variable is initialized in similar manner. The method `Gtk::Button#new` is called which returns a GtkButton to be stored inside button. A label is set using a ruby hash as argument :`:label => "Hello World"`.
+
+Afterwards button is added to our button_box. Using the method "Gtk::Button#signal_connect" we add instructions, so that when the button is clicked, a message will be displayed in the terminal if the GTK application was started from one.
+
+After that, `Gtk::Window#destroy` is called. This method is herited from `Gtk::Widget`. This has the effect that when the button is clicked, the whole GTK window is destroyed. More information about creating buttons can be found [here](https://wiki.gnome.org/HowDoI/Buttons).
+The rest of the code in example-1.rb is identical to example-0.rb. Next section will elaborate further on how to add several GtkWidgets to your GTK application.
+
+## Packing
+https://developer.gnome.org/gtk3/stable/ch01s02.html
+
+When creating an application, you'll want to put more than one widget inside a window. When you want to put more than one widget into a window, it it becomes important to control how each widget is positioned and sized. This is where packing comes in.
+
+GTK+ comes with a large variety of layout containers whose purpose it is to control the layout of the child widgets that are added to them. See [Layout Containers](https://developer.gnome.org/gtk3/stable/LayoutContainers.html) for an overview.
+
+The following example shows how the `Gtk::Grid` container lets you arrange several buttons:
+*    example-2.rb
+
+```ruby
+require "gtk3"
+
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  # create a new window, and set its title
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_border_width(10)
+
+  # Here we construct the container that is going pack our buttons 
+  grid = Gtk::Grid.new
+
+  # Pack the container in the window
+  window.add(grid)
+
+  button = Gtk::Button.new(:label => "Button 1")
+  button.signal_connect("clicked") { puts "Hello World" }
+  # Place the first button in the grid cell (0, 0), and make it fill
+  # just 1 cell horizontally and vertically (ie no spanning)
+  grid.attach(button, 0, 0, 1, 1)
+
+  button = Gtk::Button.new(:label => "Button 2")
+  button.signal_connect("clicked") { puts "Hello World" }
+  # Place the second button in the grid cell (1, 0), and make it fill
+  # just 1 cell horizontally and vertically (ie no spanning)
+  grid.attach(button, 1, 0, 1, 1)
+
+  button = Gtk::Button.new(:label => "Quit")
+  button.signal_connect("clicked") { window.destroy }
+  # Place the Quit button in the grid cell (0, 1), and make it
+  # span 2 columns.
+  grid.attach(button, 0, 1, 2, 1)
+
+  # Now that we are done packing our widgets, we show them all
+  # in one go, by calling Gtk::Widget#show_all on the window.
+  # This call recursively calls Gtk::Widget#show on all widgets
+  # that are contained in the window, directly or indirectly
+  window.show_all
+end
+
+# Gtk::Application#run need C style argv ([prog, arg1, arg2, ...,argn]).
+# The ARGV ruby variable only contains the arguments ([arg1, arg2, ...,argb])
+# and not the program name. We have to add it explicitly.
+
+status = app.run([$0] + ARGV)
+
+puts status
+```
+## Building user interfaces
+https://developer.gnome.org/gtk3/stable/ch01s03.html
+
+When construcing a more complicated user interface, with dozens or hundreds of widgets, doing all the setup work in code is cumbersome, and making changes becomes next to impossible.
+Thankfully, GTK+ supports the separation of user interface layout from your business logic, by using UI descriptions in an XML format that can be parsed by the `Gtk::Builder` class.
+
+*    example-4.rb : Packing buttons with GtkBuilder
+
+```ruby
+require "gtk3"
+
+builder_file = "#{File.expand_path(File.dirname(__FILE__))}/builder.ui"
+
+# Construct a Gtk::Builder instance and load our UI description
+builder = Gtk::Builder.new(:file => builder_file)
+
+# Connect signal handlers to the constructed widgets
+window = builder.get_object("window")
+window.signal_connect("destroy") { Gtk.main_quit }
+
+button = builder.get_object("button1")
+button.signal_connect("clicked") { puts "Hello World" }
+
+button = builder.get_object("button2")
+button.signal_connect("clicked") { puts "Hello World" }
+
+button = builder.get_object("quit")
+button.signal_connect("clicked") { Gtk.main_quit }
+
+Gtk.main
+```
+
+Here is the "builder.ui" file that describes the interface:
+
+```xml
+<interface>
+  <object id="window" class="GtkWindow">
+    <property name="visible">True</property>
+    <property name="title">Grid</property>
+    <property name="border-width">10</property>
+    <child>
+      <object id="grid" class="GtkGrid">
+        <property name="visible">True</property>
+        <child>
+          <object id="button1" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 1</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="button2" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 2</property>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="quit" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Quit</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">1</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+      </packing>
+    </child>
+  </object>
+</interface>
+```
+
+The usage of the `Gtk::Builder` is really easy, we just create an instance from the
+file "builder.ui" with `Gtk::Builder.new(:file => builder_file)`. Then you can access every widget or part of the interface thanks to its name: `window = builder.get_object("window")`. Note that `Gtk::Builder` can also be used to construct objects that are not widgets, such as tree models, adjustments, etc.
+
+The XML definition of the interface can be loaded from a file, a string or a path in a gresource binary. More informations related to this XML definition can be found [here](https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI). Those files are generally built with [glade](https://glade.gnome.org/). 
+
+
+## Building applications
+
+### A trivial application
+https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5
+
+*    exampleapp1/exampleapp.rb
+```ruby
+require "gtk3"
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+
+  def open(file)
+    
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+    signal_connect "open" do |application, files, hin|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+        
+      win.present
+    end
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$0]+ARGV)
+```
+
+In this example we create a subclass of `Gtk::Application` called ExampleApp. In the `ExampleApp#initialize` method, we add instructions for two signals *activate* and *open*. Every `Gtk::Application` object or its subclass object can react to 4 signals:
+
+*    startup : sets up the application when it first start
+*    shutdown : preforms shutdown tasks
+*    activate : shows the default first window of the application
+*    open : opens files and shows them in a new window
+
+For more informations, see [here](https://wiki.gnome.org/HowDoI/GtkApplication).
+In this case, the signal "*activate*" will be triggered if no arguments are given to the `ExampleApp#run` method. And a default window will be created and will be presented to the user ( [see](https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-present).
+
+If file names are given to the `ExampleApp#run` method, then it is the "*open*" signal that is called.
+Trought this event, you can manage the files that are stored in an array of `Gio::File` objects.
+
+In this example, each files are used by an `ExampleAppWindow#open` method. The `ExampleAppWindow` class is derived from the `Gtk::ApplicationWindow`.
+
+This does not look very impressive yet, but our application is already presenting itself on the session bus, and it accepts files as commandline arguments.
+
+
+### Populating the window
+https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.6
+
+*    exampleapp2/exampleapp.rb
+
+### Opening files
+https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.7
+
+*    exampleapp3/exampleapp.rb
+
+### An application menu
+https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.8
+
+*    exampleapp4/exampleapp.rb
diff --git a/gtk3/sample/tutorial/builder.ui b/gtk3/sample/tutorial/builder.ui
new file mode 100644
index 0000000..aa553eb
--- /dev/null
+++ b/gtk3/sample/tutorial/builder.ui
@@ -0,0 +1,66 @@
+<!--
+  Copyright (C) 2015  Ruby-GNOME2 Project Team
+
+  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  Original:
+    * URL: https://git.gnome.org/browse/gtk+/tree/examples/builder.ui
+    * License: LGPL 2
+-->
+<interface>
+  <object id="window" class="GtkWindow">
+    <property name="visible">True</property>
+    <property name="title">Grid</property>
+    <property name="border-width">10</property>
+    <child>
+      <object id="grid" class="GtkGrid">
+        <property name="visible">True</property>
+        <child>
+          <object id="button1" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 1</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="button2" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Button 2</property>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object id="quit" class="GtkButton">
+            <property name="visible">True</property>
+            <property name="label">Quit</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">1</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/gtk3/sample/tutorial/example-0.rb b/gtk3/sample/tutorial/example-0.rb
new file mode 100644
index 0000000..6ee4e78
--- /dev/null
+++ b/gtk3/sample/tutorial/example-0.rb
@@ -0,0 +1,32 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/window-default.c
+#   * License: LGPL 2
+
+require "gtk3"
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_default_size(200, 200)
+  window.show_all
+end
+
+puts app.run
+
diff --git a/gtk3/sample/tutorial/example-1.rb b/gtk3/sample/tutorial/example-1.rb
new file mode 100644
index 0000000..7aa8748
--- /dev/null
+++ b/gtk3/sample/tutorial/example-1.rb
@@ -0,0 +1,47 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/hello-world.c
+#   * License: LGPL 2
+
+require "gtk3"
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_default_size(200, 200)
+
+  button_box = Gtk::ButtonBox.new(:horizontal)
+  window.add(button_box)
+
+  button = Gtk::Button.new(label: "Hello World")
+  button.signal_connect "clicked" do |widget|
+    puts "Hello World"
+    window.destroy
+  end
+
+  button_box.add(button)
+
+  window.show_all
+end
+
+# Gtk::Application#run need C style argv ([prog, arg1, arg2, ...,argn]).
+# The ARGV ruby variable only contains the arguments ([arg1, arg2, ...,argb])
+# and not the program name. We have to add it explicitly.
+
+puts app.run([$0] + ARGV)
diff --git a/gtk3/sample/tutorial/example-2.rb b/gtk3/sample/tutorial/example-2.rb
new file mode 100644
index 0000000..3413529
--- /dev/null
+++ b/gtk3/sample/tutorial/example-2.rb
@@ -0,0 +1,68 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/grid-packing.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+app = Gtk::Application.new("org.gtk.example", :flags_none)
+
+app.signal_connect "activate" do |application|
+  # create a new window, and set its title
+  window = Gtk::ApplicationWindow.new(application)
+  window.set_title("Window")
+  window.set_border_width(10)
+
+  # Here we construct the container that is going pack our buttons 
+  grid = Gtk::Grid.new
+
+  # Pack the container in the window
+  window.add(grid)
+
+  button = Gtk::Button.new(:label => "Button 1")
+  button.signal_connect("clicked") { puts "Hello World" }
+  # Place the first button in the grid cell (0, 0), and make it fill
+  # just 1 cell horizontally and vertically (ie no spanning)
+  grid.attach(button, 0, 0, 1, 1)
+
+  button = Gtk::Button.new(:label => "Button 2")
+  button.signal_connect("clicked") { puts "Hello World" }
+  # Place the second button in the grid cell (1, 0), and make it fill
+  # just 1 cell horizontally and vertically (ie no spanning)
+  grid.attach(button, 1, 0, 1, 1)
+
+  button = Gtk::Button.new(:label => "Quit")
+  button.signal_connect("clicked") { window.destroy }
+  # Place the Quit button in the grid cell (0, 1), and make it
+  # span 2 columns.
+  grid.attach(button, 0, 1, 2, 1)
+
+  # Now that we are done packing our widgets, we show them all
+  # in one go, by calling Gtk::Widget#show_all on the window.
+  # This call recursively calls Gtk::Widget#show on all widgets
+  # that are contained in the window, directly or indirectly
+  window.show_all
+end
+
+# Gtk::Application#run need C style argv ([prog, arg1, arg2, ...,argn]).
+# The ARGV ruby variable only contains the arguments ([arg1, arg2, ...,argb])
+# and not the program name. We have to add it explicitly.
+
+status = app.run([$0] + ARGV)
+
+puts status
diff --git a/gtk3/sample/tutorial/example-4.rb b/gtk3/sample/tutorial/example-4.rb
new file mode 100644
index 0000000..a3bd241
--- /dev/null
+++ b/gtk3/sample/tutorial/example-4.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/builder.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+builder_file = "#{File.expand_path(File.dirname(__FILE__))}/builder.ui"
+
+# Construct a Gtk::Builder instance and load our UI description
+builder = Gtk::Builder.new(:file => builder_file)
+
+# Connect signal handlers to the constructed widgets
+window = builder.get_object("window")
+window.signal_connect("destroy") { Gtk.main_quit }
+
+button = builder.get_object("button1")
+button.signal_connect("clicked") { puts "Hello World" }
+
+button = builder.get_object("button2")
+button.signal_connect("clicked") { puts "Hello World" }
+
+button = builder.get_object("quit")
+button.signal_connect("clicked") { Gtk.main_quit }
+
+Gtk.main
diff --git a/gtk3/sample/tutorial/exampleapp.desktop b/gtk3/sample/tutorial/exampleapp.desktop
new file mode 100644
index 0000000..25016a7
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Example
+Icon=exampleapp
+StartupNotify=true
+Exec=exampleapp.rb
diff --git a/gtk3/sample/tutorial/exampleapp.png b/gtk3/sample/tutorial/exampleapp.png
new file mode 100644
index 0000000..8beb54e
Binary files /dev/null and b/gtk3/sample/tutorial/exampleapp.png differ
diff --git a/gtk3/sample/tutorial/exampleapp1/exampleapp.rb b/gtk3/sample/tutorial/exampleapp1/exampleapp.rb
new file mode 100644
index 0000000..6136a5b
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp1/exampleapp.rb
@@ -0,0 +1,57 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+
+  def open(file)
+    
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+    signal_connect "open" do |application, files, hin|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+        
+      win.present
+    end
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run
diff --git a/gtk3/sample/tutorial/exampleapp2/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp2/exampleapp.gresource.xml
new file mode 100644
index 0000000..175264c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp2/exampleapp.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp2/exampleapp.rb b/gtk3/sample/tutorial/exampleapp2/exampleapp.rb
new file mode 100644
index 0000000..5bfc198
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp2/exampleapp.rb
@@ -0,0 +1,87 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+at_exit do
+  FileUtils.rm_f(gresource_bin)
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+  end
+
+  def open(file)
+    
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hin|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+        
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run
diff --git a/gtk3/sample/tutorial/exampleapp2/window.ui b/gtk3/sample/tutorial/exampleapp2/window.ui
new file mode 100644
index 0000000..6b37e86
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp2/window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp3/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp3/exampleapp.gresource.xml
new file mode 100644
index 0000000..175264c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp3/exampleapp.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp3/exampleapp.rb b/gtk3/sample/tutorial/exampleapp3/exampleapp.rb
new file mode 100644
index 0000000..902efd2
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp3/exampleapp.rb
@@ -0,0 +1,106 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+at_exit do
+  FileUtils.rm_f(gresource_bin)
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  # https://github.com/ruby-gnome2/ruby-gnome2/pull/445
+  # https://github.com/ruby-gnome2/ruby-gnome2/issues/503
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+  end
+
+  def open(file)
+    basename = file.basename
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+    stack.add_titled(scrolled, basename, basename)
+    stream = file.read
+    view.buffer.text = stream.read
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hint|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+        
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+# Gtk::Application#run need C style argv ([prog, arg1, arg2, ...,argn]).
+# The ARGV ruby variable only contains the arguments ([arg1, arg2, ...,argb])
+# and not the program name. We have to add it explicitly.
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp3/window.ui b/gtk3/sample/tutorial/exampleapp3/window.ui
new file mode 100644
index 0000000..6b37e86
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp3/window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp4/app-menu.ui b/gtk3/sample/tutorial/exampleapp4/app-menu.ui
new file mode 100644
index 0000000..e1e131c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp4/app-menu.ui
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp4/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp4/exampleapp.gresource.xml
new file mode 100644
index 0000000..1c9b118
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp4/exampleapp.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+    <file preprocess="xml-stripblanks">app-menu.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp4/exampleapp.rb b/gtk3/sample/tutorial/exampleapp4/exampleapp.rb
new file mode 100644
index 0000000..1731aa8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp4/exampleapp.rb
@@ -0,0 +1,124 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application4/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application4/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+file_pattern = File.basename(__FILE__).gsub(".rb","")
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+at_exit do
+  FileUtils.rm_f(gresource_bin)
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  # https://github.com/ruby-gnome2/ruby-gnome2/pull/445
+  # https://github.com/ruby-gnome2/ruby-gnome2/issues/503
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+  end
+
+  def open(file)
+    basename = file.basename
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+    stack.add_titled(scrolled, basename, basename)
+    stream = file.read
+    view.buffer.text = stream.read
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "startup" do |application|
+      quit_accels = ["<Ctrl>Q"]
+
+      action = Gio::SimpleAction.new("quit")
+      action.signal_connect("activate") do |_action, parameter|
+        application.quit
+      end
+      application.add_action(action)
+      application.set_accels_for_action("app.quit", quit_accels)
+
+      action = Gio::SimpleAction.new("preferences")
+      action.signal_connect("activate") do |_action, parameter|
+
+      end
+      application.add_action(action)
+
+      builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/app-menu.ui")
+      app_menu = builder.get_object("appmenu")
+      application.set_app_menu(app_menu)
+
+    end
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hint|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp4/window.ui b/gtk3/sample/tutorial/exampleapp4/window.ui
new file mode 100644
index 0000000..6b37e86
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp4/window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp5/app-menu.ui b/gtk3/sample/tutorial/exampleapp5/app-menu.ui
new file mode 100644
index 0000000..e1e131c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp5/app-menu.ui
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp5/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp5/exampleapp.gresource.xml
new file mode 100644
index 0000000..1c9b118
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp5/exampleapp.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+    <file preprocess="xml-stripblanks">app-menu.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp5/exampleapp.rb b/gtk3/sample/tutorial/exampleapp5/exampleapp.rb
new file mode 100644
index 0000000..ce464ea
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp5/exampleapp.rb
@@ -0,0 +1,135 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application5/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application5/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+gschema_bin = "#{current_path}/gschemas.compiled"
+gschema_xml = "#{current_path}/org.gtk.exampleapp.gschema.xml"
+
+system("glib-compile-schemas", current_path)
+
+
+at_exit do
+  FileUtils.rm_f([gresource_bin, gschema_bin])
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+ENV["GSETTINGS_SCHEMA_DIR"] = current_path 
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  # https://github.com/ruby-gnome2/ruby-gnome2/pull/445
+  # https://github.com/ruby-gnome2/ruby-gnome2/issues/503
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+    settings = Gio::Settings.new("org.gtk.exampleapp")
+    settings.bind("transition",
+                  stack,
+                  "transition-type",
+                  Gio::SettingsBindFlags::DEFAULT)
+  end
+
+  def open(file)
+    basename = file.basename
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+    stack.add_titled(scrolled, basename, basename)
+    stream = file.read
+    view.buffer.text = stream.read
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "startup" do |application|
+      quit_accels = ["<Ctrl>Q"]
+      action = Gio::SimpleAction.new("quit")
+      action.signal_connect("activate") do |_action, parameter|
+        application.quit
+      end
+      application.add_action(action)
+      application.set_accels_for_action("app.quit", quit_accels)
+
+      action = Gio::SimpleAction.new("preferences")
+      action.signal_connect("activate") do |_action, parameter|
+
+      end
+      application.add_action(action)
+
+      builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/app-menu.ui")
+      app_menu = builder.get_object("appmenu")
+      application.set_app_menu(app_menu)
+
+    end
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hint|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp5/org.gtk.exampleapp.gschema.xml b/gtk3/sample/tutorial/exampleapp5/org.gtk.exampleapp.gschema.xml
new file mode 100644
index 0000000..fc0c2c0
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp5/org.gtk.exampleapp.gschema.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
+    <key name="font" type="s">
+      <default>'Monospace 12'</default>
+      <summary>Font</summary>
+      <description>The font to be used for content.</description>
+    </key>
+    <key name="transition" type="s">
+      <choices>
+        <choice value='none'/>
+        <choice value='crossfade'/>
+        <choice value='slide-left-right'/>
+      </choices>
+      <default>'none'</default>
+      <summary>Transition</summary>
+      <description>The transition to use when switching tabs.</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/gtk3/sample/tutorial/exampleapp5/window.ui b/gtk3/sample/tutorial/exampleapp5/window.ui
new file mode 100644
index 0000000..6b37e86
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp5/window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp6/app-menu.ui b/gtk3/sample/tutorial/exampleapp6/app-menu.ui
new file mode 100644
index 0000000..e1e131c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/app-menu.ui
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp6/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp6/exampleapp.gresource.xml
new file mode 100644
index 0000000..7976885
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/exampleapp.gresource.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+    <file preprocess="xml-stripblanks">app-menu.ui</file>
+    <file preprocess="xml-stripblanks">prefs.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp6/exampleapp.rb b/gtk3/sample/tutorial/exampleapp6/exampleapp.rb
new file mode 100644
index 0000000..50af841
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/exampleapp.rb
@@ -0,0 +1,168 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application6/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application6/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+gschema_bin = "#{current_path}/gschemas.compiled"
+gschema_xml = "#{current_path}/org.gtk.exampleapp.gschema.xml"
+
+system("glib-compile-schemas", current_path)
+
+
+at_exit do
+  FileUtils.rm_f([gresource_bin, gschema_bin])
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+ENV["GSETTINGS_SCHEMA_DIR"] = current_path
+
+class ExampleAppPrefs < Gtk::Dialog
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/prefs.ui")
+      bind_template_child("font")
+      bind_template_child("transition")
+    end
+  end
+  def initialize(args)
+    parent = args[:transient_for]
+    bar = args[:use_header_bar]
+    super(:transient_for => parent, :use_header_bar => 1)
+    settings = Gio::Settings.new("org.gtk.exampleapp")
+    settings.bind("font",
+                  font,
+                  "font",
+                  Gio::SettingsBindFlags::DEFAULT)
+    settings.bind("transition",
+                  transition,
+                  "active-id",
+                  Gio::SettingsBindFlags::DEFAULT)
+  end
+end
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  # https://github.com/ruby-gnome2/ruby-gnome2/pull/445
+  # https://github.com/ruby-gnome2/ruby-gnome2/issues/503
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+    @settings = Gio::Settings.new("org.gtk.exampleapp")
+    @settings.bind("transition",
+                  stack,
+                  "transition-type",
+                  Gio::SettingsBindFlags::DEFAULT)
+  end
+
+  def open(file)
+    basename = file.basename
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+    stack.add_titled(scrolled, basename, basename)
+    stream = file.read
+    buffer = view.buffer
+    buffer.text = stream.read
+    tag = buffer.create_tag() 
+    @settings.bind("font", tag, "font", Gio::SettingsBindFlags::DEFAULT)
+    buffer.apply_tag(tag, buffer.start_iter, buffer.end_iter)
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "startup" do |application|
+      quit_accels = ["<Ctrl>Q"]
+      action = Gio::SimpleAction.new("quit")
+      action.signal_connect("activate") do |_action, _parameter|
+        application.quit
+      end
+      application.add_action(action)
+      application.set_accels_for_action("app.quit", quit_accels)
+
+      action = Gio::SimpleAction.new("preferences")
+      action.signal_connect("activate") do |_action, _parameter|
+        win = application.windows.first
+
+        prefs = ExampleAppPrefs.new(:transient_for => win,
+                                    :use_header_bar => true)
+        prefs.present
+      end
+      application.add_action(action)
+
+      builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/app-menu.ui")
+      app_menu = builder.get_object("appmenu")
+      application.set_app_menu(app_menu)
+
+    end
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hint|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp6/org.gtk.exampleapp.gschema.xml b/gtk3/sample/tutorial/exampleapp6/org.gtk.exampleapp.gschema.xml
new file mode 100644
index 0000000..fc0c2c0
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/org.gtk.exampleapp.gschema.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
+    <key name="font" type="s">
+      <default>'Monospace 12'</default>
+      <summary>Font</summary>
+      <description>The font to be used for content.</description>
+    </key>
+    <key name="transition" type="s">
+      <choices>
+        <choice value='none'/>
+        <choice value='crossfade'/>
+        <choice value='slide-left-right'/>
+      </choices>
+      <default>'none'</default>
+      <summary>Transition</summary>
+      <description>The transition to use when switching tabs.</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/gtk3/sample/tutorial/exampleapp6/prefs.ui b/gtk3/sample/tutorial/exampleapp6/prefs.ui
new file mode 100644
index 0000000..95e1cb8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/prefs.ui
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppPrefs" parent="GtkDialog">
+    <property name="title" translatable="yes">Preferences</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="vbox">
+        <child>
+          <object class="GtkGrid" id="grid">
+            <property name="visible">True</property>
+            <property name="margin">6</property>
+            <property name="row-spacing">12</property>
+            <property name="column-spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="fontlabel">
+                <property name="visible">True</property>
+                <property name="label">_Font:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">font</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFontButton" id="font">
+                <property name="visible">True</property>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="transitionlabel">
+                <property name="visible">True</property>
+                <property name="label">_Transition:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">transition</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBoxText" id="transition">
+                <property name="visible">True</property>
+                <items>
+                  <item translatable="yes" id="none">None</item>
+                  <item translatable="yes" id="crossfade">Fade</item>
+                  <item translatable="yes" id="slide-left-right">Slide</item>
+                </items>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp6/window.ui b/gtk3/sample/tutorial/exampleapp6/window.ui
new file mode 100644
index 0000000..6b37e86
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp6/window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp7/app-menu.ui b/gtk3/sample/tutorial/exampleapp7/app-menu.ui
new file mode 100644
index 0000000..e1e131c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/app-menu.ui
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp7/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp7/exampleapp.gresource.xml
new file mode 100644
index 0000000..7976885
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/exampleapp.gresource.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+    <file preprocess="xml-stripblanks">app-menu.ui</file>
+    <file preprocess="xml-stripblanks">prefs.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp7/exampleapp.rb b/gtk3/sample/tutorial/exampleapp7/exampleapp.rb
new file mode 100644
index 0000000..24a6c07
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/exampleapp.rb
@@ -0,0 +1,200 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application7/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application7/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+gschema_bin = "#{current_path}/gschemas.compiled"
+gschema_xml = "#{current_path}/org.gtk.exampleapp.gschema.xml"
+
+system("glib-compile-schemas", current_path)
+
+
+at_exit do
+  FileUtils.rm_f([gresource_bin, gschema_bin])
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+ENV["GSETTINGS_SCHEMA_DIR"] = current_path
+
+class ExampleAppPrefs < Gtk::Dialog
+  type_register
+
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/prefs.ui")
+      bind_template_child("font")
+      bind_template_child("transition")
+    end
+  end
+
+  def initialize(args)
+    parent = args[:transient_for]
+    bar = args[:use_header_bar]
+    super(:transient_for => parent, :use_header_bar => 1)
+    settings = Gio::Settings.new("org.gtk.exampleapp")
+    settings.bind("font",
+                  font,
+                  "font",
+                  Gio::SettingsBindFlags::DEFAULT)
+    settings.bind("transition",
+                  transition,
+                  "active-id",
+                  Gio::SettingsBindFlags::DEFAULT)
+  end
+end
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+      bind_template_child("search")
+      bind_template_child("searchbar")
+      set_connect_func do |name|
+        method(name)
+      end
+    end
+
+    private
+
+    def search_text_changed(search_entry)
+      text = search_entry.text
+      return if text.empty?
+
+      win = search_entry.toplevel
+      tab = win.stack.visible_child
+      view = tab.child
+      buffer = view.buffer
+      range = buffer.start_iter.forward_search(text, Gtk::TextSearchFlags::CASE_INSENSITIVE)
+      return unless range
+      buffer.select_range(range[0], range[1])
+      view.scroll_to_iter(range[0], 0.0, false, 0.0, 0.0)
+    end
+
+    def visible_child_changed(stack, params)
+      return if stack.in_destruction?
+      win = stack.toplevel
+      win.searchbar.set_search_mode(false)
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+    @settings = Gio::Settings.new("org.gtk.exampleapp")
+    @settings.bind("transition",
+                  stack,
+                  "transition-type",
+                  Gio::SettingsBindFlags::DEFAULT)
+    search.bind_property("active", searchbar, "search-mode-enabled", :bidirectional)
+  end
+
+  def open(file)
+    basename = file.basename
+
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+
+    stack.add_titled(scrolled, basename, basename)
+
+    stream = file.read
+    buffer = view.buffer
+    buffer.text = stream.read
+    tag = buffer.create_tag()
+    @settings.bind("font", tag, "font", Gio::SettingsBindFlags::DEFAULT)
+    buffer.apply_tag(tag, buffer.start_iter, buffer.end_iter)
+    search.sensitive = true
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "startup" do |application|
+      quit_accels = ["<Ctrl>Q"]
+      action = Gio::SimpleAction.new("quit")
+      action.signal_connect("activate") do |_action, _parameter|
+        application.quit
+      end
+      application.add_action(action)
+      application.set_accels_for_action("app.quit", quit_accels)
+
+      action = Gio::SimpleAction.new("preferences")
+      action.signal_connect("activate") do |_action, _parameter|
+        win = application.windows.first
+        prefs = ExampleAppPrefs.new(:transient_for => win,
+                                    :use_header_bar => true)
+        prefs.present
+      end
+      application.add_action(action)
+
+      builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/app-menu.ui")
+      app_menu = builder.get_object("appmenu")
+      application.set_app_menu(app_menu)
+    end
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, hint|
+      windows = application.windows
+      win = nil
+      unless windows.empty?
+        win = windows.first
+      else
+        win = ExampleAppWindow.new(application)
+      end
+
+      files.each { |file| win.open(file) }
+
+      win.present
+    end
+
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp7/org.gtk.exampleapp.gschema.xml b/gtk3/sample/tutorial/exampleapp7/org.gtk.exampleapp.gschema.xml
new file mode 100644
index 0000000..fc0c2c0
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/org.gtk.exampleapp.gschema.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
+    <key name="font" type="s">
+      <default>'Monospace 12'</default>
+      <summary>Font</summary>
+      <description>The font to be used for content.</description>
+    </key>
+    <key name="transition" type="s">
+      <choices>
+        <choice value='none'/>
+        <choice value='crossfade'/>
+        <choice value='slide-left-right'/>
+      </choices>
+      <default>'none'</default>
+      <summary>Transition</summary>
+      <description>The transition to use when switching tabs.</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/gtk3/sample/tutorial/exampleapp7/prefs.ui b/gtk3/sample/tutorial/exampleapp7/prefs.ui
new file mode 100644
index 0000000..95e1cb8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/prefs.ui
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppPrefs" parent="GtkDialog">
+    <property name="title" translatable="yes">Preferences</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="vbox">
+        <child>
+          <object class="GtkGrid" id="grid">
+            <property name="visible">True</property>
+            <property name="margin">6</property>
+            <property name="row-spacing">12</property>
+            <property name="column-spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="fontlabel">
+                <property name="visible">True</property>
+                <property name="label">_Font:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">font</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFontButton" id="font">
+                <property name="visible">True</property>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="transitionlabel">
+                <property name="visible">True</property>
+                <property name="label">_Transition:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">transition</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBoxText" id="transition">
+                <property name="visible">True</property>
+                <items>
+                  <item translatable="yes" id="none">None</item>
+                  <item translatable="yes" id="crossfade">Fade</item>
+                  <item translatable="yes" id="slide-left-right">Slide</item>
+                </items>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp7/window.ui b/gtk3/sample/tutorial/exampleapp7/window.ui
new file mode 100644
index 0000000..589acd5
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp7/window.ui
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="search">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="search-icon">
+                    <property name="visible">True</property>
+                    <property name="icon-name">edit-find-symbolic</property>
+                    <property name="icon-size">1</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack-type">end</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSearchBar" id="searchbar">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkSearchEntry" id="searchentry">
+                <signal name="search-changed" handler="search_text_changed"/>
+                <property name="visible">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkStack" id="stack">
+            <signal name="notify::visible-child" handler="visible_child_changed"/>
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp8/app-menu.ui b/gtk3/sample/tutorial/exampleapp8/app-menu.ui
new file mode 100644
index 0000000..e1e131c
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/app-menu.ui
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp8/exampleapp.gresource.xml b/gtk3/sample/tutorial/exampleapp8/exampleapp.gresource.xml
new file mode 100644
index 0000000..ace59c8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/exampleapp.gresource.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gtk/exampleapp">
+    <file preprocess="xml-stripblanks">window.ui</file>
+    <file preprocess="xml-stripblanks">app-menu.ui</file>
+    <file preprocess="xml-stripblanks">gears-menu.ui</file>
+    <file preprocess="xml-stripblanks">prefs.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/sample/tutorial/exampleapp8/exampleapp.rb b/gtk3/sample/tutorial/exampleapp8/exampleapp.rb
new file mode 100644
index 0000000..9526819
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/exampleapp.rb
@@ -0,0 +1,247 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# Original:
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application8/exampleapp.c
+#   * URL: https://git.gnome.org/browse/gtk+/tree/examples/application8/exampleappwin.c
+#   * License: LGPL 2
+
+require "gtk3"
+
+require "fileutils"
+
+current_path = File.expand_path(File.dirname(__FILE__))
+gresource_bin = "#{current_path}/exampleapp.gresource"
+gresource_xml = "#{current_path}/exampleapp.gresource.xml"
+
+system("glib-compile-resources",
+       "--target", gresource_bin,
+       "--sourcedir", current_path,
+       gresource_xml)
+
+gschema_bin = "#{current_path}/gschemas.compiled"
+
+system("glib-compile-schemas", current_path)
+
+at_exit do
+  FileUtils.rm_f([gresource_bin, gschema_bin])
+end
+
+resource = Gio::Resource.load(gresource_bin)
+Gio::Resources.register(resource)
+
+ENV["GSETTINGS_SCHEMA_DIR"] = current_path
+
+def update_words(win)
+  tab = win.stack.visible_child
+  return unless tab
+  view = tab.child
+  buffer = view.buffer
+  iter = buffer.start_iter
+  strings = []
+  done = false
+  until iter.end?
+    until iter.starts_word
+      unless iter.forward_char
+        done = true
+        break
+      end
+    end
+    break if done
+    word_end = iter.clone
+    break  unless word_end.forward_word_end
+    strings << buffer.get_text(iter, word_end, false)
+    iter = word_end
+  end
+  children = win.words.children
+  children.each { |c| win.words.remove(c) } unless children.empty?
+  strings.each do |s|
+    row = Gtk::Button.new(:label => s)
+    row.signal_connect("clicked") { |_widget| win.searchentry.text = s }
+    row.show
+    win.words.add(row)
+  end
+end
+
+class ExampleAppPrefs < Gtk::Dialog
+  type_register
+
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/prefs.ui")
+      bind_template_child("font")
+      bind_template_child("transition")
+    end
+  end
+
+  def initialize(args)
+    parent = args[:transient_for]
+    super(:transient_for => parent, :use_header_bar => 1)
+    settings = Gio::Settings.new("org.gtk.exampleapp")
+    settings.bind("font",
+                  font,
+                  "font",
+                  Gio::SettingsBindFlags::DEFAULT)
+    settings.bind("transition",
+                  transition,
+                  "active-id",
+                  Gio::SettingsBindFlags::DEFAULT)
+  end
+end
+
+class ExampleAppWindow < Gtk::ApplicationWindow
+  type_register
+  class << self
+    def init
+      set_template(:resource => "/org/gtk/exampleapp/window.ui")
+      bind_template_child("stack")
+      bind_template_child("search")
+      bind_template_child("searchbar")
+      bind_template_child("searchentry")
+      bind_template_child("gears")
+      bind_template_child("words")
+      bind_template_child("sidebar")
+
+      set_connect_func do |name|
+        method(name)
+      end
+    end
+
+    private
+
+    def search_text_changed(search_entry)
+      text = search_entry.text
+      return if text.empty?
+
+      win = search_entry.toplevel
+      tab = win.stack.visible_child
+      view = tab.child
+      buffer = view.buffer
+      range = buffer.start_iter.forward_search(text,
+                                               Gtk::TextSearchFlags::CASE_INSENSITIVE)
+      return unless range
+      buffer.select_range(range[0], range[1])
+      view.scroll_to_iter(range[0], 0.0, false, 0.0, 0.0)
+    end
+
+    def visible_child_changed(stack, params)
+      return if stack.in_destruction?
+      win = stack.toplevel
+      win.searchbar.set_search_mode(false)
+      update_words(win)
+    end
+  end
+
+  def initialize(application)
+    super(:application => application)
+    @settings = Gio::Settings.new("org.gtk.exampleapp")
+    @settings.bind("transition",
+                   stack,
+                   "transition-type",
+                   Gio::SettingsBindFlags::DEFAULT)
+    search.bind_property("active", searchbar, "search-mode-enabled", :bidirectional)
+    @settings.bind("show-words",
+                   sidebar,
+                   "reveal-child",
+                   Gio::SettingsBindFlags::DEFAULT)
+    sidebar.signal_connect "notify::reveal-child" do |_sidebar, _gparamspec, an_application|
+      update_words(an_application)
+    end
+    builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/gears-menu.ui")
+    menu = builder.get_object("menu")
+    gears.set_menu_model(menu)
+    action = @settings.create_action("show-words")
+    add_action(action)
+  end
+
+  def open(file)
+    basename = file.basename
+
+    scrolled = Gtk::ScrolledWindow.new
+    scrolled.show
+    scrolled.set_hexpand(true)
+    scrolled.set_vexpand(true)
+
+    view = Gtk::TextView.new
+    view.set_editable(false)
+    view.set_cursor_visible(false)
+    view.show
+    scrolled.add(view)
+
+    stack.add_titled(scrolled, basename, basename)
+
+    stream = file.read
+    buffer = view.buffer
+    buffer.text = stream.read
+    tag = buffer.create_tag
+    @settings.bind("font", tag, "font", Gio::SettingsBindFlags::DEFAULT)
+    buffer.apply_tag(tag, buffer.start_iter, buffer.end_iter)
+    search.sensitive = true
+    update_words(self)
+  end
+end
+
+class ExampleApp < Gtk::Application
+  def initialize
+    super("org.gtk.exampleapp", :handles_open)
+
+    signal_connect "startup" do |application|
+      quit_accels = ["<Ctrl>Q"]
+      action = Gio::SimpleAction.new("quit")
+      action.signal_connect("activate") do |_action, _parameter|
+        application.quit
+      end
+      application.add_action(action)
+      application.set_accels_for_action("app.quit", quit_accels)
+
+      action = Gio::SimpleAction.new("preferences")
+      action.signal_connect("activate") do |_action, _parameter|
+        win = application.windows.first
+        prefs = ExampleAppPrefs.new(:transient_for => win,
+                                    :use_header_bar => true)
+        prefs.present
+      end
+      application.add_action(action)
+
+      builder = Gtk::Builder.new(:resource => "/org/gtk/exampleapp/app-menu.ui")
+      app_menu = builder.get_object("appmenu")
+      application.set_app_menu(app_menu)
+    end
+
+    signal_connect "activate" do |application|
+      window = ExampleAppWindow.new(application)
+      window.present
+    end
+
+    signal_connect "open" do |application, files, _hint|
+      windows = application.windows
+      win = nil
+      if windows.empty?
+        win = ExampleAppWindow.new(application)
+      else
+        win = windows.first
+      end
+
+      files.each { |file| win.open(file) }
+
+      win.present
+    end
+  end
+end
+
+app = ExampleApp.new
+
+puts app.run([$PROGRAM_NAME] + ARGV)
diff --git a/gtk3/sample/tutorial/exampleapp8/gears-menu.ui b/gtk3/sample/tutorial/exampleapp8/gears-menu.ui
new file mode 100644
index 0000000..7e5df31
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/gears-menu.ui
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Words</attribute>
+        <attribute name="action">win.show-words</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp8/org.gtk.exampleapp.gschema.xml b/gtk3/sample/tutorial/exampleapp8/org.gtk.exampleapp.gschema.xml
new file mode 100644
index 0000000..a6929a8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/org.gtk.exampleapp.gschema.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
+    <key name="font" type="s">
+      <default>'Monospace 12'</default>
+      <summary>Font</summary>
+      <description>The font to be used for content.</description>
+    </key>
+    <key name="transition" type="s">
+      <choices>
+        <choice value='none'/>
+        <choice value='crossfade'/>
+        <choice value='slide-left-right'/>
+      </choices>
+      <default>'none'</default>
+      <summary>Transition</summary>
+      <description>The transition to use when switching tabs.</description>
+    </key>
+    <key name="show-words" type="b">
+      <default>false</default>
+      <summary>Show words</summary>
+      <description>Whether to show a word list in the sidebar</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/gtk3/sample/tutorial/exampleapp8/prefs.ui b/gtk3/sample/tutorial/exampleapp8/prefs.ui
new file mode 100644
index 0000000..95e1cb8
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/prefs.ui
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppPrefs" parent="GtkDialog">
+    <property name="title" translatable="yes">Preferences</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="vbox">
+        <child>
+          <object class="GtkGrid" id="grid">
+            <property name="visible">True</property>
+            <property name="margin">6</property>
+            <property name="row-spacing">12</property>
+            <property name="column-spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="fontlabel">
+                <property name="visible">True</property>
+                <property name="label">_Font:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">font</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFontButton" id="font">
+                <property name="visible">True</property>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="transitionlabel">
+                <property name="visible">True</property>
+                <property name="label">_Transition:</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">transition</property>
+                <property name="xalign">1</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBoxText" id="transition">
+                <property name="visible">True</property>
+                <items>
+                  <item translatable="yes" id="none">None</item>
+                  <item translatable="yes" id="crossfade">Fade</item>
+                  <item translatable="yes" id="slide-left-right">Slide</item>
+                </items>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/sample/tutorial/exampleapp8/window.ui b/gtk3/sample/tutorial/exampleapp8/window.ui
new file mode 100644
index 0000000..ab39883
--- /dev/null
+++ b/gtk3/sample/tutorial/exampleapp8/window.ui
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <template class="ExampleAppWindow" parent="GtkApplicationWindow">
+    <property name="title" translatable="yes">Example Application</property>
+    <property name="default-width">600</property>
+    <property name="default-height">400</property>
+    <child>
+      <object class="GtkBox" id="content_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkHeaderBar" id="header">
+            <property name="visible">True</property>
+            <child type="title">
+              <object class="GtkStackSwitcher" id="tabs">
+                <property name="visible">True</property>
+                <property name="margin">6</property>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="search">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="search-icon">
+                    <property name="visible">True</property>
+                    <property name="icon-name">edit-find-symbolic</property>
+                    <property name="icon-size">1</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack-type">end</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkMenuButton" id="gears">
+                <property name="visible">True</property>
+                <property name="direction">none</property>
+                <property name="use-popover">True</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+              </object>
+              <packing>
+                <property name="pack-type">end</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSearchBar" id="searchbar">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkSearchEntry" id="searchentry">
+                <signal name="search-changed" handler="search_text_changed"/>
+                <property name="visible">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox" id="hbox">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkRevealer" id="sidebar">
+                <property name="visible">True</property>
+                <property name="transition-type">slide-right</property>
+                <child>
+                 <object class="GtkScrolledWindow" id="sidebar-sw">
+                   <property name="visible">True</property>
+                   <property name="hscrollbar-policy">never</property>
+                   <property name="vscrollbar-policy">automatic</property>
+                   <child>
+                     <object class="GtkListBox" id="words">
+                       <property name="visible">True</property>
+                       <property name="selection-mode">none</property>
+                     </object>
+                   </child>
+                 </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkStack" id="stack">
+                <signal name="notify::visible-child" handler="visible_child_changed"/>
+                <property name="visible">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gtk3/test/fixture/Rakefile b/gtk3/test/fixture/Rakefile
new file mode 100644
index 0000000..56f6105
--- /dev/null
+++ b/gtk3/test/fixture/Rakefile
@@ -0,0 +1,32 @@
+# -*- ruby -*-
+#
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "rake/clean"
+
+gresources = ["simple_window.gresource", "image.gresource"]
+
+gresources.each do |gresource|
+  gresource_xml = "#{gresource}.xml"
+  dependencies = [gresource_xml]
+  CLEAN << gresource
+  file gresource => dependencies do
+    sh("glib-compile-resources", gresource_xml)
+  end
+end
+
+task :default => gresources
diff --git a/gtk3/test/fixture/gnome-logo-icon.png b/gtk3/test/fixture/gnome-logo-icon.png
new file mode 100644
index 0000000..06721a9
Binary files /dev/null and b/gtk3/test/fixture/gnome-logo-icon.png differ
diff --git a/gtk3/test/fixture/image.gresource b/gtk3/test/fixture/image.gresource
new file mode 100644
index 0000000..dbef512
Binary files /dev/null and b/gtk3/test/fixture/image.gresource differ
diff --git a/gtk3/test/fixture/image.gresource.xml b/gtk3/test/fixture/image.gresource.xml
new file mode 100644
index 0000000..62b7313
--- /dev/null
+++ b/gtk3/test/fixture/image.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/ruby/gnome">
+    <file>gnome-logo-icon.png</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/test/fixture/simple_window.gresource.xml b/gtk3/test/fixture/simple_window.gresource.xml
new file mode 100644
index 0000000..970381d
--- /dev/null
+++ b/gtk3/test/fixture/simple_window.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/simple_window">
+    <file>simple_window.ui</file>
+  </gresource>
+</gresources>
diff --git a/gtk3/test/fixture/simple_window.ui b/gtk3/test/fixture/simple_window.ui
new file mode 100644
index 0000000..2e6ea5b
--- /dev/null
+++ b/gtk3/test/fixture/simple_window.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkWindow" id="window">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">label</property>
+        <property name="ellipsize">end</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk3/test/gtk-test-utils.rb b/gtk3/test/gtk-test-utils.rb
index 22b1f87..548c4dc 100644
--- a/gtk3/test/gtk-test-utils.rb
+++ b/gtk3/test/gtk-test-utils.rb
@@ -1,15 +1,57 @@
-require 'tempfile'
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "tempfile"
+require "fileutils"
 
 module GtkTestUtils
   private
   def only_gtk_version(major, minor, micro=nil)
     micro ||= 0
-    unless Gtk.check_version?(major, minor, micro)
+    unless Gtk::Version.or_later?(major, minor, micro)
       omit("Require GTK+ >= #{major}.#{minor}.#{micro}")
     end
   end
 
-  def only_x11
-    omit("Only for X11 backend") unless Gdk.windowing_x11?
+  def window_system_type_name
+    Gdk::Screen.default.class.gtype.name
+  end
+
+  module WindowSystemTypeNames
+    X11 = "GdkX11Screen"
+    WINDOWS = "GdkWin32Screen"
+  end
+
+  def x11?
+    window_system_type_name == WindowSystemTypeNames::X11
+  end
+
+  def csd_supported?
+    screen = Gdk::Screen.default
+    case window_system_type_name
+    when WindowSystemTypeNames::X11
+      screen.composited? and screen.rgba_visual
+    when WindowSystemTypeNames::WINDOWS
+      screen.rgba_visual
+    else
+      true
+    end
+  end
+
+  def fixture_path(*components)
+    File.join(File.dirname(__FILE__), "fixture", *components)
   end
 end
diff --git a/gtk3/test/run-test.rb b/gtk3/test/run-test.rb
index e142f99..cffdf63 100755
--- a/gtk3/test/run-test.rb
+++ b/gtk3/test/run-test.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@ cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
 pango_base = File.join(ruby_gnome2_base, "pango")
 gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
 gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
+gio2_base = File.join(ruby_gnome2_base, "gio2")
 gdk3_base = File.join(ruby_gnome2_base, "gdk3")
 gtk3_base = File.join(ruby_gnome2_base, "gtk3")
 
@@ -35,6 +36,7 @@ gtk3_base = File.join(ruby_gnome2_base, "gtk3")
   [pango_base, "pango"],
   [gdk_pixbuf_base, "gdk_pixbuf2"],
   [gobject_introspection_base, "gobject-introspection"],
+  [gio2_base, "gio2"],
   [gdk3_base, "gdk3"],
   [gtk3_base, "gtk3"]
 ].each do |target, module_name|
@@ -47,6 +49,10 @@ gtk3_base = File.join(ruby_gnome2_base, "gtk3")
   $LOAD_PATH.unshift(File.join(target, "lib"))
 end
 
+Dir.chdir(File.join(gtk3_base, "test", "fixture")) do
+  system("rake") or exit(false)
+end
+
 $LOAD_PATH.unshift(File.join(glib_base, "test"))
 require 'glib-test-init'
 
@@ -55,4 +61,6 @@ require 'gtk-test-utils'
 
 require 'gtk3'
 
+Gtk.init
+
 exit Test::Unit::AutoRunner.run(true)
diff --git a/gtk3/test/test_gc.rb b/gtk3/test/test-gc.rb
similarity index 100%
rename from gtk3/test/test_gc.rb
rename to gtk3/test/test-gc.rb
diff --git a/gtk3/test/test-gdk-display.rb b/gtk3/test/test-gdk-display.rb
new file mode 100644
index 0000000..528ab1a
--- /dev/null
+++ b/gtk3/test/test-gdk-display.rb
@@ -0,0 +1,25 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkDisplay < Test::Unit::TestCase
+  include GtkTestUtils
+
+  test "device_is_grabbed?" do
+    display = Gdk::Display.default
+    device = display.devices.first
+    assert_false(display.device_is_grabbed?(device))
+  end
+end
diff --git a/gtk3/test/test-gdk-event.rb b/gtk3/test/test-gdk-event.rb
new file mode 100644
index 0000000..f466b17
--- /dev/null
+++ b/gtk3/test/test-gdk-event.rb
@@ -0,0 +1,24 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkEvent < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def test_widget
+    event = Gdk::Event.new(:delete)
+    assert_nil(event.widget)
+  end
+end
diff --git a/gtk3/test/test-gdk-screen.rb b/gtk3/test/test-gdk-screen.rb
new file mode 100644
index 0000000..b1f11bd
--- /dev/null
+++ b/gtk3/test/test-gdk-screen.rb
@@ -0,0 +1,42 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGdkScreen < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "#get_setting" do
+    test "no type" do
+      screen = Gdk::Screen.default
+      theme_name_value = screen.get_setting("gtk-theme-name")
+      if theme_name_value.nil? and x11?
+        omit("XSETTINGS is required.")
+      end
+      assert_equal(Gtk::Settings.default.gtk_theme_name,
+                   theme_name_value.value)
+    end
+
+    test "custom type" do
+      screen = Gdk::Screen.default
+      double_click_time_value = screen.get_setting("gtk-double-click-time",
+                                                   GLib::Type::INT)
+      if double_click_time_value.nil? and x11?
+        omit("XSETTINGS is required.")
+      end
+      assert_equal(Gtk::Settings.default.gtk_double_click_time,
+                   double_click_time_value.value)
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_about_dialog.rb b/gtk3/test/test-gtk-about-dialog.rb
similarity index 100%
rename from gtk3/test/test_gtk_about_dialog.rb
rename to gtk3/test/test-gtk-about-dialog.rb
diff --git a/gtk3/test/test-gtk-accel-group.rb b/gtk3/test/test-gtk-accel-group.rb
new file mode 100644
index 0000000..a7ee3f1
--- /dev/null
+++ b/gtk3/test/test-gtk-accel-group.rb
@@ -0,0 +1,23 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkAccelGroup < Test::Unit::TestCase
+  def test_connect
+    group = Gtk::AccelGroup.new
+    group.connect(Gdk::Keyval::KEY_0, 0, 0) do
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_accel_key.rb b/gtk3/test/test-gtk-accel-key.rb
similarity index 100%
rename from gtk3/test/test_gtk_accel_key.rb
rename to gtk3/test/test-gtk-accel-key.rb
diff --git a/gtk3/test/test_gtk_accessible.rb b/gtk3/test/test-gtk-accessible.rb
similarity index 100%
rename from gtk3/test/test_gtk_accessible.rb
rename to gtk3/test/test-gtk-accessible.rb
diff --git a/gtk3/test/test-gtk-action-bar.rb b/gtk3/test/test-gtk-action-bar.rb
new file mode 100644
index 0000000..4e1ca72
--- /dev/null
+++ b/gtk3/test/test-gtk-action-bar.rb
@@ -0,0 +1,43 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkActionBar < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 12, 0)
+    @action_bar = Gtk::ActionBar.new
+  end
+
+  def test_center_widget
+    widget = Gtk::EventBox.new
+    @action_bar.center_widget = widget
+    assert_equal(widget, @action_bar.center_widget)
+  end
+
+  def test_pack
+    start1 = Gtk::EventBox.new
+    start2 = Gtk::EventBox.new
+    end1 = Gtk::EventBox.new
+    end2 = Gtk::EventBox.new
+    @action_bar.pack_start(start1)
+    @action_bar.pack_start(start2)
+    @action_bar.pack_end(end1)
+    @action_bar.pack_end(end2)
+    assert_equal([start1, start2, end2, end1],
+                 @action_bar.children)
+  end
+end
diff --git a/gtk3/test/test-gtk-action-group.rb b/gtk3/test/test-gtk-action-group.rb
new file mode 100644
index 0000000..bb6cab9
--- /dev/null
+++ b/gtk3/test/test-gtk-action-group.rb
@@ -0,0 +1,48 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkActionGroup < Test::Unit::TestCase
+  def setup
+    @group = Gtk::ActionGroup.new("Ruby/GTK3")
+  end
+
+  def test_set_translate_func
+    @group.set_translate_func do |message|
+      "#{message} (translated)"
+    end
+    assert_equal("hello (translated)", @group.translate_string("hello"))
+  end
+
+  sub_test_case("#translate_string") do
+    test("nil") do
+      assert_nil(@group.translate_string(nil))
+    end
+  end
+
+  sub_test_case("#add_action") do
+    test("no options") do
+      action = Gtk::Action.new("run")
+      @group.add_action(action)
+      assert_nil(action.accel_path)
+    end
+
+    test(":accelerator") do
+      action = Gtk::Action.new("run")
+      @group.add_action(action, :accelerator => "<Control>a")
+      assert_equal("<Actions>/Ruby/GTK3/run", action.accel_path)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-action.rb b/gtk3/test/test-gtk-action.rb
new file mode 100644
index 0000000..2e4b6bd
--- /dev/null
+++ b/gtk3/test/test-gtk-action.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkAction < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test("no options") do
+      action = Gtk::Action.new("run")
+      assert_equal("run", action.name)
+    end
+
+    test(":label") do
+      action = Gtk::Action.new("run", :label => "Run")
+      assert_equal("Run", action.label)
+    end
+
+    test(":tooltip") do
+      action = Gtk::Action.new("run", :tooltip => "Run this action")
+      assert_equal("Run this action", action.tooltip)
+    end
+
+    test(":stock_id") do
+      action = Gtk::Action.new("add", :stock_id => "gtk-add")
+      assert_equal("gtk-add", action.stock_id)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-assistant.rb b/gtk3/test/test-gtk-assistant.rb
new file mode 100644
index 0000000..34feb3e
--- /dev/null
+++ b/gtk3/test/test-gtk-assistant.rb
@@ -0,0 +1,44 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkAssistant < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @assistant = Gtk::Assistant.new
+  end
+
+  test "#set_forward_page_func" do
+    page = nil
+    next_page = 2
+    @assistant.set_forward_page_func do |current_page|
+      page = current_page
+      next_page
+    end
+
+    page1 = Gtk::EventBox.new
+    page2 = Gtk::EventBox.new
+    page3 = Gtk::EventBox.new
+    @assistant.append_page(page1)
+    @assistant.append_page(page2)
+    @assistant.append_page(page3)
+
+    assert_equal(-1, @assistant.current_page)
+    @assistant.next_page
+    assert_equal([-1, next_page],
+                 [page, @assistant.current_page])
+  end
+end
diff --git a/gtk3/test/test_gtk_border.rb b/gtk3/test/test-gtk-border.rb
similarity index 100%
rename from gtk3/test/test_gtk_border.rb
rename to gtk3/test/test-gtk-border.rb
diff --git a/gtk3/test/test-gtk-box.rb b/gtk3/test/test-gtk-box.rb
new file mode 100644
index 0000000..1b909d2
--- /dev/null
+++ b/gtk3/test/test-gtk-box.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkBox < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    sub_test_case "spacing" do
+      def test_nil
+        box = Gtk::Box.new(:vertical, nil)
+        assert_equal(0, box.spacing)
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-buildable.rb b/gtk3/test/test-gtk-buildable.rb
new file mode 100644
index 0000000..56b7377
--- /dev/null
+++ b/gtk3/test/test-gtk-buildable.rb
@@ -0,0 +1,56 @@
+class TestGtkBuildable < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @buildable = Gtk::Box.new(:horizontal)
+  end
+
+  def test_builder_name
+    assert_nil(@buildable.builder_name)
+    @buildable.builder_name = "YYY"
+    assert_equal("YYY", @buildable.builder_name)
+
+    @buildable.builder_name = ""
+    assert_equal("", @buildable.builder_name)
+  end
+
+  def test_add_child
+    assert_equal([], @buildable.children)
+
+    builder = Gtk::Builder.new
+    entry = Gtk::Entry.new
+    @buildable.add_child(builder, entry)
+    assert_equal([entry], @buildable.children)
+  end
+
+  def test_set_buildable_property
+    assert_nil(@buildable.parent)
+
+    builder = Gtk::Builder.new
+    parent = Gtk::Box.new(:horizontal)
+    @buildable.set_buildable_property(builder, "parent", parent)
+    assert_equal(parent, @buildable.parent)
+  end
+
+  def test_construct_child
+    assert_nil(@buildable.parent)
+
+    @buildable = Gtk::UIManager.new
+    @buildable.add_ui(<<-EOU)
+<ui>
+  <toolbar name='Toolbar'>
+  </toolbar>
+</ui>
+EOU
+    builder = Gtk::Builder.new
+    assert_kind_of(Gtk::Toolbar, @buildable.construct_child(builder, "Toolbar"))
+  end
+
+  def test_get_internal_child
+    assert_nil(@buildable.parent)
+
+    @buildable = Gtk::Dialog.new
+    builder = Gtk::Builder.new
+    assert_kind_of(Gtk::Box, @buildable.get_internal_child(builder, "vbox"))
+  end
+end
diff --git a/gtk3/test/test-gtk-builder.rb b/gtk3/test/test-gtk-builder.rb
new file mode 100644
index 0000000..7c749dd
--- /dev/null
+++ b/gtk3/test/test-gtk-builder.rb
@@ -0,0 +1,200 @@
+# -*- coding: utf-8 -*-
+
+class TestGtkBuilder < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def test_constants
+    assert_const_defined(Gtk::BuilderError, :INVALID_TAG)
+  end
+
+  sub_test_case ".new" do
+    test "no argument" do
+      builder = Gtk::Builder.new
+      assert_equal([], builder.objects)
+    end
+
+    test "file" do
+      only_gtk_version(3, 10, 0)
+      builder = Gtk::Builder.new(:file => ui_definition_file.path)
+      assert_kind_of(Gtk::Dialog, builder["dialog1"])
+    end
+
+    test "resource" do
+      only_gtk_version(3, 10, 0)
+      resource = Gio::Resource.load(fixture_path("simple_window.gresource"))
+      Gio::Resources.register(resource)
+      begin
+        resource_path = "/simple_window/simple_window.ui"
+        builder = Gtk::Builder.new(:resource => resource_path)
+        assert_kind_of(Gtk::Window, builder["window"])
+      ensure
+        Gio::Resources.unregister(resource)
+      end
+    end
+
+    test "string" do
+      only_gtk_version(3, 10, 0)
+      builder = Gtk::Builder.new(:string => ui_definition_simple)
+      assert_kind_of(Gtk::Window, builder["main-window"])
+    end
+  end
+
+  def test_add_from_file
+    builder = Gtk::Builder.new
+    assert_nothing_raised do
+      builder.add_from_file(ui_definition_file.path)
+    end
+    assert_kind_of(Gtk::Dialog, builder["dialog1"])
+  end
+
+  sub_test_case "#add_from_string" do
+    def test_ascii_only
+      builder = Gtk::Builder.new
+      builder.add_from_string(ui_definition_simple)
+      assert_kind_of(Gtk::Window, builder["main-window"])
+    end
+
+    def test_multibyte_characters
+      builder = Gtk::Builder.new
+      comment = "<!-- 日本語 -->\n" * 100
+      builder.add_from_string("#{comment}#{ui_definition_simple}")
+      assert_kind_of(Gtk::Window, builder["main-window"])
+    end
+  end
+
+  def test_add_with_file
+    builder = Gtk::Builder.new
+    assert_nothing_raised do
+      builder.add(ui_definition_file.path)
+    end
+    assert_kind_of(Gtk::ButtonBox, builder["hbuttonbox1"])
+  end
+
+  def test_add_with_string
+    builder = Gtk::Builder.new
+    assert_nothing_raised do
+      builder.add(ui_definition)
+    end
+    assert_kind_of(Gtk::Button, builder["ok_button"])
+  end
+
+  def test_add_chain
+    builder = Gtk::Builder.new
+    assert_nothing_raised do
+      builder << ui_definition_file.path << ui_definition_simple
+    end
+    assert_kind_of(Gtk::Dialog, builder["dialog1"])
+    assert_kind_of(Gtk::Window, builder["main-window"])
+  end
+
+  def test_objects
+    builder = Gtk::Builder.new
+    assert_nothing_raised do
+      builder << ui_definition_file.path << ui_definition_simple
+    end
+    assert_equal(["dialog1", "vbox1", "hbuttonbox1", "ok_button",
+                  "main-window"].sort,
+                 builder.objects.collect {|object| object.builder_name}.sort)
+  end
+
+  def test_translation_domain
+    builder = Gtk::Builder.new
+    assert_nil(builder.translation_domain)
+    builder.translation_domain = "ruby-gnome2"
+    assert_equal("ruby-gnome2", builder.translation_domain)
+  end
+
+  def test_connect_signals
+    handler_names = []
+
+    builder = Gtk::Builder.new
+    builder.connect_signals do |name|
+      handler_names << name
+      Proc.new {}
+    end
+    assert_equal([].sort, handler_names.sort)
+
+    builder << ui_definition
+    builder.connect_signals do |name|
+      handler_names << name
+      Proc.new {}
+    end
+    assert_equal(["ok_button_clicked"].sort, handler_names.sort)
+  end
+
+  def test_connect_signals_with_no_signal_ui_definition
+    handler_names = []
+
+    builder = Gtk::Builder.new
+    builder.connect_signals do |name|
+      handler_names << name
+      Proc.new {}
+    end
+    assert_equal([].sort, handler_names.sort)
+
+    builder << ui_definition_simple
+    builder.connect_signals do |name|
+      handler_names << name
+      Proc.new {}
+    end
+    assert_equal([].sort, handler_names.sort)
+  end
+
+  def test_get_type_from_name
+    builder = Gtk::Builder.new
+    assert_nil(builder.get_type("XXX"))
+    assert_equal(Gtk::Box.gtype, builder.get_type("GtkBox"))
+  end
+
+  private
+  def ui_definition
+    <<-EOX
+<interface>
+  <object class="GtkDialog" id="dialog1">
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="vbox1">
+        <property name="border-width">10</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="border-width">20</property>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="use-stock">TRUE</property>
+                <signal name="clicked" handler="ok_button_clicked"/>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
+EOX
+  end
+
+  def ui_definition_simple
+    <<-EOX
+<interface>
+  <object class="GtkWindow" id="main-window">
+  </object>
+</interface>
+EOX
+  end
+
+  def ui_definition_with_signal
+    <<-EOX
+<interface>
+  <object class="GtkWindow" id="main-window">
+  </object>
+</interface>
+EOX
+  end
+
+  def ui_definition_file
+    xml = Tempfile.new("Gtk::Builder")
+    xml.print(ui_definition)
+    xml.close
+    xml
+  end
+end
diff --git a/gtk3/test/test-gtk-button.rb b/gtk3/test/test-gtk-button.rb
new file mode 100644
index 0000000..9bb0d3a
--- /dev/null
+++ b/gtk3/test/test-gtk-button.rb
@@ -0,0 +1,54 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test "no argument" do
+      button = Gtk::Button.new
+      assert_nil(button.label)
+    end
+
+    test ":label" do
+      label = "Button"
+      button = Gtk::Button.new(:label => label)
+      assert_equal(label, button.label)
+    end
+
+    test ":label and :use_underline" do
+      label = "Button"
+      button = Gtk::Button.new(:label         => label,
+                               :use_underline => true)
+      assert_equal([label, true],
+                   [button.label, button.use_underline?])
+    end
+
+    test ":stock_id" do
+      stock_id = Gtk::Stock::OK
+      button = Gtk::Button.new(:stock_id => stock_id)
+      assert_equal([stock_id, true],
+                   [button.label, button.use_stock?])
+    end
+
+    test ":icon_name" do
+      only_gtk_version(3, 10, 0)
+      icon_name = "document-open"
+      button = Gtk::Button.new(:icon_name => icon_name)
+      assert_not_nil(button.image)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-cell-layout.rb b/gtk3/test/test-gtk-cell-layout.rb
new file mode 100644
index 0000000..358dd81
--- /dev/null
+++ b/gtk3/test/test-gtk-cell-layout.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkCellLayout < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @layout = Gtk::ComboBox.new
+    @renderer = Gtk::CellRendererText.new
+    @layout.pack_start(@renderer, false)
+  end
+
+  sub_test_case "#set_attributes" do
+    test "empty" do
+      @layout.set_attributes(@renderer, {})
+    end
+
+    test "multiple" do
+      @layout.set_attributes(@renderer, {:text => 1})
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-color-chooser-dialog.rb b/gtk3/test/test-gtk-color-chooser-dialog.rb
new file mode 100644
index 0000000..62d62ef
--- /dev/null
+++ b/gtk3/test/test-gtk-color-chooser-dialog.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkColorChooserDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::ColorChooserDialog.new
+      if csd_supported?
+        assert_equal("", dialog.title)
+      else
+        assert_nil(dialog.title)
+      end
+    end
+
+    test "title" do
+      dialog = Gtk::ColorChooserDialog.new(:title => "title")
+      assert_equal("title", dialog.title)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::ColorChooserDialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-combo-box-text.rb b/gtk3/test/test-gtk-combo-box-text.rb
new file mode 100644
index 0000000..54f5147
--- /dev/null
+++ b/gtk3/test/test-gtk-combo-box-text.rb
@@ -0,0 +1,34 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkComboBoxText < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test ":entry => true" do
+      combo_box_text = Gtk::ComboBoxText.new(:entry => true)
+      assert do
+        combo_box_text.has_entry?
+      end
+    end
+    test ":entry => false" do
+      combo_box_text = Gtk::ComboBoxText.new
+      assert do
+        not combo_box_text.has_entry?
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-combo-box.rb b/gtk3/test/test-gtk-combo-box.rb
new file mode 100644
index 0000000..280208d
--- /dev/null
+++ b/gtk3/test/test-gtk-combo-box.rb
@@ -0,0 +1,97 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkComboBox < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    sub_test_case(":entry => true") do
+      test "no others" do
+        combo_box = Gtk::ComboBox.new(:entry => true)
+        assert do
+          combo_box.has_entry?
+        end
+      end
+
+      test ":model" do
+        model = Gtk::ListStore.new(Gdk::Pixbuf, String)
+        combo_box = Gtk::ComboBox.new(:entry => true, :model => model)
+        assert do
+          combo_box.has_entry?
+        end
+        assert_equal(model, combo_box.model)
+      end
+
+      test ":area" do
+        area = Gtk::CellAreaBox.new
+        combo_box = Gtk::ComboBox.new(:entry => true, :area => area)
+        assert do
+          combo_box.has_entry?
+        end
+        assert_equal(area, combo_box.area)
+      end
+    end
+
+    sub_test_case("no :entry") do
+      test "no others" do
+        combo_box = Gtk::ComboBox.new
+        assert do
+          not combo_box.has_entry?
+        end
+        assert_nil(combo_box.model)
+      end
+
+      test ":model" do
+        model = Gtk::ListStore.new(Gdk::Pixbuf, String)
+        combo_box = Gtk::ComboBox.new(:model => model)
+        assert do
+          not combo_box.has_entry?
+        end
+        assert_equal(model, combo_box.model)
+      end
+
+      test ":area" do
+        area = Gtk::CellAreaBox.new
+        combo_box = Gtk::ComboBox.new(:area => area)
+        assert do
+          not combo_box.has_entry?
+        end
+        assert_equal(area, combo_box.area)
+      end
+    end
+  end
+
+  sub_test_case("#active_iter") do
+    def setup
+      @model = Gtk::ListStore.new(TrueClass, String)
+
+      iter = @model.append
+      iter[0] = false
+      iter[1] = "item1"
+
+      @combo_box = Gtk::ComboBox.new(:model => @model)
+    end
+
+    test "found" do
+      @combo_box.active_iter = @model.iter_first
+      assert_equal(@model.iter_first, @combo_box.active_iter)
+    end
+
+    test "not found" do
+      assert_nil(@combo_box.active_iter)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-container.rb b/gtk3/test/test-gtk-container.rb
new file mode 100644
index 0000000..c89ae09
--- /dev/null
+++ b/gtk3/test/test-gtk-container.rb
@@ -0,0 +1,171 @@
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkContainer < Test::Unit::TestCase
+  include GtkTestUtils
+
+  class TestClassMethods < self
+    def test_child_properties
+      assert_equal(["x", "y"],
+                   Gtk::Layout.child_properties.collect(&:name))
+    end
+  end
+
+  class TestAdd < self
+    def setup
+      @container = Gtk::Layout.new
+    end
+
+    def test_shift
+      element1 = Gtk::EventBox.new
+      element2 = Gtk::EventBox.new
+      element3 = Gtk::EventBox.new
+      @container << element1 << element2 << element3
+      assert_equal([element1, element2, element3],
+                   @container.children)
+    end
+  end
+
+  class TestEach < self
+    def setup
+      @container = Gtk::Layout.new
+      @element1 = Gtk::EventBox.new
+      @element2 = Gtk::EventBox.new
+      @element3 = Gtk::EventBox.new
+      @container << @element1 << @element2 << @element3
+    end
+
+    def test_enumerable
+      assert_equal([@element1, @element2, @element3],
+                   @container.to_a)
+    end
+  end
+
+  class TestEachAll < self
+    def setup
+      @scrolled_window = Gtk::ScrolledWindow.new
+    end
+
+    def test_enumerable
+      assert_equal([@scrolled_window.vscrollbar, @scrolled_window.hscrollbar],
+                   @scrolled_window.each_all.to_a)
+    end
+  end
+
+  class TestFocusChain < self
+    def setup
+      @container = Gtk::Layout.new
+    end
+
+    def test_set_explicitly
+      @container.focus_chain = []
+      assert_equal([], @container.focus_chain)
+    end
+
+    def test_not_set_explicitly
+      assert_nil(@container.focus_chain)
+    end
+  end
+
+  class TestTemplate < self
+    def test_resource
+      only_gtk_version(3, 10, 0)
+
+      Dir.mktmpdir do |dir|
+        Dir.chdir(dir) do
+          class_name = "MyWindowResource"
+          label_value = "My Label"
+
+          gresource_path = "template.gresource"
+          gresource_xml_path = "#{gresource_path}.xml"
+          template_ui_path = "template.ui"
+          File.open(gresource_xml_path, "w") do |gresource_xml|
+            gresource_xml.puts(<<-XML)
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/template">
+    <file>#{template_ui_path}</file>
+  </gresource>
+</gresources>
+            XML
+          end
+          File.open(template_ui_path, "w") do |template_ui|
+            template_ui.puts(ui_definition(class_name, label_value))
+          end
+
+          assert do
+            system("glib-compile-resources", gresource_xml_path)
+          end
+
+          resource = Gio::Resource.load(gresource_path)
+          Gio::Resources.register(resource)
+          begin
+            custom_class = Class.new(Gtk::Window) do
+              type_register(class_name)
+
+              singleton_class.__send__(:define_method, :init) do
+                set_template(:resource => "/template/#{template_ui_path}")
+                bind_template_child("label")
+              end
+            end
+            window = custom_class.new
+            assert_equal(label_value, window.label.label)
+          ensure
+            Gio::Resources.unregister(resource)
+          end
+        end
+      end
+    end
+
+    def ui_definition(class_name, label)
+      <<-DEFINITION
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <template class="#{class_name}" parent="GtkWindow">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">#{label}</property>
+        <property name="ellipsize">end</property>
+      </object>
+    </child>
+  </template>
+</interface>
+      DEFINITION
+    end
+
+    def test_data
+      only_gtk_version(3, 10, 0)
+
+      class_name = "MyWindowData"
+      label_value = "My Label"
+      template_data = ui_definition(class_name, label_value)
+      custom_class = Class.new(Gtk::Window) do
+        type_register(class_name)
+
+        singleton_class.__send__(:define_method, :init) do
+          set_template(:data => template_data)
+          bind_template_child("label")
+        end
+      end
+      window = custom_class.new
+      assert_equal(label_value, window.label.label)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-css-provider.rb b/gtk3/test/test-gtk-css-provider.rb
new file mode 100644
index 0000000..33b5503
--- /dev/null
+++ b/gtk3/test/test-gtk-css-provider.rb
@@ -0,0 +1,101 @@
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkCssProvider < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @provider = Gtk::CssProvider.new
+  end
+
+  sub_test_case "#load" do
+    test ":data" do
+      assert do
+        @provider.load(:data => "GtkWindow {background-color: red;}")
+      end
+      assert_equal(<<-CSS, @provider.to_s)
+GtkWindow {
+  background-color: rgb(255,0,0);
+}
+      CSS
+    end
+
+    test ":file" do
+      file = Tempfile.new(["ruby-gtk3", ".css"])
+      file.puts("GtkWindow {background-color: red;}")
+      file.close
+      assert do
+        @provider.load(:file => Gio::File.path(file.path))
+      end
+      assert_equal(<<-CSS, @provider.to_s)
+GtkWindow {
+  background-color: rgb(255,0,0);
+}
+      CSS
+    end
+
+    test ":path" do
+      file = Tempfile.new(["ruby-gtk3", ".css"])
+      file.puts("GtkWindow {background-color: red;}")
+      file.close
+      assert do
+        @provider.load(:path => file.path)
+      end
+      assert_equal(<<-CSS, @provider.to_s)
+GtkWindow {
+  background-color: rgb(255,0,0);
+}
+      CSS
+    end
+
+    test ":resource_path" do
+      only_gtk_version(3, 16, 0)
+
+      css = Tempfile.new(["ruby-gtk3", ".css"])
+      css.puts("GtkWindow {background-color: red;}")
+      css.close
+      resource_xml = Tempfile.new(["ruby-gtk3", ".gresource.xml"])
+      resource_xml.puts(<<-RESOURCE_XML)
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/style">
+    <file alias="style.css">#{css.path}</file>
+  </gresource>
+</gresources>
+      RESOURCE_XML
+      resource_xml.close
+      resource_path = resource_xml.path.gsub(/\.xml\z/, "")
+      resource = nil
+      begin
+        system("glib-compile-resources", resource_xml.path)
+        resource = Gio::Resource.load(resource_path)
+        Gio::Resources.register(resource)
+        assert do
+          @provider.load(:resource_path => "/style/style.css")
+        end
+      ensure
+        Gio::Resources.unregister(resource) if resource
+        FileUtils.rm_f(resource_path)
+      end
+
+      assert_equal(<<-CSS, @provider.to_s)
+GtkWindow {
+  background-color: rgb(255,0,0);
+}
+      CSS
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-dialog.rb b/gtk3/test/test-gtk-dialog.rb
new file mode 100644
index 0000000..3f74cc0
--- /dev/null
+++ b/gtk3/test/test-gtk-dialog.rb
@@ -0,0 +1,74 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::Dialog.new
+      assert_nil(dialog.title)
+    end
+
+    test "title" do
+      dialog = Gtk::Dialog.new(:title => "title")
+      assert_equal("title", dialog.title)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::Dialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+
+    test "flags - modal" do
+      dialog = Gtk::Dialog.new(:flags => Gtk::DialogFlags::MODAL)
+      assert do
+        dialog.modal?
+      end
+    end
+
+    test "flags - destroy_with_parent" do
+      dialog = Gtk::Dialog.new(:flags => Gtk::DialogFlags::DESTROY_WITH_PARENT)
+      assert do
+        dialog.destroy_with_parent?
+      end
+    end
+
+    test "buttons" do
+      response_id = 1
+      buttons = [
+        ["title", response_id],
+      ]
+      dialog = Gtk::Dialog.new(:buttons => buttons)
+      button = dialog.get_widget_for_response(response_id)
+      assert_equal("title", button.label)
+    end
+  end
+
+  sub_test_case "instance methods" do
+    def setup
+      @dialog = Gtk::Dialog.new
+    end
+
+    test "#use_header_bar?" do
+      only_gtk_version(3, 12, 0)
+      assert do
+        not @dialog.use_header_bar?
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_entry.rb b/gtk3/test/test-gtk-entry.rb
similarity index 100%
rename from gtk3/test/test_gtk_entry.rb
rename to gtk3/test/test-gtk-entry.rb
diff --git a/gtk3/test/test-gtk-event-controller.rb b/gtk3/test/test-gtk-event-controller.rb
new file mode 100644
index 0000000..70f4ee8
--- /dev/null
+++ b/gtk3/test/test-gtk-event-controller.rb
@@ -0,0 +1,35 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkEventController < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 14, 0)
+    @gesture = Gtk::GestureSingle.new
+  end
+
+  def test_propergation_phase
+    @gesture.propagation_phase = :capture
+    assert_equal(Gtk::PropagationPhase::CAPTURE, @gesture.propagation_phase)
+  end
+
+  class TestEnum < self
+    def test_enum_propergation_phase
+      assert_const_defined(Gtk::PropagationPhase, :BUBBLE)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-file-chooser-dialog.rb b/gtk3/test/test-gtk-file-chooser-dialog.rb
new file mode 100644
index 0000000..a0ce604
--- /dev/null
+++ b/gtk3/test/test-gtk-file-chooser-dialog.rb
@@ -0,0 +1,52 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkFileChooserDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::FileChooserDialog.new
+      assert_equal(Gtk::FileChooserAction::OPEN, dialog.action)
+    end
+
+    test "title" do
+      dialog = Gtk::FileChooserDialog.new(:title => "title")
+      assert_equal("title", dialog.title)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::FileChooserDialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+
+    test "action" do
+      dialog = Gtk::FileChooserDialog.new(:action => :save)
+      assert_equal(Gtk::FileChooserAction::SAVE, dialog.action)
+    end
+
+    test "buttons" do
+      response_id = 1
+      buttons = [
+        ["title", response_id],
+      ]
+      dialog = Gtk::FileChooserDialog.new(:buttons => buttons)
+      button = dialog.get_widget_for_response(response_id)
+      assert_equal("title", button.label)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-flow-box.rb b/gtk3/test/test-gtk-flow-box.rb
new file mode 100644
index 0000000..4119a78
--- /dev/null
+++ b/gtk3/test/test-gtk-flow-box.rb
@@ -0,0 +1,64 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkFlowBox < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 12, 0)
+    @flow_box = Gtk::FlowBox.new
+  end
+
+  def test_homogeneous_accessors
+    @flow_box.homogeneous = true
+    assert_true(@flow_box.homogeneous?)
+  end
+
+  def test_row_spaceing_accessors
+    row_spaces = 10
+    @flow_box.row_spacing = row_spaces
+    assert_equal(row_spaces, @flow_box.row_spacing)
+  end
+
+  def test_column_spacing_accessors
+    column_spaces = 10
+    @flow_box.column_spacing = column_spaces
+    assert_equal(column_spaces, @flow_box.column_spacing)
+  end
+
+  def test_min_children_per_line_accessors
+    min_value = 3
+    @flow_box.min_children_per_line = min_value
+    assert_equal(min_value, @flow_box.min_children_per_line)
+  end
+
+  def test_max_children_per_line_accessors
+    max_value = 10
+    @flow_box.max_children_per_line = max_value
+    assert_equal(max_value, @flow_box.max_children_per_line)
+  end
+
+  def test_activate_single_on_click_accessors
+    @flow_box.activate_on_single_click = false
+    assert_false(@flow_box.activate_on_single_click?)
+  end
+
+  def test_selection_mode_accessors
+    selection_browse = Gtk::SelectionMode::BROWSE
+    @flow_box.selection_mode = selection_browse
+    assert_equal(selection_browse, @flow_box.selection_mode)
+  end
+end
diff --git a/gtk3/test/test-gtk-font-chooser-dialog.rb b/gtk3/test/test-gtk-font-chooser-dialog.rb
new file mode 100644
index 0000000..acc8b9e
--- /dev/null
+++ b/gtk3/test/test-gtk-font-chooser-dialog.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkFontChooserDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::FontChooserDialog.new
+      if csd_supported?
+        assert_equal("", dialog.title)
+      else
+        assert_nil(dialog.title)
+      end
+    end
+
+    test "title" do
+      dialog = Gtk::FontChooserDialog.new(:title => "title")
+      assert_equal("title", dialog.title)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::FontChooserDialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-gesture-multi-press.rb b/gtk3/test/test-gtk-gesture-multi-press.rb
new file mode 100644
index 0000000..70d4cb8
--- /dev/null
+++ b/gtk3/test/test-gtk-gesture-multi-press.rb
@@ -0,0 +1,31 @@
+# Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkGestureMultiPress < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 14, 0)
+    widget = Gtk::Invisible.new
+    @press = Gtk::GestureMultiPress.new(widget)
+  end
+
+  def test_area
+    rectangle = Gdk::Rectangle.new(0, 10, 20, 30)
+    @press.area = rectangle
+    assert_equal(rectangle, @press.area)
+  end
+end
diff --git a/gtk3/test/test-gtk-gesture-pan.rb b/gtk3/test/test-gtk-gesture-pan.rb
new file mode 100644
index 0000000..af57b30
--- /dev/null
+++ b/gtk3/test/test-gtk-gesture-pan.rb
@@ -0,0 +1,32 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkGesturePan < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 14, 0)
+    orientation_default = Gtk::Orientation::HORIZONTAL
+    widget = Gtk::Invisible.new
+    @pan = Gtk::GesturePan.new(widget, orientation_default)
+  end
+
+  def test_orientation
+    orientation_vertical = Gtk::Orientation::VERTICAL
+    @pan.orientation = orientation_vertical
+    assert_equal(orientation_vertical, @pan.orientation)
+  end
+end
diff --git a/gtk3/test/test-gtk-gesture-single.rb b/gtk3/test/test-gtk-gesture-single.rb
new file mode 100644
index 0000000..578b57f
--- /dev/null
+++ b/gtk3/test/test-gtk-gesture-single.rb
@@ -0,0 +1,40 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkGestureSingle < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 14, 0)
+    @gesture = Gtk::GestureSingle.new
+  end
+
+  def test_exclusive
+    @gesture.exclusive = true
+    assert_true(@gesture.exclusive?)
+  end
+
+  def test_touch_only
+    @gesture.touch_only = true
+    assert_true(@gesture.touch_only?)
+  end
+
+  def test_button
+    button_number = 0
+    @gesture.button = button_number
+    assert_equal(@gesture.button, button_number)
+  end
+end
diff --git a/gtk3/test/test-gtk-gesture.rb b/gtk3/test/test-gtk-gesture.rb
new file mode 100644
index 0000000..e0dfe71
--- /dev/null
+++ b/gtk3/test/test-gtk-gesture.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkGesture < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 14, 0)
+  end
+
+  class TestEnum < self
+    def test_event_sequence_state
+      assert_const_defined(Gtk::EventSequenceState, :DENIED)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-header-bar.rb b/gtk3/test/test-gtk-header-bar.rb
new file mode 100644
index 0000000..b852741
--- /dev/null
+++ b/gtk3/test/test-gtk-header-bar.rb
@@ -0,0 +1,80 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkHeaderBar < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 10, 0)
+    @header_bar = Gtk::HeaderBar.new
+  end
+
+  def test_custom_title_accessors
+    widget = Gtk::EventBox.new
+    @header_bar.custom_title = widget
+    assert_equal(widget, @header_bar.custom_title)
+  end
+
+  def test_title_accessors
+    header_bar_title = "no title"
+    @header_bar.title = header_bar_title
+    assert_equal(header_bar_title, @header_bar.title)
+  end
+
+  def test_subtitle_accessors
+    header_bar_subtitle = "sub title"
+    @header_bar.subtitle = header_bar_subtitle
+    assert_equal(header_bar_subtitle, @header_bar.subtitle)
+  end
+
+  def test_show_close_button_accessors
+    @header_bar.show_close_button = true
+    assert_equal(true, @header_bar.show_close_button?)
+  end
+
+  def test_spacing_accessors
+    spacing_size = 10
+    @header_bar.spacing = spacing_size
+    assert_equal(spacing_size, @header_bar.spacing)
+  end
+
+  def test_pack
+    start1 = Gtk::EventBox.new
+    start2 = Gtk::EventBox.new
+    end1 = Gtk::EventBox.new
+    end2 = Gtk::EventBox.new
+    @header_bar.pack_start(start1)
+    @header_bar.pack_start(start2)
+    @header_bar.pack_end(end1)
+    @header_bar.pack_end(end2)
+    assert_equal([start1, start2, end1, end2],
+                 @header_bar.children)
+  end
+
+  def test_decolation_layout_accessors
+    only_gtk_version(3, 12, 0)
+    layout = "decolated"
+    @header_bar.decoration_layout = layout
+    assert_equal(layout, @header_bar.decoration_layout)
+    assert_true(@header_bar.decoration_layout_set?)
+  end
+
+  def test_has_subtitle_accessors
+    only_gtk_version(3, 12, 0)
+    @header_bar.has_subtitle = false
+    assert_false(@header_bar.has_subtitle?)
+  end
+end
diff --git a/gtk3/test/test_gtk_icon_theme.rb b/gtk3/test/test-gtk-icon-theme.rb
similarity index 100%
rename from gtk3/test/test_gtk_icon_theme.rb
rename to gtk3/test/test-gtk-icon-theme.rb
diff --git a/gtk3/test/test-gtk-icon-view.rb b/gtk3/test/test-gtk-icon-view.rb
new file mode 100644
index 0000000..9d31631
--- /dev/null
+++ b/gtk3/test/test-gtk-icon-view.rb
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkIconView < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test "no arguments" do
+      icon_view = Gtk::IconView.new
+      assert_nil(icon_view.model)
+    end
+
+    test ":model" do
+      model = Gtk::ListStore.new(String)
+      icon_view = Gtk::IconView.new(:model => model)
+      assert_equal(model, icon_view.model)
+    end
+
+    test ":area" do
+      area = Gtk::CellAreaBox.new
+      icon_view = Gtk::IconView.new(:area => area)
+      assert_equal(area, icon_view.area)
+    end
+  end
+
+  class TestGetCellRect < self
+    def setup
+      only_gtk_version(3, 6, 0)
+      model = Gtk::ListStore.new(String, Gdk::Pixbuf)
+      iter = model.append
+      model.set_values(iter, ["label", nil])
+      @path = iter.path
+      @icon_view = Gtk::IconView.new(:model => model)
+    end
+
+    def test_found
+      assert_kind_of(Gdk::Rectangle, @icon_view.get_cell_rect(@path))
+    end
+
+    def test_not_found
+      indices, _ = @path.indices
+      not_found_path = Gtk::TreePath.new
+      not_found_path.append_index(indices.last + 1)
+      assert_nil(@icon_view.get_cell_rect(not_found_path))
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-image.rb b/gtk3/test/test-gtk-image.rb
new file mode 100644
index 0000000..cebfaaf
--- /dev/null
+++ b/gtk3/test/test-gtk-image.rb
@@ -0,0 +1,52 @@
+class TestGtkImage < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "stock" do
+      image = Gtk::Image.new(:stock => Gtk::Stock::GO_FORWARD,
+                             :size => :dialog)
+      assert_equal([
+                     Gtk::Stock::GO_FORWARD.to_s,
+                     Gtk::IconSize::DIALOG,
+                   ],
+                   image.stock)
+    end
+
+    test "icon_name" do
+      icon_name = "dialog-password"
+      image = Gtk::Image.new(:icon_name => icon_name,
+                             :size => Gtk::IconSize::DIALOG)
+      assert_equal([
+                     icon_name,
+                     Gtk::IconSize::DIALOG,
+                   ],
+                   image.icon_name)
+    end
+
+    test "icon" do
+      icon = Gio::ThemedIcon.new("gtk-open")
+      image = Gtk::Image.new(:icon => icon,
+                             :size => :dialog)
+      assert_equal([
+                     icon,
+                     Gtk::IconSize::DIALOG,
+                   ],
+                   image.icon)
+    end
+
+    test "resource" do
+      resource = Gio::Resource.load(fixture_path("image.gresource"))
+      Gio::Resources.register(resource)
+      begin
+        resource_path = "/org/ruby/gnome/gnome-logo-icon.png"
+        image = Gtk::Image.new(:resource => resource_path,
+                               :size => :dialog)
+        omit("GTK+ 3.16 doesn't support getting resource path. See GitHub#461.")
+        assert_equal(resource_path,
+                     image.resource)
+      ensure
+        Gio::Resources.unregister(resource)
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-label.rb b/gtk3/test/test-gtk-label.rb
new file mode 100644
index 0000000..75c9082
--- /dev/null
+++ b/gtk3/test/test-gtk-label.rb
@@ -0,0 +1,39 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkLabel < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test ":use_underline => true" do
+      label = Gtk::Label.new("_Hello", :use_underline => true)
+      assert_equal("h", [label.mnemonic_keyval].pack("U"))
+    end
+  end
+
+  sub_test_case "instance methods" do
+    sub_test_case "set_markup" do
+      def setup
+        @label = Gtk::Label.new
+      end
+
+      test ":use_underline => true" do
+        @label.set_markup("_Hello", :use_underline => true)
+        assert_equal("h", [@label.mnemonic_keyval].pack("U"))
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-level-bar.rb b/gtk3/test/test-gtk-level-bar.rb
new file mode 100644
index 0000000..ee8da58
--- /dev/null
+++ b/gtk3/test/test-gtk-level-bar.rb
@@ -0,0 +1,94 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkLevelBar < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 6, 0)
+  end
+
+  class TestConstructor < self
+    def test_no_arguments
+      level_bar = Gtk::LevelBar.new
+      assert_equal([
+                     0.0,
+                     1.0,
+                   ],
+                   [
+                     level_bar.min_value,
+                     level_bar.max_value,
+                   ])
+    end
+
+    def test_min_max_value
+      min_value = 1.0
+      max_value = 20.0
+      level_bar = Gtk::LevelBar.new(min_value, max_value)
+      assert_equal([
+                     min_value,
+                     max_value,
+                   ],
+                   [
+                     level_bar.min_value,
+                     level_bar.max_value,
+                   ])
+    end
+  end
+
+  class TestAccessor < self
+    def setup
+      super
+      @level_bar = Gtk::LevelBar.new
+    end
+
+    def test_min_value
+      @level_bar.min_value = 1.0
+      assert_equal(1.0, @level_bar.min_value)
+    end
+
+    def test_max_value
+      @level_bar.max_value = 20.0
+      assert_equal(20.0, @level_bar.max_value)
+    end
+
+    def test_value
+      @level_bar.value = 1.0
+      assert_equal(1.0, @level_bar.value)
+    end
+
+    def test_offset_value
+      @level_bar.add_offset_value(Gtk::LevelBar::OFFSET_LOW, 0.10)
+      assert_equal(0.10, @level_bar.get_offset_value(Gtk::LevelBar::OFFSET_LOW))
+    end
+
+    def test_get_nonexistent_offset_value
+      assert_nil(@level_bar.get_offset_value("nonexistent"))
+    end
+
+    def test_inverted
+      only_gtk_version(3, 8, 0)
+      @level_bar.inverted = true
+      assert_true(@level_bar.inverted?)
+    end
+  end
+
+  class TestEnum < self
+    def test_level_bar_mode
+      assert_const_defined(Gtk::LevelBar::Mode, :CONTINUOUS)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-list-store.rb b/gtk3/test/test-gtk-list-store.rb
new file mode 100644
index 0000000..d77db08
--- /dev/null
+++ b/gtk3/test/test-gtk-list-store.rb
@@ -0,0 +1,204 @@
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301  USA
+
+class TestGtkListStore < Test::Unit::TestCase
+  include GtkTestUtils
+
+  ID = 0
+  NAME = 1
+
+  COLUMNS = {
+    ID => Integer,
+    NAME => String,
+  }
+
+  def setup
+    columns = COLUMNS.keys.sort.collect do |key|
+      COLUMNS[key]
+    end
+    @store = Gtk::ListStore.new(*columns)
+  end
+
+  sub_test_case(".new") do
+    test "no columns" do
+      assert_raise(ArgumentError.new("No column type is specified")) do
+        Gtk::ListStore.new
+      end
+    end
+  end
+
+  sub_test_case("#set_values") do
+    test "Array" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal([0, '1'], [iter[0], iter[1]])
+
+      iter = @store.append
+      @store.set_values(iter, [2, '3'])
+      assert_equal([2, '3'], [iter[0], iter[1]])
+
+      @store.set_values(iter, [])
+      assert_equal([2, '3'], [iter[0], iter[1]])
+    end
+
+    test "Hash" do
+      iter = @store.append
+      @store.set_values(iter, {ID => 0, NAME => 'me'})
+      assert_equal([0, 'me'], [iter[ID], iter[NAME]])
+
+      iter = @store.append
+      @store.set_values(iter, {NAME => 'you', ID => 2})
+      assert_equal([2, 'you'], [iter[ID], iter[NAME]])
+
+      @store.set_values(iter, {NAME => "she"})
+      assert_equal([2, 'she'], [iter[ID], iter[NAME]])
+
+      @store.set_values(iter, {})
+      assert_equal([2, 'she'], [iter[ID], iter[NAME]])
+    end
+  end
+
+  sub_test_case("Add data") do
+    test "#append" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal("0", iter.path.to_s)
+
+      iter = @store.append
+      @store.set_values(iter, [2, '3'])
+
+      assert_equal("1", iter.path.to_s)
+      assert_equal(0, @store.iter_first[0])
+      assert_equal(2, @store.get_iter("1")[0])
+    end
+
+    test "#prepend" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal("0", iter.path.to_s)
+
+      iter = @store.prepend
+      @store.set_values(iter, [2, '3'])
+
+      assert_equal("0", iter.path.to_s)
+      assert_equal(2, @store.iter_first[0])
+      assert_equal(0, @store.get_iter("1")[0])
+    end
+
+    test "#insert" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal("0", iter.path.to_s)
+
+      iter = @store.append
+      @store.set_values(iter, [2, '3'])
+      assert_equal("1", iter.path.to_s)
+
+      iter = @store.insert(1)
+      @store.set_values(iter, [4, '5'])
+
+      assert_equal(0, @store.get_iter("0")[0])
+      assert_equal(4, @store.get_iter("1")[0])
+      assert_equal(2, @store.get_iter("2")[0])
+    end
+
+    test "#insert_before" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal("0", iter.path.to_s)
+
+      iter = @store.append
+      @store.set_values(iter, [2, '3'])
+      assert_equal("1", iter.path.to_s)
+
+      sibling = @store.get_iter("1")
+      iter = @store.insert_before(sibling)
+      @store.set_values(iter, [4, '5'])
+
+      assert_equal(0, @store.get_iter("0")[0])
+      assert_equal(4, @store.get_iter("1")[0])
+      assert_equal(2, @store.get_iter("2")[0])
+    end
+
+    test "#insert_after" do
+      iter = @store.append
+      @store.set_values(iter, [0, '1'])
+      assert_equal("0", iter.path.to_s)
+
+      iter = @store.append
+      @store.set_values(iter, [2, '3'])
+      assert_equal("1", iter.path.to_s)
+
+      sibling = @store.get_iter("0")
+      iter = @store.insert_after(sibling)
+      @store.set_values(iter, [4, '5'])
+
+      assert_equal(0, @store.get_iter("0")[0])
+      assert_equal(4, @store.get_iter("1")[0])
+      assert_equal(2, @store.get_iter("2")[0])
+    end
+  end
+
+  test "#each" do
+    first_iter = @store.append
+    first_iter[ID] = 0
+    first_iter[NAME] = "Hello"
+    second_iter = @store.append
+    second_iter[ID] = 1
+    second_iter[NAME] = "World"
+
+    normalized_data = []
+    @store.each do |model, path, iter|
+      normalized_data << [model, path.to_s, iter.class]
+    end
+    assert_equal([
+                   [@store, first_iter.path.to_s, first_iter.class],
+                   [@store, second_iter.path.to_s, second_iter.class],
+                 ],
+                 normalized_data)
+  end
+
+  sub_test_case "GC" do
+    test "iter" do
+      GC.start
+      n_iterators = count_objects(Gtk::TreeIter)
+      50.times do |i|
+        iter = @store.append
+        iter[ID] = i
+        iter[NAME] = i.to_s
+      end
+      100.times do
+        @store.iter_first
+      end
+      iter = @store.iter_first
+      while @store.remove(iter); end
+      assert_equal(0, @store.to_enum(:each).to_a.size)
+      GC.start
+      assert do
+        count_objects(Gtk::TreeIter) <= n_iterators + 1
+      end
+    end
+
+    private
+    def count_objects(klass)
+      n_objects = ObjectSpace.each_object(Gtk::TreeIter) do
+        # do nothing
+      end
+      n_objects
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_menu_button.rb b/gtk3/test/test-gtk-menu-button.rb
similarity index 100%
rename from gtk3/test/test_gtk_menu_button.rb
rename to gtk3/test/test-gtk-menu-button.rb
diff --git a/gtk3/test/test_gtk_menu_item.rb b/gtk3/test/test-gtk-menu-item.rb
similarity index 100%
rename from gtk3/test/test_gtk_menu_item.rb
rename to gtk3/test/test-gtk-menu-item.rb
diff --git a/gtk3/test/test-gtk-message-dialog.rb b/gtk3/test/test-gtk-message-dialog.rb
new file mode 100644
index 0000000..f666eee
--- /dev/null
+++ b/gtk3/test/test-gtk-message-dialog.rb
@@ -0,0 +1,62 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkMessageDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::MessageDialog.new
+      assert_equal("", dialog.text)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::MessageDialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+
+    test "flags - modal" do
+      dialog = Gtk::MessageDialog.new(:flags => :modal)
+      assert do
+        dialog.modal?
+      end
+    end
+
+    test "flags - destroy_with_parent" do
+      dialog = Gtk::MessageDialog.new(:flags => :destroy_with_parent)
+      assert do
+        dialog.destroy_with_parent?
+      end
+    end
+
+    test "type" do
+      dialog = Gtk::MessageDialog.new(:type => :error)
+      assert_equal(Gtk::MessageType::ERROR, dialog.message_type)
+    end
+
+    test "buttons" do
+      dialog = Gtk::MessageDialog.new(:buttons => :cancel)
+      button = dialog.get_widget_for_response(Gtk::ResponseType::CANCEL)
+      assert_not_nil(button)
+    end
+
+    test "message" do
+      dialog = Gtk::MessageDialog.new(:message => "Label")
+      assert_equal("Label", dialog.text)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-paned.rb b/gtk3/test/test-gtk-paned.rb
new file mode 100644
index 0000000..e3cb1cc
--- /dev/null
+++ b/gtk3/test/test-gtk-paned.rb
@@ -0,0 +1,109 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkPaned < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @paned = Gtk::Paned.new(:horizontal)
+  end
+
+  sub_test_case "#pack1" do
+    def setup
+      super
+      @child = Gtk::EventBox.new
+    end
+
+    test "no options" do
+      @paned.pack1(@child)
+      assert_equal({
+                     :resize => false,
+                     :shrink => true,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+
+    test ":resize => true" do
+      @paned.pack1(@child, :resize => true)
+      assert_equal({
+                     :resize => true,
+                     :shrink => true,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+
+    test ":shrink => false" do
+      @paned.pack1(@child, :shrink => false)
+      assert_equal({
+                     :resize => false,
+                     :shrink => false,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+  end
+
+  sub_test_case "#pack2" do
+    def setup
+      super
+      @child = Gtk::EventBox.new
+    end
+
+    test "no options" do
+      @paned.pack2(@child)
+      assert_equal({
+                     :resize => true,
+                     :shrink => true,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+
+    test ":resize => false" do
+      @paned.pack2(@child, :resize => false)
+      assert_equal({
+                     :resize => false,
+                     :shrink => true,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+
+    test ":shrink => false" do
+      @paned.pack2(@child, :shrink => false)
+      assert_equal({
+                     :resize => true,
+                     :shrink => false,
+                   },
+                   {
+                     :resize => @paned.child_get_property(@child, :resize),
+                     :shrink => @paned.child_get_property(@child, :shrink),
+                   })
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-places-sidebar.rb b/gtk3/test/test-gtk-places-sidebar.rb
new file mode 100644
index 0000000..130e01a
--- /dev/null
+++ b/gtk3/test/test-gtk-places-sidebar.rb
@@ -0,0 +1,68 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkPlacesSidebar < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 10, 0)
+    @places_sidebar = Gtk::PlacesSidebar.new
+  end
+
+  def test_open_flags_accessors
+    open_flag_new_tab = Gtk::PlacesOpenFlags::NEW_TAB
+    @places_sidebar.open_flags = open_flag_new_tab
+    assert_equal(open_flag_new_tab, @places_sidebar.open_flags)
+  end
+
+  def test_location_accessors
+    assert_nil(@places_sidebar.location)
+
+    home = Gio::File.path(ENV["HOME"])
+    @places_sidebar.location = home
+    assert_equal(home.path, @places_sidebar.location.path)
+  end
+
+  def test_show_desktop_accessors
+    @places_sidebar.show_desktop = false
+    assert_false(@places_sidebar.show_desktop?)
+  end
+
+  def test_shortcuts
+    file_location1 = Gio::File.path("file1")
+    file_location2 = Gio::File.path("file2")
+    @places_sidebar.add_shortcut(file_location1)
+    @places_sidebar.add_shortcut(file_location2)
+    assert_equal([file_location1, file_location2],
+                 @places_sidebar.shortcuts)
+  end
+
+  def test_local_only_accesssors
+    @places_sidebar.local_only = true
+    assert_true(@places_sidebar.local_only?)
+  end
+
+  def test_show_enter_location_accesssors
+    only_gtk_version(3, 14, 0)
+    @places_sidebar.show_enter_location = true
+    assert_true(@places_sidebar.show_enter_location?)
+  end
+
+  def test_show_connect_to_server_accesssors
+    @places_sidebar.show_connect_to_server = true
+    assert_true(@places_sidebar.show_connect_to_server?)
+  end
+end
diff --git a/gtk3/test/test-gtk-radio-action.rb b/gtk3/test/test-gtk-radio-action.rb
new file mode 100644
index 0000000..b4e05a8
--- /dev/null
+++ b/gtk3/test/test-gtk-radio-action.rb
@@ -0,0 +1,45 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkRadioAction < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test("no options") do
+      action = Gtk::RadioAction.new("choose-one", 1)
+      assert_equal(["choose-one", 1],
+                   [action.name, action.value])
+    end
+
+    test(":label") do
+      action = Gtk::RadioAction.new("choose-one", 1,
+                                    :label => "Choose one")
+      assert_equal("Choose one", action.label)
+    end
+
+    test(":tooltip") do
+      action = Gtk::RadioAction.new("choose-one", 1,
+                                    :tooltip => "Choose one by this action")
+      assert_equal("Choose one by this action", action.tooltip)
+    end
+
+    test(":stock_id") do
+      action = Gtk::RadioAction.new("add-one", 1,
+                                    :stock_id => "gtk-add")
+      assert_equal("gtk-add", action.stock_id)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-radio-button.rb b/gtk3/test/test-gtk-radio-button.rb
new file mode 100644
index 0000000..3a54754
--- /dev/null
+++ b/gtk3/test/test-gtk-radio-button.rb
@@ -0,0 +1,82 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkRadioButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      button = Gtk::RadioButton.new
+      assert_nil(button.label)
+    end
+
+    test "label" do
+      button = Gtk::RadioButton.new(:label => "label")
+      assert_equal("label", button.label)
+    end
+
+    test "label + use_underline" do
+      button = Gtk::RadioButton.new(:label => "_label", :use_underline => true)
+      assert do
+        button.use_underline?
+      end
+    end
+
+    test "member" do
+      button1 = Gtk::RadioButton.new
+      button2 = Gtk::RadioButton.new(:member => button1)
+      assert_equal([
+                     [button2, button1],
+                     [button2, button1],
+                   ],
+                   [
+                     button1.group,
+                     button2.group,
+                   ])
+    end
+
+    test "member + label" do
+      button1 = Gtk::RadioButton.new
+      button2 = Gtk::RadioButton.new(:member => button1,
+                                     :label => "label")
+      assert_equal({
+                     :label => "label",
+                     :group => [button2, button1],
+                   },
+                   {
+                     :label => button2.label,
+                     :group => button2.group,
+                   })
+    end
+
+    test "member + label + use_underline" do
+      button1 = Gtk::RadioButton.new
+      button2 = Gtk::RadioButton.new(:member => button1,
+                                     :label => "_label",
+                                     :use_underline => true)
+      assert_equal({
+                     :label => "_label",
+                     :group => [button2, button1],
+                     :use_underline => true,
+                   },
+                   {
+                     :label => button2.label,
+                     :group => button2.group,
+                     :use_underline => button2.use_underline?,
+                   })
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-recent-chooser-dialog.rb b/gtk3/test/test-gtk-recent-chooser-dialog.rb
new file mode 100644
index 0000000..1120a2d
--- /dev/null
+++ b/gtk3/test/test-gtk-recent-chooser-dialog.rb
@@ -0,0 +1,53 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkRecentChooserDialog < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      dialog = Gtk::RecentChooserDialog.new
+      assert_nil(dialog.title)
+    end
+
+    test "title" do
+      dialog = Gtk::RecentChooserDialog.new(:title => "title")
+      assert_equal("title", dialog.title)
+    end
+
+    test "parent" do
+      parent = Gtk::Window.new
+      dialog = Gtk::RecentChooserDialog.new(:parent => parent)
+      assert_equal(parent, dialog.transient_for)
+    end
+
+    test "manager" do
+      manager = Gtk::RecentManager.new
+      Gtk::RecentChooserDialog.new(:recent_manager => manager)
+      # TODO: How to test the manager is used?
+    end
+
+    test "buttons" do
+      response_id = 1
+      buttons = [
+        ["title", response_id],
+      ]
+      dialog = Gtk::RecentChooserDialog.new(:buttons => buttons)
+      button = dialog.get_widget_for_response(response_id)
+      assert_equal("title", button.label)
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_recent_data.rb b/gtk3/test/test-gtk-recent-data.rb
similarity index 100%
rename from gtk3/test/test_gtk_recent_data.rb
rename to gtk3/test/test-gtk-recent-data.rb
diff --git a/gtk3/test/test-gtk-recent-filter-info.rb b/gtk3/test/test-gtk-recent-filter-info.rb
new file mode 100644
index 0000000..a5f8a68
--- /dev/null
+++ b/gtk3/test/test-gtk-recent-filter-info.rb
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkRecentFilterInfo < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def test_contains
+    info = Gtk::RecentFilterInfo.new
+    assert_equal(Gtk::RecentFilterFlags.new, info.contains)
+  end
+end
diff --git a/gtk3/test/test-gtk-recent-info.rb b/gtk3/test/test-gtk-recent-info.rb
new file mode 100644
index 0000000..120fb83
--- /dev/null
+++ b/gtk3/test/test-gtk-recent-info.rb
@@ -0,0 +1,37 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkRecentInfo < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "instance methods" do
+    def setup
+      manager = Gtk::RecentManager.new
+      uri = "file:///#{__FILE__}"
+      manager.add_item(uri)
+      while Gtk.events_pending?
+        Gtk.main_iteration
+      end
+      @info = manager.lookup_item(uri)
+    end
+
+    test "#exist?" do
+      assert do
+        @info.exist?
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_revealer.rb b/gtk3/test/test-gtk-revealer.rb
similarity index 100%
rename from gtk3/test/test_gtk_revealer.rb
rename to gtk3/test/test-gtk-revealer.rb
diff --git a/gtk3/test/test-gtk-scale-button.rb b/gtk3/test/test-gtk-scale-button.rb
new file mode 100644
index 0000000..10f61c8
--- /dev/null
+++ b/gtk3/test/test-gtk-scale-button.rb
@@ -0,0 +1,56 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkScaleButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test "no argument" do
+      scale_button = Gtk::ScaleButton.new
+      assert_equal(Gtk::IconSize::BUTTON, scale_button.size)
+      assert_equal(0.0, scale_button.adjustment.lower)
+      assert_equal(100.0, scale_button.adjustment.upper)
+      assert_equal(2.0, scale_button.adjustment.step_increment)
+      assert_equal(nil, scale_button.icons)
+    end
+
+    test ":icon_size" do
+      scale_button = Gtk::ScaleButton.new(:icon_size => :menu)
+      assert_equal(Gtk::IconSize::MENU, scale_button.size)
+    end
+
+    test ":min" do
+      scale_button = Gtk::ScaleButton.new(:min => 4.0)
+      assert_equal(4.0, scale_button.adjustment.lower)
+    end
+
+    test ":max" do
+      scale_button = Gtk::ScaleButton.new(:max => 90.0)
+      assert_equal(90.0, scale_button.adjustment.upper)
+    end
+
+    test ":step" do
+      scale_button = Gtk::ScaleButton.new(:step => 5.0)
+      assert_equal(5.0, scale_button.adjustment.step_increment)
+    end
+
+    test ":icons" do
+      icons_set = %w(gtk-goto-bottom gtk-goto-top gtk-execute)
+      scale_button = Gtk::ScaleButton.new(:icons => icons_set)
+      assert_equal(icons_set, scale_button.icons)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-search-bar.rb b/gtk3/test/test-gtk-search-bar.rb
new file mode 100644
index 0000000..70a5fb2
--- /dev/null
+++ b/gtk3/test/test-gtk-search-bar.rb
@@ -0,0 +1,55 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkSearchBar < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 10, 0)
+    @search_bar = Gtk::SearchBar.new
+  end
+
+  def test_connect_entry
+    entry = Gtk::SearchEntry.new
+    assert_equal(@search_bar, @search_bar.connect_entry(entry))
+  end
+
+  def test_search_mode_enabled_accessors
+    entry = Gtk::SearchEntry.new
+    @search_bar.connect_entry(entry)
+    @search_bar.search_mode_enabled = true
+    assert_true(@search_bar.search_mode_enabled?)
+  end
+
+  def test_show_close_button_accessors
+    @search_bar.show_close_button = true
+    assert_true(@search_bar.show_close_button?)
+  end
+
+  def test_handle_event
+    window = Gtk::Window.new
+    key_press_event = Gdk::EventKey.new(:key_press)
+    key_press_event.keyval = Gdk::Keyval::KEY_a
+    entry = Gtk::SearchEntry.new
+    @search_bar.add(entry)
+    @search_bar.connect_entry(entry)
+    window.add(@search_bar)
+    window.show_all
+    key_press_event.window = window.window
+    assert_equal(Gdk::Event::STOP,
+                 @search_bar.handle_event(key_press_event))
+  end
+end
diff --git a/gtk3/test/test_gtk_search_entry.rb b/gtk3/test/test-gtk-search-entry.rb
similarity index 100%
rename from gtk3/test/test_gtk_search_entry.rb
rename to gtk3/test/test-gtk-search-entry.rb
diff --git a/gtk3/test/test-gtk-spin-button.rb b/gtk3/test/test-gtk-spin-button.rb
new file mode 100644
index 0000000..ba5401a
--- /dev/null
+++ b/gtk3/test/test-gtk-spin-button.rb
@@ -0,0 +1,45 @@
+# Copyright (C) 2014 Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+class TestGtkSpinButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "#initialize" do
+    def test_adjustment
+      adjustment = Gtk::Adjustment.new(0, 0, 10, 1, 2, 4)
+      button = Gtk::SpinButton.new(adjustment)
+      assert_equal(adjustment, button.adjustment)
+    end
+
+    def test_range
+      min  = 0
+      max  = 100
+      step = 10
+      button = Gtk::SpinButton.new(min, max, step)
+      adjustment = button.adjustment
+      assert_equal([
+                     min,
+                     max,
+                     step,
+                   ],
+                   [
+                     adjustment.lower,
+                     adjustment.upper,
+                     adjustment.step_increment,
+                   ])
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_stack_switcher.rb b/gtk3/test/test-gtk-stack-switcher.rb
similarity index 100%
rename from gtk3/test/test_gtk_stack_switcher.rb
rename to gtk3/test/test-gtk-stack-switcher.rb
diff --git a/gtk3/test/test-gtk-stack.rb b/gtk3/test/test-gtk-stack.rb
new file mode 100644
index 0000000..4d796b7
--- /dev/null
+++ b/gtk3/test/test-gtk-stack.rb
@@ -0,0 +1,122 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkStack < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    only_gtk_version(3, 10, 0)
+    @stack = Gtk::Stack.new
+  end
+
+  class TestAdd < self
+    def setup
+      super
+      @child = Gtk::EventBox.new
+    end
+
+    def test_return_value
+      assert_equal(@stack, @stack.add(@child))
+    end
+
+    def test_added
+      @stack.add(@child)
+      assert_equal([@child], @stack.children)
+    end
+
+    def test_name
+      widget_name = "set widget name"
+      @stack.add(@child, widget_name)
+      assert_equal(widget_name,
+                   @stack.child_get_property(@child, "name"))
+    end
+
+    def test_name_add_title
+      widget_name = "set widget name"
+      widget_title = "set widget title"
+      @stack.add(@child, widget_name, widget_title)
+      assert_equal([
+                     widget_name,
+                     widget_title,
+                   ],
+                   [
+                     @stack.child_get_property(@child, "name"),
+                     @stack.child_get_property(@child, "title"),
+                   ])
+    end
+  end
+
+  def test_homogeneous_accessors
+    @stack.homogeneous = false
+    assert_false(@stack.homogeneous?)
+  end
+
+  def test_transition_duration_accessors
+    duration = 500
+    @stack.transition_duration = duration
+    assert_equal(duration, @stack.transition_duration)
+  end
+
+  def test_transition_type_accessors
+    stack_transition_type = Gtk::Stack::TransitionType::SLIDE_UP
+    @stack.transition_type = stack_transition_type
+    assert_equal(stack_transition_type, @stack.transition_type)
+  end
+
+  class TestVisibleChild < self
+    def setup
+      super
+      @visible_widget = Gtk::EventBox.new
+      @visible_widget.show
+      @visible_widget_name = "visible widget"
+      @stack.add(@visible_widget, @visible_widget_name)
+    end
+
+    def test_assign
+      @stack.visible_child = @visible_widget
+      assert_equal(@visible_widget, @stack.visible_child)
+    end
+
+    def test_widget
+      @stack.set_visible_child(@visible_widget)
+      assert_equal(@visible_widget, @stack.visible_child)
+    end
+
+    def test_name
+      @stack.set_visible_child(@visible_widget_name)
+      assert_equal(@visible_widget_name,
+                   @stack.visible_child_name)
+    end
+
+    def test_name_and_transition_type
+      @stack.set_visible_child(@visible_widget_name, :crossfade)
+      assert_equal(@visible_widget_name,
+                   @stack.visible_child_name)
+    end
+
+    def test_child_by_name
+      only_gtk_version(3, 12, 0)
+      assert_kind_of(Gtk::EventBox,
+                     @stack.get_child_by_name(@visible_widget_name))
+    end
+  end
+
+  class TestEnum < self
+    def test_transition_type
+      assert_const_defined(Gtk::Stack::TransitionType, :CROSSFADE)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-stock.rb b/gtk3/test/test-gtk-stock.rb
new file mode 100644
index 0000000..68ff474
--- /dev/null
+++ b/gtk3/test/test-gtk-stock.rb
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkStock < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".add") do
+    test("no options") do
+      Gtk::Stock.add(:ruby_gtk, "Ruby/GTK")
+      assert_equal("ruby_gtk", Gtk::Stock.lookup(:ruby_gtk).stock_id)
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk_style_context.rb b/gtk3/test/test-gtk-style-context.rb
similarity index 100%
rename from gtk3/test/test_gtk_style_context.rb
rename to gtk3/test/test-gtk-style-context.rb
diff --git a/gtk3/test/test_gtk_style_properties.rb b/gtk3/test/test-gtk-style-properties.rb
similarity index 100%
rename from gtk3/test/test_gtk_style_properties.rb
rename to gtk3/test/test-gtk-style-properties.rb
diff --git a/gtk3/test/test-gtk-style-provider.rb b/gtk3/test/test-gtk-style-provider.rb
new file mode 100644
index 0000000..d8b7c22
--- /dev/null
+++ b/gtk3/test/test-gtk-style-provider.rb
@@ -0,0 +1,25 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkStyleProvider < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "constants" do
+    test "priority" do
+      assert_equal(800, Gtk::StyleProvider::PRIORITY_USER)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-switch.rb b/gtk3/test/test-gtk-switch.rb
new file mode 100644
index 0000000..2ddebea
--- /dev/null
+++ b/gtk3/test/test-gtk-switch.rb
@@ -0,0 +1,34 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkSwitch < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @switch = Gtk::Switch.new
+  end
+
+  def test_active_accessors
+    @switch.active = true
+    assert_true(@switch.active?)
+  end
+
+  def test_state_accessors
+    only_gtk_version(3, 14, 0)
+    @switch.state = true
+    assert_true(@switch.state?)
+  end
+end
diff --git a/gtk3/test/test-gtk-target-entry.rb b/gtk3/test/test-gtk-target-entry.rb
new file mode 100644
index 0000000..cb3aa33
--- /dev/null
+++ b/gtk3/test/test-gtk-target-entry.rb
@@ -0,0 +1,37 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestTargetEntry < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    sub_test_case("flags") do
+      test("constant") do
+        target_entry = Gtk::TargetEntry.new("test",
+                                            Gtk::TargetFlags::SAME_APP,
+                                            12_345)
+        assert_equal(Gtk::TargetFlags::SAME_APP,
+                     target_entry.flags)
+      end
+
+      test("symbol") do
+        target_entry = Gtk::TargetEntry.new("test", :same_app, 12_345)
+        assert_equal(Gtk::TargetFlags::SAME_APP,
+                     target_entry.flags)
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-text-buffer.rb b/gtk3/test/test-gtk-text-buffer.rb
new file mode 100644
index 0000000..cf2233c
--- /dev/null
+++ b/gtk3/test/test-gtk-text-buffer.rb
@@ -0,0 +1,151 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTextBuffer < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "instance methods" do
+    def setup
+      @text_buffer = Gtk::TextBuffer.new
+      @text_buffer.text = "Hello World!"
+    end
+
+    sub_test_case "#insert" do
+      test "no options" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.insert(iter, "Ruby ")
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":interactive" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.insert(iter, "Ruby ", :interactive => true)
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":default_editable => true" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.insert(iter, "Ruby ",
+                            :interactive => true,
+                            :default_editable => true)
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":default_editable => false" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.insert(iter, "Ruby ",
+                            :interactive => true,
+                            :default_editable => false)
+        assert_equal("Hello World!", @text_buffer.text)
+      end
+    end
+
+    sub_test_case "#insert_at_cursor" do
+      test "no options" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.place_cursor(iter)
+        @text_buffer.insert_at_cursor("Ruby ")
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":interactive" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.place_cursor(iter)
+        @text_buffer.insert_at_cursor("Ruby ",
+                                      :interactive => true)
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":default_editable => true" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.place_cursor(iter)
+        @text_buffer.insert_at_cursor("Ruby ",
+                                      :interactive => true,
+                                      :default_editable => true)
+        assert_equal("Hello Ruby World!", @text_buffer.text)
+      end
+
+      test ":default_editable => false" do
+        iter = @text_buffer.get_iter_at(:offset => "Hello ".bytesize)
+        @text_buffer.place_cursor(iter)
+        @text_buffer.insert_at_cursor("Ruby ",
+                                      :interactive => true,
+                                      :default_editable => false)
+        assert_equal("Hello World!", @text_buffer.text)
+      end
+    end
+
+    test "#text=" do
+      @text_buffer.text = "Hello Ruby World!"
+      assert_equal("Hello Ruby World!", @text_buffer.text)
+    end
+
+    test "#serialize_formats" do
+      assert_equal([Gdk::Atom],
+                   @text_buffer.serialize_formats.collect(&:class))
+    end
+
+    test "#deserialize_formats" do
+      @text_buffer.register_deserialize_tagset(nil)
+      assert_equal([Gdk::Atom],
+                   @text_buffer.deserialize_formats.collect(&:class))
+    end
+
+    test "#serialize and #deserialize" do
+      format = @text_buffer.serialize_formats[0]
+      serialized = @text_buffer.serialize(@text_buffer,
+                                          format,
+                                          @text_buffer.start_iter,
+                                          @text_buffer.end_iter)
+      output_text_buffer = Gtk::TextBuffer.new
+      output_format = output_text_buffer.register_deserialize_tagset(nil)
+      output_text_buffer.deserialize(output_text_buffer,
+                                     output_format,
+                                     output_text_buffer.start_iter,
+                                     serialized)
+      assert_equal(@text_buffer.text,
+                   output_text_buffer.text)
+    end
+
+    sub_test_case "#selection_bounds" do
+      test "selected" do
+        insert_iter =
+          @text_buffer.get_iter_at(:offset => "Hel".bytesize)
+        selection_bound_iter =
+          @text_buffer.get_iter_at(:offset => "Hello Wor".bytesize)
+        @text_buffer.select_range(insert_iter, selection_bound_iter)
+        assert_equal([insert_iter.offset, selection_bound_iter.offset],
+                     @text_buffer.selection_bounds.collect(&:offset))
+      end
+
+      test "not selected" do
+        assert_nil(@text_buffer.selection_bounds)
+      end
+    end
+
+    sub_test_case "#create_tag" do
+      test "default" do
+        tag = @text_buffer.create_tag
+        assert_nil(tag.name)
+      end
+
+      test "named" do
+        tag = @text_buffer.create_tag("new-tag")
+        assert_equal("new-tag", tag.name)
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-text-tag-table.rb b/gtk3/test/test-gtk-text-tag-table.rb
new file mode 100644
index 0000000..1a289fe
--- /dev/null
+++ b/gtk3/test/test-gtk-text-tag-table.rb
@@ -0,0 +1,34 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTextTagTable < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case "instance methods" do
+    def setup
+      @table = Gtk::TextTagTable.new
+    end
+
+    sub_test_case "#add" do
+      test "success" do
+        tag = Gtk::TextTag.new("bold")
+        assert do
+          @table.add(tag)
+        end
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-toggle-action.rb b/gtk3/test/test-gtk-toggle-action.rb
new file mode 100644
index 0000000..ddc413b
--- /dev/null
+++ b/gtk3/test/test-gtk-toggle-action.rb
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkToggleAction < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test("no options") do
+      action = Gtk::ToggleAction.new("run")
+      assert_equal("run", action.name)
+    end
+
+    test(":label") do
+      action = Gtk::ToggleAction.new("run", :label => "Run")
+      assert_equal("Run", action.label)
+    end
+
+    test(":tooltip") do
+      action = Gtk::ToggleAction.new("run", :tooltip => "Run this action")
+      assert_equal("Run this action", action.tooltip)
+    end
+
+    test(":stock_id") do
+      action = Gtk::ToggleAction.new("add", :stock_id => "gtk-add")
+      assert_equal("gtk-add", action.stock_id)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-toggle-button.rb b/gtk3/test/test-gtk-toggle-button.rb
new file mode 100644
index 0000000..c0f4b95
--- /dev/null
+++ b/gtk3/test/test-gtk-toggle-button.rb
@@ -0,0 +1,39 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkToggleButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case ".new" do
+    test "no argument" do
+      button = Gtk::ToggleButton.new
+      assert_nil(button.label)
+    end
+
+    test "label" do
+      button = Gtk::ToggleButton.new(:label => "label")
+      assert_equal("label", button.label)
+    end
+
+    test "label + mnemonic" do
+      button = Gtk::ToggleButton.new(:label => "_label", :use_underline => true)
+      assert_equal("_label", button.label)
+      assert do
+        button.use_underline?
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tool-button.rb b/gtk3/test/test-gtk-tool-button.rb
new file mode 100644
index 0000000..6a44265
--- /dev/null
+++ b/gtk3/test/test-gtk-tool-button.rb
@@ -0,0 +1,53 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkToolButton < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test "no argument" do
+      button = Gtk::ToolButton.new
+      assert_nil(button.icon_widget)
+    end
+
+    test ":icon_widget" do
+      icon_widget = Gtk::EventBox.new
+      button = Gtk::ToolButton.new(:icon_widget => icon_widget)
+      assert_equal(icon_widget, button.icon_widget)
+    end
+
+    test ":label" do
+      label = "Button"
+      button = Gtk::ToolButton.new(:label => label)
+      assert_equal(label, button.label)
+    end
+
+    test ":icon_widget and :label" do
+      icon_widget = Gtk::EventBox.new
+      label = "Button"
+      button = Gtk::ToolButton.new(:icon_widget => icon_widget,
+                                   :label       => label)
+      assert_equal([icon_widget, label],
+                   [button.icon_widget, button.label])
+    end
+
+    test ":stock_id" do
+      stock_id = Gtk::Stock::OK
+      button = Gtk::ToolButton.new(:stock_id => stock_id)
+      assert_equal(stock_id, button.stock_id)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-iter.rb b/gtk3/test/test-gtk-tree-iter.rb
new file mode 100644
index 0000000..37b7fdd
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-iter.rb
@@ -0,0 +1,53 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301  USA
+
+class TestGtkTreeIter < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @model = Gtk::ListStore.new(String)
+    @iter = @model.append
+  end
+
+  def test_path
+    assert_equal("0", @iter.path.to_s)
+  end
+
+  sub_test_case("#set_values") do
+    test "Array" do
+      @iter.set_values(["string"])
+      assert_equal("string", @iter[0])
+    end
+
+    test "Hash" do
+      @iter.set_values(0 => "string")
+      assert_equal("string", @iter[0])
+    end
+  end
+
+  sub_test_case("#values=") do
+    test "Array" do
+      @iter.values = ["string"]
+      assert_equal("string", @iter[0])
+    end
+
+    test "Hash" do
+      @iter.values = {0 => "string"}
+      assert_equal("string", @iter[0])
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-model-filter.rb b/gtk3/test/test-gtk-tree-model-filter.rb
new file mode 100644
index 0000000..490a3e9
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-model-filter.rb
@@ -0,0 +1,55 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTreeModelFilter < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @model = Gtk::TreeStore.new(String)
+    @root = @model.append(nil)
+    @filter_root = @model.append(@root)
+    @filter = Gtk::TreeModelFilter.new(@model, @filter_root.path)
+  end
+
+  sub_test_case "#set_modify_func" do
+    test "no argument" do
+      assert_raise(ArgumentError.new("one or more types are required")) do
+        @filter.set_modify_func do
+        end
+      end
+    end
+  end
+
+  sub_test_case "#convert_iter_to_child_iter" do
+    test "converted" do
+      iter = @model.append(@filter_root)
+      assert_equal(iter,
+                   @filter.convert_iter_to_child_iter(@filter.iter_first))
+    end
+  end
+
+  sub_test_case "#convert_child_iter_to_iter" do
+    test "converted" do
+      iter = @model.append(@filter_root)
+      assert_equal(@filter.iter_first,
+                   @filter.convert_child_iter_to_iter(iter))
+    end
+
+    test "not converted" do
+      assert_nil(@filter.convert_child_iter_to_iter(@root))
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-path.rb b/gtk3/test/test-gtk-tree-path.rb
new file mode 100644
index 0000000..1abedb5
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-path.rb
@@ -0,0 +1,42 @@
+# Copyright (C) 2010-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTreePath < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def test_compare
+    assert_equal(-1, tree_path("0") <=> tree_path("1"))
+    assert_equal(0, tree_path("0") <=> tree_path("0"))
+    assert_equal(1, tree_path("1") <=> tree_path("0"))
+  end
+
+  def test_equal
+    assert_equal(tree_path("0"), tree_path("0"))
+    assert_not_equal(tree_path("0"), tree_path("1"))
+    assert_not_equal(tree_path("0"), "0")
+  end
+
+  def test_indices
+    indices, depth = tree_path("2").indices
+    assert_equal([[2], 1],
+                 [indices, depth])
+  end
+
+  private
+  def tree_path(path)
+    Gtk::TreePath.new(path)
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-selection.rb b/gtk3/test/test-gtk-tree-selection.rb
new file mode 100644
index 0000000..3e9f4d9
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-selection.rb
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTreeSelection < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case("accessors") do
+    def setup
+      @tree = Gtk::TreeView.new
+      @selection =  @tree.selection
+    end
+
+    test "mode" do
+      @selection.mode = :multiple
+      assert_equal(Gtk::SelectionMode::MULTIPLE, @selection.mode)
+    end
+  end
+
+  sub_test_case("selected") do
+    def setup
+      @model = Gtk::TreeStore.new(String)
+      @view = Gtk::TreeView.new(@model)
+      @column = Gtk::TreeViewColumn.new("Label",
+                                        Gtk::CellRendererText.new,
+                                        :text => 0)
+      @iter = @model.append(nil)
+      @iter[0] = "Hello"
+
+      @selection = @view.selection
+      @selection.select_path(@iter.path)
+    end
+
+    test "#selected_rows" do
+      assert_equal([[@iter.path], @model],
+                   @selection.selected_rows)
+    end
+
+    test "#each" do
+      normalized_selected = @selection.collect do |model, path, iter|
+        [model, path.to_s, iter.class]
+      end
+      assert_equal([[@model, @iter.path.to_s, @iter.class]],
+                   normalized_selected)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-view-column.rb b/gtk3/test/test-gtk-tree-view-column.rb
new file mode 100644
index 0000000..d53314f
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-view-column.rb
@@ -0,0 +1,71 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTreeViewColumn < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case(".new") do
+    test "empty" do
+      column = Gtk::TreeViewColumn.new
+      assert_equal("", column.title)
+    end
+
+    test "title only" do
+      column = Gtk::TreeViewColumn.new("title")
+      assert_equal("title", column.title)
+    end
+
+    sub_test_case("attributes") do
+      test "string key" do
+        column = Gtk::TreeViewColumn.new
+        cell = Gtk::CellRendererText.new
+        column.pack_start(cell, true)
+        column.add_attribute(cell, "text", 0)
+      end
+
+      test "symbol key" do
+        column = Gtk::TreeViewColumn.new
+        cell = Gtk::CellRendererText.new
+        column.pack_start(cell, true)
+        column.add_attribute(cell, :text, 0)
+      end
+    end
+  end
+
+  sub_test_case("instance methods") do
+    def setup
+      @column = Gtk::TreeViewColumn.new
+      @cell = Gtk::CellRendererText.new
+      @column.pack_start(@cell, true)
+      @column.add_attribute(@cell, :text, 0)
+    end
+
+    test "#set_cell_data_func" do
+      values = []
+      @column.set_cell_data_func(@cell) do |column, cell, model, iter|
+        values << iter[0]
+      end
+
+      model = Gtk::TreeStore.new(String)
+      parent = model.append(nil)
+      parent[0] = "Hello"
+      child = model.append(parent)
+      child[0] = "World"
+      @column.cell_set_cell_data(model, parent, true, true)
+      assert_equal([parent[0]], values)
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-tree-view.rb b/gtk3/test/test-gtk-tree-view.rb
new file mode 100644
index 0000000..5b9537d
--- /dev/null
+++ b/gtk3/test/test-gtk-tree-view.rb
@@ -0,0 +1,105 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkTreeView < Test::Unit::TestCase
+  include GtkTestUtils
+
+  sub_test_case("instance methods") do
+    def setup
+      @store = Gtk::TreeStore.new(String)
+      @view = Gtk::TreeView.new(@store)
+      @column = Gtk::TreeViewColumn.new("Label",
+                                        Gtk::CellRendererText.new,
+                                        :text => 0)
+      @view.append_column(@column)
+
+      @window = Gtk::Window.new
+      @window.add(@view)
+      @window.signal_connect("destroy") do
+        Gtk.main_quit
+      end
+    end
+
+    sub_test_case "#get_path_at_pos" do
+      test "found" do
+        iter = @store.append(nil)
+        iter[0] = "Hello"
+        result = nil
+        GLib::Idle.add do
+          result = @view.get_path_at_pos(0, 0)
+          @window.destroy
+          GLib::Source::REMOVE
+        end
+        @window.show_all
+        Gtk.main
+
+        result[0] = result[0].to_s if result[0].is_a?(Gtk::TreePath)
+        assert_equal(["0", @column, 0, 0],
+                     result)
+      end
+
+      test "not found" do
+        result = nil
+        GLib::Idle.add do
+          result = @view.get_path_at_pos(0, 0)
+          @window.destroy
+          GLib::Source::REMOVE
+        end
+        @window.show_all
+        Gtk.main
+
+        assert_nil(result)
+      end
+    end
+
+    test "#map_expanded_rows" do
+      parent = @store.append(nil)
+      parent[0] = "Hello"
+      child = @store.append(parent)
+      child[0] = "World"
+
+      @view.expand_all
+      @view.map_expanded_rows do |view, path|
+        iter = @store.get_iter(path)
+        iter[0] += " (mapped)"
+      end
+
+      normalized_data = @store.collect do |model, path, iter|
+        [model, path.to_s, iter[0]]
+      end
+      assert_equal([
+                     [@store, parent.path.to_s, "Hello (mapped)"],
+                     [@store, child.path.to_s, "World"],
+                   ],
+                   normalized_data)
+    end
+
+    test "#row_expanded?" do
+      parent = @store.append(nil)
+      parent[0] = "Hello"
+      child = @store.append(parent)
+      child[0] = "World"
+
+      assert do
+        not @view.row_expanded?(parent.path)
+      end
+      @view.expand_all
+      assert do
+        @view.row_expanded?(parent.path)
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-version.rb b/gtk3/test/test-gtk-version.rb
new file mode 100644
index 0000000..8f3b937
--- /dev/null
+++ b/gtk3/test/test-gtk-version.rb
@@ -0,0 +1,47 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkVersion < Test::Unit::TestCase
+  include GtkTestUtils
+
+  test "STRING" do
+    major = Gtk::Version::MAJOR
+    minor = Gtk::Version::MINOR
+    micro = Gtk::Version::MICRO
+    assert_equal([major, minor, micro].join("."),
+                 Gtk::Version::STRING)
+  end
+
+  sub_test_case("#or_later?") do
+    test "same" do
+      assert_true(Gtk::Version.or_later?(Gtk::Version::MAJOR,
+                                         Gtk::Version::MINOR,
+                                         Gtk::Version::MICRO))
+    end
+
+    test "later" do
+      assert_true(Gtk::Version.or_later?(Gtk::Version::MAJOR,
+                                         Gtk::Version::MINOR,
+                                         Gtk::Version::MICRO - 1))
+    end
+
+    test "earlier" do
+      assert_false(Gtk::Version.or_later?(Gtk::Version::MAJOR,
+                                          Gtk::Version::MINOR,
+                                          Gtk::Version::MICRO + 1))
+    end
+  end
+end
diff --git a/gtk3/test/test-gtk-widget.rb b/gtk3/test/test-gtk-widget.rb
new file mode 100644
index 0000000..081b7ed
--- /dev/null
+++ b/gtk3/test/test-gtk-widget.rb
@@ -0,0 +1,148 @@
+# Copyright (C) 2008-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestGtkWidget < Test::Unit::TestCase
+  include GtkTestUtils
+
+  def setup
+    @widget = Gtk::Invisible.new
+  end
+
+  sub_test_case "class methods" do
+    test ".style_properties" do
+      assert_equal("cursor-aspect-ratio",
+                   Gtk::Label.style_properties.collect(&:name).sort.first)
+    end
+  end
+
+  def test_set_window
+    attrs = Gdk::WindowAttr.new(100, 100, :input_only, :temp)
+    window = Gdk::Window.new(nil, attrs, 0)
+    @widget.window = window
+    assert_equal(window, @widget.window)
+  end
+
+  def test_modify_color_component_with_nil_color
+    assert_nothing_raised do
+      @widget.override_color(:normal, nil)
+    end
+
+    assert_nothing_raised do
+      @widget.override_background_color(:normal, nil)
+    end
+  end
+
+  sub_test_case "#drag_source_set" do
+    def setup
+      only_gtk_version(3, 9, 16)
+      super
+    end
+
+    test "targets - TargetEntry" do
+      target = "text/uri-list"
+      info = 0
+      @widget.drag_source_set([:shift_mask, :control_mask],
+                              [Gtk::TargetEntry.new(target, 0, info)],
+                              :copy)
+      list = @widget.drag_source_get_target_list
+      assert_equal(info, list.find(target))
+    end
+
+    test "targets - Array" do
+      target = "text/uri-list"
+      info = 0
+      @widget.drag_source_set([:shift_mask, :control_mask],
+                              [[target, 0, info]],
+                              :copy)
+      list = @widget.drag_source_get_target_list
+      assert_equal(info, list.find(target))
+    end
+  end
+
+  sub_test_case "#drag_dest_set" do
+    def setup
+      only_gtk_version(3, 9, 16)
+      super
+    end
+
+    test "targets - TargetEntry" do
+      target = "text/uri-list"
+      info = 0
+      @widget.drag_dest_set(:all,
+                            [Gtk::TargetEntry.new(target, 0, info)],
+                            :copy)
+      list = @widget.drag_dest_get_target_list
+      assert_equal(info, list.find(target))
+    end
+
+    test "targets - Array" do
+      target = "text/uri-list"
+      info = 0
+      @widget.drag_dest_set(:all,
+                            [[target, 0, info]],
+                            :copy)
+      list = @widget.drag_dest_get_target_list
+      assert_equal(info, list.find(target))
+    end
+  end
+
+  sub_test_case "events" do
+    def setup
+      @widget = Gtk::EventBox.new
+    end
+
+    test "get" do
+      assert_equal(Gdk::EventMask.new(0), @widget.events)
+    end
+
+    test "add" do
+      @widget.add_events([:exposure_mask, :pointer_motion_mask])
+      assert_equal(Gdk::EventMask::EXPOSURE_MASK |
+                   Gdk::EventMask::POINTER_MOTION_MASK,
+                   @widget.events)
+    end
+
+    test "set" do
+      @widget.set_events([:exposure_mask, :pointer_motion_mask])
+      assert_equal(Gdk::EventMask::EXPOSURE_MASK |
+                   Gdk::EventMask::POINTER_MOTION_MASK,
+                   @widget.events)
+    end
+
+    test "assign" do
+      @widget.events = [:exposure_mask, :pointer_motion_mask]
+      assert_equal(Gdk::EventMask::EXPOSURE_MASK |
+                   Gdk::EventMask::POINTER_MOTION_MASK,
+                   @widget.events)
+    end
+  end
+
+  test "#style_get_property" do
+    entry = Gtk::Entry.new
+    assert do
+      entry.style_get_property("focus-padding").is_a?(Integer)
+    end
+  end
+
+  sub_test_case "predicates" do
+    test "#in_destruction?" do
+      entry = Gtk::Entry.new
+      assert do
+        not entry.in_destruction?
+      end
+    end
+  end
+end
diff --git a/gtk3/test/test_gtk.rb b/gtk3/test/test-gtk.rb
similarity index 100%
rename from gtk3/test/test_gtk.rb
rename to gtk3/test/test-gtk.rb
diff --git a/gtksourceview3-no-gi/COPYING.LIB b/gtksourceview3-no-gi/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/gtksourceview3-no-gi/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/gtksourceview3-no-gi/README.md b/gtksourceview3-no-gi/README.md
new file mode 100644
index 0000000..eb47ef1
--- /dev/null
+++ b/gtksourceview3-no-gi/README.md
@@ -0,0 +1,24 @@
+# Ruby/GtkSourceView3
+
+Ruby/GtkSourceView3 is a Ruby binding of gtksourceview-3.x.
+
+## Requirements
+
+* Ruby/GTK3 in
+  [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
+* [GtkSourceView](http://projects.gnome.org/gtksourceview/) 3.4.2 or later
+
+## Install
+
+    gem install gtksourceview3
+
+## License
+
+Copyright (c) 2008-2013 Ruby-GNOME2 Project Team
+
+This program is free software. You can distribute/modify this program
+under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+
+## Project Website
+
+http://ruby-gnome2.sourceforge.jp/
diff --git a/gtksourceview3/Rakefile b/gtksourceview3-no-gi/Rakefile
similarity index 100%
copy from gtksourceview3/Rakefile
copy to gtksourceview3-no-gi/Rakefile
diff --git a/gtksourceview3/ext/gtksourceview3/depend b/gtksourceview3-no-gi/ext/gtksourceview3/depend
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/depend
rename to gtksourceview3-no-gi/ext/gtksourceview3/depend
diff --git a/gtksourceview3/ext/gtksourceview3/extconf.rb b/gtksourceview3-no-gi/ext/gtksourceview3/extconf.rb
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/extconf.rb
rename to gtksourceview3-no-gi/ext/gtksourceview3/extconf.rb
diff --git a/gtksourceview3/ext/gtksourceview3/gtksourceview3.def b/gtksourceview3-no-gi/ext/gtksourceview3/gtksourceview3.def
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/gtksourceview3.def
rename to gtksourceview3-no-gi/ext/gtksourceview3/gtksourceview3.def
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksource.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksource.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksource.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksource.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcebuffer.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcebuffer.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcebuffer.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcebuffer.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcegutter.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutter.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcegutter.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutter.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrenderer.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrenderer.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrenderer.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrenderer.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrendererpixbuf.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrendererpixbuf.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrendererpixbuf.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrendererpixbuf.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrenderertext.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrenderertext.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcegutterrenderertext.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcegutterrenderertext.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcelanguage.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcelanguage.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcelanguage.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcelanguage.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcelanguagemanager.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcelanguagemanager.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcelanguagemanager.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcelanguagemanager.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcemark.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcemark.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcemark.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcemark.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcemarkattributes.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcemarkattributes.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcemarkattributes.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcemarkattributes.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourceprintcompositor.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceprintcompositor.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourceprintcompositor.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceprintcompositor.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcestyle.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestyle.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcestyle.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestyle.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcestylescheme.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestylescheme.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcestylescheme.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestylescheme.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourcestyleschememanager.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestyleschememanager.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourcestyleschememanager.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourcestyleschememanager.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourceundomanager.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceundomanager.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourceundomanager.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceundomanager.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourceview.c b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview.c
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourceview.c
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview.c
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourceview3conversions.h b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview3conversions.h
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourceview3conversions.h
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview3conversions.h
diff --git a/gtksourceview3/ext/gtksourceview3/rbgtksourceview3private.h b/gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview3private.h
similarity index 100%
rename from gtksourceview3/ext/gtksourceview3/rbgtksourceview3private.h
rename to gtksourceview3-no-gi/ext/gtksourceview3/rbgtksourceview3private.h
diff --git a/gtksourceview3/extconf.rb b/gtksourceview3-no-gi/extconf.rb
similarity index 100%
rename from gtksourceview3/extconf.rb
rename to gtksourceview3-no-gi/extconf.rb
diff --git a/gtksourceview3/lib/gtksourceview3.rb b/gtksourceview3-no-gi/lib/gtksourceview3.rb
similarity index 100%
copy from gtksourceview3/lib/gtksourceview3.rb
copy to gtksourceview3-no-gi/lib/gtksourceview3.rb
diff --git a/gtksourceview3-no-gi/lib/gtksourceview3/deprecated.rb b/gtksourceview3-no-gi/lib/gtksourceview3/deprecated.rb
new file mode 100644
index 0000000..5d07ec7
--- /dev/null
+++ b/gtksourceview3-no-gi/lib/gtksourceview3/deprecated.rb
@@ -0,0 +1,47 @@
+module Gtk
+  extend GLib::Deprecatable
+  define_deprecated_const :SourceBuffer, 'GtkSource::Buffer'
+  define_deprecated_const :SourceLanguage, 'GtkSource::Language'
+  define_deprecated_const :SourceLanguageManager, 'GtkSource::LanguageManager'
+  define_deprecated_const :SourceMark, 'GtkSource::Mark'
+  define_deprecated_const :SourcePrintCompositor, 'GtkSource::PrintCompositor'
+  define_deprecated_const :SourceStyle, 'GtkSource::Style'
+  define_deprecated_const :SourceStyleScheme, 'GtkSource::StyleScheme'
+  define_deprecated_const :SourceStyleSchemeManager, 'GtkSource::StyleSchemeManager'
+  define_deprecated_const :SourceView, 'GtkSource::View'
+end
+
+module GtkSource
+  class Buffer
+    extend GLib::Deprecatable
+    define_deprecated_method :not_undoable_action, :begin_not_undoable_action
+    define_deprecated_method :non_undoable_action, :begin_not_undoable_action
+  end
+
+  class View
+    extend GLib::Deprecatable
+    define_deprecated_flags :DrawSpacesFlags, 'DRAW_SPACES'
+    define_deprecated_enums :SmartHomeEndType, 'SMART_HOME_END'
+    define_deprecated_const :BUILD_VERSION, 'GtkSource::BUILD_VERSION'
+    define_deprecated_method :set_mark_category_background, :warn => "Use 'GtkSource::MarkAttributes#set_background'." do |_self, category, background|
+      _self.get_mark_attributes(category).first.set_background(background) # TODO
+    end
+    define_deprecated_method :get_mark_category_background, :warn => "Use 'GtkSource::MarkAttributes#background'." do |_self, category|
+      _self.get_mark_attributes(category).first.background # TODO
+    end
+    define_deprecated_method :set_mark_category_pixbuf, :warn => "Use 'GtkSource::MarkAttributes#set_pixbuf'." do |_self, category, pixbuf|
+      _self.get_mark_attributes(category).first.set_pixbuf(pixbuf) # TODO
+    end
+    define_deprecated_method :get_mark_category_pixbuf, :warn => "Use 'GtkSource::MarkAttributes#pixbuf'." do |_self, category|
+      _self.get_mark_attributes(category).first.pixbuf # TODO
+    end
+    define_deprecated_method :set_mark_category_priority, :warn => "Use '#{self}#set_mark_attributes'." do |_self, category, priority|
+      attributes = _self.get_mark_attributes(category).first # TODO
+      _self.set_mark_attributes(category, attributes, priority)
+    end
+    define_deprecated_method :get_mark_category_priority, :warn => "Use '#{self}#get_mark_attributes'." do |_self, category|
+      _self.get_mark_attributes(category).last # TODO
+    end
+  end
+end
+
diff --git a/gtksourceview3/sample/sourcelanguagemanager.rb b/gtksourceview3-no-gi/sample/sourcelanguagemanager.rb
similarity index 100%
rename from gtksourceview3/sample/sourcelanguagemanager.rb
rename to gtksourceview3-no-gi/sample/sourcelanguagemanager.rb
diff --git a/gtksourceview3/sample/test.rb b/gtksourceview3-no-gi/sample/test.rb
similarity index 100%
rename from gtksourceview3/sample/test.rb
rename to gtksourceview3-no-gi/sample/test.rb
diff --git a/gtksourceview3/test/run-test.rb b/gtksourceview3-no-gi/test/run-test.rb
similarity index 100%
copy from gtksourceview3/test/run-test.rb
copy to gtksourceview3-no-gi/test/run-test.rb
diff --git a/gtksourceview3/test/test_mark_attributes.rb b/gtksourceview3-no-gi/test/test_mark_attributes.rb
similarity index 100%
rename from gtksourceview3/test/test_mark_attributes.rb
rename to gtksourceview3-no-gi/test/test_mark_attributes.rb
diff --git a/gtksourceview3/test/test_source_gutter_renderer.rb b/gtksourceview3-no-gi/test/test_source_gutter_renderer.rb
similarity index 100%
copy from gtksourceview3/test/test_source_gutter_renderer.rb
copy to gtksourceview3-no-gi/test/test_source_gutter_renderer.rb
diff --git a/gtksourceview3/test/test_source_language_manager.rb b/gtksourceview3-no-gi/test/test_source_language_manager.rb
similarity index 100%
rename from gtksourceview3/test/test_source_language_manager.rb
rename to gtksourceview3-no-gi/test/test_source_language_manager.rb
diff --git a/gtksourceview3/test/test_source_view.rb b/gtksourceview3-no-gi/test/test_source_view.rb
similarity index 100%
rename from gtksourceview3/test/test_source_view.rb
rename to gtksourceview3-no-gi/test/test_source_view.rb
diff --git a/gtksourceview3/Rakefile b/gtksourceview3/Rakefile
index cfa16a7..8d7c837 100644
--- a/gtksourceview3/Rakefile
+++ b/gtksourceview3/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2012-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2012-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,7 @@ require "gnome2/rake/package-task"
 package_task = GNOME2::Rake::PackageTask.new do |package|
   package.summary = "Ruby/GtkSourceView3 is a Ruby binding of gtksourceview-3.x."
   package.description = "Ruby/GtkSourceView3 is a Ruby binding of gtksourceview-3.x."
-  package.dependency.gem.runtime = ["gtk3"]
+  package.dependency.gem.runtime = ["gtk3", "gobject-introspection"]
   package.windows.packages = []
   package.windows.dependencies = []
   package.windows.build_dependencies = [
@@ -44,7 +44,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "gtksourceview",
       :download_site => :gnome,
       :label => "GtkSourceView",
-      :version => "3.14.2",
+      :version => "3.16.1",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
@@ -56,4 +56,3 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
   ]
 end
 package_task.define
-
diff --git a/gtksourceview3/lib/gtksourceview3.rb b/gtksourceview3/lib/gtksourceview3.rb
index 45091e0..3c91a7e 100644
--- a/gtksourceview3/lib/gtksourceview3.rb
+++ b/gtksourceview3/lib/gtksourceview3.rb
@@ -1,20 +1,55 @@
-=begin
-  Copyright (c) 2008-2011 Ruby-GNOME2 Project Team
-  This program is licensed under the same licence as Ruby-GNOME2.
-=end
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require 'gtk3'
+require "gtk3"
 
 base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
 vendor_dir = base_dir + "vendor" + "local"
 vendor_bin_dir = vendor_dir + "bin"
 GLib.prepend_dll_path(vendor_bin_dir)
-begin
-  major, minor, = RUBY_VERSION.split(/\./)
-  require "#{major}.#{minor}/gtksourceview3.so"
-rescue LoadError
-  require "gtksourceview3.so"
-end
+vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
+GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
+
+require "gtksourceview3/loader"
+
+module GtkSource
+  LOG_DOMAIN = "GtkSource"
+  GLib::Log.set_log_domain(LOG_DOMAIN)
 
-require 'gtksourceview3/deprecated'
+  class Error < StandardError
+  end
 
+  class << self
+    def const_missing(name)
+      init
+      if const_defined?(name)
+        const_get(name)
+      else
+        super
+      end
+    end
+
+    def init
+      class << self
+        remove_method(:init)
+        remove_method(:const_missing)
+      end
+      Gtk.init if Gtk.respond_to?(:init)
+      loader = Loader.new(self)
+      loader.load("GtkSource")
+    end
+  end
+end
diff --git a/gtksourceview3/lib/gtksourceview3/loader.rb b/gtksourceview3/lib/gtksourceview3/loader.rb
new file mode 100644
index 0000000..6222f88
--- /dev/null
+++ b/gtksourceview3/lib/gtksourceview3/loader.rb
@@ -0,0 +1,46 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module GtkSource
+  class Loader < GObjectIntrospection::Loader
+    private
+    def load_function_info(info)
+      name = info.name
+      case name
+      when "init"
+        # ignore
+      else
+        super
+      end
+    end
+
+    def post_load(repository, namespace)
+      require_libraries
+    end
+
+    def require_libraries
+      require "gtksourceview3/mark-attributes"
+
+      require "gtksourceview3/deprecated"
+    end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+  end
+end
diff --git a/gtksourceview3/lib/gtksourceview3/mark-attributes.rb b/gtksourceview3/lib/gtksourceview3/mark-attributes.rb
new file mode 100644
index 0000000..7857fbe
--- /dev/null
+++ b/gtksourceview3/lib/gtksourceview3/mark-attributes.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module GtkSource
+  class MarkAttributes
+    alias_method :background_raw, :background
+    def background
+      set, rgba = background_raw
+      if set
+        rgba
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/gtksourceview3/test/run-test.rb b/gtksourceview3/test/run-test.rb
index 93bd484..e2ac703 100755
--- a/gtksourceview3/test/run-test.rb
+++ b/gtksourceview3/test/run-test.rb
@@ -9,6 +9,7 @@ cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
 pango_base = File.join(ruby_gnome2_base, "pango")
 gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
 gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
+gio2_base = File.join(ruby_gnome2_base, "gio2")
 gdk3_base = File.join(ruby_gnome2_base, "gdk3")
 gtk3_base = File.join(ruby_gnome2_base, "gtk3")
 gtk_source_view3_base = File.join(ruby_gnome2_base, "gtksourceview3")
@@ -23,6 +24,7 @@ dependencies = [
   pango_base,
   gdk_pixbuf_base,
   gobject_introspection_base,
+  gio2_base,
   gdk3_base,
   gtk3_base,
   gtk_source_view3_base,
diff --git a/gtksourceview3/test/test-mark-attributes.rb b/gtksourceview3/test/test-mark-attributes.rb
new file mode 100644
index 0000000..b7bc8bb
--- /dev/null
+++ b/gtksourceview3/test/test-mark-attributes.rb
@@ -0,0 +1,26 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestMarkAttributes < Test::Unit::TestCase
+  def setup
+    @mark_attributes = GtkSource::MarkAttributes.new
+  end
+
+  def test_background
+    @mark_attributes.background = Gdk::RGBA.new(1, 0, 0, 0)
+    assert_equal("rgba(255,0,0,0)", @mark_attributes.background.to_s)
+  end
+end
diff --git a/gtksourceview3/test/test_source_gutter_renderer.rb b/gtksourceview3/test/test-source-gutter-renderer.rb
similarity index 100%
rename from gtksourceview3/test/test_source_gutter_renderer.rb
rename to gtksourceview3/test/test-source-gutter-renderer.rb
diff --git a/gtksourceview3/test/test-source-language-manager.rb b/gtksourceview3/test/test-source-language-manager.rb
new file mode 100644
index 0000000..e52cb57
--- /dev/null
+++ b/gtksourceview3/test/test-source-language-manager.rb
@@ -0,0 +1,46 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestLanguageManager < Test::Unit::TestCase
+  def setup
+    @manager = GtkSource::LanguageManager.new
+    @view = GtkSource::View.new
+  end
+
+  def test_language
+    language = @manager.get_language("ruby")
+    @view.buffer.language = language
+    assert_equal(language, @view.buffer.language)
+
+    highlight = true
+    @view.buffer.highlight_syntax = highlight
+    assert_true(@view.buffer.highlight_syntax?)
+
+    @view.buffer.highlight_matching_brackets = highlight
+    assert_true(@view.buffer.highlight_matching_brackets?)
+  end
+
+  def test_language_ids
+    ids = @manager.language_ids
+    assert_include(ids, "ruby")
+  end
+
+  def test_search_path
+    custom_path = "/path/to/search"
+    @manager.search_path = [custom_path]
+    assert_equal([custom_path], @manager.search_path)
+  end
+end
diff --git a/gtksourceview3/test/test-source-view.rb b/gtksourceview3/test/test-source-view.rb
new file mode 100644
index 0000000..4d0a947
--- /dev/null
+++ b/gtksourceview3/test/test-source-view.rb
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestSourceView < Test::Unit::TestCase
+  def setup
+    @view = GtkSource::View.new
+  end
+
+  def test_auto_indent
+    @view.auto_indent = true
+    assert_true(@view.auto_indent?)
+  end
+
+  def test_line_number
+    @view.show_line_numbers = true
+    assert_true(@view.show_line_numbers?)
+  end
+
+  def test_indent_width
+    indent = 4
+    @view.indent_width = indent
+    assert_equal(indent, @view.indent_width)
+  end
+
+  def test_insert_spaces_instead_of_tabs
+    insert_spaces = true
+    @view.insert_spaces_instead_of_tabs = insert_spaces
+    assert_true(@view.insert_spaces_instead_of_tabs?)
+  end
+
+  def test_right_margin_position
+    margin = 100
+    @view.right_margin_position = margin
+    assert_equal(margin, @view.right_margin_position)
+  end
+
+  def test_show_right_margin
+    show = true
+    @view.show_right_margin = show
+    assert_true(@view.show_right_margin?)
+  end
+end
diff --git a/gvlc/COPYING.LIB b/gvlc/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/gvlc/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/gvlc/README b/gvlc/README
new file mode 100644
index 0000000..9554f22
--- /dev/null
+++ b/gvlc/README
@@ -0,0 +1,36 @@
+Ruby/VLC
+========
+
+Ruby/VLC is a Ruby binding of libVLC for Ruby/GTK.
+
+Requirements
+------------
+
+  Ruby >= 1.9.x: http://www.ruby-lang.org/
+  libVLC >= 2.0: http://www.videolan.org/
+
+Install (RubyGems)
+------------------
+
+  % sudo gem install gvlc
+
+Install (traditional)
+---------------------
+
+Install ruby-1.9.x or later and libVLC >= 2.0.
+
+  % ruby extconf.rb
+  % make
+  % sudo make install
+
+Copying
+-------
+   Copyright (c) 2012 Ruby-GNOME2 Project Team
+
+   This program is free software.
+   You can distribute/modify this program under the terms of
+   the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+
+Project Website
+---------------
+   http://ruby-gnome2.sourceforge.jp/
diff --git a/gvlc/Rakefile b/gvlc/Rakefile
new file mode 100644
index 0000000..29bae17
--- /dev/null
+++ b/gvlc/Rakefile
@@ -0,0 +1,15 @@
+# -*- ruby -*-
+
+$LOAD_PATH.unshift("./../glib2/lib")
+require 'gnome2/rake/package-task'
+
+package_task = GNOME2::Rake::PackageTask.new do |package|
+  package.summary = "Ruby/VLC is a Ruby binding of libVLC for Ruby/GTK."
+  package.description = "Ruby/VLC is a Ruby binding of libVLC for Ruby/GTK."
+  package.dependency.gem.runtime = ["glib2"]
+  package.windows.packages = []
+  package.windows.dependencies = []
+  package.post_install_message = "This library is experimental."
+end
+package_task.define
+
diff --git a/gvlc/ext/gvlc/depend b/gvlc/ext/gvlc/depend
new file mode 100644
index 0000000..5f2394c
--- /dev/null
+++ b/gvlc/ext/gvlc/depend
@@ -0,0 +1,6 @@
+install: install-pc
+install-pc:
+	if test -n "$(pkgconfigdir)"; then			\
+	  $(MAKEDIRS) $(pkgconfigdir);				\
+	  $(INSTALL_DATA) ruby-vlc.pc $(pkgconfigdir);		\
+	fi
diff --git a/gvlc/ext/gvlc/enums.c b/gvlc/ext/gvlc/enums.c
new file mode 100644
index 0000000..41fa803
--- /dev/null
+++ b/gvlc/ext/gvlc/enums.c
@@ -0,0 +1,289 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+GType
+vlc_track_type_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_track_unknown,  "VLC_TRACK_TYPE_UNKNOWN",   "unknown"},
+            {libvlc_track_audio,    "VLC_TRACK_TYPE_AUDIO",     "audio"},
+            {libvlc_track_video,    "VLC_TRACK_TYPE_VIDEO",     "video"},
+            {libvlc_track_text,     "VLC_TRACK_TYPE_TEXT",      "text"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCTrackType"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_meta_type_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_meta_Title,         "VLC_META_TYPE_TITLE",          "title"},
+            {libvlc_meta_Artist,        "VLC_META_TYPE_ARTIST",         "artist"},
+            {libvlc_meta_Genre,         "VLC_META_TYPE_GENRE",          "genre"},
+            {libvlc_meta_Copyright,     "VLC_META_TYPE_COPYRIGHT",      "copyright"},
+            {libvlc_meta_Album,         "VLC_META_TYPE_ALBUM",          "album"},
+            {libvlc_meta_TrackNumber,   "VLC_META_TYPE_TRACKNUMBER",    "tracknumber"},
+            {libvlc_meta_Description,   "VLC_META_TYPE_DESCRIPTION",    "description"},
+            {libvlc_meta_Rating,        "VLC_META_TYPE_RATING",         "rating"},
+            {libvlc_meta_Date,          "VLC_META_TYPE_DATE",           "date"},
+            {libvlc_meta_Setting,       "VLC_META_TYPE_SETTING",        "setting"},
+            {libvlc_meta_URL,           "VLC_META_TYPE_URL",            "url"},
+            {libvlc_meta_Language,      "VLC_META_TYPE_LANGUAGE",       "language"},
+            {libvlc_meta_NowPlaying,    "VLC_META_TYPE_NOWPLAYING",     "nowplaying"},
+            {libvlc_meta_Publisher,     "VLC_META_TYPE_PUBLISHER",      "publisher"},
+            {libvlc_meta_EncodedBy,     "VLC_META_TYPE_ENCODEDBY",      "encodedby"},
+            {libvlc_meta_ArtworkURL,    "VLC_META_TYPE_ARTWORKURL",     "artworkurl"},
+            {libvlc_meta_TrackID,       "VLC_META_TYPE_TRACKID",        "trackid"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCMetaType"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_state_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_NothingSpecial,     "VLC_STATE_NOTHINGSPECIAL",     "nothingspecial"},
+            {libvlc_Opening,            "VLC_STATE_OPENING",            "opening"},
+            {libvlc_Buffering,          "VLC_STATE_BUFFERING",          "buffering"},
+            {libvlc_Playing,            "VLC_STATE_PLAYING",            "playing"},
+            {libvlc_Paused,             "VLC_STATE_PAUSED",             "paused"},
+            {libvlc_Stopped,            "VLC_STATE_STOPPED",            "stopped"},
+            {libvlc_Ended,              "VLC_STATE_ENDED",              "ended"},
+            {libvlc_Error,              "VLC_STATE_ERROR",              "error"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCState"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_playback_mode_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_playback_mode_default,  "VLC_PLAYBACK_MODE_DEFAULT",    "default"},
+            {libvlc_playback_mode_loop,     "VLC_PLAYBACK_MODE_LOOP",       "loop"},
+            {libvlc_playback_mode_repeat,   "VLC_PLAYBACK_MODE_REPEAT",     "repeat"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCPlaybackMode"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_navigate_mode_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_navigate_activate,  "VLC_NAVIGATE_MODE_ACTIVATE",   "activate"},
+            {libvlc_navigate_up,        "VLC_NAVIGATE_MODE_UP",         "up"},
+            {libvlc_navigate_down,      "VLC_NAVIGATE_MODE_DOWN",       "down"},
+            {libvlc_navigate_left,      "VLC_NAVIGATE_MODE_LEFT",       "left"},
+            {libvlc_navigate_right,     "VLC_NAVIGATE_MODE_RIGHT",      "right"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCNavigateMode"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_video_marquee_option_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_marquee_Enable,     "VLC_VIDEO_MARQUEE_OPTION_ENABLE",      "enable"},
+            {libvlc_marquee_Text,       "VLC_VIDEO_MARQUEE_OPTION_TEXT",        "text"},
+            {libvlc_marquee_Color,      "VLC_VIDEO_MARQUEE_OPTION_COLOR",       "color"},
+            {libvlc_marquee_Opacity,    "VLC_VIDEO_MARQUEE_OPTION_OPACITY",     "opacity"},
+            {libvlc_marquee_Position,   "VLC_VIDEO_MARQUEE_OPTION_POSITION",    "position"},
+            {libvlc_marquee_Refresh,    "VLC_VIDEO_MARQUEE_OPTION_REFRESH",     "refresh"},
+            {libvlc_marquee_Size,       "VLC_VIDEO_MARQUEE_OPTION_SIZE",        "size"},
+            {libvlc_marquee_Timeout,    "VLC_VIDEO_MARQUEE_OPTION_TIMEOUT",     "timeout"},
+            {libvlc_marquee_X,          "VLC_VIDEO_MARQUEE_OPTION_X",           "x"},
+            {libvlc_marquee_Y,          "VLC_VIDEO_MARQUEE_OPTION_Y",           "y"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCVideoMarqueeOption"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_video_logo_option_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_logo_enable,    "VLC_VIDEO_LOGO_OPTION_ENABLE",     "enable"},
+            {libvlc_logo_file,      "VLC_VIDEO_LOGO_OPTION_FILE",       "file"},
+            {libvlc_logo_x,         "VLC_VIDEO_LOGO_OPTION_X",          "x"},
+            {libvlc_logo_y,         "VLC_VIDEO_LOGO_OPTION_Y",          "y"},
+            {libvlc_logo_delay,     "VLC_VIDEO_LOGO_OPTION_DELAY",      "delay"},
+            {libvlc_logo_repeat,    "VLC_VIDEO_LOGO_OPTION_REPEAT",     "repeat"},
+            {libvlc_logo_opacity,   "VLC_VIDEO_LOGO_OPTION_OPACITY",    "opacity"},
+            {libvlc_logo_position,  "VLC_VIDEO_LOGO_OPTION_POSITION",   "position"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCVideoLogoOption"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_video_adjust_option_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_adjust_Enable,      "VLC_VIDEO_ADJUST_OPTION_ENABLE",       "enable"},
+            {libvlc_adjust_Contrast,    "VLC_VIDEO_ADJUST_OPTION_CONTRAST",     "contrast"},
+            {libvlc_adjust_Brightness,  "VLC_VIDEO_ADJUST_OPTION_BRIGHTNESS",   "brightness"},
+            {libvlc_adjust_Hue,         "VLC_VIDEO_ADJUST_OPTION_HUE",          "hue"},
+            {libvlc_adjust_Saturation,  "VLC_VIDEO_ADJUST_OPTION_SATURATION",   "saturation"},
+            {libvlc_adjust_Gamma,       "VLC_VIDEO_ADJUST_OPTION_GAMMA",        "gamma"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCVideoAdjustOption"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_audio_output_channel_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_AudioChannel_Error,     "VLC_AUDIO_OUTPUT_CHANNEL_ERROR",       "error"},
+            {libvlc_AudioChannel_Stereo,    "VLC_AUDIO_OUTPUT_CHANNEL_STEREO",      "stereo"},
+            {libvlc_AudioChannel_RStereo,   "VLC_AUDIO_OUTPUT_CHANNEL_RSTEREO",     "rstereo"},
+            {libvlc_AudioChannel_Left,      "VLC_AUDIO_OUTPUT_CHANNEL_LEFT",        "left"},
+            {libvlc_AudioChannel_Right,     "VLC_AUDIO_OUTPUT_CHANNEL_RIGHT",       "right"},
+            {libvlc_AudioChannel_Dolbys,    "VLC_AUDIO_OUTPUT_CHANNEL_DOLBYS",      "dolbys"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCAudioOutputChannel"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_audio_output_device_types_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_AudioOutputDevice_Error,    "VLC_AUDIO_OUTPUT_DEVICE_TYPES_ERROR",      "error"},
+            {libvlc_AudioOutputDevice_Mono,     "VLC_AUDIO_OUTPUT_DEVICE_TYPES_MONO",       "mono"},
+            {libvlc_AudioOutputDevice_Stereo,   "VLC_AUDIO_OUTPUT_DEVICE_TYPES_STEREO",     "stereo"},
+            {libvlc_AudioOutputDevice_2F2R,     "VLC_AUDIO_OUTPUT_DEVICE_TYPES_2F2R",       "ch2f2r"},
+            {libvlc_AudioOutputDevice_3F2R,     "VLC_AUDIO_OUTPUT_DEVICE_TYPES_3F2R",       "ch3f2r"},
+            {libvlc_AudioOutputDevice_5_1,      "VLC_AUDIO_OUTPUT_DEVICE_TYPES_5_1",        "ch5_1"},
+            {libvlc_AudioOutputDevice_6_1,      "VLC_AUDIO_OUTPUT_DEVICE_TYPES_6_1",        "ch6_1"},
+            {libvlc_AudioOutputDevice_7_1,      "VLC_AUDIO_OUTPUT_DEVICE_TYPES_7_1",        "ch7_1"},
+            {libvlc_AudioOutputDevice_SPDIF,    "VLC_AUDIO_OUTPUT_DEVICE_TYPES_SPDIF",      "spdif"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCAudioOutputDeviceTypes"), values);
+    }
+    return etype;
+}
+
+GType
+vlc_event_type_get_type(void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            {libvlc_MediaMetaChanged,               "VLC_EVENT_TYPE_MEDIA_METACHANGED",                 "media_metachanged"},
+            {libvlc_MediaSubItemAdded,              "VLC_EVENT_TYPE_MEDIA_SUBITEMADDED",                "media_subitemadded"},
+            {libvlc_MediaDurationChanged,           "VLC_EVENT_TYPE_MEDIA_DURATIONCHANGED",             "media_durationchanged"},
+            {libvlc_MediaParsedChanged,             "VLC_EVENT_TYPE_MEDIA_PARSEDCHANGED",               "media_parsedchanged"},
+            {libvlc_MediaFreed,                     "VLC_EVENT_TYPE_MEDIA_FREED",                       "media_freed"},
+            {libvlc_MediaStateChanged,              "VLC_EVENT_TYPE_MEDIA_STATECHANGED",                "media_statechanged"},
+            {libvlc_MediaPlayerMediaChanged,        "VLC_EVENT_TYPE_MEDIAPLAYER_MEDIACHANGED",          "mediaplayer_mediachanged"},
+            {libvlc_MediaPlayerNothingSpecial,      "VLC_EVENT_TYPE_MEDIAPLAYER_NOTHINGSPECIAL",        "mediaplayer_nothingspecial"},
+            {libvlc_MediaPlayerOpening,             "VLC_EVENT_TYPE_MEDIAPLAYER_OPENING",               "mediaplayer_opening"},
+            {libvlc_MediaPlayerBuffering,           "VLC_EVENT_TYPE_MEDIAPLAYER_BUFFERING",             "mediaplayer_buffering"},
+            {libvlc_MediaPlayerPlaying,             "VLC_EVENT_TYPE_MEDIAPLAYER_PLAYING",               "mediaplayer_playing"},
+            {libvlc_MediaPlayerPaused,              "VLC_EVENT_TYPE_MEDIAPLAYER_PAUSED",                "mediaplayer_paused"},
+            {libvlc_MediaPlayerStopped,             "VLC_EVENT_TYPE_MEDIAPLAYER_STOPPED",               "mediaplayer_stopped"},
+            {libvlc_MediaPlayerForward,             "VLC_EVENT_TYPE_MEDIAPLAYER_FORWARD",               "mediaplayer_forward"},
+            {libvlc_MediaPlayerBackward,            "VLC_EVENT_TYPE_MEDIAPLAYER_BACKWARD",              "mediaplayer_backward"},
+            {libvlc_MediaPlayerEndReached,          "VLC_EVENT_TYPE_MEDIAPLAYER_ENDREACHED",            "mediaplayer_endreached"},
+            {libvlc_MediaPlayerEncounteredError,    "VLC_EVENT_TYPE_MEDIAPLAYER_ENCOUNTEREDERROR",      "mediaplayer_encounterederror"},
+            {libvlc_MediaPlayerTimeChanged,         "VLC_EVENT_TYPE_MEDIAPLAYER_TIMECHANGED",           "mediaplayer_timechanged"},
+            {libvlc_MediaPlayerPositionChanged,     "VLC_EVENT_TYPE_MEDIAPLAYER_POSITIONCHANGED",       "mediaplayer_positionchanged"},
+            {libvlc_MediaPlayerSeekableChanged,     "VLC_EVENT_TYPE_MEDIAPLAYER_SEEKABLECHANGED",       "mediaplayer_seekablechanged"},
+            {libvlc_MediaPlayerPausableChanged,     "VLC_EVENT_TYPE_MEDIAPLAYER_PAUSABLECHANGED",       "mediaplayer_pausablechanged"},
+            {libvlc_MediaPlayerTitleChanged,        "VLC_EVENT_TYPE_MEDIAPLAYER_TITLECHANGED",          "mediaplayer_titlechanged"},
+            {libvlc_MediaPlayerSnapshotTaken,       "VLC_EVENT_TYPE_MEDIAPLAYER_SNAPSHOTTAKEN",         "mediaplayer_snapshottaken"},
+            {libvlc_MediaPlayerLengthChanged,       "VLC_EVENT_TYPE_MEDIAPLAYER_LENGTHCHANGED",         "mediaplayer_lengthchanged"},
+            {libvlc_MediaPlayerVout,                "VLC_EVENT_TYPE_MEDIAPLAYER_VOUT",                  "mediaplayer_vout"},
+            {libvlc_MediaListItemAdded,             "VLC_EVENT_TYPE_MEDIALIST_ITEMADDED",               "medialist_itemadded"},
+            {libvlc_MediaListWillAddItem,           "VLC_EVENT_TYPE_MEDIALIST_WILLADDITEM",             "medialist_willadditem"},
+            {libvlc_MediaListItemDeleted,           "VLC_EVENT_TYPE_MEDIALIST_ITEMDELETED",             "medialist_itemdeleted"},
+            {libvlc_MediaListWillDeleteItem,        "VLC_EVENT_TYPE_MEDIALIST_WILLDELETEITEM",          "medialist_willdeleteitem"},
+            {libvlc_MediaListViewItemAdded,         "VLC_EVENT_TYPE_MEDIALISTVIEW_ITEMADDED",           "medialistview_itemadded"},
+            {libvlc_MediaListViewWillAddItem,       "VLC_EVENT_TYPE_MEDIALISTVIEW_WILLADDITEM",         "medialistview_willadditem"},
+            {libvlc_MediaListViewItemDeleted,       "VLC_EVENT_TYPE_MEDIALISTVIEW_ITEMDELETED",         "medialistview_itemdeleted"},
+            {libvlc_MediaListViewWillDeleteItem,    "VLC_EVENT_TYPE_MEDIALISTVIEW_WILLDELETEITEM",      "medialistview_willdeleteitem"},
+            {libvlc_MediaListPlayerPlayed,          "VLC_EVENT_TYPE_MEDIALISTPLAYER_PLAYED",            "medialistplayer_played"},
+            {libvlc_MediaListPlayerNextItemSet,     "VLC_EVENT_TYPE_MEDIALISTPLAYER_NEXTITEMSET",       "medialistplayer_nextitemset"},
+            {libvlc_MediaListPlayerStopped,         "VLC_EVENT_TYPE_MEDIALISTPLAYER_STOPPED",           "medialistplayer_stopped"},
+            {libvlc_MediaDiscovererStarted,         "VLC_EVENT_TYPE_MEDIADISCOVERER_STARTED",           "mediadiscoverer_started"},
+            {libvlc_MediaDiscovererEnded,           "VLC_EVENT_TYPE_MEDIADISCOVERER_ENDED",             "mediadiscoverer_ended"},
+            {libvlc_VlmMediaAdded,                  "VLC_EVENT_TYPE_VLMMEDIA_ADDED",                    "vlmmedia_added"},
+            {libvlc_VlmMediaRemoved,                "VLC_EVENT_TYPE_VLMMEDIA_REMOVED",                  "vlmmedia_removed"},
+            {libvlc_VlmMediaChanged,                "VLC_EVENT_TYPE_VLMMEDIA_CHANGED",                  "vlmmedia_changed"},
+            {libvlc_VlmMediaInstanceStarted,        "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STARTED",          "vlmmediainstance_started"},
+            {libvlc_VlmMediaInstanceStopped,        "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STOPPED",          "vlmmediainstance_stopped"},
+            {libvlc_VlmMediaInstanceStatusInit,     "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSINIT",       "vlmmediainstance_statusinit"},
+            {libvlc_VlmMediaInstanceStatusOpening,  "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSOPENING",    "vlmmediainstance_statusopening"},
+            {libvlc_VlmMediaInstanceStatusPlaying,  "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSPLAYING",    "vlmmediainstance_statusplaying"},
+            {libvlc_VlmMediaInstanceStatusPause,    "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSPAUSE",      "vlmmediainstance_statuspause"},
+            {libvlc_VlmMediaInstanceStatusEnd,      "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSEND",        "vlmmediainstance_statusend"},
+            {libvlc_VlmMediaInstanceStatusError,    "VLC_EVENT_TYPE_VLMMEDIAINSTANCE_STATUSERROR",      "vlmmediainstance_statuserror"},
+            {0, NULL, NULL}
+        };
+        etype = g_enum_register_static(g_intern_static_string("VLCEventType"), values);
+    }
+    return etype;
+}
diff --git a/gvlc/ext/gvlc/extconf.rb b/gvlc/ext/gvlc/extconf.rb
new file mode 100644
index 0000000..38b9d18
--- /dev/null
+++ b/gvlc/ext/gvlc/extconf.rb
@@ -0,0 +1,62 @@
+=begin
+extconf.rb for Ruby/VLC extention library
+=end
+
+require 'pathname'
+
+base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
+top_dir = base_dir.parent
+top_build_dir = Pathname(".").parent.parent.parent.expand_path
+
+mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
+version_suffix = ""
+unless mkmf_gnome2_dir.exist?
+  if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
+    version_suffix = $1
+    mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
+  end
+end
+
+$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
+
+module_name = "gvlc"
+package_id = "libvlc"
+
+begin
+  require 'mkmf-gnome2'
+rescue LoadError
+  require 'rubygems'
+  gem 'glib2'
+  require 'mkmf-gnome2'
+end
+
+["glib2"].each do |package|
+  directory = "#{package}#{version_suffix}"
+  build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
+  add_depend_package(package, "#{directory}/ext/#{package}",
+                     top_dir.to_s,
+                     :top_build_dir => top_build_dir.to_s,
+                     :target_build_dir => build_dir)
+end
+
+unless required_pkg_config_package([package_id, 2, 0, 0],
+                                   :debian => "libvlc-dev")
+  exit(false)
+end
+
+have_library('vlc')
+have_header('vlc/vlc.h')
+
+$INCFLAGS = [$INCFLAGS, PKGConfig.cflags_only_I('glib-2.0')].join(' ')
+
+create_pkg_config_file("Ruby/VLC", package_id)
+$defs << "-DRUBY_VLC_COMPILATION"
+create_makefile(module_name)
+pkg_config_dir = with_config("pkg-config-dir")
+if pkg_config_dir.is_a?(String)
+  File.open("Makefile", "ab") do |makefile|
+    makefile.puts
+    makefile.puts("pkgconfigdir=#{pkg_config_dir}")
+  end
+end
+
diff --git a/gvlc/ext/gvlc/init.c b/gvlc/ext/gvlc/init.c
new file mode 100644
index 0000000..d9fe8e3
--- /dev/null
+++ b/gvlc/ext/gvlc/init.c
@@ -0,0 +1,31 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+extern void Init_gvlc(void);
+
+void
+Init_gvlc(void)
+{
+    Init_vlc();
+
+    rbgutil_start_callback_dispatch_thread();
+}
diff --git a/gvlc/ext/gvlc/rbvlc.c b/gvlc/ext/gvlc/rbvlc.c
new file mode 100644
index 0000000..8c25094
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlc.c
@@ -0,0 +1,138 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+#define RG_TARGET_NAMESPACE mVLC
+
+/*
+ * Retrieve libvlc version.
+ *
+ * @example
+ *   VLC::Core.version        # => "2.0.0-rc1 Twoflower"
+ *
+ * @return [String] a string containing the libvlc version
+ * @todo fixme
+ */
+static VALUE
+rg_s_version(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(libvlc_get_version());
+}
+
+/*
+ * Retrieve libvlc compiler version.
+ *
+ * @example
+ *   VLC::Core.compiler       # => "gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)"
+ *
+ * @return [String] a string containing the libvlc compiler version
+ * @todo fixme
+ */
+static VALUE
+rg_s_compiler(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(libvlc_get_compiler());
+}
+
+/*
+ * Retrieve libvlc changeset.
+ *
+ * @example
+ *   VLC::Core.changeset      # => "2.0.0+git20120127+r38"
+ *
+ * @return [String] a string containing the libvlc changeset
+ * @todo fixme
+ */
+static VALUE
+rg_s_changeset(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(libvlc_get_changeset());
+}
+
+/*
+ * A human-readable error message for the last LibVLC error in the calling
+ * thread. The resulting string is valid until another error occurs (at least
+ * until the next LibVLC call).
+ *
+ * @note
+ *   This will be nil if there was no error.
+ *
+ * @return [String] the last error message
+ * @todo fixme
+ */
+static VALUE
+rg_s_errmsg(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(libvlc_errmsg());
+}
+
+/*
+ * Clears the LibVLC error status for the current thread. This is optional.
+ * By default, the error status is automatically overridden when a new error
+ * occurs, and destroyed when the thread exits.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_s_clearerr(VALUE self)
+{
+    libvlc_clearerr();
+    return self;
+}
+
+/*
+ * Document-module: VLC
+ *
+ * @todo fixme
+ */
+void
+Init_vlc(void)
+{
+    VALUE RG_TARGET_NAMESPACE = rb_define_module("VLC");
+    G_DEF_CLASS(VLC_TYPE_TRACK_TYPE, "TrackType", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_STATE, "State", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_PLAYBACK_MODE, "PlaybackMode", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_NAVIGATE_MODE, "NavigateMode", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_VIDEO_MARQUEE_OPTION, "VideoMarqueeOption", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_VIDEO_LOGO_OPTION, "VideoLogoOption", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_VIDEO_ADJUST_OPTION, "VideoAdjustOption", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_AUDIO_OUTPUT_CHANNEL, "AudioOutputChannel", RG_TARGET_NAMESPACE);
+    G_DEF_CLASS(VLC_TYPE_AUDIO_OUTPUT_DEVICE_TYPES, "AudioOutputDeviceTypes", RG_TARGET_NAMESPACE);
+
+    RG_DEF_SMETHOD(version, 0);
+    RG_DEF_SMETHOD(compiler, 0);
+    RG_DEF_SMETHOD(changeset, 0);
+    RG_DEF_SMETHOD(errmsg, 0);
+    RG_DEF_SMETHOD(clearerr, 0);
+
+    Init_vlc_core(RG_TARGET_NAMESPACE);
+    Init_vlc_media(RG_TARGET_NAMESPACE);
+    Init_vlc_mediaplayer(RG_TARGET_NAMESPACE);
+    Init_vlc_medialist(RG_TARGET_NAMESPACE);
+    Init_vlc_medialistplayer(RG_TARGET_NAMESPACE);
+    Init_vlc_medialibrary(RG_TARGET_NAMESPACE);
+    Init_vlc_mediadiscoverer(RG_TARGET_NAMESPACE);
+    Init_vlc_event(RG_TARGET_NAMESPACE);
+    Init_vlc_moduledescription(RG_TARGET_NAMESPACE);
+    Init_vlc_trackdescription(RG_TARGET_NAMESPACE);
+    Init_vlc_audiooutput(RG_TARGET_NAMESPACE);
+}
diff --git a/gvlc/ext/gvlc/rbvlcaudiooutput.c b/gvlc/ext/gvlc/rbvlcaudiooutput.c
new file mode 100644
index 0000000..9df4687
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcaudiooutput.c
@@ -0,0 +1,93 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_audio_output_t *
+vlc_audio_output_copy(const libvlc_audio_output_t *instance)
+{
+    libvlc_audio_output_t *result = g_new(libvlc_audio_output_t, 1);
+    *result = *instance;
+    result->psz_name        = g_strdup(instance->psz_name);
+    result->psz_description = g_strdup(instance->psz_description);
+    return result;
+}
+
+static void
+vlc_audio_output_free(libvlc_audio_output_t *instance)
+{
+    g_free(instance->psz_name);
+    g_free(instance->psz_description);
+    g_free(instance);
+}
+
+GType
+vlc_audio_output_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCAudioOutput",
+                                                (GBoxedCopyFunc)vlc_audio_output_copy,
+                                                (GBoxedFreeFunc)vlc_audio_output_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cAudioOutput
+#define _SELF(self) (RVAL2VLCAUDIOOUTPUT(self))
+
+/*
+ * Get name of audio output
+ *
+ * @return [String] name
+ * @todo fixme
+ */
+static VALUE
+rg_name(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_name);
+}
+
+/*
+ * Get description of audio output
+ *
+ * @return [String] description
+ * @todo fixme
+ */
+static VALUE
+rg_description(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_description);
+}
+
+/*
+ * Document-class: VLC::AudioOutput
+ *
+ * Description for audio output.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_audiooutput(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_AUDIO_OUTPUT, "AudioOutput", mVLC);
+
+    RG_DEF_METHOD(name, 0);
+    RG_DEF_METHOD(description, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcconversions.h b/gvlc/ext/gvlc/rbvlcconversions.h
new file mode 100644
index 0000000..aae93b8
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcconversions.h
@@ -0,0 +1,75 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef __RBVLC_CONVERSIONS_H__
+#define __RBVLC_CONVERSIONS_H__
+
+#define RVAL2VLCCORE(o)                     ((libvlc_instance_t*)RVAL2BOXED(o, VLC_TYPE_CORE))
+#define VLCCORE2RVAL(o)                     (BOXED2RVAL(o, VLC_TYPE_CORE))
+#define RVAL2VLCMEDIA(o)                    ((libvlc_media_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA))
+#define VLCMEDIA2RVAL(o)                    (BOXED2RVAL(o, VLC_TYPE_MEDIA))
+#define RVAL2VLCMEDIAPLAYER(o)              ((libvlc_media_player_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_PLAYER))
+#define VLCMEDIAPLAYER2RVAL(o)              (BOXED2RVAL(o, VLC_TYPE_MEDIA_PLAYER))
+#define RVAL2VLCMEDIALIST(o)                ((libvlc_media_list_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_LIST))
+#define VLCMEDIALIST2RVAL(o)                (BOXED2RVAL(o, VLC_TYPE_MEDIA_LIST))
+#define RVAL2VLCMEDIALISTPLAYER(o)          ((libvlc_media_list_player_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_LIST_PLAYER))
+#define VLCMEDIALISTPLAYER2RVAL(o)          (BOXED2RVAL(o, VLC_TYPE_MEDIA_LIST_PLAYER))
+#define RVAL2VLCMEDIALIBRARY(o)             ((libvlc_media_library_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_LIBRARY))
+#define VLCMEDIALIBRARY2RVAL(o)             (BOXED2RVAL(o, VLC_TYPE_MEDIA_LIBRARY))
+#define RVAL2VLCMEDIADISCOVERER(o)          ((libvlc_media_discoverer_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_DISCOVERER))
+#define VLCMEDIADISCOVERER2RVAL(o)          (BOXED2RVAL(o, VLC_TYPE_MEDIA_DISCOVERER))
+#define RVAL2VLCEVENT(o)                    ((libvlc_event_t*)RVAL2BOXED(o, VLC_TYPE_EVENT))
+#define VLCEVENT2RVAL(o)                    (BOXED2RVAL(o, VLC_TYPE_EVENT))
+#define RVAL2VLCMEDIATRACKINFO(o)           ((libvlc_media_track_info_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_TRACK_INFO))
+#define VLCMEDIATRACKINFO2RVAL(o)           (BOXED2RVAL(o, VLC_TYPE_MEDIA_TRACK_INFO))
+#define RVAL2VLCMODULEDESCRIPTION(o)        ((libvlc_module_description_t*)RVAL2BOXED(o, VLC_TYPE_MODULE_DESCRIPTION))
+#define VLCMODULEDESCRIPTION2RVAL(o)        (BOXED2RVAL(o, VLC_TYPE_MODULE_DESCRIPTION))
+#define RVAL2VLCTRACKDESCRIPTION(o)         ((libvlc_track_description_t*)RVAL2BOXED(o, VLC_TYPE_TRACK_DESCRIPTION))
+#define VLCTRACKDESCRIPTION2RVAL(o)         (BOXED2RVAL(o, VLC_TYPE_TRACK_DESCRIPTION))
+#define RVAL2VLCAUDIOOUTPUT(o)              ((libvlc_audio_output_t*)RVAL2BOXED(o, VLC_TYPE_AUDIO_OUTPUT))
+#define VLCAUDIOOUTPUT2RVAL(o)              (BOXED2RVAL(o, VLC_TYPE_AUDIO_OUTPUT))
+#define RVAL2VLCMEDIASTATS(o)               ((libvlc_media_stats_t*)RVAL2BOXED(o, VLC_TYPE_MEDIA_STATS))
+#define VLCMEDIASTATS2RVAL(o)               (BOXED2RVAL(o, VLC_TYPE_MEDIA_STATS))
+
+#define RVAL2VLCTRACKTYPE(o)                (RVAL2GENUM(o, VLC_TYPE_TRACK_TYPE))
+#define VLCTRACKTYPE2RVAL(o)                (GENUM2RVAL(o, VLC_TYPE_TRACK_TYPE))
+#define RVAL2VLCMETATYPE(o)                 (RVAL2GENUM(o, VLC_TYPE_META_TYPE))
+#define VLCMETATYPE2RVAL(o)                 (GENUM2RVAL(o, VLC_TYPE_META_TYPE))
+#define RVAL2VLCSTATE(o)                    (RVAL2GENUM(o, VLC_TYPE_STATE))
+#define VLCSTATE2RVAL(o)                    (GENUM2RVAL(o, VLC_TYPE_STATE))
+#define RVAL2VLCPLAYBACKMODE(o)             (RVAL2GENUM(o, VLC_TYPE_PLAYBACK_MODE))
+#define VLCPLAYBACKMODE2RVAL(o)             (GENUM2RVAL(o, VLC_TYPE_PLAYBACK_MODE))
+#define RVAL2VLCNAVIGATEMODE(o)             (RVAL2GENUM(o, VLC_TYPE_NAVIGATE_MODE))
+#define VLCNAVIGATEMODE2RVAL(o)             (GENUM2RVAL(o, VLC_TYPE_NAVIGATE_MODE))
+#define RVAL2VLCVIDEOMARQUEEOPTION(o)       (RVAL2GENUM(o, VLC_TYPE_VIDEO_MARQUEE_OPTION))
+#define VLCVIDEOMARQUEEOPTION2RVAL(o)       (GENUM2RVAL(o, VLC_TYPE_VIDEO_MARQUEE_OPTION))
+#define RVAL2VLCVIDEOLOGOOPTION(o)          (RVAL2GENUM(o, VLC_TYPE_VIDEO_LOGO_OPTION))
+#define VLCVIDEOLOGOOPTION2RVAL(o)          (GENUM2RVAL(o, VLC_TYPE_VIDEO_LOGO_OPTION))
+#define RVAL2VLCVIDEOADJUSTOPTION(o)        (RVAL2GENUM(o, VLC_TYPE_VIDEO_ADJUST_OPTION))
+#define VLCVIDEOADJUSTOPTION2RVAL(o)        (GENUM2RVAL(o, VLC_TYPE_VIDEO_ADJUST_OPTION))
+#define RVAL2VLCAUDIOOUTPUTCHANNEL(o)       (RVAL2GENUM(o, VLC_TYPE_AUDIO_OUTPUT_CHANNEL))
+#define VLCAUDIOOUTPUTCHANNEL2RVAL(o)       (GENUM2RVAL(o, VLC_TYPE_AUDIO_OUTPUT_CHANNEL))
+#define RVAL2VLCAUDIOOUTPUTDEVICETYPES(o)   (RVAL2GENUM(o, VLC_TYPE_AUDIO_OUTPUT_DEVICE_TYPES))
+#define VLCAUDIOOUTPUTDEVICETYPES2RVAL(o)   (GENUM2RVAL(o, VLC_TYPE_AUDIO_OUTPUT_DEVICE_TYPES))
+#define RVAL2VLCEVENTTYPE(o)                (RVAL2GENUM(o, VLC_TYPE_EVENT_TYPE))
+#define VLCEVENTTYPE2RVAL(o)                (GENUM2RVAL(o, VLC_TYPE_EVENT_TYPE))
+
+#endif
+
diff --git a/gvlc/ext/gvlc/rbvlccore.c b/gvlc/ext/gvlc/rbvlccore.c
new file mode 100644
index 0000000..a10c902
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlccore.c
@@ -0,0 +1,311 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_instance_t *
+vlc_core_copy(const libvlc_instance_t *instance)
+{
+    libvlc_retain((libvlc_instance_t *)instance);
+    return (libvlc_instance_t *)instance;
+}
+
+static void
+vlc_core_free(libvlc_instance_t *instance)
+{
+    libvlc_release(instance);
+}
+
+GType
+vlc_core_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCCore",
+                                                (GBoxedCopyFunc)vlc_core_copy,
+                                                (GBoxedFreeFunc)vlc_core_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cCore
+#define _SELF(self) (RVAL2VLCCORE(self))
+
+/*
+ * Create and initialize a libvlc instance.
+ * This functions accept a list of "command line" arguments similar to the
+ * main(). These arguments affect the LibVLC instance default configuration.
+ *
+ * @note
+ *   Arguments are meant to be passed from the command line to LibVLC, just like
+ *   VLC media player does. The list of valid arguments depends on the LibVLC
+ *   version, the operating system and platform, and set of available LibVLC
+ *   plugins. Invalid or unsupported arguments will cause the function to fail
+ *   (i.e. return NULL). Also, some arguments may alter the behaviour or
+ *   otherwise interfere with other LibVLC functions.
+ *
+ * @note
+ *   There is absolutely no warranty or promise of forward, backward and
+ *   cross-platform compatibility with regards to libvlc_new() arguments.
+ *   We recommend that you do not use them, other than when debugging.
+ *
+ * @example
+ *   core = VLC::Core.new('--rate', '2')
+ *
+ * @param [String] args list of arguments
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE rb_args;
+    char **args;
+    long len;
+    libvlc_instance_t *instance;
+
+    rb_scan_args(argc, argv, "0*", &rb_args);
+
+    args = RVAL2CSTRARY(rb_args, &len);
+    instance = libvlc_new((int)len, (const char *const *)args);
+    CSTRARY_FREE(args, len);
+    if (!instance)
+        rb_raise(rb_eArgError, "Invalid arguments.");
+
+    G_INITIALIZE(self, instance);
+    vlc_core_free(instance);
+    return Qnil;
+}
+
+/*
+ * Try to start a user interface for the libvlc instance.
+ *
+ * @example
+ *   core.add_intf("notify")
+ *
+ * @param [String] name interface name, or nil for default
+ * @return self
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_add_intf(VALUE self, VALUE name)
+{
+    if(libvlc_add_intf(_SELF(self), RVAL2CSTR_ACCEPT_NIL(name)))
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    return self;
+}
+
+static void
+cb_exit_handler(void *self)
+{
+    VALUE func = rb_ivar_get((VALUE)self, rb_intern("exit_handler"));
+    if (NIL_P(func))
+        rb_warn("exit handler not found");
+    else
+        rb_funcall(func, rb_intern("call"), 1, self);
+}
+
+/*
+ * Registers a callback for the LibVLC exit event. This is mostly useful if
+ * you have started at least one interface with {#add_intf}.
+ * Typically, this function will wake up your application main loop (from
+ * another thread).
+ *
+ * @note
+ *   This function and {#wait} cannot be used at the same time.
+ *   Use either or none of them but not both.
+ *
+ * @yield
+ * @yieldparam self
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_exit_handler(VALUE self)
+{
+    rb_ivar_set(self, rb_intern("exit_handler"), rb_block_proc());
+    libvlc_set_exit_handler(_SELF(self), cb_exit_handler, (void *)self);
+    return self;
+}
+
+/*
+ * Waits until an interface causes the instance to exit.
+ * You should start at least one interface first, using {#add_intf}.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_wait(VALUE self)
+{
+    libvlc_wait(_SELF(self));
+    return self;
+}
+
+/*
+ * Sets the application name. LibVLC passes this as the user agent string
+ * when a protocol requires it.
+ *
+ * @example
+ *   core.set_user_agent("FooBar player 1.2.3", "FooBar/1.2.3 Ruby/1.9.3p0")
+ *
+ * @param [String] name human-readable application name
+ * @param [String] http HTTP User Agent
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_user_agent(VALUE self, VALUE name, VALUE http)
+{
+    libvlc_set_user_agent(_SELF(self), RVAL2CSTR(name), RVAL2CSTR(http));
+    return self;
+}
+
+/*
+ * Returns a list of video filters that are available.
+ *
+ * @return [Array<VLC::ModuleDescription>] a list of module descriptions
+ * @todo fixme
+ */
+static VALUE
+rg_video_filter_list(VALUE self)
+{
+    return MODULEDESCRIPTIONLIST2RVAL(libvlc_video_filter_list_get(_SELF(self)));
+}
+
+/*
+ * Returns a list of audio filters that are available.
+ *
+ * @return [Array<VLC::ModuleDescription>] a list of module descriptions
+ * @todo fixme
+ */
+static VALUE
+rg_audio_filter_list(VALUE self)
+{
+    return MODULEDESCRIPTIONLIST2RVAL(libvlc_audio_filter_list_get(_SELF(self)));
+}
+
+/*
+ * Get the list of available audio outputs
+ *
+ * @return [Array<VLC::AudioOutput>] list of available audio outputs.
+ * @todo fixme
+ */
+static VALUE
+rg_audio_output_list(VALUE self)
+{
+    return AUDIOOUTPUTLIST2RVAL(libvlc_audio_output_list_get(_SELF(self)));
+}
+
+/*
+ * Get count of devices for audio output, these devices are hardware oriented
+ * like analor or digital output of sound card
+ *
+ * @param [String] name name of audio output (see {VLC::AudioOutput})
+ * @return [Integer] number of devices
+ * @todo fixme
+ */
+static VALUE
+rg_audio_output_device_count(VALUE self, VALUE name)
+{
+    return INT2NUM(libvlc_audio_output_device_count(_SELF(self), RVAL2CSTR(name)));
+}
+
+/*
+ * Get long name of device, if not available short name given
+ *
+ * @param [String] name name of audio output (see {VLC::AudioOutput})
+ * @param [Integer] index device index
+ * @return [String] long name of device
+ * @todo fixme
+ */
+static VALUE
+rg_audio_output_device_longname(VALUE self, VALUE name, VALUE index)
+{
+    return CSTR2RVAL(libvlc_audio_output_device_longname(_SELF(self), RVAL2CSTR(name), NUM2INT(index)));
+}
+
+/*
+ * Get id name of device
+ *
+ * @param [String] name name of audio output (see {VLC::AudioOutput})
+ * @param [Integer] index device index
+ * @return [String] id name of device, use for setting device
+ * @todo fixme
+ */
+static VALUE
+rg_audio_output_device_id(VALUE self, VALUE name, VALUE index)
+{
+    return CSTR2RVAL_FREE(libvlc_audio_output_device_id(_SELF(self), RVAL2CSTR(name), NUM2INT(index)));
+}
+
+/*
+ * Discover media service by name.
+ *
+ * @param [String] service_name service name
+ * @return [VLC::MediaDiscoverer] media discover object or nil in case of error
+ * @todo fixme
+ */
+static VALUE
+rg_create_discoverer(VALUE self, VALUE service_name)
+{
+    return VLCMEDIADISCOVERER2RVAL(libvlc_media_discoverer_new_from_name(_SELF(self), RVAL2CSTR(service_name)));
+}
+
+/*
+ * Create an new Media Library object
+ *
+ * @return [VLC::MediaLibrary] a new object or nil on error
+ * @todo fixme
+ */
+static VALUE
+rg_create_library(VALUE self)
+{
+    return VLCMEDIALIBRARY2RVAL(libvlc_media_library_new(_SELF(self)));
+}
+
+
+/*
+ * Document-class: VLC::Core
+ *
+ * Before it can do anything useful, {VLC::Core} must be initialized.
+ * You can create one (or more) instance(s) of {VLC::Core} in a given process.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_core(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_CORE, "Core", mVLC);
+
+    RG_DEF_METHOD(initialize, -1);
+    RG_DEF_METHOD(add_intf, 1);
+    RG_DEF_METHOD(set_exit_handler, 0);
+    RG_DEF_METHOD(wait, 0);
+    RG_DEF_METHOD(set_user_agent, 2);
+    RG_DEF_METHOD(video_filter_list, 0);
+    RG_DEF_METHOD(audio_filter_list, 0);
+    RG_DEF_METHOD(audio_output_list, 0);
+    RG_DEF_METHOD(audio_output_device_count, 1);
+    RG_DEF_METHOD(audio_output_device_longname, 2);
+    RG_DEF_METHOD(audio_output_device_id, 2);
+    RG_DEF_METHOD(create_discoverer, 1);
+    RG_DEF_METHOD(create_library, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcevent.c b/gvlc/ext/gvlc/rbvlcevent.c
new file mode 100644
index 0000000..be1568b
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcevent.c
@@ -0,0 +1,76 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_event_t *
+vlc_event_copy(const libvlc_event_t *instance)
+{
+    libvlc_event_t *result = g_new(libvlc_event_t, 1);
+    *result = *instance;
+    return result;
+}
+
+static void
+vlc_event_free(libvlc_event_t *instance)
+{
+    g_free(instance);
+}
+
+GType
+vlc_event_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCEvent",
+                                                (GBoxedCopyFunc)vlc_event_copy,
+                                                (GBoxedFreeFunc)vlc_event_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cEvent
+#define _SELF(self) (RVAL2VLCEVENT(self))
+
+/*
+ * Get an event's type
+ *
+ * @return [VLC::Event::Type] event's type
+ * @todo fixme
+ */
+static VALUE
+rg_type(VALUE self)
+{
+    return VLCEVENTTYPE2RVAL(_SELF(self)->type);
+}
+
+/*
+ * Document-class: VLC::Event
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_event(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_EVENT, "Event", mVLC);
+
+    RG_DEF_METHOD(type, 0);
+
+    Init_vlc_event_type(RG_TARGET_NAMESPACE);
+}
diff --git a/gvlc/ext/gvlc/rbvlceventtype.c b/gvlc/ext/gvlc/rbvlceventtype.c
new file mode 100644
index 0000000..1218abb
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlceventtype.c
@@ -0,0 +1,49 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+#define RG_TARGET_NAMESPACE cType
+#define _SELF(self) (RVAL2VLCEVENTTYPE(self))
+
+/*
+ * Get an event's type name.
+ *
+ * @return [String] type name
+ * @todo fixme
+ */
+static VALUE
+rg_type_name(VALUE self)
+{
+    return CSTR2RVAL(libvlc_event_type_name(_SELF(self)));
+}
+
+/*
+ * Document-class: VLC::Event::Type
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_event_type(VALUE cEvent)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_EVENT_TYPE, "Type", cEvent);
+
+    RG_DEF_METHOD(type_name, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmedia.c b/gvlc/ext/gvlc/rbvlcmedia.c
new file mode 100644
index 0000000..f31043a
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmedia.c
@@ -0,0 +1,413 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_t *
+vlc_media_copy(const libvlc_media_t *instance)
+{
+    libvlc_media_retain((libvlc_media_t *)instance);
+    return (libvlc_media_t *)instance;
+}
+
+static void
+vlc_media_free(libvlc_media_t *instance)
+{
+    libvlc_media_release(instance);
+}
+
+GType
+vlc_media_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMedia",
+                                                (GBoxedCopyFunc)vlc_media_copy,
+                                                (GBoxedFreeFunc)vlc_media_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMedia
+#define _SELF(self) (RVAL2VLCMEDIA(self))
+
+/*
+ * @overload initialize(options = {})
+ *   Create a media with a certain given media resource location,
+ *   for instance a valid URL.
+ *
+ *   @note
+ *     To refer to a local file with this function,
+ *     the file://... URI syntax <b>must</b> be used (see IETF RFC3986).
+ *     We recommend using {#initialize}(core: core, path: file) instead when dealing with
+ *     local files.
+ *
+ *   @param [Hash] options specify media
+ *   @option options [VLC::Core] :core the core instance (optional)
+ *   @option options [String] :location the media location URL
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @overload initialize(options = {})
+ *   Create a media for a certain file path.
+ *
+ *   @param [Hash] options specify media
+ *   @option options [VLC::Core] :core the core instance (optional)
+ *   @option options [String] :path local filesystem path
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @overload initialize(options = {})
+ *   Create a media for an already open file descriptor.
+ *   The file descriptor shall be open for reading (or reading and writing).
+ *
+ *   Regular file descriptors, pipe read descriptors and character device
+ *   descriptors (including TTYs) are supported on all platforms.
+ *   Block device descriptors are supported where available.
+ *   Directory descriptors are supported on systems that provide fdopendir().
+ *   Sockets are supported on all platforms where they are file descriptors,
+ *   i.e. all except Windows.
+ *
+ *   @note
+ *     This library will <b>not</b> automatically close the file descriptor
+ *     under any circumstance. Nevertheless, a file descriptor can usually only be
+ *     rendered once in a media player. To render it a second time, the file
+ *     descriptor should probably be rewound to the beginning with lseek().
+ *
+ *   @param [Hash] options specify media
+ *   @option options [VLC::Core] :core the core instance (optional)
+ *   @option options [Integer] :fd open file descriptor
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @overload initialize(options = {})
+ *   Create a media as an empty node with a given name.
+ *
+ *   @param [Hash] options specify media
+ *   @option options [VLC::Core] :core the core instance (optional)
+ *   @option options [String] :name the name of the node
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @todo fixme
+ */
+static VALUE
+rg_initialize(VALUE self, VALUE options)
+{
+    VALUE core, location, path, fd, name;
+    libvlc_media_t *instance = NULL;
+
+    rbg_scan_options(options,
+                    "core",     &core,
+                    "location", &location,
+                    "path",     &path,
+                    "fd",       &fd,
+                    "name",     &name,
+                    NULL);
+    if (NIL_P(core))
+        core = rb_funcall(GTYPE2CLASS(VLC_TYPE_CORE), rb_intern("new"), 0);
+
+    if (!NIL_P(location))
+        instance = libvlc_media_new_location(RVAL2VLCCORE(core), RVAL2CSTR(location));
+    else if (!NIL_P(path))
+        instance = libvlc_media_new_path(RVAL2VLCCORE(core), RVAL2CSTR(path));
+    else if (!NIL_P(fd))
+        instance = libvlc_media_new_fd(RVAL2VLCCORE(core), NUM2INT(fd));
+    else if (!NIL_P(name))
+        instance = libvlc_media_new_as_node(RVAL2VLCCORE(core), RVAL2CSTR(name));
+    if (!instance)
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    rb_ivar_set(self, rb_intern("core"), core);
+
+    G_INITIALIZE(self, instance);
+    vlc_media_free(instance);
+    return Qnil;
+}
+
+/*
+ *
+ * @return [VLC::Core]
+ * @todo fixme
+ */
+static VALUE
+rg_core(VALUE self)
+{
+    return rb_ivar_get(self, rb_intern("core"));
+}
+
+/*
+ * Add an option to the media.
+ *
+ * This option will be used to determine how the media_player will
+ * read the media. This allows to use VLC's advanced
+ * reading/streaming options on a per-media basis.
+ *
+ * The options are detailed in vlc --long-help, for instance "--sout-all"
+ *
+ * @param [String] options the options
+ * @param [Integer] flags the flags for this option
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_add_option(int argc, VALUE *argv, VALUE self)
+{
+    VALUE options, flags;
+
+    rb_scan_args(argc, argv, "11", &options, &flags);
+
+    if (NIL_P(flags))
+        libvlc_media_add_option(_SELF(self), RVAL2CSTR(options));
+    else
+        libvlc_media_add_option_flag(_SELF(self), RVAL2CSTR(options), NUM2UINT(flags));
+
+    return self;
+}
+
+/*
+ * Get the media resource locator (mrl) from a media descriptor object
+ *
+ * @return [String] string with mrl of media descriptor object
+ * @todo fixme
+ */
+static VALUE
+rg_mrl(VALUE self)
+{
+    return CSTR2RVAL(libvlc_media_get_mrl(_SELF(self)));
+}
+
+/*
+ * Read the meta of the media.
+ *
+ * If the media has not yet been parsed this will return nil.
+ *
+ * This methods automatically calls {#parse}(async: true), so after calling
+ * it you may receive a :media_metachanged event. If you prefer a synchronous
+ * version ensure that you call {#parse} before {#get_meta}.
+ *
+ * @param [VLC::Media::MetaType, Symbol] type the meta to read
+ * @return [String] the media's meta
+ * @see #parse
+ * @todo fixme
+ */
+static VALUE
+rg_get_meta(VALUE self, VALUE type)
+{
+    return CSTR2RVAL(libvlc_media_get_meta(_SELF(self), RVAL2VLCMETATYPE(type)));
+}
+
+/*
+ * Set the meta of the media (this function will not save the meta, call
+ * {#save_meta} in order to save the meta)
+ *
+ * @param [VLC::Media::MetaType, Symbol] type the meta to write
+ * @param [String] value the media's meta
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_meta(VALUE self, VALUE type, VALUE value)
+{
+    libvlc_media_set_meta(_SELF(self), RVAL2VLCMETATYPE(type), RVAL2CSTR(value));
+    return self;
+}
+
+/*
+ * Save the meta previously set
+ *
+ * @return [Boolean] true if the write operation was successfull
+ * @todo fixme
+ */
+static VALUE
+rg_save_meta(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_save_meta(_SELF(self)));
+}
+
+/*
+ * Get current state of media descriptor object.
+ *
+ * @return [VLC::State] state of media descriptor object
+ * @todo fixme
+ */
+static VALUE
+rg_state(VALUE self)
+{
+    return VLCSTATE2RVAL(libvlc_media_get_state(_SELF(self)));
+}
+
+/*
+ * Get the current statistics about the media
+ *
+ * @return [VLC::Media::Stats] the statistics about the media or nil
+ * @todo fixme
+ */
+static VALUE
+rg_stats(VALUE self)
+{
+    libvlc_media_stats_t stats;
+    if (libvlc_media_get_stats(_SELF(self), &stats))
+        return VLCMEDIASTATS2RVAL(&stats);
+    else
+        return Qnil;
+}
+
+/*
+ * Get duration (in ms) of media descriptor object item.
+ *
+ * @return [Integer] duration of media item or nil on error
+ * @todo fixme
+ */
+static VALUE
+rg_duration(VALUE self)
+{
+    libvlc_time_t duration = libvlc_media_get_duration(_SELF(self));
+    return duration < 0 ? Qnil : LONG2NUM(duration);
+}
+
+/*
+ * Parse a media.
+ *
+ * This fetches (local) meta data and tracks information.
+ *
+ * To track when this is over you can listen to :media_parsedchanged
+ * event. However if the media was already parsed you will not receive this
+ * event.
+ *
+ * @param [Hash] options specify media
+ * @option options [Boolean] :async (false) whether the operation is asynchronous or not
+ * @return self
+ * @see #get_meta
+ * @see #tracks_info
+ * @todo fixme
+ */
+static VALUE
+rg_parse(VALUE self, VALUE options)
+{
+    VALUE async;
+    rbg_scan_options(options,
+                    "async", &async,
+                    NULL);
+
+    if (RVAL2CBOOL(async))
+        libvlc_media_parse_async(_SELF(self));
+    else
+        libvlc_media_parse(_SELF(self));
+
+    return self;
+}
+
+/*
+ * Get Parsed status for media descriptor object.
+ *
+ * @return [Boolean] true if media object has been parsed otherwise it returns false
+ * @todo fixme
+ */
+static VALUE
+rg_parsed_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_is_parsed(_SELF(self)));
+}
+
+/*
+ * Get media descriptor's elementary streams description
+ *
+ * @note
+ *   you need to call {#parse} or play the media at least once
+ *   before calling this function.
+ *   Not doing this will result in an empty array.
+ *
+ * @return [Array<VLC::Media::TrackInfo>] array of Elementary Streams descriptions
+ * @todo fixme
+ */
+static VALUE
+rg_tracks_info(VALUE self)
+{
+    libvlc_media_track_info_t *track_info, *p;
+    int track_count, i;
+    VALUE result;
+
+    track_count = libvlc_media_get_tracks_info(_SELF(self), &track_info);
+    result = rb_ary_new();
+    for (i = 0, p = track_info; i < track_count; i++, p++) {
+        rb_ary_push(result, VLCMEDIATRACKINFO2RVAL(p));
+/*        g_free(p); */
+    }
+
+    return result;
+}
+
+/*
+ * Register for an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to listen
+ * @yield call when event_type occurs
+ * @yieldparam self
+ * @yieldparam [VLC::Event] event
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_attach_event(VALUE self, VALUE event_type)
+{
+    return em_attach_event(libvlc_media_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Unregister an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to unregister
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_detach_event(VALUE self, VALUE event_type)
+{
+    return em_detach_event(libvlc_media_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Document-class: VLC::Media
+ *
+ * an abstract representation of a playable media.
+ * It consists of a media location and various optional meta data.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_media(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA, "Media", mVLC);
+    G_DEF_CLASS(VLC_TYPE_META_TYPE, "MetaType", RG_TARGET_NAMESPACE);
+
+    RG_DEF_METHOD(initialize, 1);
+    RG_DEF_METHOD(core, 0);
+    RG_DEF_METHOD(add_option, -1);
+    RG_DEF_METHOD(mrl, 0);
+    RG_DEF_METHOD(get_meta, 1);
+    RG_DEF_METHOD(set_meta, 2);
+    RG_DEF_METHOD(save_meta, 0);
+    RG_DEF_METHOD(state, 0);
+    RG_DEF_METHOD(stats, 0);
+    RG_DEF_METHOD(duration, 0);
+    RG_DEF_METHOD(parse, 0);
+    RG_DEF_METHOD_P(parsed, 0);
+    RG_DEF_METHOD(tracks_info, 0);
+    RG_DEF_METHOD(attach_event, 1);
+    RG_DEF_METHOD(detach_event, 1);
+
+    Init_vlc_media_trackinfo(RG_TARGET_NAMESPACE);
+    Init_vlc_media_stats(RG_TARGET_NAMESPACE);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmediadiscoverer.c b/gvlc/ext/gvlc/rbvlcmediadiscoverer.c
new file mode 100644
index 0000000..7d5b8a3
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmediadiscoverer.c
@@ -0,0 +1,136 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_discoverer_t *
+vlc_media_discoverer_copy(const libvlc_media_discoverer_t *instance)
+{
+/*    libvlc_media_discoverer_retain((libvlc_media_discoverer_t *)instance);*/
+    return (libvlc_media_discoverer_t *)instance;
+}
+
+static void
+vlc_media_discoverer_free(libvlc_media_discoverer_t *instance)
+{
+    libvlc_media_discoverer_release(instance);
+}
+
+GType
+vlc_media_discoverer_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaDiscoverer",
+                                                (GBoxedCopyFunc)vlc_media_discoverer_copy,
+                                                (GBoxedFreeFunc)vlc_media_discoverer_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMediaDiscoverer
+#define _SELF(self) (RVAL2VLCMEDIADISCOVERER(self))
+
+/*
+ * Get media service discover object its localized name.
+ *
+ * @return [String] localized name
+ * @todo fixme
+ */
+static VALUE
+rg_localized_name(VALUE self)
+{
+    return CSTR2RVAL(libvlc_media_discoverer_localized_name(_SELF(self)));
+}
+
+/*
+ * Get media service discover media list.
+ *
+ * @return [VLC::MediaList] list of media items
+ * @todo fixme
+ */
+static VALUE
+rg_media_list(VALUE self)
+{
+    return VLCMEDIALIST2RVAL(libvlc_media_discoverer_media_list(_SELF(self)));
+}
+
+/*
+ * Query if media service discover object is running.
+ *
+ * @return [Boolean] true if running, false if not
+ * @todo fixme
+ */
+static VALUE
+rg_running_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_discoverer_is_running(_SELF(self)));
+}
+
+/*
+ * Register for an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to listen
+ * @yield call when event_type occurs
+ * @yieldparam self
+ * @yieldparam [VLC::Event] event
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_attach_event(VALUE self, VALUE event_type)
+{
+    return em_attach_event(libvlc_media_discoverer_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Unregister an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to unregister
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_detach_event(VALUE self, VALUE event_type)
+{
+    return em_detach_event(libvlc_media_discoverer_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Document-class: VLC::MediaDiscoverer
+ *
+ * LibVLC media discovery finds available media via various means.
+ * This corresponds to the service discovery functionality in VLC media player.
+ * Different plugins find potential medias locally (e.g. user media directory),
+ * from peripherals (e.g. video capture device), on the local network
+ * (e.g. SAP) or on the Internet (e.g. Internet radios).
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_mediadiscoverer(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_DISCOVERER, "MediaDiscoverer", mVLC);
+
+    RG_DEF_METHOD(localized_name, 0);
+    RG_DEF_METHOD(media_list, 0);
+    RG_DEF_METHOD_P(running, 0);
+    RG_DEF_METHOD(attach_event, 1);
+    RG_DEF_METHOD(detach_event, 1);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmedialibrary.c b/gvlc/ext/gvlc/rbvlcmedialibrary.c
new file mode 100644
index 0000000..7c70064
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmedialibrary.c
@@ -0,0 +1,86 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_library_t *
+vlc_media_library_copy(const libvlc_media_library_t *instance)
+{
+    libvlc_media_library_retain((libvlc_media_library_t *)instance);
+    return (libvlc_media_library_t *)instance;
+}
+
+static void
+vlc_media_library_free(libvlc_media_library_t *instance)
+{
+    libvlc_media_library_release(instance);
+}
+
+GType
+vlc_media_library_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaLibrary",
+                                                (GBoxedCopyFunc)vlc_media_library_copy,
+                                                (GBoxedFreeFunc)vlc_media_library_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMediaLibrary
+#define _SELF(self) (RVAL2VLCMEDIALIBRARY(self))
+
+/*
+ * Load media library.
+ *
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_load(VALUE self)
+{
+    return ZEROBOOL2RVAL(libvlc_media_library_load(_SELF(self)));
+}
+
+/*
+ * Get media library subitems.
+ *
+ * @return [VLC::MediaList] media list subitems
+ * @todo fixme
+ */
+static VALUE
+rg_media_list(VALUE self)
+{
+    return VLCMEDIALIST2RVAL(libvlc_media_library_media_list(_SELF(self)));
+}
+
+/*
+ * Document-class: VLC::MediaLibrary
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_medialibrary(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_LIBRARY, "MediaLibrary", mVLC);
+
+    RG_DEF_METHOD(load, 0);
+    RG_DEF_METHOD(media_list, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmedialist.c b/gvlc/ext/gvlc/rbvlcmedialist.c
new file mode 100644
index 0000000..55289e4
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmedialist.c
@@ -0,0 +1,341 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_list_t *
+vlc_media_list_copy(const libvlc_media_list_t *instance)
+{
+    libvlc_media_list_retain((libvlc_media_list_t *)instance);
+    return (libvlc_media_list_t *)instance;
+}
+
+static void
+vlc_media_list_free(libvlc_media_list_t *instance)
+{
+    libvlc_media_list_release(instance);
+}
+
+GType
+vlc_media_list_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaList",
+                                                (GBoxedCopyFunc)vlc_media_list_copy,
+                                                (GBoxedFreeFunc)vlc_media_list_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMediaList
+#define _SELF(self) (RVAL2VLCMEDIALIST(self))
+
+static ID id_core;
+
+/*
+ * Create an empty media list.
+ *
+ * @param [VLC::Core] core the core instance
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE core;
+    libvlc_media_list_t *instance;
+
+    rb_scan_args(argc, argv, "01", &core);
+    if (NIL_P(core))
+        core = rb_funcall(GTYPE2CLASS(VLC_TYPE_CORE), rb_intern("new"), 0);
+
+    instance = libvlc_media_list_new(RVAL2VLCCORE(core));
+    if (!instance)
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    rb_ivar_set(self, id_core, core);
+
+    G_INITIALIZE(self, instance);
+    vlc_media_list_free(instance);
+    return Qnil;
+}
+
+/*
+ *
+ * @return [VLC::Core]
+ * @todo fixme
+ */
+static VALUE
+rg_core(VALUE self)
+{
+    return rb_ivar_get(self, id_core);
+}
+
+static VALUE
+get_media(VALUE self, VALUE media)
+{
+    if (TYPE(media) == T_HASH) {
+        if (NIL_P(rb_hash_lookup(media, ID2SYM(id_core))))
+            rb_hash_aset(media, ID2SYM(id_core), rg_core(self));
+        return rb_funcall(GTYPE2CLASS(VLC_TYPE_MEDIA), rb_intern("new"), 1, media);
+    } else {
+        return media;
+    }
+}
+
+/*
+ * Associate media instance with this media list instance.
+ * If another media instance was present it will be released.
+ * The {#lock} should NOT be held upon entering this function.
+ *
+ * @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
+ * @return [VLC::Media] the media instance
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_set_media(VALUE self, VALUE media)
+{
+    media = get_media(self, media);
+    libvlc_media_list_set_media(_SELF(self), RVAL2VLCMEDIA(media));
+    return media;
+}
+
+/*
+ * Get media instance from this media list instance. This action will increase
+ * the refcount on the media instance.
+ * The {#lock} should NOT be held upon entering this function.
+ *
+ * @return [VLC::Media] media instance
+ * @todo fixme
+ */
+static VALUE
+rg_media(VALUE self)
+{
+    return VLCMEDIA2RVAL(libvlc_media_list_media(_SELF(self)));
+}
+
+/*
+ * List media instance in media list at a position
+ * The {#lock} should be held upon entering this function.
+ *
+ * @param [Integer] pos position in array
+ * @return [VLC::Media] media instance at position or nil
+ * @todo fixme
+ */
+static VALUE
+rg_get_media(VALUE self, VALUE pos)
+{
+    /* TODO: need libvlc_media_release? */
+    return VLCMEDIA2RVAL(libvlc_media_list_item_at_index(_SELF(self), NUM2INT(pos)));
+}
+
+/*
+ * Add media instance to media list
+ * The {#lock} should be held upon entering this function.
+ *
+ * @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
+ * @return [VLC::Media] the media instance
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_add_media(VALUE self, VALUE media)
+{
+    media = get_media(self, media);
+    if (libvlc_media_list_add_media(_SELF(self), RVAL2VLCMEDIA(media)))
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    G_CHILD_ADD(self, media);
+    return media;
+}
+
+/*
+ * Insert media instance in media list on a position
+ * The {#lock} should be held upon entering this function.
+ *
+ * @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
+ * @param [Integer] pos position in array
+ * @return [VLC::Media] the media instance
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_insert_media(VALUE self, VALUE media, VALUE pos)
+{
+    media = get_media(self, media);
+    if (libvlc_media_list_insert_media(_SELF(self), RVAL2VLCMEDIA(media), NUM2INT(pos)))
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    G_CHILD_ADD(self, media);
+    return media;
+}
+
+/*
+ * Remove media instance from media list on a position
+ * The {#lock} should be held upon entering this function.
+ *
+ * @param [VLC::Media, Integer] media the media instance or position in array
+ * @return [Boolean] true on success, false if the list is read-only or the item was not found
+ * @todo fixme
+ */
+static VALUE
+rg_remove_media(VALUE self, VALUE media)
+{
+    int pos;
+
+    if (TYPE(media) == T_FIXNUM) {
+        pos = NUM2INT(media);
+        /* TODO: G_CHILD_REMOVE */
+    } else {
+        pos = libvlc_media_list_index_of_item(_SELF(self), RVAL2VLCMEDIA(media));
+        G_CHILD_REMOVE(self, media);
+    }
+
+    return ZEROBOOL2RVAL(libvlc_media_list_remove_index(_SELF(self), pos));
+}
+
+/*
+ * Get count on media list items
+ * The {#lock} should be held upon entering this function.
+ *
+ * @return [Integer] number of items in media list
+ * @todo fixme
+ */
+static VALUE
+rg_count(VALUE self)
+{
+    return INT2NUM(libvlc_media_list_count(_SELF(self)));
+}
+
+/*
+ * Find index position of List media instance in media list.
+ * Warning: the function will return the first matched position.
+ * The {#lock} should be held upon entering this function.
+ *
+ * @param [VLC::Media] media media instance
+ * @return [Integer] position of media instance or nil if media not found
+ * @todo fixme
+ */
+static VALUE
+rg_index(VALUE self, VALUE media)
+{
+    int index = libvlc_media_list_index_of_item(_SELF(self), RVAL2VLCMEDIA(media));
+    return (index < 0) ? Qnil : INT2NUM(index);
+}
+
+/*
+ * This indicates if this media list is read-only from a user point of view
+ *
+ * @return [Boolean] true on readonly, false on readwrite
+ * @todo fixme
+ */
+static VALUE
+rg_readonly_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_list_is_readonly(_SELF(self)));
+}
+
+/*
+ * Release lock on media list items
+ * The {#lock} should be held upon entering this function.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_unlock(VALUE self)
+{
+    libvlc_media_list_unlock(_SELF(self));
+    return self;
+}
+
+/*
+ * Get lock on media list items
+ *
+ * @yield
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_lock(VALUE self)
+{
+    libvlc_media_list_lock(_SELF(self));
+    if (rb_block_given_p())
+        rb_ensure(rb_yield, self, rg_unlock, self);
+    return self;
+}
+
+/*
+ * Register for an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to listen
+ * @yield call when event_type occurs
+ * @yieldparam self
+ * @yieldparam [VLC::Event] event
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_attach_event(VALUE self, VALUE event_type)
+{
+    return em_attach_event(libvlc_media_list_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Unregister an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to unregister
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_detach_event(VALUE self, VALUE event_type)
+{
+    return em_detach_event(libvlc_media_list_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Document-class: VLC::MediaList
+ *
+ * A LibVLC media list holds multiple {VLC::Media} media descriptors.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_medialist(VALUE mVLC)
+{
+    id_core = rb_intern("core");
+
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_LIST, "MediaList", mVLC);
+
+    RG_DEF_METHOD(initialize, -1);
+    RG_DEF_METHOD(core, 0);
+    RG_DEF_METHOD(set_media, 1);
+    RG_DEF_METHOD(media, 0);
+    RG_DEF_METHOD(get_media, 1);
+    RG_DEF_METHOD(add_media, 1);
+    RG_DEF_METHOD(insert_media, 2);
+    RG_DEF_METHOD(remove_media, 1);
+    RG_DEF_METHOD(count, 0);
+    RG_DEF_METHOD(index, 1);
+    RG_DEF_METHOD_P(readonly, 0);
+    RG_DEF_METHOD(unlock, 0);
+    RG_DEF_METHOD(lock, 0);
+    RG_DEF_METHOD(attach_event, 1);
+    RG_DEF_METHOD(detach_event, 1);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmedialistplayer.c b/gvlc/ext/gvlc/rbvlcmedialistplayer.c
new file mode 100644
index 0000000..9bf7590
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmedialistplayer.c
@@ -0,0 +1,334 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_list_player_t *
+vlc_media_list_player_copy(const libvlc_media_list_player_t *instance)
+{
+    libvlc_media_list_player_retain((libvlc_media_list_player_t *)instance);
+    return (libvlc_media_list_player_t *)instance;
+}
+
+static void
+vlc_media_list_player_free(libvlc_media_list_player_t *instance)
+{
+    libvlc_media_list_player_release(instance);
+}
+
+GType
+vlc_media_list_player_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaListPlayer",
+                                                (GBoxedCopyFunc)vlc_media_list_player_copy,
+                                                (GBoxedFreeFunc)vlc_media_list_player_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMediaListPlayer
+#define _SELF(self) (RVAL2VLCMEDIALISTPLAYER(self))
+
+/*
+ * Create new media_list_player.
+ *
+ * @param [Hash] options media list player options
+ * @option options [VLC::Core] :core the core instance
+ * @option options [VLC::MediaList] :list the media list instance
+ * @option options [VLC::MediaPlayer] :player the media player instance
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE options, core, list, player;
+    libvlc_media_list_player_t *instance;
+
+    rb_scan_args(argc, argv, "01", &options);
+    rbg_scan_options(options,
+                     "core",    &core,
+                     "list",    &list,
+                     "player",  &player,
+                     NULL);
+
+    if (NIL_P(core) && !NIL_P(list))
+        core = rb_funcall(list, rb_intern("core"), 0);
+    if (NIL_P(core) && !NIL_P(player))
+        core = rb_funcall(player, rb_intern("core"), 0);
+    if (NIL_P(core))
+        core = rb_funcall(GTYPE2CLASS(VLC_TYPE_CORE), rb_intern("new"), 0);
+
+    instance = libvlc_media_list_player_new(RVAL2VLCCORE(core));
+    if (!instance)
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    rb_ivar_set(self, rb_intern("core"), core);
+
+    G_INITIALIZE(self, instance);
+    vlc_media_list_player_free(instance);
+
+    if (NIL_P(list))
+        list = rb_funcall(GTYPE2CLASS(VLC_TYPE_MEDIA_LIST), rb_intern("new"), 1, core);
+    rb_funcall(self, rb_intern("set_media_list"), 1, list);
+
+    if (NIL_P(player))
+        player = rb_funcall(GTYPE2CLASS(VLC_TYPE_MEDIA_PLAYER), rb_intern("new"), 1, core);
+    rb_funcall(self, rb_intern("set_media_player"), 1, player);
+
+    return Qnil;
+}
+
+/*
+ *
+ * @return [VLC::Core]
+ * @todo fixme
+ */
+static VALUE
+rg_core(VALUE self)
+{
+    return rb_ivar_get(self, rb_intern("core"));
+}
+
+/*
+ * Replace media player in media_list_player with this instance.
+ *
+ * @param [VLC::MediaPlayer] player media player instance
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_media_player(VALUE self, VALUE player)
+{
+    libvlc_media_list_player_set_media_player(_SELF(self), RVAL2VLCMEDIAPLAYER(player));
+    rb_ivar_set(self, rb_intern("media_player"), player);
+    return self;
+}
+
+/*
+ *
+ * @return [VLC::MediaPlayer]
+ * @todo fixme
+ */
+static VALUE
+rg_media_player(VALUE self)
+{
+    return rb_ivar_get(self, rb_intern("media_player"));
+}
+
+/*
+ * Set the media list associated with the player
+ *
+ * @param [VLC::MediaList] list list of media
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_media_list(VALUE self, VALUE list)
+{
+    libvlc_media_list_player_set_media_list(_SELF(self), RVAL2VLCMEDIALIST(list));
+    rb_ivar_set(self, rb_intern("media_list"), list);
+    return self;
+}
+
+/*
+ *
+ * @return [VLC::MediaList]
+ * @todo fixme
+ */
+static VALUE
+rg_media_list(VALUE self)
+{
+    return rb_ivar_get(self, rb_intern("media_list"));
+}
+
+/*
+ * Is media list playing?
+ *
+ * @return [Boolean] true for playing and false for not playing
+ * @todo fixme
+ */
+static VALUE
+rg_playing_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_list_player_is_playing(_SELF(self)));
+}
+
+/*
+ * Play media list
+ *
+ * @param [VLC::Media, Integer] the media instance or index in media list
+ * @return [Boolean] true upon success false if the item wasn't found
+ * @todo fixme
+ */
+static VALUE
+rg_play(int argc, VALUE *argv, VALUE self)
+{
+    VALUE media, result = Qtrue;
+
+    rb_scan_args(argc, argv, "01", &media);
+    if (NIL_P(media))
+        libvlc_media_list_player_play(_SELF(self));
+    else if (TYPE(media) == T_FIXNUM)
+        result = ZEROBOOL2RVAL(libvlc_media_list_player_play_item_at_index(_SELF(self), NUM2INT(media)));
+    else
+        result = ZEROBOOL2RVAL(libvlc_media_list_player_play_item(_SELF(self), RVAL2VLCMEDIA(media)));
+
+    return result;
+}
+
+/*
+ * Pause media list
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_pause(VALUE self)
+{
+    libvlc_media_list_player_pause(_SELF(self));
+    return self;
+}
+
+/*
+ * Stop playing media list
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_stop(VALUE self)
+{
+    libvlc_media_list_player_stop(_SELF(self));
+    return self;
+}
+
+/*
+ * Get current state of media list player
+ *
+ * @return [VLC::State] state for media list player
+ * @todo fixme
+ */
+static VALUE
+rg_state(VALUE self)
+{
+    return VLCSTATE2RVAL(libvlc_media_list_player_get_state(_SELF(self)));
+}
+
+/*
+ * Play previous item from media list
+ *
+ * @return [Boolean] true upon success false if there is no previous item
+ * @todo fixme
+ */
+static VALUE
+rg_previous(VALUE self)
+{
+    return ZEROBOOL2RVAL(libvlc_media_list_player_previous(_SELF(self)));
+}
+
+/*
+ * Play next item from media list
+ *
+ * @return [Boolean] true upon success false if there is no next item
+ * @todo fixme
+ */
+static VALUE
+rg_next(VALUE self)
+{
+    return ZEROBOOL2RVAL(libvlc_media_list_player_next(_SELF(self)));
+}
+
+/*
+ * Sets the playback mode for the playlist
+ *
+ * @param [VLC::PlaybackMode] mode playback mode specification
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_playback_mode(VALUE self, VALUE mode)
+{
+    libvlc_media_list_player_set_playback_mode(_SELF(self), RVAL2VLCPLAYBACKMODE(mode));
+    return self;
+}
+
+/*
+ * Register for an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to listen
+ * @yield call when event_type occurs
+ * @yieldparam self
+ * @yieldparam [VLC::Event] event
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_attach_event(VALUE self, VALUE event_type)
+{
+    return em_attach_event(libvlc_media_list_player_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Unregister an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to unregister
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_detach_event(VALUE self, VALUE event_type)
+{
+    return em_detach_event(libvlc_media_list_player_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Document-class: VLC::MediaListPlayer
+ *
+ * The LibVLC media list player plays a {VLC::MediaList} list of media,
+ * in a certain order.
+ * This is required to especially support playlist files.
+ * The normal {VLC::MediaPlayer} LibVLC media player can only play a
+ * single media, and does not handle playlist files properly.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_medialistplayer(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_LIST_PLAYER, "MediaListPlayer", mVLC);
+
+    RG_DEF_METHOD(initialize, -1);
+    RG_DEF_METHOD(core, 0);
+    RG_DEF_METHOD(set_media_player, 1);
+    RG_DEF_METHOD(media_player, 0);
+    RG_DEF_METHOD(set_media_list, 1);
+    RG_DEF_METHOD(media_list, 0);
+    RG_DEF_METHOD_P(playing, 0);
+    RG_DEF_METHOD(play, -1);
+    RG_DEF_METHOD(pause, 0);
+    RG_DEF_METHOD(stop, 0);
+    RG_DEF_METHOD(state, 0);
+    RG_DEF_METHOD(previous, 0);
+    RG_DEF_METHOD(next, 0);
+    RG_DEF_METHOD(set_playback_mode, 1);
+    RG_DEF_METHOD(attach_event, 1);
+    RG_DEF_METHOD(detach_event, 1);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmediaplayer.c b/gvlc/ext/gvlc/rbvlcmediaplayer.c
new file mode 100644
index 0000000..785200d
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmediaplayer.c
@@ -0,0 +1,1558 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_player_t *
+vlc_media_player_copy(const libvlc_media_player_t *instance)
+{
+    libvlc_media_player_retain((libvlc_media_player_t *)instance);
+    return (libvlc_media_player_t *)instance;
+}
+
+static void
+vlc_media_player_free(libvlc_media_player_t *instance)
+{
+    libvlc_media_player_release(instance);
+}
+
+GType
+vlc_media_player_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaPlayer",
+                                                (GBoxedCopyFunc)vlc_media_player_copy,
+                                                (GBoxedFreeFunc)vlc_media_player_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cMediaPlayer
+#define _SELF(self) (RVAL2VLCMEDIAPLAYER(self))
+
+static ID id_core;
+
+/*
+ * @overload initialize(core = nil)
+ *   Create an empty Media Player object
+ *
+ *   @param [VLC::Core] core the core instance
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @overload initialize(media)
+ *   Create a Media Player object from a Media
+ *
+ *   @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
+ *   @raise [ArgumentError] Invalid or unsupported arguments
+ *
+ * @todo fixme
+ */
+static VALUE
+rg_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE arg, core;
+    libvlc_media_player_t *instance;
+
+    rb_scan_args(argc, argv, "01", &arg);
+    if (NIL_P(arg))
+        arg = rb_funcall(GTYPE2CLASS(VLC_TYPE_CORE), rb_intern("new"), 0);
+    else if (TYPE(arg) == T_HASH)
+        arg = rb_funcall(GTYPE2CLASS(VLC_TYPE_MEDIA), rb_intern("new"), 1, arg);
+
+    GType gtype = RVAL2GTYPE(arg);
+    if (gtype == VLC_TYPE_MEDIA) {
+        instance = libvlc_media_player_new_from_media(RVAL2VLCMEDIA(arg));
+        core = rb_funcall(arg, id_core, 0);
+    } else {
+        instance = libvlc_media_player_new(RVAL2VLCCORE(arg));
+        core = arg;
+    }
+    if (!instance)
+        rb_raise(rb_eArgError, "Invalid arguments.");
+    rb_ivar_set(self, id_core, core);
+
+    G_INITIALIZE(self, instance);
+    vlc_media_player_free(instance);
+    return Qnil;
+}
+
+/*
+ *
+ * @return [VLC::Core]
+ * @todo fixme
+ */
+static VALUE
+rg_core(VALUE self)
+{
+    return rb_ivar_get(self, id_core);
+}
+
+/*
+ * Set the media that will be used by the media_player.
+ *
+ * @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
+ * @raise [ArgumentError] Invalid or unsupported arguments
+ * @todo fixme
+ */
+static VALUE
+rg_set_media(VALUE self, VALUE media)
+{
+    if (TYPE(media) == T_HASH) {
+        if (NIL_P(rb_hash_lookup(media, ID2SYM(id_core))))
+            rb_hash_aset(media, ID2SYM(id_core), rg_core(self));
+        media = rb_funcall(GTYPE2CLASS(VLC_TYPE_MEDIA), rb_intern("new"), 1, media);
+    }
+
+    libvlc_media_player_set_media(_SELF(self), RVAL2VLCMEDIA(media));
+    return self;
+}
+
+/*
+ * Get the media used by the media_player.
+ *
+ * @return [VLC::Media] the media associated with the media_player or nil
+ * @todo fixme
+ */
+static VALUE
+rg_media(VALUE self)
+{
+    return VLCMEDIA2RVAL(libvlc_media_player_get_media(_SELF(self)));
+}
+
+/*
+ * is_playing
+ *
+ * @return [Boolean] true if the media player is playing, false otherwise
+ * @todo fixme
+ */
+static VALUE
+rg_playing_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_player_is_playing(_SELF(self)));
+}
+
+/*
+ * Play
+ *
+ * @return [Boolean] true if playback started (and was already started), or false on error
+ * @todo fixme
+ */
+static VALUE
+rg_play(VALUE self)
+{
+    return ZEROBOOL2RVAL(libvlc_media_player_play(_SELF(self)));
+}
+
+/*
+ * Pause or resume (no effect if there is no media)
+ *
+ * @param [Boolean] do_pause play/resume if false, pause if true
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_pause(int argc, VALUE *argv, VALUE self)
+{
+    VALUE do_pause;
+
+    rb_scan_args(argc, argv, "01", &do_pause);
+    if (RVAL2CBOOL(do_pause))
+        libvlc_media_player_set_pause(_SELF(self), true);
+    else
+        libvlc_media_player_pause(_SELF(self));
+
+    return self;
+}
+
+/*
+ * Stop (no effect if there is no media)
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_stop(VALUE self)
+{
+    libvlc_media_player_stop(_SELF(self));
+    return self;
+}
+
+/*
+ * Set an X Window System drawable where the media player should render its
+ * video output. If LibVLC was built without X11 output support, then this has
+ * no effects.
+ *
+ * The specified identifier must correspond to an existing Input/Output class
+ * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
+ * the X11 server is the same as the one the VLC instance has been configured
+ * with. This function must be called before video playback is started;
+ * otherwise it will only take effect after playback stop and restart.
+ *
+ * @param [Integer] xid the ID of the X window
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_xwindow(VALUE self, VALUE xid)
+{
+    libvlc_media_player_set_xwindow(_SELF(self), NUM2INT(xid));
+    return self;
+}
+
+/*
+ * Get the X Window System window identifier previously set with
+ * {#set_xwindow}. Note that this will return the identifier
+ * even if VLC is not currently using it (for instance if it is playing an
+ * audio-only input).
+ *
+ * @return [Integer] an X window ID, or nil if none where set.
+ * @todo fixme
+ */
+static VALUE
+rg_xwindow(VALUE self)
+{
+    uint32_t xid = libvlc_media_player_get_xwindow(_SELF(self));
+    return xid == 0 ? Qnil : UINT2NUM(xid);
+}
+
+/*
+ * Get the current movie length (in ms).
+ *
+ * @return [Integer] the movie length (in ms), or nil if there is no media.
+ * @todo fixme
+ */
+static VALUE
+rg_length(VALUE self)
+{
+    libvlc_time_t len = libvlc_media_player_get_length(_SELF(self));
+    return len < 0 ? Qnil : LONG2NUM(len);
+}
+
+/*
+ * Set the movie time (in ms). This has no effect if no media is being played.
+ * Not all formats and protocols support this.
+ *
+ * @param [Integer] time the movie time (in ms).
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_time(VALUE self, VALUE time)
+{
+    libvlc_media_player_set_time(_SELF(self), NUM2LONG(time));
+    return self;
+}
+
+/*
+ * Get the current movie time (in ms).
+ *
+ * @return [Integer] the movie time (in ms), or nil if there is no media.
+ * @todo fixme
+ */
+static VALUE
+rg_time(VALUE self)
+{
+    libvlc_time_t time = libvlc_media_player_get_time(_SELF(self));
+    return time < 0 ? Qnil : LONG2NUM(time);
+}
+
+/*
+ * Set movie position. This has no effect if playback is not enabled.
+ * This might not work depending on the underlying input format and protocol.
+ *
+ * @param [Float] pos the position
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_position(VALUE self, VALUE pos)
+{
+    libvlc_media_player_set_position(_SELF(self), NUM2DBL(pos));
+    return self;
+}
+
+/*
+ * Get movie position.
+ *
+ * @return [Float] movie position, or nil in case of error
+ * @todo fixme
+ */
+static VALUE
+rg_position(VALUE self)
+{
+    float pos = libvlc_media_player_get_position(_SELF(self));
+    return pos < 0 ? Qnil : DBL2NUM(pos);
+}
+
+/*
+ * Set movie chapter (if applicable).
+ *
+ * @param [Integer] chapter chapter number to play
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_chapter(VALUE self, VALUE chapter)
+{
+    libvlc_media_player_set_chapter(_SELF(self), NUM2INT(chapter));
+    return self;
+}
+
+/*
+ * Get movie chapter.
+ *
+ * @return [Integer] chapter number currently playing, or nil if there is no media.
+ * @todo fixme
+ */
+static VALUE
+rg_chapter(VALUE self)
+{
+    int chapter = libvlc_media_player_get_chapter(_SELF(self));
+    return chapter < 0 ? Qnil : INT2NUM(chapter);
+}
+
+/*
+ * Get movie or title chapter count
+ *
+ * @param [Integer] title title number
+ * @return [Integer] number of chapters in movie or title, or nil
+ * @todo fixme
+ */
+static VALUE
+rg_chapter_count(int argc, VALUE *argv, VALUE self)
+{
+    VALUE title;
+    int count;
+
+    rb_scan_args(argc, argv, "01", &title);
+
+    if (NIL_P(title))
+        count = libvlc_media_player_get_chapter_count(_SELF(self));
+    else
+        count = libvlc_media_player_get_chapter_count_for_title(_SELF(self), NUM2INT(title));
+
+    return count < 0 ? Qnil : INT2NUM(count);
+}
+
+/*
+ * Get the description of available chapters for specific title.
+ *
+ * @param [Integer] title title number
+ * @return [Array<VLC::TrackDescription>] list containing description of available chapter for title
+ * @todo fixme
+ */
+static VALUE
+rg_chapter_description(VALUE self, VALUE title)
+{
+    return TRACKDESCRIPTIONLIST2RVAL(libvlc_video_get_chapter_description(_SELF(self), NUM2INT(title)));
+}
+
+/*
+ * Is the player able to play
+ *
+ * @return [Boolean]
+ * @todo fixme
+ */
+static VALUE
+rg_will_play_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_player_will_play(_SELF(self)));
+}
+
+/*
+ * Set movie title
+ *
+ * @param [Integer] title title number to play
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_title(VALUE self, VALUE title)
+{
+    libvlc_media_player_set_title(_SELF(self), NUM2INT(title));
+    return self;
+}
+
+/*
+ * Get movie title
+ *
+ * @return [Integer] title number currently playing, or nil
+ * @todo fixme
+ */
+static VALUE
+rg_title(VALUE self)
+{
+    int title = libvlc_media_player_get_title(_SELF(self));
+    return title < 0 ? Qnil : INT2NUM(title);
+}
+
+/*
+ * Get movie title count
+ *
+ * @return [Integer] title number count, or nil
+ * @todo fixme
+ */
+static VALUE
+rg_title_count(VALUE self)
+{
+    int count = libvlc_media_player_get_title_count(_SELF(self));
+    return count < 0 ? Qnil : INT2NUM(count);
+}
+
+/*
+ * Get the description of available titles.
+ *
+ * @return [Array<VLC::TrackDescription>] list containing description of available titles
+ * @todo fixme
+ */
+static VALUE
+rg_title_description(VALUE self)
+{
+    return TRACKDESCRIPTIONLIST2RVAL(libvlc_video_get_title_description(_SELF(self)));
+}
+
+/*
+ * Set previous chapter (if applicable)
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_previous_chapter(VALUE self)
+{
+    libvlc_media_player_previous_chapter(_SELF(self));
+    return self;
+}
+
+/*
+ * Set next chapter (if applicable)
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_next_chapter(VALUE self)
+{
+    libvlc_media_player_next_chapter(_SELF(self));
+    return self;
+}
+
+/*
+ * Set movie play rate
+ *
+ * @param [Float] rate movie play rate to set
+ * @return [Boolean] false if an error was detected, true otherwise (but even then, it might
+ * not actually work depending on the underlying media protocol)
+ * @todo fixme
+ */
+static VALUE
+rg_set_rate(VALUE self, VALUE rate)
+{
+    return ZEROBOOL2RVAL(libvlc_media_player_set_rate(_SELF(self), NUM2DBL(rate)));
+}
+
+/*
+ * Get the requested movie play rate.
+ *
+ * @note
+ *   Depending on the underlying media, the requested rate may be
+ *   different from the real playback rate.
+ *
+ * @return [Float] movie play rate
+ * @todo fixme
+ */
+static VALUE
+rg_rate(VALUE self)
+{
+    return DBL2NUM(libvlc_media_player_get_rate(_SELF(self)));
+}
+
+/*
+ * Get current movie state
+ *
+ * @return [VLC::State] the current state of the media player
+ * @todo fixme
+ */
+static VALUE
+rg_state(VALUE self)
+{
+    return VLCSTATE2RVAL(libvlc_media_player_get_state(_SELF(self)));
+}
+
+/*
+ * Get movie fps rate
+ *
+ * @return [Float] frames per second (fps) for this playing movie, or nil if unspecified
+ * @todo fixme
+ */
+static VALUE
+rg_fps(VALUE self)
+{
+    float fps = libvlc_media_player_get_fps(_SELF(self));
+    return fps == 0 ? Qnil : DBL2NUM(fps);
+}
+
+/*
+ * How many video outputs does this media player have?
+ *
+ * @return [Integer] the number of video outputs
+ * @todo fixme
+ */
+static VALUE
+rg_has_vout(VALUE self)
+{
+    return UINT2NUM(libvlc_media_player_has_vout(_SELF(self)));
+}
+
+/*
+ * Is this media player seekable?
+ *
+ * @return [Boolean] true if the media player can seek
+ * @todo fixme
+ */
+static VALUE
+rg_seekable_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_player_is_seekable(_SELF(self)));
+}
+
+/*
+ * Can this media player be paused?
+ *
+ * @return [Boolean] true if the media player can pause
+ * @todo fixme
+ */
+static VALUE
+rg_can_pause_p(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_media_player_can_pause(_SELF(self)));
+}
+
+/*
+ * Display the next frame (if supported)
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_next_frame(VALUE self)
+{
+    libvlc_media_player_next_frame(_SELF(self));
+    return self;
+}
+
+/*
+ * Navigate through DVD Menu
+ *
+ * @param [VLC::NavigateMode] mode the Navigation mode
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_navigate(VALUE self, VALUE mode)
+{
+    libvlc_media_player_navigate(_SELF(self), RVAL2VLCNAVIGATEMODE(mode));
+    return self;
+}
+
+/*
+ * Toggle fullscreen status on non-embedded video outputs.
+ *
+ * @note
+ *   The same limitations applies to this function as to {#set_fullscreen}.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_toggle_fullscreen(VALUE self)
+{
+    libvlc_toggle_fullscreen(_SELF(self));
+    return self;
+}
+
+/*
+ * Enable or disable fullscreen.
+ *
+ * @note
+ *   With most window managers, only a top-level windows can be in
+ *   full-screen mode. Hence, this function will not operate properly if
+ *   {#set_xwindow} was used to embed the video in a
+ *   non-top-level window. In that case, the embedding window must be reparented
+ *   to the root window <b>before</b> fullscreen mode is enabled. You will want
+ *   to reparent it back to its normal parent when disabling fullscreen.
+ *
+ * @param [Boolean] fullscreen boolean for fullscreen status
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_fullscreen(VALUE self, VALUE fullscreen)
+{
+    libvlc_set_fullscreen(_SELF(self), RVAL2CBOOL(fullscreen));
+    return self;
+}
+
+/*
+ * Get current fullscreen status.
+ *
+ * @return [Boolean] the fullscreen status
+ * @todo fixme
+ */
+static VALUE
+rg_fullscreen(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_get_fullscreen(_SELF(self)));
+}
+
+/*
+ * Enable or disable key press events handling, according to the LibVLC hotkeys
+ * configuration. By default and for historical reasons, keyboard events are
+ * handled by the LibVLC video widget.
+ *
+ * @note
+ *   On X11, there can be only one subscriber for key press and mouse
+ *   click events per window. If your application has subscribed to those events
+ *   for the X window ID of the video widget, then LibVLC will not be able to
+ *   handle key presses and mouse clicks in any case.
+ *
+ * @note
+ *   This function is only implemented for X11 and Win32 at the moment.
+ *
+ * @param [Boolean] on true to handle key press events, false to ignore them.
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_key_input(VALUE self, VALUE on)
+{
+    libvlc_video_set_key_input(_SELF(self), RVAL2CBOOL(on));
+    return self;
+}
+
+/*
+ * Enable or disable mouse click events handling. By default, those events are
+ * handled. This is needed for DVD menus to work, as well as a few video
+ * filters such as "puzzle".
+ *
+ * @note
+ *   This function is only implemented for X11 and Win32 at the moment.
+ *
+ * @param [Boolean] on true to handle mouse click events, false to ignore them.
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_mouse_input(VALUE self, VALUE on)
+{
+    libvlc_video_set_mouse_input(_SELF(self), RVAL2CBOOL(on));
+    return self;
+}
+
+/*
+ * Get the pixel dimensions of a video.
+ *
+ * @param [Integer] video number of the video (starting from, and most commonly 0)
+ * @return [Array(Integer, Integer)] the pixel dimensions(width and height) or nil
+ * @todo fixme
+ */
+static VALUE
+rg_get_size(VALUE self, VALUE video)
+{
+    unsigned int width, height;
+    int result = libvlc_video_get_size(_SELF(self), NUM2UINT(video), &width, &height);
+    return result == 0 ? rb_ary_new3(2, UINT2NUM(width), UINT2NUM(height)) : Qnil;
+}
+
+/*
+ * Get the mouse pointer coordinates over a video.
+ * Coordinates are expressed in terms of the decoded video resolution,
+ * <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
+ * you can query your windowing system directly).
+ *
+ * Either of the coordinates may be negative or larger than the corresponding
+ * dimension of the video, if the cursor is outside the rendering area.
+ *
+ * @note
+ *   The coordinates may be out-of-date if the pointer is not located
+ *   on the video rendering area. LibVLC does not track the pointer if it is
+ *   outside of the video widget.
+ *
+ * @note
+ *   LibVLC does not support multiple pointers (it does of course support
+ *   multiple input devices sharing the same pointer) at the moment.
+ *
+ * @param [Integer] video number of the video (starting from, and most commonly 0)
+ * @return [Array(Integer, Integer)] the mouse pointer coordinates(abscissa and ordinate) or nil
+ * @todo fixme
+ */
+static VALUE
+rg_get_cursor(VALUE self, VALUE video)
+{
+    int x, y, result;
+    result = libvlc_video_get_cursor(_SELF(self), NUM2UINT(video), &x, &y);
+    return result == 0 ? rb_ary_new3(2, INT2NUM(x), INT2NUM(y)) : Qnil;
+}
+
+/*
+ * Set the video scaling factor. That is the ratio of the number of pixels on
+ * screen to the number of pixels in the original decoded video in each
+ * dimension. Zero is a special value; it will adjust the video to the output
+ * window/drawable (in windowed mode) or the entire screen.
+ *
+ * Note that not all video outputs support scaling.
+ *
+ * @param [Float] scale the scaling factor, or zero
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_scale(VALUE self, VALUE scale)
+{
+    libvlc_video_set_scale(_SELF(self), NUM2DBL(scale));
+    return self;
+}
+
+/*
+ * Get the current video scaling factor.
+ * See also {#set_scale}.
+ *
+ * @return [Float] the currently configured zoom factor, or 0. if the video is set
+ * to fit to the output window/drawable automatically.
+ * @todo fixme
+ */
+static VALUE
+rg_scale(VALUE self)
+{
+    return DBL2NUM(libvlc_video_get_scale(_SELF(self)));
+}
+
+/*
+ * Set new video aspect ratio.
+ *
+ * @note
+ *   Invalid aspect ratios are ignored.
+ *
+ * @param [Float] ratio new video aspect-ratio or nil to reset to default
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_aspect_ratio(VALUE self, VALUE ratio)
+{
+    libvlc_video_set_aspect_ratio(_SELF(self), RVAL2CSTR_ACCEPT_NIL(ratio));
+    return self;
+}
+
+/*
+ * Get current video aspect ratio.
+ *
+ * @return [String] the video aspect ratio or nil if unspecified
+ * @todo fixme
+ */
+static VALUE
+rg_aspect_ratio(VALUE self)
+{
+    return CSTR2RVAL_FREE(libvlc_video_get_aspect_ratio(_SELF(self)));
+}
+
+/*
+ * Set new video subtitle.
+ *
+ * @param [Integer] spu new video subtitle to select
+ * @return [Boolean] true on success, false if out of range
+ * @todo fixme
+ */
+static VALUE
+rg_set_spu(VALUE self, VALUE spu)
+{
+    return ZEROBOOL2RVAL(libvlc_video_set_spu(_SELF(self), NUM2UINT(spu)));
+}
+
+/*
+ * Get current video subtitle.
+ *
+ * @return [Integer] the video subtitle selected, or nil if none
+ * @todo fixme
+ */
+static VALUE
+rg_spu(VALUE self)
+{
+    int spu = libvlc_video_get_spu(_SELF(self));
+    return spu < 0 ? Qnil : INT2NUM(spu);
+}
+
+/*
+ * Get the number of available video subtitles.
+ *
+ * @return [Integer] the number of available video subtitles
+ * @todo fixme
+ */
+static VALUE
+rg_spu_count(VALUE self)
+{
+    return INT2NUM(libvlc_video_get_spu_count(_SELF(self)));
+}
+
+/*
+ * Get the description of available video subtitles.
+ *
+ * @return [Array<VLC::TrackDescription>] list containing description of available video subtitles
+ * @todo fixme
+ */
+static VALUE
+rg_spu_description(VALUE self)
+{
+    return TRACKDESCRIPTIONLIST2RVAL(libvlc_video_get_spu_description(_SELF(self)));
+}
+
+/*
+ * Set new video subtitle file.
+ *
+ * @param [String] file new video subtitle file
+ * @return [Boolean] the success status
+ * @todo fixme
+ */
+static VALUE
+rg_set_subtitle_file(VALUE self, VALUE file)
+{
+    return CBOOL2RVAL(libvlc_video_set_subtitle_file(_SELF(self), RVAL2CSTR(file)));
+}
+
+/*
+ * Set the subtitle delay. This affects the timing of when the subtitle will
+ * be displayed. Positive values result in subtitles being displayed later,
+ * while negative values will result in subtitles being displayed earlier.
+ *
+ * The subtitle delay will be reset to zero each time the media changes.
+ *
+ * @param [Integer] delay the display of subtitles should be delayed (in microseconds)
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_set_spu_delay(VALUE self, VALUE delay)
+{
+    return ZEROBOOL2RVAL(libvlc_video_set_spu_delay(_SELF(self), NUM2LONG(delay)));
+}
+
+/*
+ * Get the current subtitle delay. Positive values means subtitles are being
+ * displayed later, negative values earlier.
+ *
+ * @return [Integer] the display of subtitles is being delayed (in microseconds)
+ * @todo fixme
+ */
+static VALUE
+rg_spu_delay(VALUE self)
+{
+    return LONG2NUM(libvlc_video_get_spu_delay(_SELF(self)));
+}
+
+/*
+ * Set new crop filter geometry.
+ *
+ * @param [String] geometry new crop filter geometry (nil to unset)
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_crop_geometry(VALUE self, VALUE geometry)
+{
+    libvlc_video_set_crop_geometry(_SELF(self), RVAL2CSTR_ACCEPT_NIL(geometry));
+    return self;
+}
+
+/*
+ * Set new teletext page to retrieve.
+ *
+ * @param [Integer] page teletex page number requested
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_teletext(VALUE self, VALUE page)
+{
+    libvlc_video_set_teletext(_SELF(self), NUM2INT(page));
+    return self;
+}
+
+/*
+ * Get current teletext page requested.
+ *
+ * @return [Integer] the current teletext page requested.
+ * @todo fixme
+ */
+static VALUE
+rg_teletext(VALUE self)
+{
+    return INT2NUM(libvlc_video_get_teletext(_SELF(self)));
+}
+
+/*
+ * Toggle teletext transparent status on video output.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_toggle_teletext(VALUE self)
+{
+    libvlc_toggle_teletext(_SELF(self));
+    return self;
+}
+
+/*
+ * Set video track.
+ *
+ * @param [Integer] track the track
+ * @return [Boolean] true on success, false if out of range
+ * @todo fixme
+ */
+static VALUE
+rg_set_video_track(VALUE self, VALUE track)
+{
+    return ZEROBOOL2RVAL(libvlc_video_set_track(_SELF(self), NUM2INT(track)));
+}
+
+/*
+ * Get current video track.
+ *
+ * @return [Integer] the video track or nil if none
+ * @todo fixme
+ */
+static VALUE
+rg_video_track(VALUE self)
+{
+    int track = libvlc_video_get_track(_SELF(self));
+    return track < 0 ? Qnil : INT2NUM(track);
+}
+
+/*
+ * Get number of available video tracks.
+ *
+ * @return [Integer] the number of available video tracks
+ * @todo fixme
+ */
+static VALUE
+rg_video_track_count(VALUE self)
+{
+    return INT2NUM(libvlc_video_get_track_count(_SELF(self)));
+}
+
+/*
+ * Get the description of available video tracks.
+ *
+ * @return [Array<VLC::TrackDescription>] list with description of available video tracks
+ * @todo fixme
+ */
+static VALUE
+rg_video_track_description(VALUE self)
+{
+    return TRACKDESCRIPTIONLIST2RVAL(libvlc_video_get_track_description(_SELF(self)));
+}
+
+/*
+ * Take a snapshot of the current video window.
+ *
+ * If :width AND :height is 0, original size is used.
+ * If :width XOR :height is 0, original aspect-ratio is preserved.
+ *
+ * @param [Hash] options snapshot options
+ * @option options [Integer] :video (0) number of video output (typically 0 for the first/only one)
+ * @option options [String] :file the path where to save the screenshot to
+ * @option options [Integer] :width (0) the snapshot's width
+ * @option options [Integer] :height (0) the snapshot's height
+ * @return [Boolean] true on success, false if the video was not found
+ * @todo fixme
+ */
+static VALUE
+rg_take_snapshot(VALUE self, VALUE options)
+{
+    VALUE video, file, width, height;
+    int result;
+
+    rbg_scan_options(options,
+                    "video",    &video,
+                    "file",     &file,
+                    "width",    &width,
+                    "height",   &height,
+                    NULL);
+    result = libvlc_video_take_snapshot(_SELF(self),
+                                        NIL_P(video) ? 0 : NUM2UINT(video),
+                                        RVAL2CSTR(file),
+                                        NIL_P(width) ? 0 : NUM2UINT(width),
+                                        NIL_P(height) ? 0 : NUM2UINT(height));
+    return ZEROBOOL2RVAL(result);
+}
+
+/*
+ * Enable or disable deinterlace filter
+ *
+ * @param [String] mode type of deinterlace filter, nil to disable
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_deinterlace(VALUE self, VALUE mode)
+{
+    libvlc_video_set_deinterlace(_SELF(self), RVAL2CSTR_ACCEPT_NIL(mode));
+    return self;
+}
+
+/*
+ * Enable, disable or set an integer marquee option
+ *
+ * Setting {VLC::VideoMarqueeOption::ENABLE} has the side effect of enabling (arg !0)
+ * or disabling (arg 0) the marq filter.
+ *
+ * @param [VLC::VideoMarqueeOption] option marq option to set
+ * @param [Integer] value marq option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_marquee_int(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_marquee_int(_SELF(self), RVAL2VLCVIDEOMARQUEEOPTION(option), NUM2INT(value));
+    return self;
+}
+
+/*
+ * Set a marquee string option
+ *
+ * @param [VLC::VideoMarqueeOption] option marq option to set
+ * @param [String] value marq option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_marquee_string(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_marquee_string(_SELF(self), RVAL2VLCVIDEOMARQUEEOPTION(option), RVAL2CSTR(value));
+    return self;
+}
+
+/*
+ * Get an integer marquee option value
+ *
+ * @param [VLC::VideoMarqueeOption] option marq option to get
+ * @return [Integer] marq option value
+ * @todo fixme
+ */
+static VALUE
+rg_get_marquee_int(VALUE self, VALUE option)
+{
+    return INT2NUM(libvlc_video_get_marquee_int(_SELF(self), RVAL2VLCVIDEOMARQUEEOPTION(option)));
+}
+
+/*
+ * Get a string marquee option value
+ *
+ * @param [VLC::VideoMarqueeOption] option marq option to get
+ * @return [String] marq option value
+ * @todo fixme
+ */
+static VALUE
+rg_get_marquee_string(VALUE self, VALUE option)
+{
+    return CSTR2RVAL(libvlc_video_get_marquee_string(_SELF(self), RVAL2VLCVIDEOMARQUEEOPTION(option)));
+}
+
+/*
+ * Set logo option as integer. Options that take a different type value
+ * are ignored.
+ * Passing {VLC::VideoLogoOption::ENABLE} as option value has the side effect of
+ * starting (arg !0) or stopping (arg 0) the logo filter.
+ *
+ * @param [VLC::VideoLogoOption] option logo option to set
+ * @param [Integer] value logo option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_logo_int(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_logo_int(_SELF(self), RVAL2VLCVIDEOLOGOOPTION(option), NUM2INT(value));
+    return self;
+}
+
+/*
+ * Set logo option as string. Options that take a different type value
+ * are ignored.
+ *
+ * @param [VLC::VideoLogoOption] option logo option to set
+ * @param [String] value logo option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_logo_string(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_logo_string(_SELF(self), RVAL2VLCVIDEOLOGOOPTION(option), RVAL2CSTR(value));
+    return self;
+}
+
+/*
+ * Get integer logo option.
+ *
+ * @param [VLC::VideoLogoOption] option logo option to get
+ * @return [Integer] logo option value
+ * @todo fixme
+ */
+static VALUE
+rg_get_logo_int(VALUE self, VALUE option)
+{
+    return INT2NUM(libvlc_video_get_logo_int(_SELF(self), RVAL2VLCVIDEOLOGOOPTION(option)));
+}
+
+/*
+ * Get a string logo option value
+ *
+ * @param [VLC::VideoLogoOption] option marq option to get
+ * @return [String] logo option value
+ * @todo fixme
+ */
+/*
+static VALUE
+rg_get_logo_string(VALUE self, VALUE option)
+{
+    CSTR2RVAL(libvlc_video_get_logo_string(_SELF(self), RVAL2VLCVIDEOLOGOOPTION(option)));
+}
+*/
+
+/*
+ * Set adjust option as integer. Options that take a different type value
+ * are ignored.
+ * Passing {VLC::VideoAdjustOption::ENABLE} as option value has the side effect of
+ * starting (arg !0) or stopping (arg 0) the adjust filter.
+ *
+ * @param [VLC::VideoAdjustOption] option adust option to set
+ * @param [Integer] value adjust option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_adjust_int(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_adjust_int(_SELF(self), RVAL2VLCVIDEOADJUSTOPTION(option), NUM2INT(value));
+    return self;
+}
+
+/*
+ * Set adjust option as float. Options that take a different type value
+ * are ignored.
+ *
+ * @param [VLC::VideoAdjustOption] option adust option to set
+ * @param [Float] value adjust option value
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_adjust_float(VALUE self, VALUE option, VALUE value)
+{
+    libvlc_video_set_adjust_float(_SELF(self), RVAL2VLCVIDEOADJUSTOPTION(option), NUM2DBL(value));
+    return self;
+}
+
+/*
+ * Get integer adjust option.
+ *
+ * @param [VLC::VideoAdjustOption] option adjust option to get
+ * @return [Integer] adjust option value
+ * @todo fixme
+ */
+static VALUE
+rg_get_adjust_int(VALUE self, VALUE option)
+{
+    return INT2NUM(libvlc_video_get_adjust_int(_SELF(self), RVAL2VLCVIDEOADJUSTOPTION(option)));
+}
+
+/*
+ * Get float adjust option.
+ *
+ * @param [VLC::VideoAdjustOption] option adjust option to get
+ * @return [Float] adjust option value
+ * @todo fixme
+ */
+static VALUE
+rg_get_adjust_float(VALUE self, VALUE option)
+{
+    return DBL2NUM(libvlc_video_get_adjust_float(_SELF(self), RVAL2VLCVIDEOADJUSTOPTION(option)));
+}
+
+/*
+ * Set the audio output.
+ * Change will be applied after stop and play.
+ *
+ * @param [String] name name of audio output (@see VLC::AudioOutput)
+ * @return [Boolean] true if function succeded, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_set_audio_output(VALUE self, VALUE name)
+{
+    return ZEROBOOL2RVAL(libvlc_audio_output_set(_SELF(self), RVAL2CSTR(name)));
+}
+
+/*
+ * Set audio output device. Changes are only effective after stop and play.
+ *
+ * @param [String] name name of audio output (@see VLC::AudioOutput)
+ * @param [String] id id name of device
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_audio_output_device(VALUE self, VALUE name, VALUE id)
+{
+    libvlc_audio_output_device_set(_SELF(self), RVAL2CSTR(name), RVAL2CSTR(id));
+    return self;
+}
+
+/*
+ * Set current audio device type.
+ *
+ * @param [VLC::AudioOutputDeviceTypes] type the audio device type
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_audio_output_device_type(VALUE self, VALUE type)
+{
+    libvlc_audio_output_set_device_type(_SELF(self), RVAL2VLCAUDIOOUTPUTDEVICETYPES(type));
+    return self;
+}
+
+/*
+ * Get current audio device type. Device type describes something like
+ * character of output sound - stereo sound, 2.1, 5.1 etc
+ *
+ * @return [VLC::AudioOutputDeviceTypes] the audio device type
+ * @todo fixme
+ */
+static VALUE
+rg_audio_output_device_type(VALUE self)
+{
+    return VLCAUDIOOUTPUTDEVICETYPES2RVAL(libvlc_audio_output_get_device_type(_SELF(self)));
+}
+
+/*
+ * Toggle mute status.
+ *
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_toggle_mute(VALUE self)
+{
+    libvlc_audio_toggle_mute(_SELF(self));
+    return self;
+}
+
+/*
+ * Set mute status.
+ *
+ * @param [Boolean] mute If status is true then mute, otherwise unmute
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_set_mute(VALUE self, VALUE mute)
+{
+    libvlc_audio_set_mute(_SELF(self), RVAL2CBOOL(mute));
+    return self;
+}
+
+/*
+ * Get current mute status.
+ *
+ * @return [Boolean] the mute status
+ * @todo fixme
+ */
+static VALUE
+rg_mute(VALUE self)
+{
+    return CBOOL2RVAL(libvlc_audio_get_mute(_SELF(self)));
+}
+
+/*
+ * Set current software audio volume.
+ *
+ * @param [Integer] volume the volume in percents (0 = mute, 100 = 0dB)
+ * @return [Boolean] true if the volume was set, false if it was out of range
+ * @todo fixme
+ */
+static VALUE
+rg_set_volume(VALUE self, VALUE volume)
+{
+    return ZEROBOOL2RVAL(libvlc_audio_set_volume(_SELF(self), NUM2INT(volume)));
+}
+
+/*
+ * Get current software audio volume.
+ *
+ * @return [Integer] the software volume in percents (0 = mute, 100 = nominal / 0dB)
+ * @todo fixme
+ */
+static VALUE
+rg_volume(VALUE self)
+{
+    return INT2NUM(libvlc_audio_get_volume(_SELF(self)));
+}
+
+/*
+ * Set current audio track.
+ *
+ * @param [Integer] track the track
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_set_audio_track(VALUE self, VALUE track)
+{
+    return ZEROBOOL2RVAL(libvlc_audio_set_track(_SELF(self), NUM2INT(track)));
+}
+
+/*
+ * Get current audio track.
+ *
+ * @return [Integer] the audio track or nil if none
+ * @todo fixme
+ */
+static VALUE
+rg_audio_track(VALUE self)
+{
+    int track = libvlc_audio_get_track(_SELF(self));
+    return track < 0 ? Qnil : INT2NUM(track);
+}
+
+/*
+ * Get number of available audio tracks.
+ *
+ * @return [Integer] the number of available audio tracks, or nil if unavailable
+ * @todo fixme
+ */
+static VALUE
+rg_audio_track_count(VALUE self)
+{
+    int count = libvlc_audio_get_track_count(_SELF(self));
+    return count < 0 ? Qnil : INT2NUM(count);
+}
+
+/*
+ * Get the description of available audio tracks.
+ *
+ * @return [Array<VLC::TrackDescription>] list with description of available audio tracks
+ * @todo fixme
+ */
+static VALUE
+rg_audio_track_description(VALUE self)
+{
+    return TRACKDESCRIPTIONLIST2RVAL(libvlc_audio_get_track_description(_SELF(self)));
+}
+
+/*
+ * Set current audio channel.
+ *
+ * @param [VLC::AudioOutputChannel] channel the audio channel
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_set_channel(VALUE self, VALUE channel)
+{
+    return ZEROBOOL2RVAL(libvlc_audio_set_channel(_SELF(self), RVAL2VLCAUDIOOUTPUTCHANNEL(channel)));
+}
+
+/*
+ * Get current audio channel.
+ *
+ * @return [VLC::AudioOutputChannel] the audio channel
+ * @todo fixme
+ */
+static VALUE
+rg_channel(VALUE self)
+{
+    return VLCAUDIOOUTPUTCHANNEL2RVAL(libvlc_audio_get_channel(_SELF(self)));
+}
+
+/*
+ * Set current audio delay. The audio delay will be reset to zero each time the media changes.
+ *
+ * @param [Integer] delay the audio delay (microseconds)
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_set_delay(VALUE self, VALUE delay)
+{
+    return ZEROBOOL2RVAL(libvlc_audio_set_delay(_SELF(self), NUM2LONG(delay)));
+}
+
+/*
+ * Get current audio delay.
+ *
+ * @return [Integer] the audio delay (microseconds)
+ * @todo fixme
+ */
+static VALUE
+rg_delay(VALUE self)
+{
+    return LONG2NUM(libvlc_audio_get_delay(_SELF(self)));
+}
+
+/*
+ * Register for an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to listen
+ * @yield call when event_type occurs
+ * @yieldparam self
+ * @yieldparam [VLC::Event] event
+ * @return [Boolean] true on success, false on error
+ * @todo fixme
+ */
+static VALUE
+rg_attach_event(VALUE self, VALUE event_type)
+{
+    return em_attach_event(libvlc_media_player_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Unregister an event notification.
+ *
+ * @param [VLC::Event::Type] event_type the desired event to which we want to unregister
+ * @return self
+ * @todo fixme
+ */
+static VALUE
+rg_detach_event(VALUE self, VALUE event_type)
+{
+    return em_detach_event(libvlc_media_player_event_manager(_SELF(self)), self, event_type);
+}
+
+/*
+ * Document-class: VLC::MediaPlayer
+ *
+ * A LibVLC media player plays one media (usually in a custom drawable).
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_mediaplayer(VALUE mVLC)
+{
+    id_core = rb_intern("core");
+
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_PLAYER, "MediaPlayer", mVLC);
+
+    RG_DEF_METHOD(initialize, -1);
+    RG_DEF_METHOD(core, 0);
+    RG_DEF_METHOD(set_media, 1);
+    RG_DEF_METHOD(media, 0);
+    RG_DEF_METHOD_P(playing, 0);
+    RG_DEF_METHOD(play, 0);
+    RG_DEF_METHOD(pause, -1);
+    RG_DEF_METHOD(stop, 0);
+    RG_DEF_METHOD(set_xwindow, 1);
+    RG_DEF_METHOD(xwindow, 0);
+    RG_DEF_METHOD(length, 0);
+    RG_DEF_METHOD(set_time, 1);
+    RG_DEF_METHOD(time, 0);
+    RG_DEF_METHOD(set_position, 1);
+    RG_DEF_METHOD(position, 0);
+    RG_DEF_METHOD(set_chapter, 1);
+    RG_DEF_METHOD(chapter, 0);
+    RG_DEF_METHOD(chapter_count, -1);
+    RG_DEF_METHOD(chapter_description, 1);
+    RG_DEF_METHOD_P(will_play, 0);
+    RG_DEF_METHOD(set_title, 1);
+    RG_DEF_METHOD(title, 0);
+    RG_DEF_METHOD(title_count, 0);
+    RG_DEF_METHOD(title_description, 0);
+    RG_DEF_METHOD(previous_chapter, 0);
+    RG_DEF_METHOD(next_chapter, 0);
+    RG_DEF_METHOD(set_rate, 1);
+    RG_DEF_METHOD(rate, 0);
+    RG_DEF_METHOD(state, 0);
+    RG_DEF_METHOD(fps, 0);
+    RG_DEF_METHOD(has_vout, 0);
+    RG_DEF_METHOD_P(seekable, 0);
+    RG_DEF_METHOD_P(can_pause, 0);
+    RG_DEF_METHOD(next_frame, 0);
+    RG_DEF_METHOD(navigate, 1);
+    RG_DEF_METHOD(toggle_fullscreen, 0);
+    RG_DEF_METHOD(set_fullscreen, 1);
+    RG_DEF_METHOD(fullscreen, 0);
+    RG_DEF_METHOD(set_key_input, 1);
+    RG_DEF_METHOD(set_mouse_input, 1);
+    RG_DEF_METHOD(get_size, 1);
+    RG_DEF_METHOD(get_cursor, 1);
+    RG_DEF_METHOD(set_scale, 1);
+    RG_DEF_METHOD(scale, 0);
+    RG_DEF_METHOD(set_aspect_ratio, 1);
+    RG_DEF_METHOD(aspect_ratio, 0);
+    RG_DEF_METHOD(set_spu, 1);
+    RG_DEF_METHOD(spu, 0);
+    RG_DEF_METHOD(spu_count, 0);
+    RG_DEF_METHOD(spu_description, 0);
+    RG_DEF_METHOD(set_subtitle_file, 1);
+    RG_DEF_METHOD(set_spu_delay, 1);
+    RG_DEF_METHOD(spu_delay, 0);
+    RG_DEF_METHOD(set_crop_geometry, 1);
+    RG_DEF_METHOD(set_teletext, 1);
+    RG_DEF_METHOD(teletext, 0);
+    RG_DEF_METHOD(toggle_teletext, 0);
+    RG_DEF_METHOD(set_video_track, 1);
+    RG_DEF_METHOD(video_track, 0);
+    RG_DEF_METHOD(video_track_count, 0);
+    RG_DEF_METHOD(video_track_description, 0);
+    RG_DEF_METHOD(take_snapshot, 1);
+    RG_DEF_METHOD(set_deinterlace, 1);
+    RG_DEF_METHOD(set_marquee_int, 2);
+    RG_DEF_METHOD(set_marquee_string, 2);
+    RG_DEF_METHOD(get_marquee_int, 1);
+    RG_DEF_METHOD(get_marquee_string, 1);
+    RG_DEF_METHOD(set_logo_int, 2);
+    RG_DEF_METHOD(set_logo_string, 2);
+    RG_DEF_METHOD(get_logo_int, 1);
+    RG_DEF_METHOD(set_adjust_int, 2);
+    RG_DEF_METHOD(set_adjust_float, 2);
+    RG_DEF_METHOD(get_adjust_int, 1);
+    RG_DEF_METHOD(get_adjust_float, 1);
+    RG_DEF_METHOD(set_audio_output, 1);
+    RG_DEF_METHOD(set_audio_output_device, 2);
+    RG_DEF_METHOD(set_audio_output_device_type, 1);
+    RG_DEF_METHOD(audio_output_device_type, 0);
+    RG_DEF_METHOD(toggle_mute, 0);
+    RG_DEF_METHOD(set_mute, 1);
+    RG_DEF_METHOD(mute, 0);
+    RG_DEF_METHOD(set_volume, 1);
+    RG_DEF_METHOD(volume, 0);
+    RG_DEF_METHOD(set_audio_track, 1);
+    RG_DEF_METHOD(audio_track, 0);
+    RG_DEF_METHOD(audio_track_count, 0);
+    RG_DEF_METHOD(audio_track_description, 0);
+    RG_DEF_METHOD(set_channel, 1);
+    RG_DEF_METHOD(channel, 0);
+    RG_DEF_METHOD(set_delay, 1);
+    RG_DEF_METHOD(delay, 0);
+    RG_DEF_METHOD(attach_event, 1);
+    RG_DEF_METHOD(detach_event, 1);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmediastats.c b/gvlc/ext/gvlc/rbvlcmediastats.c
new file mode 100644
index 0000000..dde1e36
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmediastats.c
@@ -0,0 +1,243 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_stats_t *
+vlc_media_stats_copy(const libvlc_media_stats_t *instance)
+{
+    libvlc_media_stats_t *result = g_new(libvlc_media_stats_t, 1);
+    *result = *instance;
+    return result;
+}
+
+static void
+vlc_media_stats_free(libvlc_media_stats_t *instance)
+{
+    g_free(instance);
+}
+
+GType
+vlc_media_stats_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaStats",
+                                                (GBoxedCopyFunc)vlc_media_stats_copy,
+                                                (GBoxedFreeFunc)vlc_media_stats_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cStats
+#define _SELF(self) (RVAL2VLCMEDIASTATS(self))
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_read_bytes(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_read_bytes);
+}
+
+/*
+ *
+ * @return [Float]
+ * @todo fixme
+ */
+static VALUE
+rg_input_bitrate(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->f_input_bitrate);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_demux_read_bytes(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_demux_read_bytes);
+}
+
+/*
+ *
+ * @return [Float]
+ * @todo fixme
+ */
+static VALUE
+rg_demux_bitrate(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->f_demux_bitrate);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_demux_corrupted(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_demux_corrupted);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_demux_discontinuity(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_demux_discontinuity);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_decoded_video(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_decoded_video);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_decoded_audio(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_decoded_audio);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_displayed_pictures(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_displayed_pictures);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_lost_pictures(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_lost_pictures);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_played_abuffers(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_played_abuffers);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_lost_abuffers(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_lost_abuffers);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_sent_packets(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_sent_packets);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_sent_bytes(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_sent_bytes);
+}
+
+/*
+ *
+ * @return [Float]
+ * @todo fixme
+ */
+static VALUE
+rg_send_bitrate(VALUE self)
+{
+    return DBL2NUM(_SELF(self)->f_send_bitrate);
+}
+
+/*
+ * Document-class: VLC::Media::Stats
+ *
+ * LibVLC media statistics
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_media_stats(VALUE cMedia)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_STATS, "Stats", cMedia);
+
+    RG_DEF_METHOD(read_bytes, 0);
+    RG_DEF_METHOD(input_bitrate, 0);
+    RG_DEF_METHOD(demux_read_bytes, 0);
+    RG_DEF_METHOD(demux_bitrate, 0);
+    RG_DEF_METHOD(demux_corrupted, 0);
+    RG_DEF_METHOD(demux_discontinuity, 0);
+    RG_DEF_METHOD(decoded_video, 0);
+    RG_DEF_METHOD(decoded_audio, 0);
+    RG_DEF_METHOD(displayed_pictures, 0);
+    RG_DEF_METHOD(lost_pictures, 0);
+    RG_DEF_METHOD(played_abuffers, 0);
+    RG_DEF_METHOD(lost_abuffers, 0);
+    RG_DEF_METHOD(sent_packets, 0);
+    RG_DEF_METHOD(sent_bytes, 0);
+    RG_DEF_METHOD(send_bitrate, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmediatrackinfo.c b/gvlc/ext/gvlc/rbvlcmediatrackinfo.c
new file mode 100644
index 0000000..c5526e1
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmediatrackinfo.c
@@ -0,0 +1,181 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_media_track_info_t *
+vlc_media_track_info_copy(const libvlc_media_track_info_t *instance)
+{
+    libvlc_media_track_info_t *result = g_new(libvlc_media_track_info_t, 1);
+    *result = *instance;
+    return result;
+}
+
+static void
+vlc_media_track_info_free(libvlc_media_track_info_t *instance)
+{
+    g_free(instance);
+}
+
+GType
+vlc_media_track_info_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCMediaTrackInfo",
+                                                (GBoxedCopyFunc)vlc_media_track_info_copy,
+                                                (GBoxedFreeFunc)vlc_media_track_info_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cTrackInfo
+#define _SELF(self) (RVAL2VLCMEDIATRACKINFO(self))
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_codec(VALUE self)
+{
+    return UINT2NUM(_SELF(self)->i_codec);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_id(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_id);
+}
+
+/*
+ *
+ * @return [VLC::TrackType]
+ * @todo fixme
+ */
+static VALUE
+rg_type(VALUE self)
+{
+    return VLCTRACKTYPE2RVAL(_SELF(self)->i_type);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_profile(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_profile);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_level(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_level);
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_channels(VALUE self)
+{
+    if (_SELF(self)->i_type == libvlc_track_audio)
+        return UINT2NUM(_SELF(self)->u.audio.i_channels);
+    else
+        return Qnil;
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_rate(VALUE self)
+{
+    if (_SELF(self)->i_type == libvlc_track_audio)
+        return UINT2NUM(_SELF(self)->u.audio.i_rate);
+    else
+        return Qnil;
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_width(VALUE self)
+{
+    if (_SELF(self)->i_type == libvlc_track_video)
+        return UINT2NUM(_SELF(self)->u.video.i_width);
+    else
+        return Qnil;
+}
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_height(VALUE self)
+{
+    if (_SELF(self)->i_type == libvlc_track_video)
+        return UINT2NUM(_SELF(self)->u.video.i_height);
+    else
+        return Qnil;
+}
+
+/*
+ * Document-class: VLC::Media::TrackInfo
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_media_trackinfo(VALUE cMedia)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MEDIA_TRACK_INFO, "TrackInfo", cMedia);
+
+    RG_DEF_METHOD(codec, 0);
+    RG_DEF_METHOD(id, 0);
+    RG_DEF_METHOD(type, 0);
+    RG_DEF_METHOD(profile, 0);
+    RG_DEF_METHOD(level, 0);
+    RG_DEF_METHOD(channels, 0);
+    RG_DEF_METHOD(rate, 0);
+    RG_DEF_METHOD(width, 0);
+    RG_DEF_METHOD(height, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcmoduledescription.c b/gvlc/ext/gvlc/rbvlcmoduledescription.c
new file mode 100644
index 0000000..2236731
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcmoduledescription.c
@@ -0,0 +1,119 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_module_description_t *
+vlc_module_description_copy(const libvlc_module_description_t *instance)
+{
+    libvlc_module_description_t *result = g_new(libvlc_module_description_t, 1);
+    *result = *instance;
+    result->psz_name        = g_strdup(instance->psz_name);
+    result->psz_shortname   = g_strdup(instance->psz_shortname);
+    result->psz_longname    = g_strdup(instance->psz_longname);
+    result->psz_help        = g_strdup(instance->psz_help);
+    return result;
+}
+
+static void
+vlc_module_description_free(libvlc_module_description_t *instance)
+{
+    g_free(instance->psz_name);
+    g_free(instance->psz_shortname);
+    g_free(instance->psz_longname);
+    g_free(instance->psz_help);
+    g_free(instance);
+}
+
+GType
+vlc_module_description_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCModuleDescription",
+                                                (GBoxedCopyFunc)vlc_module_description_copy,
+                                                (GBoxedFreeFunc)vlc_module_description_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cModuleDescription
+#define _SELF(self) (RVAL2VLCMODULEDESCRIPTION(self))
+
+/*
+ *
+ * @return [String]
+ * @todo fixme
+ */
+static VALUE
+rg_name(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_name);
+}
+
+/*
+ *
+ * @return [String]
+ * @todo fixme
+ */
+static VALUE
+rg_shortname(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_shortname);
+}
+
+/*
+ *
+ * @return [String]
+ * @todo fixme
+ */
+static VALUE
+rg_longname(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_longname);
+}
+
+/*
+ *
+ * @return [String]
+ * @todo fixme
+ */
+static VALUE
+rg_help(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_help);
+}
+
+/*
+ * Document-class: VLC::ModuleDescription
+ *
+ * Description of a module.
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_moduledescription(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_MODULE_DESCRIPTION, "ModuleDescription", mVLC);
+
+    RG_DEF_METHOD(name, 0);
+    RG_DEF_METHOD(shortname, 0);
+    RG_DEF_METHOD(longname, 0);
+    RG_DEF_METHOD(help, 0);
+}
diff --git a/gvlc/ext/gvlc/rbvlcprivate.h b/gvlc/ext/gvlc/rbvlcprivate.h
new file mode 100644
index 0000000..896f4a0
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlcprivate.h
@@ -0,0 +1,117 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#ifndef __RBVLC_PRIVATE_H__
+#define __RBVLC_PRIVATE_H__
+
+#include <ruby.h>
+#include <vlc/vlc.h>
+#include <rbgobject.h>
+
+#include "rbvlcconversions.h"
+
+G_BEGIN_DECLS
+
+#define ZEROBOOL2RVAL(bool) ((bool == 0) ? Qtrue : Qfalse)
+#define RVAL2CSTRARY(ary, len) rval2cstrary(ary, len)
+#define CSTRARY_FREE(ary, len) cstrary_free(ary, len)
+#define MODULEDESCRIPTIONLIST2RVAL(list) moduledescriptionlist2rval(list)
+#define TRACKDESCRIPTIONLIST2RVAL(list) trackdescriptionlist2rval(list)
+#define AUDIOOUTPUTLIST2RVAL(list) audiooutputlist2rval(list)
+
+G_GNUC_INTERNAL char **rval2cstrary(VALUE ary, long *len);
+G_GNUC_INTERNAL void cstrary_free(char **ary, long len);
+G_GNUC_INTERNAL VALUE moduledescriptionlist2rval(libvlc_module_description_t *list);
+G_GNUC_INTERNAL VALUE trackdescriptionlist2rval(libvlc_track_description_t *list);
+G_GNUC_INTERNAL VALUE audiooutputlist2rval(libvlc_audio_output_t *list);
+G_GNUC_INTERNAL VALUE em_attach_event(libvlc_event_manager_t *event_manager, VALUE self, VALUE event_type);
+G_GNUC_INTERNAL VALUE em_detach_event(libvlc_event_manager_t *event_manager, VALUE self, VALUE event_type);
+
+G_GNUC_INTERNAL void Init_vlc(void);
+
+G_GNUC_INTERNAL void Init_vlc_core(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_media(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_mediaplayer(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_medialist(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_medialistplayer(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_medialibrary(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_mediadiscoverer(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_event(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_moduledescription(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_trackdescription(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_audiooutput(VALUE mVLC);
+G_GNUC_INTERNAL void Init_vlc_media_trackinfo(VALUE cMedia);
+G_GNUC_INTERNAL void Init_vlc_media_stats(VALUE cMedia);
+
+G_GNUC_INTERNAL void Init_vlc_event_type(VALUE cEvent);
+
+#define VLC_TYPE_CORE (vlc_core_get_type())
+G_GNUC_INTERNAL GType vlc_core_get_type(void);
+#define VLC_TYPE_MEDIA (vlc_media_get_type())
+G_GNUC_INTERNAL GType vlc_media_get_type(void);
+#define VLC_TYPE_MEDIA_PLAYER (vlc_media_player_get_type())
+G_GNUC_INTERNAL GType vlc_media_player_get_type(void);
+#define VLC_TYPE_MEDIA_LIST (vlc_media_list_get_type())
+G_GNUC_INTERNAL GType vlc_media_list_get_type(void);
+#define VLC_TYPE_MEDIA_LIST_PLAYER (vlc_media_list_player_get_type())
+G_GNUC_INTERNAL GType vlc_media_list_player_get_type(void);
+#define VLC_TYPE_MEDIA_LIBRARY (vlc_media_library_get_type())
+G_GNUC_INTERNAL GType vlc_media_library_get_type(void);
+#define VLC_TYPE_MEDIA_DISCOVERER (vlc_media_discoverer_get_type())
+G_GNUC_INTERNAL GType vlc_media_discoverer_get_type(void);
+#define VLC_TYPE_EVENT (vlc_event_get_type())
+G_GNUC_INTERNAL GType vlc_event_get_type(void);
+#define VLC_TYPE_MEDIA_TRACK_INFO (vlc_media_track_info_get_type())
+G_GNUC_INTERNAL GType vlc_media_track_info_get_type(void);
+#define VLC_TYPE_MODULE_DESCRIPTION (vlc_module_description_get_type())
+G_GNUC_INTERNAL GType vlc_module_description_get_type(void);
+#define VLC_TYPE_TRACK_DESCRIPTION (vlc_track_description_get_type())
+G_GNUC_INTERNAL GType vlc_track_description_get_type(void);
+#define VLC_TYPE_AUDIO_OUTPUT (vlc_audio_output_get_type())
+G_GNUC_INTERNAL GType vlc_audio_output_get_type(void);
+#define VLC_TYPE_MEDIA_STATS (vlc_media_stats_get_type())
+G_GNUC_INTERNAL GType vlc_media_stats_get_type(void);
+
+#define VLC_TYPE_TRACK_TYPE (vlc_track_type_get_type())
+G_GNUC_INTERNAL GType vlc_track_type_get_type(void);
+#define VLC_TYPE_META_TYPE (vlc_meta_type_get_type())
+G_GNUC_INTERNAL GType vlc_meta_type_get_type(void);
+#define VLC_TYPE_STATE (vlc_state_get_type())
+G_GNUC_INTERNAL GType vlc_state_get_type(void);
+#define VLC_TYPE_PLAYBACK_MODE (vlc_playback_mode_get_type())
+G_GNUC_INTERNAL GType vlc_playback_mode_get_type(void);
+#define VLC_TYPE_NAVIGATE_MODE (vlc_navigate_mode_get_type())
+G_GNUC_INTERNAL GType vlc_navigate_mode_get_type(void);
+#define VLC_TYPE_VIDEO_MARQUEE_OPTION (vlc_video_marquee_option_get_type())
+G_GNUC_INTERNAL GType vlc_video_marquee_option_get_type(void);
+#define VLC_TYPE_VIDEO_LOGO_OPTION (vlc_video_logo_option_get_type())
+G_GNUC_INTERNAL GType vlc_video_logo_option_get_type(void);
+#define VLC_TYPE_VIDEO_ADJUST_OPTION (vlc_video_adjust_option_get_type())
+G_GNUC_INTERNAL GType vlc_video_adjust_option_get_type(void);
+#define VLC_TYPE_AUDIO_OUTPUT_CHANNEL (vlc_audio_output_channel_get_type())
+G_GNUC_INTERNAL GType vlc_audio_output_channel_get_type(void);
+#define VLC_TYPE_AUDIO_OUTPUT_DEVICE_TYPES (vlc_audio_output_device_types_get_type())
+G_GNUC_INTERNAL GType vlc_audio_output_device_types_get_type(void);
+#define VLC_TYPE_EVENT_TYPE (vlc_event_type_get_type())
+G_GNUC_INTERNAL GType vlc_event_type_get_type(void);
+
+G_END_DECLS
+
+#endif
diff --git a/gvlc/ext/gvlc/rbvlctrackdescription.c b/gvlc/ext/gvlc/rbvlctrackdescription.c
new file mode 100644
index 0000000..496b25c
--- /dev/null
+++ b/gvlc/ext/gvlc/rbvlctrackdescription.c
@@ -0,0 +1,90 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+static libvlc_track_description_t *
+vlc_track_description_copy(const libvlc_track_description_t *instance)
+{
+    libvlc_track_description_t *result = g_new(libvlc_track_description_t, 1);
+    *result = *instance;
+    result->psz_name = g_strdup(instance->psz_name);
+    return result;
+}
+
+static void
+vlc_track_description_free(libvlc_track_description_t *instance)
+{
+    g_free(instance->psz_name);
+    g_free(instance);
+}
+
+GType
+vlc_track_description_get_type(void)
+{
+    static GType our_type = 0;
+    if (our_type == 0)
+        our_type = g_boxed_type_register_static("VLCTrackDescription",
+                                                (GBoxedCopyFunc)vlc_track_description_copy,
+                                                (GBoxedFreeFunc)vlc_track_description_free);
+    return our_type;
+}
+
+#define RG_TARGET_NAMESPACE cTrackDescription
+#define _SELF(self) (RVAL2VLCTRACKDESCRIPTION(self))
+
+/*
+ *
+ * @return [Integer]
+ * @todo fixme
+ */
+static VALUE
+rg_id(VALUE self)
+{
+    return INT2NUM(_SELF(self)->i_id);
+}
+
+/*
+ *
+ * @return [String]
+ * @todo fixme
+ */
+static VALUE
+rg_name(VALUE self)
+{
+    return CSTR2RVAL(_SELF(self)->psz_name);
+}
+
+/*
+ * Document-class: VLC::TrackDescription
+ *
+ * Description for video, audio tracks and subtitles. It contains
+ * id and name (description string).
+ *
+ * @todo fixme
+ */
+void
+Init_vlc_trackdescription(VALUE mVLC)
+{
+    VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(VLC_TYPE_TRACK_DESCRIPTION, "TrackDescription", mVLC);
+
+    RG_DEF_METHOD(id, 0);
+    RG_DEF_METHOD(name, 0);
+}
diff --git a/gvlc/ext/gvlc/utils.c b/gvlc/ext/gvlc/utils.c
new file mode 100644
index 0000000..65d89c6
--- /dev/null
+++ b/gvlc/ext/gvlc/utils.c
@@ -0,0 +1,157 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+/*
+ *  Copyright (C) 2012  Ruby-GNOME2 Project Team
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "rbvlcprivate.h"
+
+char **
+rval2cstrary(VALUE ary, long *len)
+{
+    long i;
+    char **result;
+
+    if (NIL_P(ary))
+        return NULL;
+
+    *len = RARRAY_LEN(ary);
+    if (*len == 0)
+        return NULL;
+
+    result = ALLOC_N(char *, *len);
+    for (i = 0; i < *len; i++)
+        result[i] = g_strdup(RVAL2CSTR(RARRAY_PTR(ary)[i]));
+
+    return result;
+}
+
+void
+cstrary_free(char **ary, long len)
+{
+    long i;
+
+    if (!ary)
+        return;
+
+    for (i = 0; i < len; i++)
+        g_free(ary[i]);
+    g_free(ary);
+}
+
+VALUE
+moduledescriptionlist2rval(libvlc_module_description_t *list)
+{
+    libvlc_module_description_t *p;
+    VALUE result;
+
+    result = rb_ary_new();
+    for (p = list; p != NULL; p = p->p_next)
+        rb_ary_push(result, VLCMODULEDESCRIPTION2RVAL(p));
+    libvlc_module_description_list_release(list);
+
+    return result;
+}
+
+VALUE
+trackdescriptionlist2rval(libvlc_track_description_t *list)
+{
+    libvlc_track_description_t *p;
+    VALUE result;
+
+    result = rb_ary_new();
+    for (p = list; p != NULL; p = p->p_next)
+        rb_ary_push(result, VLCTRACKDESCRIPTION2RVAL(p));
+    libvlc_track_description_list_release(list);
+
+    return result;
+}
+
+VALUE
+audiooutputlist2rval(libvlc_audio_output_t *list)
+{
+    libvlc_audio_output_t *p;
+    VALUE result;
+
+    result = rb_ary_new();
+    for (p = list; p != NULL; p = p->p_next)
+        rb_ary_push(result, VLCAUDIOOUTPUT2RVAL(p));
+    libvlc_audio_output_list_release(list);
+
+    return result;
+}
+
+static VALUE
+callbacks_get(VALUE self)
+{
+    if (!rb_ivar_defined(self, rb_intern("callbacks")))
+        rb_ivar_set(self, rb_intern("callbacks"), rb_hash_new());
+    return rb_ivar_get(self, rb_intern("callbacks"));
+}
+
+struct cb_event_protect_arg
+{
+    const struct libvlc_event_t *event;
+    VALUE self;
+};
+
+static VALUE
+cb_event_protect(VALUE data)
+{
+    struct cb_event_protect_arg *arg = (struct cb_event_protect_arg *)data;
+    const struct libvlc_event_t *event = arg->event;
+    VALUE self = arg->self;
+
+    VALUE callbacks = callbacks_get(self);
+    VALUE func = rb_hash_aref(callbacks, INT2NUM(event->type));
+    if (NIL_P(func))
+        rb_warn("event block not found: %s", libvlc_event_type_name(event->type));
+    else
+        rb_funcall(func, rb_intern("call"), 2, self, VLCEVENT2RVAL((struct libvlc_event_t *)event));
+
+    return Qnil;
+}
+
+static void
+cb_event(const struct libvlc_event_t *event, void *self)
+{
+    struct cb_event_protect_arg arg = {event, (VALUE)self};
+    G_PROTECT_CALLBACK(cb_event_protect, &arg);
+}
+
+VALUE
+em_attach_event(libvlc_event_manager_t *event_manager, VALUE self, VALUE event_type)
+{
+    int type = RVAL2VLCEVENTTYPE(event_type);
+    VALUE func = rb_block_proc();
+    VALUE callbacks = callbacks_get(self);
+
+    rb_hash_aset(callbacks, INT2NUM(type), func);
+    return ZEROBOOL2RVAL(libvlc_event_attach(event_manager, type, cb_event, (void *)self));
+}
+
+VALUE
+em_detach_event(libvlc_event_manager_t *event_manager, VALUE self, VALUE event_type)
+{
+    int type = RVAL2VLCEVENTTYPE(event_type);
+    VALUE callbacks = callbacks_get(self);
+
+    rb_hash_delete(callbacks, INT2NUM(type));
+    libvlc_event_detach(event_manager, type, cb_event, (void *)self);
+
+    return self;
+}
diff --git a/gvlc/extconf.rb b/gvlc/extconf.rb
new file mode 100644
index 0000000..66f66e8
--- /dev/null
+++ b/gvlc/extconf.rb
@@ -0,0 +1,49 @@
+#!/usr/bin/env ruby
+
+require 'pathname'
+require 'mkmf'
+require 'rbconfig'
+require 'fileutils'
+
+package = "gvlc"
+
+base_dir = Pathname(__FILE__).dirname.expand_path
+ext_dir = base_dir + "ext" + package
+mkmf_gnome2_dir = base_dir + 'lib'
+
+ruby = File.join(RbConfig::CONFIG['bindir'],
+                 RbConfig::CONFIG['ruby_install_name'] +
+                 RbConfig::CONFIG["EXEEXT"])
+
+build_dir = Pathname("ext") + package
+FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
+extconf_rb_path = ext_dir + "extconf.rb"
+system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
+
+create_makefile(package)
+FileUtils.mv("Makefile", "Makefile.lib")
+
+File.open("Makefile", "w") do |makefile|
+  makefile.puts(<<-EOM)
+all:
+	(cd ext/#{package} && $(MAKE))
+	$(MAKE) -f Makefile.lib
+
+install:
+	(cd ext/#{package} && $(MAKE) install)
+	$(MAKE) -f Makefile.lib install
+
+site-install:
+	(cd ext/#{package} && $(MAKE) site-install)
+	$(MAKE) -f Makefile.lib site-install
+
+clean:
+	(cd ext/#{package} && $(MAKE) clean)
+	$(MAKE) -f Makefile.lib clean
+
+distclean:
+	(cd ext/#{package} && $(MAKE) distclean)
+	$(MAKE) -f Makefile.lib distclean
+	@rm -f Makefile.lib
+EOM
+end
diff --git a/gvlc/lib/gvlc.rb b/gvlc/lib/gvlc.rb
new file mode 100644
index 0000000..00b1b50
--- /dev/null
+++ b/gvlc/lib/gvlc.rb
@@ -0,0 +1,2 @@
+require 'glib2'
+require 'gvlc.so'
diff --git a/gvlc/sample/info.rb b/gvlc/sample/info.rb
new file mode 100644
index 0000000..3e385c3
--- /dev/null
+++ b/gvlc/sample/info.rb
@@ -0,0 +1,32 @@
+#!/usr/bin/env ruby
+# coding: utf-8
+
+require 'gvlc'
+
+puts "Version: #{VLC.version}"
+puts "Compiler: #{VLC.compiler}"
+puts "Changeset: #{VLC.changeset}"
+
+core = VLC::Core.new
+
+puts ""
+puts "Video Filters:"
+core.video_filter_list.each do |f|
+  puts " * #{f.name} (#{f.longname})"
+end
+
+puts ""
+puts "Audio Filters:"
+core.audio_filter_list.each do |f|
+  puts " * #{f.name} (#{f.longname})"
+end
+
+puts ""
+puts "Audio Outputs:"
+core.audio_output_list.each do |o|
+  puts " * #{o.name} (#{o.description})"
+  core.audio_output_device_count(o.name).times do |i|
+    puts "#{' ' * 5}#{core.audio_output_device_id(o.name, i)}(#{core.audio_output_device_longname(o.name, i)})"
+  end
+end
+
diff --git a/gvlc/sample/multi.rb b/gvlc/sample/multi.rb
new file mode 100644
index 0000000..4a3d323
--- /dev/null
+++ b/gvlc/sample/multi.rb
@@ -0,0 +1,41 @@
+#!/usr/bin/env ruby
+# coding: utf-8
+
+if ARGV.empty?
+  puts "Usage: #{$0} <media file> ..."
+  exit(false)
+end
+
+unless %w(gtk3 gtk2).find{|l| begin; require l; rescue LoadError; false; end}
+  puts "This sample requires gtk3 or gtk2."
+  exit(false)
+end
+require 'gvlc'
+
+def add_player(box, file)
+  player = VLC::MediaPlayer.new(path: file)
+  view = Gtk::DrawingArea.new
+  box.pack_start(view)
+
+  view.signal_connect(:realize) do |widget|
+    player.xwindow = widget.window.xid
+  end
+  player.attach_event(:mediaplayer_playing) do |player, event|
+    size = player.get_size(0)
+    view.set_size_request(*size) if size
+  end
+
+  player
+end
+
+window = Gtk::Window.new
+box = Gtk::HBox.new
+window.add(box)
+players = ARGV.map{|f| add_player(box, f)}
+
+window.signal_connect(:destroy){Gtk.main_quit}
+
+window.show_all
+players.each(&:play)
+Gtk.main
+
diff --git a/gvlc/sample/playlist.glade b/gvlc/sample/playlist.glade
new file mode 100644
index 0000000..57e1ff6
--- /dev/null
+++ b/gvlc/sample/playlist.glade
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkAction" id="act_stop">
+    <property name="tooltip" translatable="yes">stop</property>
+    <property name="icon_name">media-playback-stop</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_seek_forward">
+    <property name="tooltip" translatable="yes">seek forward</property>
+    <property name="icon_name">media-seek-forward</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_seek_backward">
+    <property name="tooltip" translatable="yes">seek backward</property>
+    <property name="icon_name">media-seek-backward</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_previous">
+    <property name="tooltip" translatable="yes">skip backward</property>
+    <property name="icon_name">media-skip-backward</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_playlist">
+    <property name="tooltip" translatable="yes">playlist</property>
+    <property name="icon_name">applications-multimedia</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_play">
+    <property name="tooltip" translatable="yes">play</property>
+    <property name="icon_name">media-playback-start</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_pause">
+    <property name="tooltip" translatable="yes">pause</property>
+    <property name="icon_name">media-playback-pause</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_next">
+    <property name="tooltip" translatable="yes">skip forward</property>
+    <property name="icon_name">media-skip-forward</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAction" id="act_fullscreen">
+    <property name="tooltip" translatable="yes">fullscreen</property>
+    <property name="icon_name">view-fullscreen</property>
+    <signal name="activate" handler="on_action_activate" swapped="no"/>
+  </object>
+  <object class="GtkAdjustment" id="adj_position">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="win_main">
+    <property name="can_focus">False</property>
+    <signal name="destroy" handler="on_win_main_destroy" swapped="no"/>
+    <signal name="scroll-event" handler="on_win_main_scroll_event" swapped="no"/>
+    <child>
+      <object class="GtkVBox" id="box_main">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkDrawingArea" id="draw_video">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="events">GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
+            <signal name="button-press-event" handler="on_draw_video_button_press_event" swapped="no"/>
+            <signal name="realize" handler="on_draw_video_realize" swapped="no"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="box_control">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkHScale" id="scale_position">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="adjustment">adj_position</property>
+                <property name="round_digits">1</property>
+                <property name="value_pos">right</property>
+                <signal name="button-press-event" handler="on_scale_position_button_press_event" swapped="no"/>
+                <signal name="format-value" handler="on_scale_position_format_value" swapped="no"/>
+                <signal name="adjust-bounds" handler="on_scale_position_adjust_bounds" swapped="no"/>
+                <signal name="button-release-event" handler="on_scale_position_button_release_event" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolbar" id="toolbar_control">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon_size">1</property>
+                <property name="icon_size_set">True</property>
+                <child>
+                  <object class="GtkToolButton" id="btn_play">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_play</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-playback-start</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_pause">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_pause</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-playback-pause</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_stop">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_stop</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-playback-stop</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_seek_backward">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_seek_backward</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-seek-backward</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_seek_forward">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_seek_forward</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-seek-forward</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_previous">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_previous</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-skip-backward</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_next">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_next</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">media-skip-forward</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSeparatorToolItem" id="sep">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_playlist">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_playlist</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="btn_fullscreen">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="related_action">act_fullscreen</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">view-fullscreen</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="win_playlist">
+    <property name="can_focus">False</property>
+    <property name="default_width">300</property>
+    <property name="default_height">600</property>
+    <signal name="delete-event" handler="on_win_playlist_delete_event" swapped="no"/>
+    <child>
+      <object class="GtkScrolledWindow" id="scroll_playlist">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="hscrollbar_policy">automatic</property>
+        <property name="vscrollbar_policy">automatic</property>
+        <child>
+          <object class="GtkTreeView" id="tree_playlist">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <signal name="row-activated" handler="on_tree_playlist_row_activated" swapped="no"/>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gvlc/sample/playlist.rb b/gvlc/sample/playlist.rb
new file mode 100644
index 0000000..cee39d0
--- /dev/null
+++ b/gvlc/sample/playlist.rb
@@ -0,0 +1,180 @@
+#!/usr/bin/env ruby
+# coding: utf-8
+
+if ARGV.empty?
+  puts "Usage: #{$0} <m3u file>|<media file> ..."
+  exit(false)
+elsif (file = ARGV.first).end_with?('.m3u')
+  base = File.dirname(file)
+  file_list = File.read(file).split("\n").map{|f| File.expand_path(f, base)}
+else
+  file_list = ARGV.map{|f| File.expand_path(f)}
+end
+
+unless %w(gtk3 gtk2).find{|l| begin; require l; rescue LoadError; false; end}
+  puts "This sample requires gtk3 or gtk2."
+  exit(false)
+end
+if Gtk.check_version?(3, 0, 0)
+  def set_background(widget)
+    widget.override_background_color(:normal, Gdk::RGBA.new(0, 0, 0, 0))
+  end
+elsif Gtk.check_version?(2, 16, 0)
+  def set_background(widget)
+    widget.modify_bg(:normal, Gdk::Color.new(0, 0, 0))
+  end
+else
+  puts "This sample requires GTK+ 2.16.0 or later."
+  exit(false)
+end
+require 'gvlc'
+
+class Playlist
+  COL_MEDIA     = 0
+  COL_FILENAME  = 1
+
+  def initialize(file_list)
+    @builder = Gtk::Builder.new.add(__FILE__.sub(/\.rb$/, '.glade'))
+    @builder.connect_signals{|name| method(name)}
+    @window, @adjustment, @playlist, @listview = %w(win_main adj_position win_playlist tree_playlist).map{|n| @builder[n]}
+
+    @listview.model = Gtk::ListStore.new(VLC::Media, String)
+    column = Gtk::TreeViewColumn.new('file', Gtk::CellRendererText.new, text: COL_FILENAME)
+    @listview.append_column(column)
+
+    @listplayer = VLC::MediaListPlayer.new
+    @player = @listplayer.media_player
+    @list = @listplayer.media_list
+    @player.attach_event(:mediaplayer_playing){|*a| on_mediaplayer_playing(*a)}
+    @player.attach_event(:mediaplayer_timechanged){|*a| on_mediaplayer_timechanged(*a)}
+    @list.lock do |list|
+      file_list.each{|f| add_media(f)}
+    end
+  end
+
+  def run
+    @window.show_all
+    @playlist.show_all
+    @listplayer.play
+    Gtk.main
+  end
+
+  def add_media(file)
+    iter = @listview.model.append
+    iter[COL_MEDIA]     = @list.add_media(path: file)
+    iter[COL_FILENAME]  = File.basename(file)
+  end
+
+  def toggle_fullscreen
+    if @window.window.state.fullscreen?
+      @builder['box_control'].show_all
+      @window.unfullscreen
+    else
+      @builder['box_control'].hide
+      @window.fullscreen
+    end
+  end
+
+  def time_str(time)
+    return '' unless time
+
+    time = (time / 1000).to_i
+    time, sec = time.divmod(60)
+    hour, min = time.divmod(60)
+    '%d:%02d:%02d' % [hour, min, sec]
+  end
+
+  def on_mediaplayer_playing(player, event)
+    @duration = nil
+    size = player.get_size(0)
+    @builder['draw_video'].set_size_request(*size) if size
+
+    mrl = player.media.mrl
+    iter = @listview.model.each{|m, p, i| break i if i[COL_MEDIA].mrl == mrl}
+    @listview.selection.select_iter(iter)
+    @window.title = iter[COL_FILENAME]
+  end
+
+  def on_mediaplayer_timechanged(player, event)
+    return if @position_change
+
+    @duration ||= player.media.duration
+    @adjustment.upper = @duration
+    @adjustment.page_increment = @duration / 10
+    @adjustment.step_increment = @duration / 100
+    @adjustment.value = player.time
+  end
+
+  def on_draw_video_realize(widget)
+    @player.xwindow = widget.window.xid
+    set_background(widget)
+  end
+
+  def on_scale_position_adjust_bounds(widget, value)
+    @position_pending = value
+  end
+
+  def on_scale_position_button_press_event(widget, event)
+    @position_change = true
+    false
+  end
+
+  def on_scale_position_button_release_event(widget, event)
+    @position_change = false
+    @player.time, @position_pending = @position_pending, nil if @position_pending
+    false
+  end
+
+  def on_win_main_scroll_event(widget, event)
+    case event.direction
+    when Gdk::EventScroll::Direction::UP
+      @player.time += @adjustment.step_increment
+    when Gdk::EventScroll::Direction::DOWN
+      @player.time -= @adjustment.step_increment
+    end
+  end
+
+  def on_scale_position_format_value(widget, value)
+    "#{time_str(value)}/#{time_str(@duration)}"
+  end
+
+  def on_draw_video_button_press_event(widget, event)
+    case event.event_type
+    when Gdk::Event::Type::BUTTON_PRESS
+      @listplayer.pause
+    when Gdk::Event::Type::BUTTON2_PRESS
+      toggle_fullscreen
+    end
+  end
+
+  def on_action_activate(action)
+    case action = action.name[/^act_(.*)/, 1].to_sym
+    when :play, :pause, :stop, :previous, :next
+      @listplayer.send(action)
+    when :seek_backward
+      @player.time -= @adjustment.page_increment
+    when :seek_forward
+      @player.time += @adjustment.page_increment
+    when :playlist
+      @playlist.show_all
+    when :fullscreen
+      toggle_fullscreen
+    end
+  end
+
+  def on_tree_playlist_row_activated(widget, path, column)
+    @listplayer.play(widget.model.get_iter(path)[COL_MEDIA])
+  end
+
+  def on_win_playlist_delete_event(widget, event)
+    @playlist.hide
+    true
+  end
+
+  def on_win_main_destroy(widget)
+    Gtk.main_quit
+  end
+end
+
+Playlist.new(file_list).run
+
diff --git a/gvlc/sample/simple.rb b/gvlc/sample/simple.rb
new file mode 100644
index 0000000..7634b9f
--- /dev/null
+++ b/gvlc/sample/simple.rb
@@ -0,0 +1,33 @@
+#!/usr/bin/env ruby
+# coding: utf-8
+
+unless file = ARGV.shift
+  puts "Usage: #{$0} <media file>"
+  exit(false)
+end
+
+unless %w(gtk3 gtk2).find{|l| begin; require l; rescue LoadError; false; end}
+  puts "This sample requires gtk3 or gtk2."
+  exit(false)
+end
+require 'gvlc'
+
+player = VLC::MediaPlayer.new(path: file)
+
+window = Gtk::Window.new
+view = Gtk::DrawingArea.new
+window.add(view)
+
+window.signal_connect(:destroy){Gtk.main_quit}
+view.signal_connect(:realize) do |widget|
+  player.xwindow = widget.window.xid
+end
+player.attach_event(:mediaplayer_playing) do |player, event|
+  size = player.get_size(0)
+  view.set_size_request(*size) if size
+end
+
+window.show_all
+player.play
+Gtk.main
+
diff --git a/pango/Rakefile b/pango/Rakefile
index d7b05a1..8b8def2 100644
--- a/pango/Rakefile
+++ b/pango/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./../glib2/lib")
 require "gnome2/rake/package-task"
@@ -13,10 +29,10 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
   package.external_packages = [
     {
       :name => "icu",
-      :download_base_url => "http://download.icu-project.org/files/icu4c/54.1",
+      :download_base_url => "http://download.icu-project.org/files/icu4c/55.1",
       :label => "gobject-introspection",
       :base_name => "icu",
-      :archive_base_name => "icu4c-54_1-src.tgz",
+      :archive_base_name => "icu4c-55_1-src.tgz",
       :compression_method => "gz",
       :base_dir_in_package => "source",
       :windows => {
@@ -34,7 +50,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "harfbuzz",
       :download_base_url => "http://www.freedesktop.org/software/harfbuzz/release",
       :label => "HarfBuzz",
-      :version => "0.9.35",
+      :version => "1.0.3",
       :compression_method => "bz2",
       :windows => {
         :configure_args => [
diff --git a/pango/ext/pango/depend b/pango/ext/pango/depend
index b818ee2..fddd650 100644
--- a/pango/ext/pango/depend
+++ b/pango/ext/pango/depend
@@ -2,7 +2,6 @@ install-so: install-headers
 install-headers:
 	$(INSTALL_DATA) $(srcdir)/rbpango.h $(RUBYARCHDIR)
 	$(INSTALL_DATA) $(srcdir)/rbpangoconversions.h $(RUBYARCHDIR)
-	$(INSTALL_DATA) rbpangoversion.h $(RUBYARCHDIR)
 
 install: install-pc
 install-pc:
diff --git a/pango/ext/pango/extconf.rb b/pango/ext/pango/extconf.rb
index 44e4bd1..ea7cd89 100644
--- a/pango/ext/pango/extconf.rb
+++ b/pango/ext/pango/extconf.rb
@@ -75,8 +75,6 @@ have_func("pango_attr_iterator_get_attrs", pango_header)
 have_func("pango_itemize_with_base_dir", pango_header)
 have_func("pango_font_family_is_monospace", pango_header)
 
-make_version_header("PANGO", "pango", ".")
-
 create_pkg_config_file("Ruby/Pango", package_id)
 $defs << " -DRUBY_PANGO_COMPILATION"
 create_makefile(module_name)
diff --git a/pango/ext/pango/rbpango.c b/pango/ext/pango/rbpango.c
index d6ff07a..1c408ab 100644
--- a/pango/ext/pango/rbpango.c
+++ b/pango/ext/pango/rbpango.c
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
+ *  Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2002-2005 Masao Mutoh
  *
  *  This library is free software; you can redistribute it and/or
@@ -31,6 +31,40 @@ extern void Init_pango(void);
  * Rendering
  */
 
+static VALUE
+rg_s_version(G_GNUC_UNUSED VALUE self)
+{
+    return INT2NUM(pango_version());
+}
+
+static VALUE
+rg_s_version_string(G_GNUC_UNUSED VALUE self)
+{
+    return CSTR2RVAL(pango_version_string());
+}
+
+static VALUE
+rg_s_check_version(G_GNUC_UNUSED VALUE self,
+                   VALUE major, VALUE minor, VALUE micro)
+{
+    const gchar *error_message;
+    error_message = pango_version_check(NUM2INT(major),
+                                        NUM2INT(minor),
+                                        NUM2INT(micro));
+    return CSTR2RVAL(error_message);
+}
+
+static VALUE
+rg_s_check_version_p(G_GNUC_UNUSED VALUE self,
+                     VALUE major, VALUE minor, VALUE micro)
+{
+    const gchar *error_message;
+    error_message = pango_version_check(NUM2INT(major),
+                                        NUM2INT(minor),
+                                        NUM2INT(micro));
+    return CBOOL2RVAL(!error_message);
+}
+
 struct rpango_reorder_items_args {
     PangoItem *item;
     VALUE ary;
@@ -261,12 +295,16 @@ Init_pango(void)
 {
     RG_TARGET_NAMESPACE = rb_define_module("Pango");
 
-    rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION", 
-                    rb_ary_new3(3, 
-                                INT2FIX(PANGO_MAJOR_VERSION), 
-                                INT2FIX(PANGO_MINOR_VERSION), 
-                                INT2FIX(PANGO_MICRO_VERSION)));
+    rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
+                    rb_ary_new3(3,
+                                INT2FIX(PANGO_VERSION_MAJOR),
+                                INT2FIX(PANGO_VERSION_MINOR),
+                                INT2FIX(PANGO_VERSION_MICRO)));
 
+    RG_DEF_SMETHOD(version, 0);
+    RG_DEF_SMETHOD(version_string, 0);
+    RG_DEF_SMETHOD(check_version, 3);
+    RG_DEF_SMETHOD_P(check_version, 3);
     RG_DEF_SMETHOD(reorder_items, 1);
     RG_DEF_SMETHOD(unichar_direction, 1);
     RG_DEF_SMETHOD(find_base_dir, 1);
diff --git a/pango/ext/pango/rbpango.h b/pango/ext/pango/rbpango.h
index 94df311..0414a0e 100644
--- a/pango/ext/pango/rbpango.h
+++ b/pango/ext/pango/rbpango.h
@@ -29,7 +29,6 @@
 #endif
 
 #include "rbgobject.h"
-#include "rbpangoversion.h"
 #include "rbpangoconversions.h"
 #include <pango/pangocairo.h>
 
diff --git a/pango/ext/pango/rbpangoattribute.c b/pango/ext/pango/rbpangoattribute.c
index dd7f34a..b9a9436 100644
--- a/pango/ext/pango/rbpangoattribute.c
+++ b/pango/ext/pango/rbpangoattribute.c
@@ -282,7 +282,7 @@ attr_AttrAbsoluteSize_initialize(VALUE self, VALUE size)
     return Qnil;
 }
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 static VALUE
 attr_AttrGravity_initialize(VALUE self, VALUE gravity)
 {
@@ -438,7 +438,7 @@ Init_pango_attribute(VALUE mPango)
     MAKE_ATTR(PANGO_ATTR_STRETCH, AttrStretch, pattrint, 1);
     MAKE_ATTR(PANGO_ATTR_SIZE, AttrSize, pattrint, 1);
     MAKE_ATTR(PANGO_ATTR_ABSOLUTE_SIZE, AttrAbsoluteSize, pattrint, 1);
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     MAKE_ATTR(PANGO_ATTR_GRAVITY, AttrGravity, pattrint, 1);
     MAKE_ATTR(PANGO_ATTR_GRAVITY_HINT, AttrGravityHint, pattrint, 1);
 #endif
diff --git a/pango/ext/pango/rbpangocairo.c b/pango/ext/pango/rbpangocairo.c
index 09a1f89..32acfd0 100644
--- a/pango/ext/pango/rbpangocairo.c
+++ b/pango/ext/pango/rbpangocairo.c
@@ -34,7 +34,7 @@ rg_s_create(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass)
     if (NIL_P(rb_font_type)) {
         font_map = pango_cairo_font_map_new();
     } else {
-#if PANGO_CHECK_VERSION(1, 18, 0)
+#if PANGO_VERSION_CHECK(1, 18, 0)
         cairo_font_type_t font_type = CAIRO_FONT_TYPE_USER;
         if (rbgutil_key_equal(rb_font_type, "ft") ||
             rbgutil_key_equal(rb_font_type, "freetype")) {
@@ -66,7 +66,7 @@ rg_s_default(G_GNUC_UNUSED VALUE klass)
     return GOBJ2RVAL(pango_cairo_font_map_get_default());
 }
 
-#if PANGO_CHECK_VERSION(1, 22, 0)
+#if PANGO_VERSION_CHECK(1, 22, 0)
 static VALUE
 rg_s_set_default(VALUE klass, VALUE font_map)
 {
@@ -93,7 +93,7 @@ rg_create_context(VALUE self)
 {
     PangoContext *pango_context;
 
-#if PANGO_CHECK_VERSION(1, 22, 0)
+#if PANGO_VERSION_CHECK(1, 22, 0)
     pango_context = pango_font_map_create_context(PANGO_FONT_MAP(_SELF(self)));
 #else
     pango_context = pango_cairo_font_map_create_context(_SELF(self));
@@ -112,7 +112,7 @@ Init_pango_cairo(VALUE mPango)
 
     RG_DEF_SMETHOD(create, -1);
     RG_DEF_SMETHOD(default, 0);
-#if PANGO_CHECK_VERSION(1, 22, 0)
+#if PANGO_VERSION_CHECK(1, 22, 0)
     RG_DEF_SMETHOD(set_default, 1);
 #endif
 
diff --git a/pango/ext/pango/rbpangocontext.c b/pango/ext/pango/rbpangocontext.c
index 62da22a..d935295 100644
--- a/pango/ext/pango/rbpangocontext.c
+++ b/pango/ext/pango/rbpangocontext.c
@@ -129,7 +129,7 @@ rg_set_base_dir(VALUE self, VALUE direction)
     return self;
 }
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 static VALUE
 rg_base_gravity(VALUE self)
 {
@@ -280,7 +280,7 @@ Init_pango_context(VALUE mPango)
     RG_DEF_METHOD(set_language, 1);
     RG_DEF_METHOD(base_dir, 0);
     RG_DEF_METHOD(set_base_dir, 1);
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     RG_DEF_METHOD(base_gravity, 0);
     RG_DEF_METHOD(set_base_gravity, 1);
     RG_DEF_METHOD(gravity_hint, 0);
diff --git a/pango/ext/pango/rbpangofontdescription.c b/pango/ext/pango/rbpangofontdescription.c
index 0304d66..6743c20 100644
--- a/pango/ext/pango/rbpangofontdescription.c
+++ b/pango/ext/pango/rbpangofontdescription.c
@@ -163,7 +163,7 @@ rg_size_is_absolute_p(VALUE self)
     return CBOOL2RVAL(pango_font_description_get_size_is_absolute(_SELF(self)));
 }
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 static VALUE
 rg_gravity(VALUE self)
 {
@@ -248,7 +248,7 @@ Init_pango_font_description(VALUE mPango)
     RG_DEF_METHOD(size, 0);
     RG_DEF_METHOD(set_absolute_size, 1);
     RG_DEF_METHOD_P(size_is_absolute, 0);
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     RG_DEF_METHOD(set_gravity, 1);
     RG_DEF_METHOD(gravity, 0);
 #endif
diff --git a/pango/ext/pango/rbpangogravity.c b/pango/ext/pango/rbpangogravity.c
index 44b64be..9bf7dc2 100644
--- a/pango/ext/pango/rbpangogravity.c
+++ b/pango/ext/pango/rbpangogravity.c
@@ -20,7 +20,7 @@
 
 #include "rbpangoprivate.h"
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 
 #define RG_TARGET_NAMESPACE mGravity
 
@@ -40,7 +40,7 @@ rg_s_vertical_p(G_GNUC_UNUSED VALUE self, VALUE gravity)
 void
 Init_pango_gravity(VALUE mPango)
 {
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mPango, "Gravity");
 
     RG_DEF_SMETHOD(to_rotation, 1);
diff --git a/pango/ext/pango/rbpangolanguage.c b/pango/ext/pango/rbpangolanguage.c
index 66c2418..9259b6c 100644
--- a/pango/ext/pango/rbpangolanguage.c
+++ b/pango/ext/pango/rbpangolanguage.c
@@ -69,6 +69,12 @@ rg_includes_script(VALUE self, VALUE script)
                                                      RVAL2PANGOSCRIPT(script)));
 }
 
+static VALUE
+rg_sample_string(VALUE self)
+{
+    return CSTR2RVAL(pango_language_get_sample_string(_SELF(self)));
+}
+
 void
 Init_pango_language(VALUE mPango)
 {
@@ -83,4 +89,6 @@ Init_pango_language(VALUE mPango)
     RG_DEF_ALIAS("to_s", "to_str");
 
     RG_DEF_METHOD(includes_script, 1);
+
+    RG_DEF_METHOD(sample_string, 0);
 }
diff --git a/pango/ext/pango/rbpangolayout.c b/pango/ext/pango/rbpangolayout.c
index 29aa812..10455ad 100644
--- a/pango/ext/pango/rbpangolayout.c
+++ b/pango/ext/pango/rbpangolayout.c
@@ -154,7 +154,7 @@ rg_width(VALUE self)
     return INT2NUM(pango_layout_get_width(_SELF(self)));
 }
 
-#if PANGO_CHECK_VERSION(1, 20, 0)
+#if PANGO_VERSION_CHECK(1, 20, 0)
 static VALUE
 rg_set_height(VALUE self, VALUE width)
 {
@@ -195,7 +195,7 @@ rg_ellipsize(VALUE self)
     return PANGOELLIPSIZEMODE2RVAL(pango_layout_get_ellipsize(_SELF(self)));
 }
 
-#if PANGO_CHECK_VERSION(1, 16, 0)
+#if PANGO_VERSION_CHECK(1, 16, 0)
 static VALUE
 rg_ellipsized_p(VALUE self)
 {
@@ -498,6 +498,14 @@ rg_iter(VALUE self)
     return PANGOLAYOUTITER2RVAL(pango_layout_get_iter(_SELF(self)));
 }
 
+#if PANGO_VERSION_CHECK(1, 22, 0)
+static VALUE
+rg_baseline(VALUE self)
+{
+    return INT2NUM(pango_layout_get_baseline(_SELF(self)));
+}
+#endif
+
 void
 Init_pango_layout(VALUE mPango)
 {
@@ -517,7 +525,7 @@ Init_pango_layout(VALUE mPango)
     RG_DEF_METHOD(font_description, 0);
     RG_DEF_METHOD(set_width, 1);
     RG_DEF_METHOD(width, 0);
-#if PANGO_CHECK_VERSION(1, 20, 0)
+#if PANGO_VERSION_CHECK(1, 20, 0)
     RG_DEF_METHOD(set_height, 1);
     RG_DEF_METHOD(height, 0);
 #endif
@@ -525,7 +533,7 @@ Init_pango_layout(VALUE mPango)
     RG_DEF_METHOD(wrap, 0);
     RG_DEF_METHOD(set_ellipsize, 1);
     RG_DEF_METHOD(ellipsize, 0);
-#if PANGO_CHECK_VERSION(1, 16, 0)
+#if PANGO_VERSION_CHECK(1, 16, 0)
     RG_DEF_METHOD_P(ellipsized, 0);
 #endif
     RG_DEF_METHOD(set_indent, 1);
@@ -557,6 +565,9 @@ Init_pango_layout(VALUE mPango)
     RG_DEF_METHOD(get_line, 1);
     RG_DEF_METHOD(lines, 0);
     RG_DEF_METHOD(iter, 0);
+#if PANGO_VERSION_CHECK(1, 22, 0)
+    RG_DEF_METHOD(baseline, 0);
+#endif
 
     /* PangoWrapMode */
     G_DEF_CLASS(PANGO_TYPE_WRAP_MODE, "WrapMode", RG_TARGET_NAMESPACE);
diff --git a/pango/ext/pango/rbpangomatrix.c b/pango/ext/pango/rbpangomatrix.c
index 13f2167..22e94bf 100644
--- a/pango/ext/pango/rbpangomatrix.c
+++ b/pango/ext/pango/rbpangomatrix.c
@@ -82,7 +82,7 @@ rg_rotate_bang(VALUE self, VALUE degrees)
     return self;
 }
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 static VALUE
 rg_gravity(VALUE self)
 {
@@ -129,7 +129,7 @@ Init_pango_matrix(VALUE mPango)
     RG_DEF_METHOD_BANG(rotate, 1);
     RG_DEF_METHOD_BANG(concat, 1);
     RG_DEF_METHOD(font_scale_factor, 0);
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     RG_DEF_METHOD(gravity, 0);
 #endif
     RG_DEF_METHOD(to_a, 0);
diff --git a/pango/ext/pango/rbpangoscript.c b/pango/ext/pango/rbpangoscript.c
index 9c1aaa4..4e904ad 100644
--- a/pango/ext/pango/rbpangoscript.c
+++ b/pango/ext/pango/rbpangoscript.c
@@ -37,7 +37,7 @@ rg_sample_language(VALUE self)
     return PANGOLANGUAGE2RVAL(lang);
 }
 
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
 static VALUE
 rg_get_gravity(int argc, VALUE *argv, VALUE self)
 {
@@ -52,7 +52,7 @@ rg_get_gravity(int argc, VALUE *argv, VALUE self)
                                          RVAL2PANGOGRAVITY(gravity),
                                          RVAL2PANGOGRAVITYHINT(gravity_hint));
     } else {
-#  if PANGO_CHECK_VERSION(1,26,0)
+#  if PANGO_VERSION_CHECK(1,26,0)
         g = pango_gravity_get_for_script_and_width(_SELF(self),
                                                    RVAL2CBOOL(wide),
                                                    RVAL2PANGOGRAVITY(gravity),
@@ -78,7 +78,7 @@ Init_pango_script(VALUE mPango)
 
     RG_DEF_SMETHOD(for_unichar, 1);
     RG_DEF_METHOD(sample_language, 0);
-#if PANGO_CHECK_VERSION(1,16,0)
+#if PANGO_VERSION_CHECK(1,16,0)
     RG_DEF_METHOD(get_gravity, -1);
 #endif
 }
diff --git a/pango/test/test-language.rb b/pango/test/test-language.rb
index 61f7ba2..a0324b2 100644
--- a/pango/test/test-language.rb
+++ b/pango/test/test-language.rb
@@ -4,4 +4,9 @@ class TestLanguage < Test::Unit::TestCase
   def test_default
     assert_match(/\A[a-z]{2}-[a-z]{2}\z/, Pango::Language.default.to_s)
   end
+
+  def test_sample_string
+    assert_equal("The quick brown fox jumps over the lazy dog.",
+                 Pango::Language.new("en").sample_string)
+  end
 end
diff --git a/pango/test/test-layout.rb b/pango/test/test-layout.rb
index 4552fee..c496396 100644
--- a/pango/test/test-layout.rb
+++ b/pango/test/test-layout.rb
@@ -2,7 +2,8 @@ class TestLayout < Test::Unit::TestCase
   include PangoTestUtils
 
   def setup
-    @context = Pango::Context.new
+    @font_map = Pango::CairoFontMap.default
+    @context = @font_map.create_context
     @layout = Pango::Layout.new(@context)
   end
 
@@ -31,4 +32,9 @@ class TestLayout < Test::Unit::TestCase
   def test_ellipsized?
     assert_false(@layout.ellipsized?)
   end
+
+  def test_baseline
+    only_pango_version(1, 22, 0)
+    assert_kind_of(Integer, @layout.baseline)
+  end
 end
diff --git a/poppler/Rakefile b/poppler/Rakefile
index 8330487..8cf1285 100644
--- a/poppler/Rakefile
+++ b/poppler/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2010-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2010-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -47,9 +47,9 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
     },
     {
       :name => "sqlite-autoconf",
-      :download_base_url => "http://www.sqlite.org/2014",
+      :download_base_url => "http://www.sqlite.org/2015",
       :label => "SQLite",
-      :version => "3080600",
+      :version => "3081101",
       :compression_method => "gz",
       :windows => {
         :configure_args => [],
@@ -57,13 +57,27 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       },
     },
     {
+      :name => "openjpeg",
+      :base_name => "openjpeg-version.2.1",
+      :archive_base_name => "version.2.1.tar.gz",
+      :download_base_url => "https://github.com/uclouvain/openjpeg/archive",
+      :label => "OpenJPEG",
+      :windows => {
+        :cmake_args => [
+          "-DBUILD_PKGCONFIG_FILES=on",
+        ],
+        :built_file => "bin/libopenjp2.dll",
+      },
+    },
+    {
       :name => "poppler",
       :download_base_url => "http://poppler.freedesktop.org",
       :label => "Poppler",
-      :version => "0.29.0",
+      :version => "0.36.0",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
+          "--enable-zlib",
           "--enable-introspection",
         ],
         :built_file => "bin/libpoppler-glib-8.dll",
diff --git a/release.rd b/release.rd
new file mode 100644
index 0000000..6583c38
--- /dev/null
+++ b/release.rd
@@ -0,0 +1,303 @@
+= Release
+
+This document describes how to release Ruby-GNOME2.
+
+== Packages
+
+Here are packages to be released:
+
+  * tar.gz: For distribution packagers such as pkgsrc.
+  * gem: For normal users.
+  * gem for Windows: For Windows users.
+
+== How to create and confirm packages
+
+=== tar.gz
+
+The following command generates ruby-gtk2-X.Y.Z.tar.gz and
+ruby-gnome2-all-X.Y.Z.tar.gz:
+
+  % rake dist
+
+Here are confirmation steps:
+
+  % cp *.tar.gz /tmp
+  % cd /tmp
+  % tar xvf ruby-gtk2-X.Y.Z.tar.gz
+  % cd ruby-gtk2-X.Y.Z
+  % ruby extconf.rb
+  % make
+  % make install DESTDIR=/tmp/ruby
+  % cd gtk2/sample/gtk-demo
+  % ruby -I/tmp/ruby/usr/local/lib/site_ruby/1.8/{,x86_64-linux} main.rb
+  (...try demo application...)
+  % cd /tmp
+  % rm -rf ruby
+  % tar xvf ruby-gnome2-all-X.Y.Z.tar.gz
+  % cd ruby-gnome2-all-X.Y.Z
+  % ruby extconf.rb
+  % make
+  % make install DESTDIR=/tmp/ruby
+  % cd gtk2/sample/gtk-demo
+  % ruby -I/tmp/ruby/usr/local/lib/site_ruby/1.8/{,x86_64-linux} main.rb
+  (...try demo application...)
+
+=== gem
+
+The following command generates gem files to */pkg/:
+
+  % rake gem:build
+
+The following command install all generated gems to user
+locally:
+
+  % rake gem:install
+
+Here are confirmation steps:
+
+  % cd gtk2/sample/gtk-demo
+  % ruby -rubygems main.rb
+  (...try demo application...)
+  % cd -
+
+The following command uninstall all gems installed by 'rake
+gem:install':
+
+  % rake gem:uninstall
+
+=== gem for Windows
+
+NOTE: This steps are confirmed on Debian GNU/Linux
+sid. (2011-09-18)
+
+Ruby-GNOME2 gems bundled Windows binary are created by
+cross-compiling. It means that you require GNU/Linux not
+Windows for releasing.
+
+The following steps are needed only the first setup:
+
+  % sudo gem install rake-compiler
+  % sudo aptitude install -y mingw-w64
+  % rake-compiler cross-ruby VERSION=1.8.7-p352 EXTS=--without-extensions
+  % rake-compiler cross-ruby VERSION=1.9.2-p290 EXTS=--without-extensions
+
+The following command downloads GTK+ related binaries for
+Windows:
+
+  % rake gem:windows:download
+
+The following command rebuilds binary gems for Windows:
+
+  % rake gem:windows:clean gem:windows:build
+
+Here are confirmation steps:
+
+  (1) copy */pkg/*-X.Y.Z-x86-mingw32.gem to Windows.
+  (2) install copied gems on Windows.
+  (3) cd GEM_PATH/gtk2/sample/gtk-demo/.
+  (4) run 'ruby main.rb' and try the demo application.
+
+== How to release packages
+
+=== tar.gz
+
+The following command uploads ruby-gtk2-X.Y.Z.tar.gz and
+ruby-gnome2-all-X.Y.Z.tar.gz to SF.net:
+
+  % rake release SVN_USER=YOUR_SF_NET_USER_NAME
+
+=== gem
+
+The following command uploads */pkg/*-X.Y.Z.gem to rubygems.org:
+
+  % rake gem:push
+
+=== gem for Windows
+
+The following command uploads */pkg/*-X.Y.Z-x86-mingw32.gem to rubygems.org:
+
+  % rake gem:windows:push
+
+== After releasing packages
+
+=== Tags the current revision
+
+  % rake tag
+
+=== Increments the version
+
+  % editor glib2/ext/glib2/rbglib.h
+  (increments RBGLIB_*_VERSION.)
+
+=== Announces the current release
+
+  (1) post release announce to
+      http://ruby-gnome2.sourceforge.jp/hiki.cgi?create_news
+
+      Here is a template:
+        Your name: kou
+        Subject: Ruby-GNOME2 X.Y.Z released
+        Body:
+          SUMMARY OF THIS RELEASE.
+
+          == Install
+
+            % sudo gem install gtk2
+
+          == Downloads
+
+          : ((<ruby-gtk2-X.Y.Z.tar.gz|URL:http://downloads.sourceforge.net/ruby-gnome2/ruby-gtk2-X.Y.Z.tar.gz>))
+            The minimum package which includes Ruby/GLib2, Ruby/GIO2, Ruby/ATK, Ruby/GdkPixbuf2, Ruby/Pango, Ruby/GTK2.
+
+          : ((<ruby-gnome2-all-X.Y.Z.tar.gz|URL:http://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-all-X.Y.Z.tar.gz>))
+             All of Ruby-GNOME2 libraries.
+
+          == Changes
+
+          COPIED CHANGES FROM NEWS.
+
+  (2) post release announce to ruby-gnome2-devel-en at lists.sourceforge.net
+
+      Here is a template:
+        Hi,
+
+        The Ruby-GNOME2 project released Ruby-GNOME2 X.Y.Z:
+          http://ruby-gnome2.sourceforge.jp/hiki.cgi?News_20110713_1
+          REPLACE THIS WITH POSTED URL AT (1).
+
+
+        SUMMARY OF THIS RELEASE.
+
+        === Install
+
+          % gem install gtk2
+
+        === Changes
+
+        COPIED CHANGES FROM NEWS.
+
+        YOUR SIGNATURE
+
+  (3) post release announce to ruby-talk at ruby-lang.org
+      (optional)
+
+      Here is a template:
+        Hi,
+
+        The Ruby-GNOME2 project released Ruby-GNOME2 X.Y.Z.
+
+        Web:
+          http://ruby-gnome2.sourceforge.jp/
+
+        Install:
+          gem install gtk2
+
+        = About Ruby-GNOME2
+
+        Ruby-GNOME2 is a set of Ruby language bindings for the GTK+
+        2.x and GNOME 2.x development environment.
+
+        = About GTK+
+
+        from http://www.gtk.org/
+
+          GTK+ is a highly usable, feature rich toolkit for creating
+          graphical user interfaces which boasts cross platform
+          compatibility and an easy to use API. GTK+ it is written
+          in C, but has bindings to many other popular programming
+          languages such as C++, Python and C# among others. GTK+ is
+          licensed under the GNU LGPL 2.1 allowing development of
+          both free and proprietary software with GTK+ without any
+          license fees or royalties.
+
+        = About GNOME
+
+        from http://www.gnome.org/about/
+
+          The GNOME project provides two things: The GNOME desktop
+          environment, an intuitive and attractive desktop for
+          users, and the GNOME development platform, an extensive
+          framework for building applications that integrate into
+          the rest of the desktop.
+
+        = About this release
+
+        SUMMARY OF THIS RELEASE.
+
+
+        YOUR SIGNATURE
+
+  (4) post release announce to ruby-gnome2-devel-ja at lists.sourceforge.net
+      (optional)
+
+      Here is a template:
+        「あなたの名前」
+
+        Ruby-GNOME2プロジェクトはRuby-GNOME2 X.Y.Zをリリースしまし
+        た。
+
+        「このリリースの要約」
+
+        === インストール方法
+
+          % gem install gtk2
+
+        === このリリースの概要
+
+        「NEWSからコピーして翻訳する」
+
+  (5) post release announce to ruby-list at ruby-lang.org
+      (optional)
+
+      Here is a template:
+        「あなたの名前」
+
+        Ruby-GNOME2プロジェクトはRuby-GNOME2 1.0.0をリリースしました。
+
+        Web:
+          http://ruby-gnome2.sourceforge.jp/
+
+        インストール:
+          gem install gtk2
+
+        = Ruby-GNOME2について
+
+        Ruby-GNOME2はGNOME 2.xで使用されるGTK+ 2.xなどの主要なライブ
+        ラリのRubyバインディング集です。
+
+        GTK+はマルチプラットフォーム対応のGUIツールキットなので、マ
+        ルチプラットフォーム対応のGUIアプリケーションをRubyで書くこ
+        とができます。
+
+        サポートしているライブラリは以下の通りです。
+
+        * Ruby/GLib2         - 基本的かつ便利なユーティリティクラス群。および、
+                               GLib::Objectをはじめとする基本クラスを提供。他のライブラリ
+                               から参照される
+        * Ruby/ATK           - アクセシビリティ
+        * Ruby/Pango         - 国際化されたテキスト・フォント処理
+        * Ruby/GdkPixbuf2    - イメージ(画像)処理
+        * Ruby/GTK2          - GUIコンポーネント
+        * Ruby/GStreamer     - 動画・音声処理
+        * Ruby/GooCanvas     - cairoで描画するキャンバスウィジェット
+        * Ruby/GtkSourceView2- テキストエディタ向けの高度なテキスト表示コンポーネント
+                               (言語毎にキーワードを強調する等)
+                               (gtksourceview 2.x用)
+        * Ruby/Poppler       - PDFレンダリング用のライブラリ
+        * Ruby/RSVG          - SVG処理
+        * Ruby/VTE           - ターミナルエミュレータ用のウィジェット
+
+        = このリリースについて
+
+        「このリリースの要約」
+
+        = 各種リソース
+
+        - メーリングリスト
+          http://sourceforge.net/mail/?group_id=53614
+
+        - Ruby-GNOME2 APIリファレンス
+          http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Ruby-GNOME2+API+Reference
+
+        - チュートリアル
+          http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?tutorials
diff --git a/rsvg2/Rakefile b/rsvg2/Rakefile
index bb0cc4f..9185c54 100644
--- a/rsvg2/Rakefile
+++ b/rsvg2/Rakefile
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 #
-# Copyright (C) 2010-2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2010-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -52,7 +52,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
       :name => "librsvg",
       :download_site => :gnome,
       :label => "librsvg",
-      :version => "2.40.6",
+      :version => "2.40.9",
       :compression_method => "xz",
       :windows => {
         :configure_args => [
diff --git a/rsvg2/ext/rsvg2/extconf.rb b/rsvg2/ext/rsvg2/extconf.rb
index 0e5b625..662d7cc 100644
--- a/rsvg2/ext/rsvg2/extconf.rb
+++ b/rsvg2/ext/rsvg2/extconf.rb
@@ -45,7 +45,7 @@ end
 
 setup_windows(module_name, base_dir)
 
-unless required_pkg_config_package(package_id,
+unless required_pkg_config_package([package_id, 2, 16, 1],
                                    :debian => "librsvg2-dev",
                                    :redhat => "librsvg2-devel",
                                    :homebrew => "librsvg",
diff --git a/rsvg2/ext/rsvg2/rbrsvg.c b/rsvg2/ext/rsvg2/rbrsvg.c
index 6300ffd..e2f9d6f 100644
--- a/rsvg2/ext/rsvg2/rbrsvg.c
+++ b/rsvg2/ext/rsvg2/rbrsvg.c
@@ -1,7 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
- *  Copyright (C) 2005-2006 Ruby-GNOME2 Project Team
+ *  Copyright (C) 2005-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2004  Kouhei Sutou <kou at cozmixng.org>
  *
  *  This library is free software; you can redistribute it and/or
@@ -155,22 +154,12 @@ rg_s_pixbuf_from_file_at_zoom_with_max(G_GNUC_UNUSED VALUE self,
     return rb_pixbuf;
 }
 
-static VALUE
-rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
-{
-#ifdef HAVE_LIBRSVG_RSVG_CAIRO_H
-    return Qtrue;
-#else
-    return Qfalse;
-#endif
-}
-
 void
 Init_rsvg2(void)
 {
     VALUE RG_TARGET_NAMESPACE = rb_define_module("RSVG");
 
-#if LIBRSVG_CHECK_VERSION(2, 9, 0)
+#if !LIBRSVG_CHECK_VERSION(2, 35, 0)
     rsvg_init();
     atexit(rsvg_term);
 #endif
@@ -199,8 +188,6 @@ Init_rsvg2(void)
     RG_DEF_SMETHOD(pixbuf_from_file_at_max_size, 3);
     RG_DEF_SMETHOD(pixbuf_from_file_at_zoom_with_max, 5);
 
-    RG_DEF_SMETHOD_P(cairo_available, 0);
-
     Init_rsvg_handle(RG_TARGET_NAMESPACE);
     Init_rsvg_dimensiondata(RG_TARGET_NAMESPACE);
 }
diff --git a/rsvg2/ext/rsvg2/rbrsvghandle.c b/rsvg2/ext/rsvg2/rbrsvghandle.c
index 14ba5ab..fadaa2d 100644
--- a/rsvg2/ext/rsvg2/rbrsvghandle.c
+++ b/rsvg2/ext/rsvg2/rbrsvghandle.c
@@ -1,7 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- *  Copyright (C) 2011  Ruby-GNOME2 Project Team
- *  Copyright (C) 2005-2006 Ruby-GNOME2 Project Team
+ *  Copyright (C) 2005-2015  Ruby-GNOME2 Project Team
  *  Copyright (C) 2004  Kouhei Sutou <kou at cozmixng.org>
  *
  *  This library is free software; you can redistribute it and/or
@@ -92,96 +91,73 @@ rb_rsvg_handle_alloc(VALUE klass)
 }
 #endif
 
-#if LIBRSVG_CHECK_VERSION(2, 14, 0)
 static VALUE
-rg_s_new_from_data(G_GNUC_UNUSED VALUE self, VALUE data)
+rg_initialize(int argc, VALUE *argv, VALUE self)
 {
-    GError *error = NULL;
     RsvgHandle *handle;
-
-    handle = rsvg_handle_new_from_data((const guint8 *)RVAL2CSTR(data),
-                                       RSTRING_LEN(data), &error);
-
-    if (error)
-        RAISE_GERROR(error);
-
-    return GOBJ2RVAL(handle);
-}
-
-static VALUE
-rg_s_new_from_file(int argc, VALUE *argv, VALUE self)
-{
-    VALUE rb_file_path, rb_options, rb_flags;
+    VALUE rb_options;
+    const char *file_name = NULL;
+    const guint8 *data = NULL;
+    gsize data_size = 0;
     GError *error = NULL;
-    RsvgHandle *handle;
+#if LIBRSVG_CHECK_VERSION(2, 40, 3)
+    RsvgHandleFlags flags = RSVG_HANDLE_FLAGS_NONE;
+#endif
 
-    rb_scan_args(argc, argv, "11", &rb_file_path, &rb_options);
-    rbg_scan_options(rb_options,
-                     "flags", &rb_flags,
-                     NULL);
+    rb_scan_args(argc, argv, "01", &rb_options);
 
-#if LIBRSVG_CHECK_VERSION(2, 40, 3)
-    {
-        GFile *file;
-        GCancellable *cancellable = NULL;
-        RsvgHandleFlags flags = RSVG_HANDLE_FLAGS_NONE;
+    if (!NIL_P(rb_options)) {
+        VALUE rb_file_name;
+        VALUE rb_data;
+        VALUE rb_flags;
 
+        rbg_scan_options(rb_options,
+                         "file_name", &rb_file_name,
+                         "data", &rb_data,
+                         "flags", &rb_flags,
+                         NULL);
+        if (!NIL_P(rb_file_name)) {
+            file_name = RVAL2CSTRFILENAME(rb_file_name);
+        }
+        if (!NIL_P(rb_data)) {
+            data = (const guint8 *)RSTRING_PTR(rb_data);
+            data_size = RSTRING_LEN(rb_data);
+        }
         if (!NIL_P(rb_flags)) {
+#if LIBRSVG_CHECK_VERSION(2, 40, 3)
             flags = RVAL2GFLAGS(rb_flags, RSVG_TYPE_HANDLE_FLAGS);
-        }
-
-        file = g_file_new_for_path((const char *)RVAL2CSTR(rb_file_path));
-        handle = rsvg_handle_new_from_gfile_sync(file, flags,
-                                                 cancellable,
-                                                 &error);
-        g_object_unref(file);
-    }
 #else
-    if (!NIL_P(rb_flags)) {
         rb_raise(rb_eArgError,
                  "librsvg 2.40.3 or later is required for :flags: <%d.%d.%d>",
                  LIBRSVG_MAJOR_VERSION,
                  LIBRSVG_MINOR_VERSION,
                  LIBRSVG_MICRO_VERSION);
-    }
-    handle = rsvg_handle_new_from_file((const gchar *)RVAL2CSTR(rb_file_path),
-                                       &error);
-#endif
-
-    if (error)
-        RAISE_GERROR(error);
-
-    return GOBJ2RVAL(handle);
-}
 #endif
+        }
+    }
 
-static VALUE
-rg_initialize(int argc, VALUE *argv, VALUE self)
-{
-    RsvgHandle *handle;
-    VALUE gz;
-    rb_scan_args(argc, argv, "01", &gz);
+    if (file_name) {
+#if LIBRSVG_CHECK_VERSION(2, 40, 3)
+        GFile *file;
+        GCancellable *cancellable = NULL;
 
-#if LIBRSVG_CHECK_VERSION(2, 11, 0)
-    handle = rsvg_handle_new();
+        file = g_file_new_for_path(file_name);
+        handle = rsvg_handle_new_from_gfile_sync(file, flags, cancellable,
+                                                 &error);
+        g_object_unref(file);
 #else
-    if (RVAL2CBOOL(gz)) {
-#  ifdef HAVE_LIBRSVG_RSVG_GZ_H
-        handle = rsvg_handle_new_gz();
-#  else
-        rb_warning("gz handling is not supported in your librsvg");
-        handle = rsvg_handle_new();
-#  endif
+        handle = rsvg_handle_new_from_file(file_name, &error);
+#endif
+    } else if (data) {
+        handle = rsvg_handle_new_from_data(data, data_size, &error);
     } else {
         handle = rsvg_handle_new();
     }
-#endif
 
-#ifdef RSVG_TYPE_HANDLE
+    if (error)
+        RAISE_GERROR(error);
+
     G_INITIALIZE(self, handle);
-#else
-    DATA_PTR(self) = handle;
-#endif
 
     rb_ivar_set(self, id_closed, Qfalse);
     return Qnil;
@@ -305,118 +281,6 @@ rg_metadata(VALUE self)
 #  endif
 #endif
 
-#if !LIBRSVG_CHECK_VERSION(2, 11, 0)
-/* Extended Convenience API */
-static VALUE
-rg_pixbuf_from_file_at_size(VALUE self, VALUE file_name,
-                                    VALUE width, VALUE height)
-{
-    VALUE rb_pixbuf;
-    GdkPixbuf *pixbuf;
-    GError *error = NULL;
-
-    pixbuf = rsvg_pixbuf_from_file_at_size_ex(_SELF(self),
-                                              RVAL2CSTR(file_name),
-                                              NUM2INT(width),
-                                              NUM2INT(height),
-                                              &error);
-
-    if (error) RAISE_GERROR(error);
-
-    rb_pixbuf = GOBJ2RVAL(pixbuf);
-    g_object_unref(pixbuf);
-    return rb_pixbuf;
-}
-
-static VALUE
-rg_pixbuf_from_file(VALUE self, VALUE file_name)
-{
-    VALUE rb_pixbuf;
-    GdkPixbuf *pixbuf;
-    GError *error = NULL;
-
-    pixbuf = rsvg_pixbuf_from_file_ex(_SELF(self),
-                                      RVAL2CSTR(file_name),
-                                      &error);
-
-    if (error) RAISE_GERROR(error);
-
-    rb_pixbuf = GOBJ2RVAL(pixbuf);
-    g_object_unref(pixbuf);
-    return rb_pixbuf;
-}
-
-static VALUE
-rg_pixbuf_from_file_at_zoom(VALUE self, VALUE file_name,
-                                    VALUE x_zoom, VALUE y_zoom)
-{
-    VALUE rb_pixbuf;
-    GdkPixbuf *pixbuf;
-    GError *error = NULL;
-
-    pixbuf = rsvg_pixbuf_from_file_at_zoom_ex(_SELF(self),
-                                              RVAL2CSTR(file_name),
-                                              NUM2DBL(x_zoom),
-                                              NUM2DBL(y_zoom),
-                                              &error);
-
-    if (error) RAISE_GERROR(error);
-
-    rb_pixbuf = GOBJ2RVAL(pixbuf);
-    g_object_unref(pixbuf);
-    return rb_pixbuf;
-}
-
-static VALUE
-rg_pixbuf_from_file_at_max_size(VALUE self, VALUE file_name,
-                                        VALUE max_width, VALUE max_height)
-{
-    VALUE rb_pixbuf;
-    GdkPixbuf *pixbuf;
-    GError *error = NULL;
-
-    pixbuf = rsvg_pixbuf_from_file_at_max_size_ex(_SELF(self),
-                                                  RVAL2CSTR(file_name),
-                                                  NUM2INT(max_width),
-                                                  NUM2INT(max_height),
-                                                  &error);
-
-    if (error) RAISE_GERROR(error);
-
-    rb_pixbuf = GOBJ2RVAL(pixbuf);
-    g_object_unref(pixbuf);
-    return rb_pixbuf;
-}
-
-static VALUE
-rg_pixbuf_from_file_at_zoom_with_max(VALUE self,
-                                             VALUE file_name,
-                                             VALUE x_zoom,
-                                             VALUE y_zoom,
-                                             VALUE max_width,
-                                             VALUE max_height)
-{
-    VALUE rb_pixbuf;
-    GdkPixbuf *pixbuf;
-    GError *error = NULL;
-
-    pixbuf = rsvg_pixbuf_from_file_at_zoom_with_max_ex(_SELF(self),
-                                                       RVAL2CSTR(file_name),
-                                                       NUM2DBL(x_zoom),
-                                                       NUM2DBL(y_zoom),
-                                                       NUM2INT(max_width),
-                                                       NUM2INT(max_height),
-                                                       &error);
-
-    if (error) RAISE_GERROR(error);
-
-    rb_pixbuf = GOBJ2RVAL(pixbuf);
-    g_object_unref(pixbuf);
-    return rb_pixbuf;
-}
-#endif
-
-#ifdef HAVE_LIBRSVG_RSVG_CAIRO_H
 static VALUE
 rg_render_cairo(int argc, VALUE *argv, VALUE self)
 {
@@ -432,7 +296,6 @@ rg_render_cairo(int argc, VALUE *argv, VALUE self)
 
     return Qnil;
 }
-#endif
 
 void
 Init_rsvg_handle(VALUE mRSVG)
@@ -448,11 +311,6 @@ Init_rsvg_handle(VALUE mRSVG)
     rb_define_alloc_func(RG_TARGET_NAMESPACE, rb_rsvg_handle_alloc);
 #endif
 
-#if LIBRSVG_CHECK_VERSION(2, 14, 0)
-    RG_DEF_SMETHOD(new_from_data, 1);
-    RG_DEF_SMETHOD(new_from_file, -1);
-#endif
-
     RG_DEF_METHOD(initialize, -1);
     RG_DEF_METHOD(set_size_callback, 0);
     RG_DEF_METHOD(set_dpi, 1);
@@ -475,18 +333,7 @@ Init_rsvg_handle(VALUE mRSVG)
 #  endif
 #endif
 
-#if !LIBRSVG_CHECK_VERSION(2, 11, 0)
-    /* Extended Convenience API */
-    RG_DEF_METHOD(pixbuf_from_file_at_size, 3);
-    RG_DEF_METHOD(pixbuf_from_file, 1);
-    RG_DEF_METHOD(pixbuf_from_file_at_zoom, 3);
-    RG_DEF_METHOD(pixbuf_from_file_at_max_size, 3);
-    RG_DEF_METHOD(pixbuf_from_file_at_zoom_with_max, 5);
-#endif
-
-#ifdef HAVE_LIBRSVG_RSVG_CAIRO_H
     RG_DEF_METHOD(render_cairo, -1);
-#endif
 
 #if LIBRSVG_CHECK_VERSION(2, 40, 3)
     /* RsvgHandleFlags */
diff --git a/rsvg2/ext/rsvg2/rsvg2.h b/rsvg2/ext/rsvg2/rsvg2.h
index e50651e..6bf1e66 100644
--- a/rsvg2/ext/rsvg2/rsvg2.h
+++ b/rsvg2/ext/rsvg2/rsvg2.h
@@ -31,32 +31,26 @@ extern "C" {
 
 #include <rbglib.h>
 #include <rbgobject.h>
+#include <rb_cairo.h>
 
-#ifdef HAVE_LIBRSVG_RSVG_GZ_H
-#  include <librsvg/rsvg-gz.h>
-#else
-#  include <librsvg/rsvg.h>
-#endif
-
-#ifdef HAVE_RB_CAIRO_H
-#  include <rb_cairo.h>
-#  include <librsvg/rsvg-cairo.h>
-#endif
-
-#ifdef HAVE_LIBRSVG_LIBRSVG_ENUM_TYPES_H
-#  include <librsvg/librsvg-enum-types.h>
-#else
-#  include "librsvg-enum-types.h"
-#endif
+#include <librsvg/rsvg.h>
 
-#define LIBRSVG_CHECK_VERSION(major, minor, micro)                            \
-    (LIBRSVG_MAJOR_VERSION > (major) ||                                       \
+#ifndef LIBRSVG_CHECK_VERSION
+#  include <librsvg/librsvg-features.h>
+#  define LIBRSVG_CHECK_VERSION(major, minor, micro)                    \
+    (LIBRSVG_MAJOR_VERSION > (major) ||                                 \
      (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \
      (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && \
       LIBRSVG_MICRO_VERSION >= (micro)))
+#endif
 
 #if !LIBRSVG_CHECK_VERSION(2, 36, 2)
-#  include <librsvg/librsvg-features.h>
+#  include <librsvg/rsvg-cairo.h>
+#  ifdef HAVE_LIBRSVG_LIBRSVG_ENUM_TYPES_H
+#    include <librsvg/librsvg-enum-types.h>
+#  else
+#    include "librsvg-enum-types.h"
+#  endif
 #endif
 
 
diff --git a/rsvg2/lib/rsvg2.rb b/rsvg2/lib/rsvg2.rb
index c0c0d42..badddab 100644
--- a/rsvg2/lib/rsvg2.rb
+++ b/rsvg2/lib/rsvg2.rb
@@ -1,16 +1,13 @@
 require "glib2"
 require "gdk_pixbuf2"
-begin
-  require "cairo"
-rescue LoadError
-end
+require "cairo"
 
 base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
 vendor_dir = base_dir + "vendor" + "local"
 vendor_bin_dir = vendor_dir + "bin"
 GLib.prepend_dll_path(vendor_bin_dir)
 begin
-  major, minor, micro, = RUBY_VERSION.split(/\./)
+  major, minor, = RUBY_VERSION.split(/\./)
   require "#{major}.#{minor}/rsvg2.so"
 rescue LoadError
   require "rsvg2.so"
@@ -18,14 +15,32 @@ end
 
 module RSVG
   LOG_DOMAIN = "librsvg"
-end
 
-if RSVG.cairo_available?
-  module Cairo
-    class Context
-      def render_rsvg_handle(handle, *args, &block)
-        handle.render_cairo(self, *args, &block)
+  class << self
+    def cairo_available?
+      true
+    end
+  end
+
+  class Handle
+    class << self
+      # For backward compatibility
+      def new_from_data(data)
+        new(:data => data)
       end
+
+      # For backward compatibility
+      def new_from_file(file_name, options={})
+        new(options.merge(:file_name => file_name))
+      end
+    end
+  end
+end
+
+module Cairo
+  class Context
+    def render_rsvg_handle(handle, *args, &block)
+      handle.render_cairo(self, *args, &block)
     end
   end
 end
diff --git a/rsvg2/sample/svg-viewer.rb b/rsvg2/sample/svg-viewer.rb
index 78058cd..5f7f527 100755
--- a/rsvg2/sample/svg-viewer.rb
+++ b/rsvg2/sample/svg-viewer.rb
@@ -27,11 +27,11 @@ window = Gtk::Window.new
 window.set_default_size(width, height)
 area = Gtk::DrawingArea.new
 
-window.signal_connect("destroy") do
+window.signal_connect(:destroy) do
   Gtk.main_quit
 end
 
-area.signal_connect("expose_event") do |widget, event|
+area.signal_connect(:expose_event) do |widget, event|
   context = widget.window.create_cairo_context
   window_width, window_height = widget.window.size
   context.scale(window_width.to_f / width, window_height.to_f / height)
diff --git a/rsvg2/test/rsvg2-test-utils.rb b/rsvg2/test/rsvg2-test-utils.rb
index 1126318..bfd803d 100644
--- a/rsvg2/test/rsvg2-test-utils.rb
+++ b/rsvg2/test/rsvg2-test-utils.rb
@@ -20,4 +20,15 @@ require "test/unit/notify"
 require "fileutils"
 
 module RSVG2TestUtils
+  def later_version?(major, minor, micro=nil)
+    micro ||= 0
+    (RSVG::BUILD_VERSION <=> [major, minor, micro]) >= 0
+  end
+
+  def only_rsvg_version(major, minor, micro=nil)
+    micro ||= 0
+    unless later_version?(major, minor, micro)
+      omit("Require librsvg >= #{major}.#{minor}.#{micro}")
+    end
+  end
 end
diff --git a/rsvg2/test/test-handle.rb b/rsvg2/test/test-handle.rb
index 0609cad..dac1705 100644
--- a/rsvg2/test/test-handle.rb
+++ b/rsvg2/test/test-handle.rb
@@ -15,6 +15,8 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 class TestHandle < Test::Unit::TestCase
+  include RSVG2TestUtils
+
   sub_test_case ".new_from_file" do
     sub_test_case "options" do
       def setup
@@ -68,12 +70,14 @@ class TestHandle < Test::Unit::TestCase
       end
 
       def test_no_option
+        only_rsvg_version(2, 40, 3)
         assert_raise(RSVG::Error::Failed) do
           RSVG::Handle.new_from_file(@large_svg_path)
         end
       end
 
       def test_unlimited
+        only_rsvg_version(2, 40, 3)
         handle = RSVG::Handle.new_from_file(@large_svg_path,
                                             :flags => :flag_unlimited)
         assert_equal([0, 0, 0.0, 0.0],
diff --git a/run-test.rb b/run-test.rb
index 2bf664e..061dc1b 100755
--- a/run-test.rb
+++ b/run-test.rb
@@ -30,10 +30,12 @@ end
 ignored_modules = [
   "gstreamer-no-gi",
   "gdk3-no-gi",
-  "gtk3-gi",
+  "gtk3-no-gi",
+  "gtksourceview3-no-gi",
+  "vte3-no-gi",
 ]
 
-succeeded = true
+failed_target_names = []
 targets.each do |target|
   next if ignored_modules.include?(target.basename.to_s)
   Dir.chdir(target.to_s) do
@@ -43,10 +45,16 @@ targets.each do |target|
     args = includes + ["test/run-test.rb"]
     command = [ruby, *args]
     unless system(command.collect {|arg| "'#{arg.gsub(/'/, '\\\'')}'"}.join(' '))
-      succeeded = false
+      failed_target_names << target.basename.to_s
     end
 
     puts separator
   end
 end
-exit(succeeded)
+
+if failed_target_names.empty?
+  exit(true)
+else
+  puts "Failed targets: #{failed_target_names.join(', ')}"
+  exit(false)
+end
diff --git a/travis-before-script.sh b/travis-before-script.sh
new file mode 100755
index 0000000..79fec3d
--- /dev/null
+++ b/travis-before-script.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (C) 2013-2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+set -e
+set -u
+
+if ! apt-cache show gir1.2-gstreamer-1.0 > /dev/null 2>&1; then
+    sudo add-apt-repository --yes ppa:gstreamer-developers/ppa
+fi
+sudo apt-get update -qq
+# TODO: we'll use gir1.2-webkit2-3.0
+#       if it's supported in Travis CI.
+sudo apt-get install -qq -y \
+    libgirepository1.0-dev \
+    gstreamer1.0-plugins-good \
+    gir1.2-gtksource-3.0 \
+    gir1.2-vte-2.90 \
+    gir1.2-webkit-1.0 \
+    gir1.2-webkit-3.0 \
+    gnome-icon-theme \
+    dbus-x11
diff --git a/vte3-no-gi/COPYING.LIB b/vte3-no-gi/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/vte3-no-gi/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/vte3/README.md b/vte3-no-gi/README.md
similarity index 100%
copy from vte3/README.md
copy to vte3-no-gi/README.md
diff --git a/vte3/Rakefile b/vte3-no-gi/Rakefile
similarity index 100%
copy from vte3/Rakefile
copy to vte3-no-gi/Rakefile
diff --git a/vte3/ext/vte3/depend b/vte3-no-gi/ext/vte3/depend
similarity index 100%
rename from vte3/ext/vte3/depend
rename to vte3-no-gi/ext/vte3/depend
diff --git a/vte3/ext/vte3/extconf.rb b/vte3-no-gi/ext/vte3/extconf.rb
similarity index 100%
rename from vte3/ext/vte3/extconf.rb
rename to vte3-no-gi/ext/vte3/extconf.rb
diff --git a/vte3/ext/vte3/rbvte.c b/vte3-no-gi/ext/vte3/rbvte.c
similarity index 100%
rename from vte3/ext/vte3/rbvte.c
rename to vte3-no-gi/ext/vte3/rbvte.c
diff --git a/vte3/ext/vte3/rbvte3conversions.h b/vte3-no-gi/ext/vte3/rbvte3conversions.h
similarity index 100%
rename from vte3/ext/vte3/rbvte3conversions.h
rename to vte3-no-gi/ext/vte3/rbvte3conversions.h
diff --git a/vte3/ext/vte3/rbvte3private.h b/vte3-no-gi/ext/vte3/rbvte3private.h
similarity index 100%
rename from vte3/ext/vte3/rbvte3private.h
rename to vte3-no-gi/ext/vte3/rbvte3private.h
diff --git a/vte3/ext/vte3/rbvtecharattributes.c b/vte3-no-gi/ext/vte3/rbvtecharattributes.c
similarity index 100%
rename from vte3/ext/vte3/rbvtecharattributes.c
rename to vte3-no-gi/ext/vte3/rbvtecharattributes.c
diff --git a/vte3/ext/vte3/rbvtepty.c b/vte3-no-gi/ext/vte3/rbvtepty.c
similarity index 100%
rename from vte3/ext/vte3/rbvtepty.c
rename to vte3-no-gi/ext/vte3/rbvtepty.c
diff --git a/vte3/ext/vte3/rbvtereaper.c b/vte3-no-gi/ext/vte3/rbvtereaper.c
similarity index 100%
rename from vte3/ext/vte3/rbvtereaper.c
rename to vte3-no-gi/ext/vte3/rbvtereaper.c
diff --git a/vte3/ext/vte3/rbvteterminal.c b/vte3-no-gi/ext/vte3/rbvteterminal.c
similarity index 100%
rename from vte3/ext/vte3/rbvteterminal.c
rename to vte3-no-gi/ext/vte3/rbvteterminal.c
diff --git a/vte3/ext/vte3/rbvteterminalaccessible.c b/vte3-no-gi/ext/vte3/rbvteterminalaccessible.c
similarity index 100%
rename from vte3/ext/vte3/rbvteterminalaccessible.c
rename to vte3-no-gi/ext/vte3/rbvteterminalaccessible.c
diff --git a/vte3/extconf.rb b/vte3-no-gi/extconf.rb
similarity index 100%
rename from vte3/extconf.rb
rename to vte3-no-gi/extconf.rb
diff --git a/vte3/lib/vte3.rb b/vte3-no-gi/lib/vte3.rb
similarity index 100%
copy from vte3/lib/vte3.rb
copy to vte3-no-gi/lib/vte3.rb
diff --git a/vte3/lib/vte3/deprecated.rb b/vte3-no-gi/lib/vte3/deprecated.rb
similarity index 100%
copy from vte3/lib/vte3/deprecated.rb
copy to vte3-no-gi/lib/vte3/deprecated.rb
diff --git a/vte3/patches/ncurses-5.9-add-missing-exe.diff b/vte3-no-gi/patches/ncurses-5.9-add-missing-exe.diff
similarity index 100%
rename from vte3/patches/ncurses-5.9-add-missing-exe.diff
rename to vte3-no-gi/patches/ncurses-5.9-add-missing-exe.diff
diff --git a/vte3/patches/ncurses-5.9-support-mingw32.diff b/vte3-no-gi/patches/ncurses-5.9-support-mingw32.diff
similarity index 100%
rename from vte3/patches/ncurses-5.9-support-mingw32.diff
rename to vte3-no-gi/patches/ncurses-5.9-support-mingw32.diff
diff --git a/vte3/sample/multiterm.rb b/vte3-no-gi/sample/multiterm.rb
similarity index 100%
rename from vte3/sample/multiterm.rb
rename to vte3-no-gi/sample/multiterm.rb
diff --git a/vte3/sample/terminal.rb b/vte3-no-gi/sample/terminal.rb
similarity index 100%
rename from vte3/sample/terminal.rb
rename to vte3-no-gi/sample/terminal.rb
diff --git a/vte3/README.md b/vte3/README.md
index bb06d76..16ccd75 100644
--- a/vte3/README.md
+++ b/vte3/README.md
@@ -14,7 +14,7 @@ Ruby/VTE3 is a Ruby binding of VTE for use with GTK3.
 
 ## License
 
-Copyright (c) 2002-2013 Ruby-GNOME2 Project Team
+Copyright (c) 2014 Ruby-GNOME2 Project Team
 
 This program is free software. You can distribute/modify this program
 under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
diff --git a/vte3/Rakefile b/vte3/Rakefile
index 09bae50..b16e176 100644
--- a/vte3/Rakefile
+++ b/vte3/Rakefile
@@ -1,4 +1,20 @@
 # -*- ruby -*-
+#
+# Copyright (C) 2011-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 $LOAD_PATH.unshift("./../glib2/lib")
 require 'gnome2/rake/package-task'
@@ -6,41 +22,41 @@ require 'gnome2/rake/package-task'
 package_task = GNOME2::Rake::PackageTask.new do |package|
   package.summary = "Ruby/VTE is a Ruby binding of VTE."
   package.description = "Ruby/VTE is a Ruby binding of VTE."
-  package.dependency.gem.runtime = ["gtk3"]
+  package.dependency.gem.runtime = ["gtk3", "gobject-introspection"]
   package.windows.packages = []
   package.windows.dependencies = []
   package.windows.build_dependencies = [
-    "glib2", "atk", "pango", "gdk_pixbuf2", "gdk3",
+    "glib2",
+    "gio2",
+    "atk",
+    "pango",
+    "gdk_pixbuf2",
+    "gdk3",
+    "gobject-introspection",
   ]
-  package.windows.build_packages = [
-    # {
-    #   :name => "ncurses",
-    #   :download_base_url => "http://ftp.gnu.org/pub/gnu/ncurses",
-    #   :label => "ncurses",
-    #   :version => "5.9",
-    #   :configure_args => [
-    #     "--enable-sp-funcs",
-    #     "--enable-term-driver",
-    #     "--with-shared",
-    #     "--without-normal",
-    #     "--without-progs",
-    #     "--without-tests",
-    #   ],
-    #   :patches => [
-    #     "ncurses-5.9-support-mingw32.diff",
-    #     "ncurses-5.9-add-missing-exe.diff",
-    #   ],
-    # },
-    # {
-    #   :name => "vte",
-    #   :download_site => :gnome,
-    #   :label => "vte",
-    #   :version => "0.34.2",
-    #   :configure_args => [],
-    #   :compression_method => "xz",
-    # }
+  package.windows.gobject_introspection_dependencies = [
+    "gio2",
+    "atk",
+    "pango",
+    "gdk_pixbuf2",
+    "gdk3",
+  ]
+  package.external_packages = [
+    {
+      :name => "vte",
+      :download_site => :gnome,
+      :label => "vte",
+      :version => "0.41.90",
+      :compression_method => "xz",
+      :windows => {
+        :configure_args => [
+          "--disable-vala",
+        ],
+        :patches => [
+        ],
+        :need_autoreconf => true,
+      },
+    },
   ]
-  package.post_install_message = "This library is experimental."
 end
 package_task.define
-
diff --git a/vte3/lib/vte3.rb b/vte3/lib/vte3.rb
index 8262ac5..bf72a0a 100644
--- a/vte3/lib/vte3.rb
+++ b/vte3/lib/vte3.rb
@@ -1,4 +1,56 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "gobject-introspection"
 require "gtk3"
-require "vte3.so"
-require "vte3/deprecated"
 
+base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
+vendor_dir = base_dir + "vendor" + "local"
+vendor_bin_dir = vendor_dir + "bin"
+GLib.prepend_dll_path(vendor_bin_dir)
+vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
+GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
+
+require "vte3/loader"
+
+module Vte
+  LOG_DOMAIN = "Vte"
+  GLib::Log.set_log_domain(LOG_DOMAIN)
+
+  class Error < StandardError
+  end
+
+  class << self
+    def const_missing(name)
+      init
+      if const_defined?(name)
+        const_get(name)
+      else
+        super
+      end
+    end
+
+    def init
+      class << self
+        remove_method(:init)
+        remove_method(:const_missing)
+      end
+      Gtk.init if Gtk.respond_to?(:init)
+      loader = Loader.new(self)
+      loader.load("Vte")
+    end
+  end
+end
diff --git a/vte3/lib/vte3/deprecated.rb b/vte3/lib/vte3/deprecated.rb
index 94aca57..0293892 100644
--- a/vte3/lib/vte3/deprecated.rb
+++ b/vte3/lib/vte3/deprecated.rb
@@ -1,3 +1,19 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
 module Vte
   extend GLib::Deprecatable
 
@@ -8,7 +24,6 @@ module Vte
     define_deprecated_const :CursorShape, 'Vte::TerminalCursorShape'
     define_deprecated_const :WriteFlags, 'Vte::TerminalWriteFlags'
 
-    define_deprecated_method :match_set_cursor_type, :match_set_cursor
     define_deprecated_method :fork_pty, :raise => "Use 'Vte::Pty#fork'."
     define_deprecated_method :using_xft?, :warn => "Don't use this method." do |_self|
       false
@@ -16,30 +31,13 @@ module Vte
     define_deprecated_method :padding, :warn => "Use 'inner-border' style property." do |_self|
       [0, 0]
     end
-    define_deprecated_method :char_descent, :warn => "Don't use this method." do |_self|
-      0
-    end
-    define_deprecated_method :char_ascent, :warn => "Don't use this method." do |_self|
-      0
-    end
-    define_deprecated_method_by_hash_args :fork_command,
-        'command, argv, envv, directory, lastlog, utmp, wtmp',
-        ':pty_flags => :default, :working_directory => <current>, :argv => <user_shell>, :envv => nil, :spawn_flags => :child_inherits_stdin' do
-        |_self, command, argv, envv, directory, lastlog = true, utmp = true, wtmp = true|
-      pty_flags = [!lastlog && :no_lastlog, !utmp && :no_utmp, !wtmp && :no_wtmp].select{|f| f}
-      argv = command && [command, *argv]
-      [{:pty_flags => pty_flags, :working_directory => directory, :argv => argv, :envv => envv}]
+
+    unless method_defined?(:pty_object)
+      define_deprecated_method :pty_object, :pty
     end
 
-    alias :__set_font__ :set_font
-    private :__set_font__
-    def set_font(*args)
-      if args.size == 1
-        params = args.first
-      else
-        raise GLib::DeprecatedError.new("#{caller[0]}: '#{self.class}#set_font(desc_or_name, antialias)' style has been deprecated. Use '#{self.class}#set_font(desc_or_name)' style.")
-      end
-      __set_font__(params)
+    unless method_defined?(:fork_command)
+      define_deprecated_method :fork_command, :spawn
     end
   end
 end
diff --git a/vte3/lib/vte3/loader.rb b/vte3/lib/vte3/loader.rb
new file mode 100644
index 0000000..423bd09
--- /dev/null
+++ b/vte3/lib/vte3/loader.rb
@@ -0,0 +1,47 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Vte
+  class Loader < GObjectIntrospection::Loader
+    private
+    def load_function_info(info)
+      name = info.name
+      case name
+      when "init"
+        # ignore
+      else
+        super
+      end
+    end
+
+    def post_load(repository, namespace)
+      require_libraries
+    end
+
+    def require_libraries
+      require "vte3/pty"
+      require "vte3/terminal"
+
+      require "vte3/deprecated"
+    end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+  end
+end
diff --git a/vte3/lib/vte3/pty.rb b/vte3/lib/vte3/pty.rb
new file mode 100644
index 0000000..06f369e
--- /dev/null
+++ b/vte3/lib/vte3/pty.rb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Vte
+  class Pty
+    alias_method :size_raw, :size
+    def size
+      succeeded, rows, columns = size_raw
+      if succeeded
+        [rows, columns]
+      else
+        nil
+      end
+    end
+  end
+end
diff --git a/vte3/lib/vte3/terminal.rb b/vte3/lib/vte3/terminal.rb
new file mode 100644
index 0000000..fae5a12
--- /dev/null
+++ b/vte3/lib/vte3/terminal.rb
@@ -0,0 +1,73 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module Vte
+  class Terminal
+    if method_defined?(:fork_command_full)
+      def fork_command(options={})
+        pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
+        working_directory = options[:working_directory]
+        argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
+        envv = options[:envv]
+        default_spawn_flags =
+          GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH
+        spawn_flags = options[:spawn_flags] || default_spawn_flags
+        succeeded, pid = fork_command_full(pty_flags,
+                                           working_directory,
+                                           argv,
+                                           envv,
+                                           spawn_flags)
+        if succeeded
+          pid
+        else
+          nil
+        end
+      end
+
+      alias_method :spawn, :fork_command
+
+      alias_method :pty_raw, :pty
+      def pty
+        pty_object
+      end
+    else
+      def spawn(options)
+        pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
+        working_directory = options[:working_directory]
+        argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
+        envv = options[:envv]
+        default_spawn_flags =
+          GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH
+        spawn_flags = options[:spawn_flags] || default_spawn_flags
+        succeeded, pid = spawn_sync(pty_flags,
+                                    working_directory,
+                                    argv,
+                                    envv,
+                                    spawn_flags)
+        if succeeded
+          pid
+        else
+          nil
+        end
+      end
+    end
+
+    alias_method :feed_child_raw, :feed_child
+    def feed_child(text)
+      feed_child_raw(text, text.bytesize)
+    end
+  end
+end
diff --git a/vte3/test/run-test.rb b/vte3/test/run-test.rb
new file mode 100755
index 0000000..0aed4a0
--- /dev/null
+++ b/vte3/test/run-test.rb
@@ -0,0 +1,63 @@
+#!/usr/bin/env ruby
+#
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
+ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
+
+glib_base = File.join(ruby_gnome2_base, "glib2")
+atk_base = File.join(ruby_gnome2_base, "atk")
+pango_base = File.join(ruby_gnome2_base, "pango")
+gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
+cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
+gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
+gio2_base = File.join(ruby_gnome2_base, "gio2")
+gdk3_base = File.join(ruby_gnome2_base, "gdk3")
+gtk3_base = File.join(ruby_gnome2_base, "gtk3")
+vte3_base = File.join(ruby_gnome2_base, "vte3")
+
+modules = [
+  [glib_base, "glib2"],
+  [atk_base, "atk"],
+  [pango_base, "pango"],
+  [cairo_gobject_base, "cairo-gobject"],
+  [gdk_pixbuf_base, "gdk_pixbuf2"],
+  [gobject_introspection_base, "gobject-introspection"],
+  [gio2_base, "gio2"],
+  [gdk3_base, "gdk3"],
+  [gtk3_base, "gtk3"],
+  [vte3_base, "vte3"],
+]
+
+modules.each do |target, module_name|
+  makefile = File.join(target, "Makefile")
+  if File.exist?(makefile) and system("which make > /dev/null")
+    `make -C #{target.dump} > /dev/null` or exit(false)
+  end
+  $LOAD_PATH.unshift(File.join(target, "ext", module_name))
+  $LOAD_PATH.unshift(File.join(target, "lib"))
+end
+
+$LOAD_PATH.unshift(File.join(glib_base, "test"))
+require "glib-test-init"
+
+$LOAD_PATH.unshift(File.join(vte3_base, "test"))
+require "vte3-test-utils"
+
+require "vte3"
+
+exit Test::Unit::AutoRunner.run(true)
diff --git a/vte3/test/test-pty.rb b/vte3/test/test-pty.rb
new file mode 100644
index 0000000..93741b6
--- /dev/null
+++ b/vte3/test/test-pty.rb
@@ -0,0 +1,47 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestPty < Test::Unit::TestCase
+  def setup
+    flag = Vte::PtyFlags::DEFAULT
+    @pty = Vte::Pty.new(flag)
+  end
+
+  def test_fd
+    assert_nothing_raised do
+      @pty.fd
+    end
+  end
+
+  def test_size
+    row = 80
+    col = 24
+    @pty.set_size(row, col)
+    assert_equal([row, col], @pty.size)
+  end
+
+  def test_term
+    term_type = "vt100"
+    @pty.term = term_type
+    assert_equal(term_type, @pty.term)
+  end
+
+  def test_utf8
+    assert_nothing_raised do
+      @pty.utf8 = true
+    end
+  end
+end
diff --git a/vte3/test/test-terminal-properties.rb b/vte3/test/test-terminal-properties.rb
new file mode 100644
index 0000000..ef4487e
--- /dev/null
+++ b/vte3/test/test-terminal-properties.rb
@@ -0,0 +1,122 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestTerminalProperties < Test::Unit::TestCase
+  include VteTestUtils
+
+  def setup
+    @terminal = Vte::Terminal.new
+  end
+
+  def test_allow_bold
+    @terminal.allow_bold = false
+    assert_false(@terminal.allow_bold?)
+  end
+
+  def test_audible_bell
+    @terminal.audible_bell = false
+    assert_false(@terminal.audible_bell?)
+  end
+
+  def test_background_image_file
+    image_name = "image_file"
+    @terminal.background_image_file = image_name
+    assert_equal(image_name, @terminal.background_image_file)
+  end
+
+  def test_backspace_binding
+    bind = Vte::TerminalEraseBinding::DELETE_SEQUENCE
+    @terminal.backspace_binding = bind
+    assert_equal(bind, @terminal.backspace_binding)
+  end
+
+  def test_cursor_blink_mode
+    cursor_mode = Vte::TerminalCursorBlinkMode::ON
+    @terminal.cursor_blink_mode = cursor_mode
+    assert_equal(cursor_mode, @terminal.cursor_blink_mode)
+  end
+
+  def test_cursor_shape
+    shape = Vte::TerminalCursorShape::IBEAM
+    @terminal.cursor_shape = shape
+    assert_equal(shape, @terminal.cursor_shape)
+  end
+
+  def test_delete_binding
+    bind = Vte::TerminalEraseBinding::ASCII_DELETE
+    @terminal.delete_binding = bind
+    assert_equal(bind, @terminal.delete_binding)
+  end
+  def test_emulation
+    terminal_type = "vt100"
+    @terminal.emulation = terminal_type
+    assert_equal(terminal_type, @terminal.emulation)
+  end
+
+  def test_encoding
+    encoding = "UTF-16"
+    @terminal.encoding = encoding
+    assert_equal(encoding, @terminal.encoding)
+  end
+
+  def test_font_desc
+    font = Pango::FontDescription.new("Monospace 15")
+    @terminal.font_desc = font
+    assert_equal(font, @terminal.font_desc)
+  end
+
+  def test_pointer_autohide
+    hide = true
+    @terminal.pointer_autohide = hide
+    assert_true(@terminal.pointer_autohide?)
+  end
+
+  def test_rewrap_on_resize
+    omit_if_not_respond(@terminal, :rewrap_on_resize?)
+    @terminal.rewrap_on_resize = false
+    assert_false(@terminal.rewrap_on_resize?)
+  end
+
+  def test_scroll_background
+    scroll = true
+    @terminal.scroll_background = scroll
+    assert_true(@terminal.scroll_background?)
+  end
+
+  def test_scroll_on_keystroke
+    scroll = true
+    @terminal.scroll_on_keystroke = scroll
+    assert_true(@terminal.scroll_on_keystroke?)
+  end
+
+  def test_scroll_on_output
+    scroll = false
+    @terminal.scroll_on_output = scroll
+    assert_false(@terminal.scroll_on_output?)
+  end
+
+  def test_scrollback_lines
+    lines = 1024
+    @terminal.scrollback_lines = lines
+    assert_equal(lines, @terminal.scrollback_lines)
+  end
+
+  def test_visible_bell
+    visible = true
+    @terminal.visible_bell = visible
+    assert_true(@terminal.visible_bell?)
+  end
+end
diff --git a/vte3/test/test-terminal-signals.rb b/vte3/test/test-terminal-signals.rb
new file mode 100644
index 0000000..1ca15c3
--- /dev/null
+++ b/vte3/test/test-terminal-signals.rb
@@ -0,0 +1,48 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestTerminalSignals < Test::Unit::TestCase
+  def setup
+    @terminal = Vte::Terminal.new
+  end
+
+  def test_beep_signal
+    called = false
+    @terminal.signal_connect("beep") do
+      called = true
+    end
+    @terminal.signal_emit("beep")
+    assert_true(called)
+  end
+
+  def test_copy_clipboard_signal
+    called = false
+    @terminal.signal_connect("copy-clipboard") do
+      called = true
+    end
+    @terminal.signal_emit("copy-clipboard")
+    assert_true(called)
+  end
+
+  def test_paste_clipboard_signal
+    called = false
+    @terminal.signal_connect("paste-clipboard") do
+      called = true
+    end
+    @terminal.signal_emit("paste-clipboard")
+    assert_true(called)
+  end
+end
diff --git a/vte3/test/test-terminal.rb b/vte3/test/test-terminal.rb
new file mode 100644
index 0000000..5a933ec
--- /dev/null
+++ b/vte3/test/test-terminal.rb
@@ -0,0 +1,44 @@
+# Copyright (C) 2014-2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestTerminal < Test::Unit::TestCase
+  include VteTestUtils
+
+  def setup
+    @terminal = Vte::Terminal.new
+  end
+
+  def test_font
+    font = Pango::FontDescription.new("Monospace 16")
+    @terminal.font = font
+    assert_equal(font, @terminal.font)
+  end
+
+  sub_test_case "#fork_command" do
+    test "success" do
+      pid = @terminal.fork_command(:argv => ["echo"])
+      assert do
+        pid > 0
+      end
+    end
+
+    test "failure" do
+      assert_raise(GLib::SpawnError) do
+        @terminal.fork_command(:argv => ["nonexistent"])
+      end
+    end
+  end
+end
diff --git a/vte3/test/vte3-test-utils.rb b/vte3/test/vte3-test-utils.rb
new file mode 100644
index 0000000..03ca8aa
--- /dev/null
+++ b/vte3/test/vte3-test-utils.rb
@@ -0,0 +1,27 @@
+# Copyright (C) 2014  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "test-unit"
+require "test/unit/notify"
+
+module VteTestUtils
+  private
+  def omit_if_not_respond(instance, method_name)
+    unless instance.respond_to?(method_name)
+      omit("#{instance.class}##{method_name} is not respond.")
+    end
+  end
+end
diff --git a/webkit-gtk/lib/webkit-gtk.rb b/webkit-gtk/lib/webkit-gtk.rb
index 94ce640..8e4be76 100644
--- a/webkit-gtk/lib/webkit-gtk.rb
+++ b/webkit-gtk/lib/webkit-gtk.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -38,11 +38,18 @@ module WebKitGtk
         remove_method(:init)
         remove_method(:const_missing)
       end
+      Gtk.init if Gtk.respond_to?(:init)
       loader = Loader.new(self)
       loader.load("WebKit")
     end
   end
 
   class Loader < GObjectIntrospection::Loader
+    private
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
   end
 end
diff --git a/webkit-gtk2/lib/webkit-gtk2.rb b/webkit-gtk2/lib/webkit-gtk2.rb
index 182b538..87950c3 100644
--- a/webkit-gtk2/lib/webkit-gtk2.rb
+++ b/webkit-gtk2/lib/webkit-gtk2.rb
@@ -1,4 +1,4 @@
-# Copyright (C) 2013  Ruby-GNOME2 Project Team
+# Copyright (C) 2013-2015  Ruby-GNOME2 Project Team
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -38,10 +38,29 @@ module WebKitGtk2
         remove_method(:init)
         remove_method(:const_missing)
       end
-      Loader.load("WebKit", self, :version => "1.0")
+      loader = Loader.new(self)
+      loader.load
     end
   end
 
   class Loader < GObjectIntrospection::Loader
+    NAMESPACE = "WebKit"
+    VERSION = "1.0"
+
+    def initialize(base_module)
+      super
+      @version = VERSION
+    end
+
+    def load
+      super(NAMESPACE)
+    end
+
+    private
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
   end
 end
diff --git a/webkit-gtk2/test/run-test.rb b/webkit-gtk2/test/run-test.rb
index 589845c..f4933a6 100755
--- a/webkit-gtk2/test/run-test.rb
+++ b/webkit-gtk2/test/run-test.rb
@@ -57,4 +57,13 @@ require "webkit-gtk-test-utils"
 
 require "webkit-gtk2"
 
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(WebKitGtk2::Loader::NAMESPACE,
+                     WebKitGtk2::Loader::VERSION)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
 exit Test::Unit::AutoRunner.run(true)
diff --git a/webkit2-gtk/COPYING.LIB b/webkit2-gtk/COPYING.LIB
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/webkit2-gtk/COPYING.LIB
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/webkit2-gtk/README.md b/webkit2-gtk/README.md
new file mode 100644
index 0000000..47f0be0
--- /dev/null
+++ b/webkit2-gtk/README.md
@@ -0,0 +1,24 @@
+# Ruby/WebKit2GTK
+
+Ruby/WebKit2GTK is a Ruby binding of WebKit2GTK+.
+
+## Requirements
+
+* Ruby/GObjectIntrospection and Ruby/GTK3 in
+  [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
+* [WebKit2GTK+](http://webkitgtk.org/)
+
+## Install
+
+    gem install webkit2-gtk
+
+## License
+
+Copyright (c) 2015 Ruby-GNOME2 Project Team
+
+This program is free software. You can distribute/modify this program
+under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+
+## Project Website
+
+http://ruby-gnome2.sourceforge.jp/
diff --git a/webkit2-gtk/Rakefile b/webkit2-gtk/Rakefile
new file mode 100644
index 0000000..67213c3
--- /dev/null
+++ b/webkit2-gtk/Rakefile
@@ -0,0 +1,123 @@
+# -*- ruby -*-
+#
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+$LOAD_PATH.unshift("./../glib2/lib")
+require "gnome2/rake/package-task"
+
+package_task = GNOME2::Rake::PackageTask.new do |package|
+  package.summary = "Ruby/WebKit2GTK is a Ruby binding of WebKit2GTK+."
+  package.description = "Ruby/WebKit2GTK is a Ruby binding of WebKit2GTK+."
+  package.dependency.gem.runtime = ["gobject-introspection", "gtk3"]
+  package.dependency.gem.development = ["test-unit-notify"]
+  package.windows.packages = []
+  package.windows.dependencies = []
+  package.windows.build_dependencies = [
+    "glib2",
+    "gio2",
+    "gobject-introspection",
+    "atk",
+    "pango",
+    "gdk_pixbuf2",
+    "gdk3",
+    "gstreamer",
+  ]
+  package.windows.gobject_introspection_dependencies = [
+    "gio2",
+    "atk",
+    "gdk_pixbuf2",
+    "pango",
+    "gdk3",
+    "gstreamer",
+  ]
+
+  gstreamer_relative_binary_dir =
+    package.package.project_root_dir +
+    "gstreamer" +
+    package.windows.relative_binary_dir
+  gstreamer_absolute_binary_dir = gstreamer_relative_binary_dir.expand_path
+
+  rcairo_relative_binary_dir =
+    package.package.project_root_dir.parent +
+    "rcairo.#{package.windows.build_architecture_suffix}" +
+    package.windows.relative_binary_dir
+  rcairo_absolute_binary_dir = rcairo_relative_binary_dir.expand_path
+
+  package.external_packages = [
+    {
+      :name => "libwebp",
+      :download_base_url => "http://downloads.webmproject.org/releases/webp",
+      :label => "WebP",
+      :version => "0.4.3",
+      :windows => {
+        :built_file => "bin/libwebp-5.dll",
+      },
+    },
+    {
+      :name => "libxslt",
+      :version => "1.1.28",
+      :download_base_url => "ftp://xmlsoft.org/libxslt",
+      :compression_method => "gz",
+      :windows => {
+        :built_file => "bin/libxslt-1.dll",
+        :configure_args => [
+          "--without-python",
+          "--with-libxml-prefix=#{rcairo_absolute_binary_dir}",
+        ],
+        :patches => [
+          "libxslt-1.1.28-add-mkdir-fallback.diff",
+        ],
+      },
+    },
+    {
+      :name => "webkitgtk",
+      :download_base_url => "http://webkitgtk.org/releases",
+      :label => "WebKitGTK+",
+      :version => "2.8.5",
+      :compression_method => "xz",
+      :windows => {
+        :cmake_args => [
+          "-DPORT=GTK",
+          "-DZLIB_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
+          "-DZLIB_LIBRARY=#{rcairo_absolute_binary_dir}/lib",
+          "-DPNG_PNG_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
+          "-DPNG_LIBRARY=#{rcairo_absolute_binary_dir}/lib",
+          "-DJPEG_INCLUDE_DIR=#{gstreamer_absolute_binary_dir}/include",
+          "-DJPEG_LIBRARY=#{gstreamer_absolute_binary_dir}/lib",
+          "-DFONTCONFIG_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
+          "-DFONTCONFIG_LIBRARIES=#{rcairo_absolute_binary_dir}/lib",
+          "-DSQLITE_INCLUDE_DIR=#{gstreamer_absolute_binary_dir}/include",
+          "-DSQLITE_LIBRARIES=#{gstreamer_absolute_binary_dir}/lib",
+          "-DENABLE_PLUGIN_PROCESS_GTK2=OFF",
+          "-DENABLE_X11_TARGET=OFF",
+        ],
+        :patches => [
+        ],
+      },
+    },
+  ]
+end
+package_task.define
+
+namespace :dependency do
+  desc "Install depenencies"
+  task :install do
+    # TODO: Install libwebkit2gtk-4.0-37 on Debian.
+  end
+end
+
+task :build => "dependency:install"
diff --git a/webkit2-gtk/lib/webkit2-gtk.rb b/webkit2-gtk/lib/webkit2-gtk.rb
new file mode 100644
index 0000000..4fc3648
--- /dev/null
+++ b/webkit2-gtk/lib/webkit2-gtk.rb
@@ -0,0 +1,87 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "gobject-introspection"
+require "gtk3"
+
+base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
+vendor_dir = base_dir + "vendor" + "local"
+vendor_bin_dir = vendor_dir + "bin"
+GLib.prepend_dll_path(vendor_bin_dir)
+
+module WebKit2Gtk
+  class << self
+    def const_missing(name)
+      init
+      if const_defined?(name)
+        const_get(name)
+      else
+        super
+      end
+    end
+
+    def init
+      class << self
+        remove_method(:init)
+        remove_method(:const_missing)
+      end
+      Gtk.init if Gtk.respond_to?(:init)
+      loader = Loader.new(self)
+      loader.load
+    end
+  end
+
+  class Loader < GObjectIntrospection::Loader
+    NAMESPACE = "WebKit2"
+
+    def load
+      super(NAMESPACE)
+    end
+
+    private
+    def pre_load(repository, namespace)
+      define_version_module
+    end
+
+    def post_load(repository, namespace)
+      require_libraries
+    end
+
+    def define_version_module
+      @version_module = Module.new
+      @base_module.const_set("Version", @version_module)
+    end
+
+    def require_libraries
+      require "webkit2-gtk/version"
+    end
+
+    def initialize_post(object)
+      super
+      return unless object.is_a?(GLib::Object)
+      self.class.reference_gobject(object, :sink => true)
+    end
+
+    def load_constant_info(info)
+      case info.name
+      when /_VERSION\z/
+        @version_module.const_set($PREMATCH, info.value)
+      else
+        super
+      end
+    end
+  end
+end
diff --git a/webkit2-gtk/lib/webkit2-gtk/version.rb b/webkit2-gtk/lib/webkit2-gtk/version.rb
new file mode 100644
index 0000000..615e35b
--- /dev/null
+++ b/webkit2-gtk/lib/webkit2-gtk/version.rb
@@ -0,0 +1,33 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+module WebKit2Gtk
+  module Version
+    STRING = [MAJOR, MINOR, MICRO].join(".")
+
+    class << self
+      def or_later?(major, minor, micro=nil)
+        micro ||= 0
+        version = [
+          MAJOR,
+          MINOR,
+          MICRO,
+        ]
+        (version <=> [major, minor, micro]) >= 0
+      end
+    end
+  end
+end
diff --git a/webkit2-gtk/patches/libxslt-1.1.28-add-mkdir-fallback.diff b/webkit2-gtk/patches/libxslt-1.1.28-add-mkdir-fallback.diff
new file mode 100644
index 0000000..456509a
--- /dev/null
+++ b/webkit2-gtk/patches/libxslt-1.1.28-add-mkdir-fallback.diff
@@ -0,0 +1,11 @@
+diff -ru libxslt-1.1.28.orig/libxslt/security.c libxslt-1.1.28/libxslt/security.c
+--- libxslt-1.1.28.orig/libxslt/security.c	2012-09-12 14:58:14.000000000 +0900
++++ libxslt-1.1.28/libxslt/security.c	2013-12-28 19:25:13.615751850 +0900
+@@ -39,6 +39,7 @@
+ #ifndef INVALID_FILE_ATTRIBUTES
+ #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+ #endif
++#define mkdir(path, mode) mkdir(path)
+ #endif
+ 
+ #ifndef HAVE_STAT
diff --git a/webkit2-gtk/sample/browser.rb b/webkit2-gtk/sample/browser.rb
new file mode 100644
index 0000000..de89389
--- /dev/null
+++ b/webkit2-gtk/sample/browser.rb
@@ -0,0 +1,30 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "webkit2-gtk"
+
+window = Gtk::Window.new
+window.signal_connect("destroy") do
+  Gtk.main_quit
+end
+
+view = WebKit2Gtk::WebView.new
+view.load_uri("http://webkitgtk.org/")
+
+window.add(view)
+window.show_all
+
+Gtk.main
diff --git a/webkit2-gtk/test/run-test.rb b/webkit2-gtk/test/run-test.rb
new file mode 100755
index 0000000..47ac11b
--- /dev/null
+++ b/webkit2-gtk/test/run-test.rb
@@ -0,0 +1,72 @@
+#!/usr/bin/env ruby
+#
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
+ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
+
+glib_base = File.join(ruby_gnome2_base, "glib2")
+gio_base = File.join(ruby_gnome2_base, "gio2")
+atk_base = File.join(ruby_gnome2_base, "atk")
+pango_base = File.join(ruby_gnome2_base, "pango")
+gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
+gdk3_base = File.join(ruby_gnome2_base, "gdk3")
+gtk3_base = File.join(ruby_gnome2_base, "gtk3")
+gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
+cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
+webkit2_gtk_base = File.join(ruby_gnome2_base, "webkit2-gtk")
+
+modules = [
+  [glib_base, "glib2"],
+  [gio_base, "gio2"],
+  [atk_base, "atk"],
+  [pango_base, "pango"],
+  [gdk_pixbuf_base, "gdk_pixbuf2"],
+  [gdk3_base, "gdk3"],
+  [gtk3_base, "gtk3"],
+  [gobject_introspection_base, "gobject-introspection"],
+  [cairo_gobject_base, "cairo-gobject"],
+  [webkit2_gtk_base, "webkit2-gtk"],
+]
+modules.each do |target, module_name|
+  if File.exist?("Makefile") and system("which make > /dev/null")
+    `make -C #{target.dump} > /dev/null` or exit(false)
+  end
+  $LOAD_PATH.unshift(File.join(target, "ext", module_name))
+  $LOAD_PATH.unshift(File.join(target, "lib"))
+end
+
+$LOAD_PATH.unshift(File.join(glib_base, "test"))
+require "glib-test-init"
+
+$LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
+require "gobject-introspection-test-utils"
+
+$LOAD_PATH.unshift(File.join(webkit2_gtk_base, "test"))
+require "webkit2-gtk-test-utils"
+
+require "webkit2-gtk"
+
+repository = GObjectIntrospection::Repository.default
+begin
+  repository.require(WebKit2Gtk::Loader::NAMESPACE)
+rescue GLib::Error
+  puts("Omit because typelib file doesn't exist: #{$!.message}")
+  exit(true)
+end
+
+exit Test::Unit::AutoRunner.run(true)
diff --git a/webkit2-gtk/test/test-webkit2-gtk-webview.rb b/webkit2-gtk/test/test-webkit2-gtk-webview.rb
new file mode 100644
index 0000000..d040ea1
--- /dev/null
+++ b/webkit2-gtk/test/test-webkit2-gtk-webview.rb
@@ -0,0 +1,61 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class TestWebKit2GtkWebView < Test::Unit::TestCase
+  def setup
+    @view = WebKit2Gtk::WebView.new
+    @http_server = WEBrick::HTTPServer.new(:Port => 0)
+    @http_server.mount_proc("/") do |request, response|
+      response.body = "Hello"
+    end
+    @http_server_thread = Thread.new do
+      @http_server.start
+    end
+  end
+
+  def teardown
+    @http_server.shutdown
+    @http_server_thread.join
+  end
+
+  def http_url
+    port = @http_server[:Port]
+    "http://127.0.0.1:#{port}/"
+  end
+
+  test "#load_uri" do
+    loaded = false
+
+    loop = GLib::MainLoop.new
+    timeout_id = GLib::Timeout.add(1000) do
+      timeout_id = nil
+      loop.quit
+      GLib::Source::REMOVE
+    end
+    @view.signal_connect("load-changed") do |view, event|
+      case event
+      when WebKit2Gtk::LoadEvent::FINISHED
+        GLib::Source.remove(timeout_id) if timeout_id
+        loaded = true
+        loop.quit
+      end
+    end
+    @view.load_uri(http_url)
+    loop.run
+
+    assert_true(loaded)
+  end
+end
diff --git a/webkit2-gtk/test/webkit2-gtk-test-utils.rb b/webkit2-gtk/test/webkit2-gtk-test-utils.rb
new file mode 100644
index 0000000..b388956
--- /dev/null
+++ b/webkit2-gtk/test/webkit2-gtk-test-utils.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  Ruby-GNOME2 Project Team
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "test-unit"
+
+require "webrick"
+
+module WebKit2GtkTestUtils
+  def only_webkit2_gtk_version(major, minor, micro=nil)
+    micro ||= 0
+    unless WebKit2Gtk.or_later?(major, minor, micro)
+      omit("Require WebKit2Gtk >= #{major}.#{minor}.#{micro}")
+    end
+  end
+end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gnome2.git



More information about the Pkg-ruby-extras-commits mailing list