Please enter the commit message for your changes. Lines starting
with '' will be ignored, and an empty message aborts the commit. On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: lib/ruby-gtk2-2.0.2/AUTHORS new file: lib/ruby-gtk2-2.0.2/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/NEWS new file: lib/ruby-gtk2-2.0.2/README new file: lib/ruby-gtk2-2.0.2/Rakefile new file: lib/ruby-gtk2-2.0.2/atk/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/atk/README new file: lib/ruby-gtk2-2.0.2/atk/Rakefile new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/atk.def new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/depend new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/extconf.rb new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.h new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkaction.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkcomponent.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkconversions.h new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkdocument.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkeditabletext.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkgobjectaccessible.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhyperlink.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhypertext.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimage.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimplementor.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobject.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobjectfactory.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobject.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectfactory.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectrole.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkprivate.h new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkregistry.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelation.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationset.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationtype.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkselection.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstate.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstateset.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstreamablecontent.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktable.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktext.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextattribute.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrange.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrectangle.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkutil.c new file: lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkvalue.c new file: lib/ruby-gtk2-2.0.2/atk/extconf.rb new file: lib/ruby-gtk2-2.0.2/atk/lib/atk.rb new file: lib/ruby-gtk2-2.0.2/atk/test/atk-test-utils.rb new file: lib/ruby-gtk2-2.0.2/atk/test/run-test.rb new file: lib/ruby-gtk2-2.0.2/atk/test/test-text-rectangle.rb new file: lib/ruby-gtk2-2.0.2/exec_make.rb new file: lib/ruby-gtk2-2.0.2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/README new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/Rakefile new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/depend new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/gdk_pixbuf2.def new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf.h new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf2private.h new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbufanimationiter.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixdata.c new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/lib/gdk_pixbuf2.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/anim.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/composite.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/flip.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/floppybuddy.gif new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/format.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/gnome-foot.png new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/inline.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/loader.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/pixdata.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/rotate.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/save.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/scale.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/simpleanim.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/utils.rb new file: lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/xpm.rb new file: lib/ruby-gtk2-2.0.2/gio2/README new file: lib/ruby-gtk2-2.0.2/gio2/Rakefile new file: lib/ruby-gtk2-2.0.2/gio2/TODO new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/depend new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.def new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.h new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2.h new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2conversions.h new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2private.h new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioappinfo.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioapplaunchcontext.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncinitable.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncresult.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiobufferedinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiobufferedoutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiocancellable.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiocharsetconverter.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiocontenttype.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioconverter.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioconverterinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioconverteroutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiodatainputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiodataoutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiodesktopappinfo.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiodrive.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioemblem.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioemblemedicon.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofile.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileattribute.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileattributeinfo.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileattributeinfolist.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileattributematcher.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofiledescriptorbased.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileenumerator.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileicon.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileinfo.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileiostream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofilemonitor.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofilenamecompleter.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofileoutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofilterinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiofilteroutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioicon.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioinetaddress.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioinetsocketaddress.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioinitable.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioio.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioiomodule.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioiomodules.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioioscheduler.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioioschedulerjob.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioiostream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioloadableicon.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiomemoryinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiomemoryoutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiomount.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiomountoperation.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgionetworkaddress.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgionetworkservice.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiooutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioresolver.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioseekable.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosimpleasyncresult.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocket.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketaddress.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketaddressenumerator.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketclient.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketconnectable.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketconnection.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketconnectionfactory.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketcontrolmessage.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketlistener.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosocketservice.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiosrvtarget.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiotcpconnection.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiothemedicon.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiothreadedsocketservice.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiotlscertificate.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixconnection.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixfdlist.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixfdmessage.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixinputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixmount.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixmountmonitor.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixmountpoint.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixmountpoints.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixmounts.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixoutputstream.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiounixsocketaddress.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiovfs.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiovolume.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiovolumemonitor.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiozlibcompressor.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgiozlibdecompressor.c new file: lib/ruby-gtk2-2.0.2/gio2/ext/gio2/util.c new file: lib/ruby-gtk2-2.0.2/gio2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gio2/lib/gio2.rb new file: lib/ruby-gtk2-2.0.2/gio2/lib/gio2/deprecated.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/load-test.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_bufferedinputstream.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_charsetconverter.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_datainputstream.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_fileenumerator.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_filemonitor.rb new file: lib/ruby-gtk2-2.0.2/gio2/test/test_inetaddress.rb new file: lib/ruby-gtk2-2.0.2/glib2/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/glib2/README new file: lib/ruby-gtk2-2.0.2/glib2/Rakefile new file: lib/ruby-gtk2-2.0.2/glib2/TODO new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/depend new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/extconf.rb new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/glib2.def new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgcompat.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib2conversions.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_bookmarkfile.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_convert.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_error.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_fileutils.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_i18n.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_int64.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_io_constants.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_iochannel.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_iochannel_win32_socket.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_iochannelerror.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_keyfile.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_maincontext.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_mainloop.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_messages.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_pollfd.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_shell.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_shellerror.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_source.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_spawn.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_spawnerror.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_threads.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_timer.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_ucs4.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_unichar.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_unicode.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_utf16.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_utf8.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_utils.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglib_win32.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglibdeprecated.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbglibdeprecated.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_boxed.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_closure.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_convert.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_enumflags.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_enums.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_flags.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_object.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_param.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_paramspecs.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_signal.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_strv.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_type.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_typeinstance.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_typeinterface.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_typemodule.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_typeplugin.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_value.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_valuearray.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobj_valuetypes.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobject.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgobject.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgprivate.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutil.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutil.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutil_callback.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutil_list.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutil_list.h new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutildeprecated.c new file: lib/ruby-gtk2-2.0.2/glib2/ext/glib2/rbgutildeprecated.h new file: lib/ruby-gtk2-2.0.2/glib2/extconf.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/glib-mkenums.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/glib2.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/glib2/deprecatable.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2-raketask.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/external-package.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/native-binary-build-task.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/package-task.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/package.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/source-download-task.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/win32-binary-build-task.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/gnome2/rake/win32-binary-download-task.rb new file: lib/ruby-gtk2-2.0.2/glib2/lib/mkmf-gnome2.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/bookmarkfile.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/idle.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/iochannel.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/keyfile.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/shell.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/spawn.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/timeout.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/timeout2.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/timer.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/type-register.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/type-register2.rb new file: lib/ruby-gtk2-2.0.2/glib2/sample/utils.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/glib-test-init.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/glib-test-utils.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/run-test.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_enum.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_file_utils.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_flags.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_glib2.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_iochannel.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_key_file.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_mkenums.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_poll_fd.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_signal.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_source.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_spawn.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_timeout.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_unicode.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_utils.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_value.rb new file: lib/ruby-gtk2-2.0.2/glib2/test/test_win32.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/gobject-introspection/README.md new file: lib/ruby-gtk2-2.0.2/gobject-introspection/Rakefile new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/depend new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/extconf.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/gobject_introspection.def new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-arg-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-base-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-boxed-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-callable-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-callback-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-constant-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-conversions.h new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-enum-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-field-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-flags-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-function-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-interface-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-loader.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-method-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-object-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-private.h new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-property-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-registered-type-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-repository.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-signal-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-struct-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-type-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-type-tag.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-types.h new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-union-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-unresolved-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-value-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gi-vfunc-info.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gobject-introspection.c new file: lib/ruby-gtk2-2.0.2/gobject-introspection/ext/gobject-introspection/rb-gobject-introspection.h new file: lib/ruby-gtk2-2.0.2/gobject-introspection/extconf.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/boxed-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/callable-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/collection-reader.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/interface-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/loader.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/object-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/repository.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/struct-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/lib/gobject-introspection/union-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/patches/0001-Support-external-g-ir-scanner.patch new file: lib/ruby-gtk2-2.0.2/gobject-introspection/patches/cross-g-ir-scanner.diff new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/gobject-introspection-test-utils.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/run-test.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-arg-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-base-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-boxed-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-callable-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-callback-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-constant-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-enum-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-field-type.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-flags-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-function-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-interface-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-loader.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-object-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-property-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-registered-type-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-repository.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-signal-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-struct-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-type-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-type-tag.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-union-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-value-info.rb new file: lib/ruby-gtk2-2.0.2/gobject-introspection/test/test-vfunc-info.rb new file: lib/ruby-gtk2-2.0.2/gtk2/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/gtk2/README new file: lib/ruby-gtk2-2.0.2/gtk2/Rakefile new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/depend new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/global.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/gtk2.def new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/init.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdk.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdk.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkatom.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkcairo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkcolor.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkcolormap.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkconst.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkconversions.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkcursor.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkdevice.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkdisplay.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkdisplaymanager.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkdragcontext.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkdraw.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkevent.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkgc.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkgeometry.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkimage.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkinput.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkkeymap.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkkeyval.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkpango.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkpangorenderer.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkpixbuf.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkpixmap.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkproperty.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkrectangle.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkregion.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkrgb.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkscreen.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkselection.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkthreads.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdktimecoord.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkvisual.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkwindow.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkwindowattr.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgdkx11.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtk.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtk.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaboutdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccelerator.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccelgroup.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccelgroupentry.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccelkey.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccellabel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccelmap.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaccessible.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaction.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkactiongroup.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkadjustment.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkalignment.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkallocation.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkarrow.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkaspectframe.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkassistant.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbin.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbindingset.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkborder.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbuildable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbuilder.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcalendar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcelleditable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcelllayout.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrenderer.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrendereraccel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrenderercombo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrendererpixbuf.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrendererprogress.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrendererspin.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrendererspinner.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrenderertext.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellrenderertoggle.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcellview.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcheckbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcheckmenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkclipboard.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcolorbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcolorsel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcolorselectiondialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcombo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcombobox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcomboboxentry.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkconst.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcontainer.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkconversions.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkcurve.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkdrag.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkdrawingarea.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkeditable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkentry.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkentrycompletion.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkeventbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkexpander.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilechooser.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilechooserbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilechooserdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilechooserwidget.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilefilter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilesel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfilesystemerror.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfixed.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfontbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfontselection.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkfontselectiondialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkframe.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkgamma.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhandlebox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhbbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhpaned.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhruler.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhscale.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhscrollbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkhseparator.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconfactory.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconinfo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconset.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconsize.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconsource.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkicontheme.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkiconview.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkimage.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkimagemenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkimcontext.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkimcontextsimple.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkimmulticontext.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkinfobar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkinputdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkinvisible.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkitemfactory.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtklabel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtklayout.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtklinkbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkliststore.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmacros.h new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmenu.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmenubar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmenushell.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmenutoolbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmessagedialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkmisc.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtknotebook.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkobject.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkoptionmenu.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkpagesetup.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkpagesetupunixdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkpaned.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkpapersize.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkplug.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintcontext.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprinter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintjob.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintoperation.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintoperationpreview.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintsettings.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprintunixdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprogress.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkprogressbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkradioaction.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkradiobutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkradiomenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkradiotoolbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrange.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrc.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrcstyle.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentaction.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentchooser.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentchooserdialog.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentchoosermenu.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentchooserwidget.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentdata.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentfilter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentfilterinfo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentinfo.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkrecentmanager.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkruler.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkscale.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkscalebutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkscrollbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkscrolledwindow.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkselection.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkselectiondata.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkseparator.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkseparatormenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkseparatortoolitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtksettings.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtksizegroup.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtksocket.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkspinbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkspinner.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkstatusbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkstatusicon.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkstock.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkstyle.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktargetlist.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktearoffmenuitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextappearance.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextattributes.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextbuffer.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextchild.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextiter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextmark.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktexttag.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktexttagtable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktextview.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktoggleaction.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktogglebutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktoggletoolbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktoolbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktoolbutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktoolitem.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktooltip.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktooltips.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreedragdest.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreedragsource.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreeiter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreemodel.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreemodelfilter.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreemodelsort.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreepath.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreerowreference.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreeselection.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreesortable.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreestore.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreeview.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtktreeviewcolumn.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkuimanager.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvbbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvbox.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkviewport.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvolumebutton.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvpaned.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvruler.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvscale.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvscrollbar.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkvseparator.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkwidget.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkwindow.c new file: lib/ruby-gtk2-2.0.2/gtk2/ext/gtk2/rbgtkwindowgroup.c new file: lib/ruby-gtk2-2.0.2/gtk2/extconf.rb new file: lib/ruby-gtk2-2.0.2/gtk2/lib/gtk2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/lib/gtk2/base.rb new file: lib/ruby-gtk2-2.0.2/gtk2/patches/gtk+-2.24.14-add-missing-exeext.diff new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/README new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/alphatest.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/apple-red.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/appwindow.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/background.jpg new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/builder.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/button_box.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-arc-negative.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-arc.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-clip-image.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-clip-rectangle.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-clip.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-curve-rectangle.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-curve-to.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-dash.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-fill-and-stroke.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-fill-and-stroke2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-gradient.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-image-pattern.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-image.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-line-cap.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-line-join.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-long-lines.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-operator.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-path.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-pattern-fill.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-self-intersect.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-text-align-center.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-text-extents.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/cairo-text.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/changedisplay.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/clipboard.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/colorsel.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/common.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/demo.ui new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/dialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/drawingarea.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/editable_cells.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/entry_completion.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/expander.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/floppybuddy.gif new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-applets.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-calendar.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-foot.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-fs-directory.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-fs-regular.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-gimp.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-gmush.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnome-gsame.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gnu-keys.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/gtk-logo-rgb.gif new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/hypertext.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/iconview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/images.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/item_factory.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/list_store.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/main.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/menus.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/panes.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/pixbufs.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/printing.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/rotated_text.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/ruby-gnome2-logo.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/sizegroup.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/stock_browser.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/textview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/gtk-demo/tree_store.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/aboutdialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/aboutdialog2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/alpha-demo.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/assistant.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/bindings.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/button.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/button2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/buttonbox.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/cairo-pong.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/calendar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/checkbutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/colorselection.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/combo_check.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/combobox.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/composited-windows.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/cursor.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/dialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/dialog2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/dnd.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/dndtreeview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/drag-move.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/drawing.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/entry.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/entrycompletion.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/expander.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/filechooser.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/fileselection.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/frame.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/gc.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/gdkscreen.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/gnome-logo-icon.png new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/helloworld.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/iconview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/image.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/infobar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/itemfactory.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/itemfactory2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/keyboard_grab.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/label.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/linkbutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/listview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/menu.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/misc_button.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/mouse-gesture.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/pangorenderer.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/pointer_grab.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/print.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/properties.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/radiobutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/recentchooserdialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/rgtk+cairo.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/scalebutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/settings.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/statusicon.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/stock.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/style_property.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/style_property.rc new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/t-gtkplug.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/t-gtksocket.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/test.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/textbuffer_serialize.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/threads.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/to_drawable.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/togglebutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/toolbar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/tooltips.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/tree_combo.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/tree_progress.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/treemodelfilter.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/treeview.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/uimanager.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/uimanager2.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/uimanager2.xml new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/window.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/misc/xbm_cursor.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/3DRings.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/FilesQueue.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/Modeller.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/README new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/button.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/buttonbox.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/check-n.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/check-y.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/checkbutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/circles.xbm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/colorselect.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/dialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/entry.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/filesel.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/fontselection.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/gammacurve.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/labels.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/layout.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/marble.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/menu.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/notebook.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/pixmap.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/progressbar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/radiobutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/range.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/reparent.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/rulers.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/sample.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/savedposition.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/scrolledwindow.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/shapedwindow.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/spinbutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/statusbar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/test.xpm new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/testgtk.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/testgtkrc new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/testgtkrc2 new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/togglebutton.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/toolbar.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/tooltips.rb new file: lib/ruby-gtk2-2.0.2/gtk2/sample/testgtk/wmhints.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/gtk-test-utils.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/run-test.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gc.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_color.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_display.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_event.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_gc.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_geometry.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_keymap.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_pango.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_rectangle.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_selection_data.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_window.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gdk_window_attribute.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_about_dialog.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_accel_group_entry.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_accel_key.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_allocation.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_border.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_buildable.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_builder.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_entry.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_icon_theme.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_image.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_list_store.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_menu_item.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_rc_style.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_recent_data.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_recent_filter_info.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_tree_path.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_unix_print.rb new file: lib/ruby-gtk2-2.0.2/gtk2/test/test_gtk_widget.rb new file: lib/ruby-gtk2-2.0.2/pango/COPYING.LIB new file: lib/ruby-gtk2-2.0.2/pango/README new file: lib/ruby-gtk2-2.0.2/pango/Rakefile new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/depend new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/extconf.rb new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/pango.def new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.h new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoanalysis.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattribute.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattriterator.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattrlist.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairo.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairocontext.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocolor.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocontext.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoconversions.h new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocoverage.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoengine.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofont.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontdescription.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontface.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontfamily.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmap.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmetrics.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontset.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontsetsimple.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphinfo.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphitem.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphstring.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangogravity.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoitem.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolanguage.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayout.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutiter.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutline.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangologattr.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangomatrix.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoprivate.h new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorectangle.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorenderer.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscript.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscriptiter.c new file: lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangotabarray.c new file: lib/ruby-gtk2-2.0.2/pango/extconf.rb new file: lib/ruby-gtk2-2.0.2/pango/lib/pango.rb new file: lib/ruby-gtk2-2.0.2/pango/patches/harfbuzz-0.9.17-disable-uniscribe.diff new file: lib/ruby-gtk2-2.0.2/pango/patches/pango-1.34.0-enable-fc-font.diff new file: lib/ruby-gtk2-2.0.2/pango/sample/attribute.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/break.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/gdk_layout.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/glyphstring.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/item.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/label.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/layout.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/pango_cairo.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/parse.rb new file: lib/ruby-gtk2-2.0.2/pango/sample/sample.txt new file: lib/ruby-gtk2-2.0.2/pango/sample/script.rb new file: lib/ruby-gtk2-2.0.2/pango/test/pango-test-utils.rb new file: lib/ruby-gtk2-2.0.2/pango/test/run-test.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-analysis.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-attribute.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-color.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-language.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-log-attr.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-matrix.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test-rectangle.rb new file: lib/ruby-gtk2-2.0.2/pango/test/test_layout.rb new file: lib/ruby-gtk2-2.0.2/run-test.rb
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
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
|
@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Copyright (C) 2012-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
|
||||
|
||||
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 = "gobject_introspection"
|
||||
package_id = "gobject-introspection-1.0"
|
||||
|
||||
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
|
||||
|
||||
setup_win32(module_name, base_dir)
|
||||
|
||||
unless required_pkg_config_package(package_id,
|
||||
:debian => "libgirepository1.0-dev",
|
||||
:fedora => "gobject-introspection-devel",
|
||||
:homebrew => "gobject-introspection",
|
||||
:macports => "gobject-introspection")
|
||||
exit(false)
|
||||
end
|
||||
|
||||
make_version_header("GI", package_id, ".")
|
||||
|
||||
gi_headers = ["girepository.h"]
|
||||
have_func("g_interface_info_find_signal", gi_headers)
|
||||
|
||||
enum_type_prefix = "gobject-introspection-enum-types"
|
||||
include_paths = PKGConfig.cflags_only_I(package_id)
|
||||
headers = include_paths.split.inject([]) do |result, path|
|
||||
result + Dir.glob(File.join(path.sub(/^-I/, ""), "gi{repository,types}.h"))
|
||||
end
|
||||
glib_mkenums(enum_type_prefix, headers, "G_TYPE_", ["girepository.h"])
|
||||
|
||||
create_pkg_config_file("Ruby/GObjectIntrospection",
|
||||
package_id, ruby_gnome2_version,
|
||||
"ruby-gobject-introspection.pc")
|
||||
|
||||
ensure_objs
|
||||
|
||||
$defs << "-DRUBY_GOBJECT_INTROSPECTION_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
|
@ -0,0 +1,5 @@
|
||||
EXPORTS
|
||||
Init_gobject_introspection
|
||||
|
||||
rb_gi_callback_data_free
|
||||
rb_gi_callback_register_finder
|
@ -0,0 +1,151 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIArgInfo
|
||||
#define SELF(self) (RVAL2GI_ARG_INFO(self))
|
||||
|
||||
GType
|
||||
gi_arg_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIArgInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_direction(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_DIRECTION2RVAL(g_arg_info_get_direction(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_caller_allocates_p(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_arg_info_is_caller_allocates(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_return_value_p(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_arg_info_is_return_value(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_optional_p(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_arg_info_is_optional(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_may_be_null_p(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_arg_info_may_be_null(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ownership_transfer(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_TRANSFER2RVAL(g_arg_info_get_ownership_transfer(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_scope(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_SCOPE_TYPE2RVAL(g_arg_info_get_scope(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_closure(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_arg_info_get_closure(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_destroy(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_arg_info_get_destroy(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type(VALUE self)
|
||||
{
|
||||
GIArgInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_arg_info_get_type(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_arg_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_ARG_INFO, "ArgInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(direction, 0);
|
||||
RG_DEF_METHOD_P(caller_allocates, 0);
|
||||
RG_DEF_METHOD_P(return_value, 0);
|
||||
RG_DEF_METHOD_P(optional, 0);
|
||||
RG_DEF_METHOD_P(may_be_null, 0);
|
||||
RG_DEF_METHOD(ownership_transfer, 0);
|
||||
RG_DEF_METHOD(scope, 0);
|
||||
RG_DEF_METHOD(closure, 0);
|
||||
RG_DEF_METHOD(destroy, 0);
|
||||
RG_DEF_METHOD(type, 0);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_DIRECTION, "Direction", rb_mGI);
|
||||
G_DEF_CLASS(G_TYPE_I_SCOPE_TYPE, "ScopeType", rb_mGI);
|
||||
G_DEF_CLASS(G_TYPE_I_TRANSFER, "Transfer", rb_mGI);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,218 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIBaseInfo
|
||||
#define SELF(self) RVAL2GI_BASE_INFO(self)
|
||||
|
||||
VALUE
|
||||
rb_gi_base_info_to_ruby(GIBaseInfo *info)
|
||||
{
|
||||
GType g_type;
|
||||
GIInfoType info_type;
|
||||
|
||||
if (!info) {
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
info_type = g_base_info_get_type(info);
|
||||
switch (info_type) {
|
||||
case GI_INFO_TYPE_INVALID:
|
||||
g_type = GI_TYPE_BASE_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_FUNCTION:
|
||||
{
|
||||
GIFunctionInfoFlags flags;
|
||||
|
||||
flags = g_function_info_get_flags((GIFunctionInfo *)info);
|
||||
if (flags & GI_FUNCTION_IS_METHOD) {
|
||||
g_type = GI_TYPE_METHOD_INFO;
|
||||
} else if (flags & GI_FUNCTION_IS_CONSTRUCTOR) {
|
||||
g_type = GI_TYPE_CONSTRUCTOR_INFO;
|
||||
} else {
|
||||
g_type = GI_TYPE_FUNCTION_INFO;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GI_INFO_TYPE_CALLBACK:
|
||||
g_type = GI_TYPE_CALLBACK_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_STRUCT:
|
||||
g_type = GI_TYPE_STRUCT_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_BOXED:
|
||||
g_type = GI_TYPE_BOXED_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_ENUM:
|
||||
g_type = GI_TYPE_ENUM_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_FLAGS:
|
||||
g_type = GI_TYPE_FLAGS_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_OBJECT:
|
||||
g_type = GI_TYPE_OBJECT_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_INTERFACE:
|
||||
g_type = GI_TYPE_INTERFACE_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_CONSTANT:
|
||||
g_type = GI_TYPE_CONSTANT_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_INVALID_0:
|
||||
g_type = GI_TYPE_BASE_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_UNION:
|
||||
g_type = GI_TYPE_UNION_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_VALUE:
|
||||
g_type = GI_TYPE_VALUE_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_SIGNAL:
|
||||
g_type = GI_TYPE_SIGNAL_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_VFUNC:
|
||||
g_type = GI_TYPE_VFUNC_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_PROPERTY:
|
||||
g_type = GI_TYPE_PROPERTY_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_FIELD:
|
||||
g_type = GI_TYPE_FIELD_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_ARG:
|
||||
g_type = GI_TYPE_ARG_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_TYPE:
|
||||
g_type = GI_TYPE_TYPE_INFO;
|
||||
break;
|
||||
case GI_INFO_TYPE_UNRESOLVED:
|
||||
g_type = GI_TYPE_UNRESOLVED_INFO;
|
||||
break;
|
||||
default:
|
||||
g_type = GI_TYPE_BASE_INFO;
|
||||
break;
|
||||
}
|
||||
|
||||
return BOXED2RVAL(info, g_type);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_gi_base_info_to_ruby_with_unref(GIBaseInfo *info)
|
||||
{
|
||||
VALUE rb_info;
|
||||
|
||||
rb_info = rb_gi_base_info_to_ruby(info);
|
||||
if (!NIL_P(rb_info)) {
|
||||
g_base_info_unref(info);
|
||||
}
|
||||
|
||||
return rb_info;
|
||||
}
|
||||
|
||||
GIBaseInfo *
|
||||
rb_gi_base_info_from_ruby(VALUE rb_info)
|
||||
{
|
||||
return RVAL2BOXED(rb_info, GI_TYPE_BASE_INFO);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type(VALUE self)
|
||||
{
|
||||
GIBaseInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_INFO_TYPE2RVAL(g_base_info_get_type(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_name(VALUE self)
|
||||
{
|
||||
GIBaseInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_base_info_get_name(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_namespace(VALUE self)
|
||||
{
|
||||
GIBaseInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_base_info_get_namespace(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_aref(VALUE self, VALUE name)
|
||||
{
|
||||
GIBaseInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_base_info_get_attribute(info, RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_each(VALUE self)
|
||||
{
|
||||
GIAttributeIter iter = {0, };
|
||||
GIBaseInfo *info;
|
||||
gchar *name, *value;
|
||||
|
||||
RETURN_ENUMERATOR(self, 0, NULL);
|
||||
|
||||
info = SELF(self);
|
||||
while (g_base_info_iterate_attributes(info, &iter, &name, &value)) {
|
||||
VALUE rb_name, rb_value;
|
||||
rb_name = CSTR2RVAL(name);
|
||||
rb_value = CSTR2RVAL(value);
|
||||
rb_yield(rb_ary_new3(2, rb_name, rb_value));
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_base_info_init(VALUE rb_mGI)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE = G_DEF_CLASS(GI_TYPE_BASE_INFO, "BaseInfo", rb_mGI);
|
||||
|
||||
rb_include_module(RG_TARGET_NAMESPACE, rb_mEnumerable);
|
||||
|
||||
RG_DEF_METHOD(type, 0);
|
||||
RG_DEF_METHOD(name, 0);
|
||||
RG_DEF_METHOD(namespace, 0);
|
||||
RG_DEF_METHOD_OPERATOR("[]", aref, 1);
|
||||
RG_DEF_METHOD(each, 0);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_INFO_TYPE, "InfoType", rb_mGI);
|
||||
|
||||
rb_gi_callable_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_registered_type_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_constant_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_value_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_property_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_field_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_arg_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_type_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_unresolved_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIBoxedInfo
|
||||
#define SELF(self) (RVAL2GI_BOXED_INFO(self))
|
||||
|
||||
GType
|
||||
gi_boxed_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIBoxedInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_boxed_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_BOXED_INFO, "BoxedInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
(void)RG_TARGET_NAMESPACE; /* suppress a warning. */
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGICallableInfo
|
||||
#define SELF(self) ((GICallableInfo *)(RVAL2GI_BASE_INFO(self)))
|
||||
|
||||
GType
|
||||
gi_callable_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GICallableInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_return_type(VALUE self)
|
||||
{
|
||||
GICallableInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL(g_callable_info_get_return_type(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_caller_owns(VALUE self)
|
||||
{
|
||||
GICallableInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_TRANSFER2RVAL(g_callable_info_get_caller_owns(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_may_return_null_p(VALUE self)
|
||||
{
|
||||
GICallableInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_callable_info_may_return_null(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_args(VALUE self)
|
||||
{
|
||||
GICallableInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_callable_info_get_n_args(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_arg(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GICallableInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_callable_info_get_arg(info, n));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_callable_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_CALLABLE_INFO, "CallableInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(return_type, 0);
|
||||
RG_DEF_METHOD(caller_owns, 0);
|
||||
RG_DEF_METHOD_P(may_return_null, 0);
|
||||
RG_DEF_METHOD(n_args, 0);
|
||||
RG_DEF_METHOD(get_arg, 1);
|
||||
|
||||
rb_gi_function_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_callback_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_signal_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_vfunc_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGICallbackInfo
|
||||
#define SELF(self) RVAL2GI_BASE_INFO(self)
|
||||
|
||||
GType
|
||||
gi_callback_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GICallbackInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_callback_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_CALLBACK_INFO, "CallbackInfo", rb_mGI,
|
||||
rb_cGICallableInfo);
|
||||
|
||||
(void)RG_TARGET_NAMESPACE; /* suppress a warning. */
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIConstantInfo
|
||||
#define SELF(self) (RVAL2GI_CONSTANT_INFO(self))
|
||||
|
||||
GType
|
||||
gi_constant_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIConstantInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type(VALUE self)
|
||||
{
|
||||
GIConstantInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_constant_info_get_type(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_value(VALUE self)
|
||||
{
|
||||
GIConstantInfo *info;
|
||||
GIArgument value;
|
||||
gint value_size;
|
||||
GITypeInfo *type_info;
|
||||
VALUE rb_value;
|
||||
|
||||
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);
|
||||
g_base_info_unref(type_info);
|
||||
g_constant_info_free_value(info, &value);
|
||||
|
||||
return rb_value;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_constant_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_CONSTANT_INFO, "ConstantInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(type, 0);
|
||||
RG_DEF_METHOD(value, 0);
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIConstructorInfo
|
||||
#define SELF(self) RVAL2GI_FUNCTION_INFO(self)
|
||||
|
||||
GType
|
||||
gi_constructor_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIConstructorInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_receiver(VALUE receiver, GITypeInfo *info, GIArgument *value)
|
||||
{
|
||||
GIBaseInfo *interface_info;
|
||||
GIInfoType interface_type;
|
||||
|
||||
if (g_type_info_get_tag(info) != GI_TYPE_TAG_INTERFACE) {
|
||||
rb_raise(rb_eRuntimeError, "TODO: returned value isn't interface");
|
||||
}
|
||||
|
||||
interface_info = g_type_info_get_interface(info);
|
||||
interface_type = g_base_info_get_type(interface_info);
|
||||
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:
|
||||
G_INITIALIZE(receiver, value->v_pointer);
|
||||
break;
|
||||
case GI_INFO_TYPE_INVALID:
|
||||
case GI_INFO_TYPE_FUNCTION:
|
||||
case GI_INFO_TYPE_CALLBACK:
|
||||
case GI_INFO_TYPE_BOXED:
|
||||
case GI_INFO_TYPE_ENUM:
|
||||
case GI_INFO_TYPE_FLAGS:
|
||||
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:
|
||||
default:
|
||||
rb_raise(rb_eRuntimeError,
|
||||
"TODO: returned value isn't object or struct");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_invoke(VALUE self, VALUE rb_options)
|
||||
{
|
||||
GIFunctionInfo *info;
|
||||
GICallableInfo *callable_info;
|
||||
VALUE receiver;
|
||||
GIArgument return_value;
|
||||
GITypeInfo return_value_info;
|
||||
|
||||
info = SELF(self);
|
||||
callable_info = (GICallableInfo *)info;
|
||||
|
||||
rb_options = rbg_to_hash(rb_options);
|
||||
receiver = rb_hash_delete(rb_options, ID2SYM(rb_intern("receiver")));
|
||||
if (NIL_P(receiver)) {
|
||||
receiver = rb_hash_delete(rb_options, rb_str_new_cstr("receiver"));
|
||||
}
|
||||
if (NIL_P(receiver)) {
|
||||
rb_raise(rb_eArgError,
|
||||
"receiver is missing: %s",
|
||||
RBG_INSPECT(rb_options));
|
||||
}
|
||||
/* TODO: use rb_protect */
|
||||
rb_gi_function_info_invoke_raw(info,
|
||||
rb_options,
|
||||
&return_value);
|
||||
|
||||
g_callable_info_load_return_type(callable_info, &return_value_info);
|
||||
initialize_receiver(receiver, &return_value_info, &return_value);
|
||||
|
||||
return receiver;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_constructor_info_init(VALUE rb_mGI, VALUE rb_cGIFunctionInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_CONSTRUCTOR_INFO,
|
||||
"ConstructorInfo", rb_mGI,
|
||||
rb_cGIFunctionInfo);
|
||||
|
||||
RG_DEF_METHOD(invoke, 1);
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#ifndef RB_GI_CONVERSIONS_H
|
||||
#define RB_GI_CONVERSIONS_H
|
||||
|
||||
#define RVAL2GI_REPOSITORY(rb_object) (G_IREPOSITORY(RVAL2GOBJ(rb_object)))
|
||||
#define RVAL2GI_REPOSITORY_LOAD_FLAGS(rb_flags) \
|
||||
(RVAL2GFLAGS(rb_flags, G_TYPE_I_REPOSITORY_LOAD_FLAGS))
|
||||
|
||||
#define GI_BASE_INFO2RVAL(info) \
|
||||
(rb_gi_base_info_to_ruby((GIBaseInfo *)(info)))
|
||||
#define GI_BASE_INFO2RVAL_WITH_UNREF(info) \
|
||||
(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_OUT_ARGUMENT2RVAL(argument, arg_info) \
|
||||
(rb_gi_out_argument_to_ruby((argument), (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 RVAL2GI_REGISTERED_TYPE_INFO(rb_object) \
|
||||
((GIRegisteredTypeInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_FUNCTION_INFO(rb_object) \
|
||||
((GIFunctionInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_STRUCT_INFO(rb_object) \
|
||||
((GIStructInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_ENUM_INFO(rb_object) \
|
||||
((GIEnumInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_OBJECT_INFO(rb_object) \
|
||||
((GIObjectInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_INTERFACE_INFO(rb_object) \
|
||||
((GIInterfaceInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_CONSTANT_INFO(rb_object) \
|
||||
((GIConstantInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_UNION_INFO(rb_object) \
|
||||
((GIUnionInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_VALUE_INFO(rb_object) \
|
||||
((GIValueInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_ARG_INFO(rb_object) \
|
||||
((GIArgInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_FIELD_INFO(rb_object) \
|
||||
((GIFieldInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
#define RVAL2GI_TYPE_INFO(rb_object) \
|
||||
((GITypeInfo *)RVAL2GI_BASE_INFO(rb_object))
|
||||
|
||||
#define GI_INFO_TYPE2RVAL(type) (GENUM2RVAL(type, G_TYPE_I_INFO_TYPE))
|
||||
#define GI_TRANSFER2RVAL(transfer) (GENUM2RVAL(transfer, G_TYPE_I_TRANSFER))
|
||||
#define GI_DIRECTION2RVAL(direction) (GENUM2RVAL(direction, G_TYPE_I_DIRECTION))
|
||||
#define GI_SCOPE_TYPE2RVAL(scope) (GENUM2RVAL(scope, G_TYPE_I_SCOPE_TYPE))
|
||||
#define RVAL2GI_TYPE_TAG(rb_tag) (RVAL2GENUM(rb_tag, G_TYPE_I_TYPE_TAG))
|
||||
#define GI_TYPE_TAG2RVAL(tag) (GENUM2RVAL(tag, G_TYPE_I_TYPE_TAG))
|
||||
#define GI_ARRAY_TYPE2RVAL(type) (rb_gi_array_type_to_ruby(type))
|
||||
|
||||
#define GI_FUNCTION_INFO_FLAGS2RVAL(tag) \
|
||||
(GFLAGS2RVAL(tag, G_TYPE_I_FUNCTION_INFO_FLAGS))
|
||||
#define GI_SIGNAL_FLAGS2RVAL(tag) \
|
||||
(GFLAGS2RVAL(tag, G_TYPE_SIGNAL_FLAGS))
|
||||
#define GI_VFUNC_INFO_FLAGS2RVAL(tag) \
|
||||
(GFLAGS2RVAL(tag, G_TYPE_IV_FUNC_INFO_FLAGS))
|
||||
#define GI_FIELD_INFO_FLAGS2RVAL(tag) \
|
||||
(GFLAGS2RVAL(tag, G_TYPE_I_FIELD_INFO_FLAGS))
|
||||
|
||||
VALUE rb_gi_base_info_to_ruby (GIBaseInfo *info);
|
||||
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);
|
||||
void rb_gi_out_argument_init (GIArgument *argument,
|
||||
GIArgInfo *arg_info);
|
||||
VALUE rb_gi_out_argument_to_ruby (GIArgument *argument,
|
||||
GIArgInfo *arg_info);
|
||||
void rb_gi_out_argument_fin (GIArgument *argument,
|
||||
GIArgInfo *arg_info);
|
||||
VALUE rb_gi_return_argument_to_ruby (GIArgument *argument,
|
||||
GICallableInfo *callable_info);
|
||||
GIArgument *rb_gi_value_argument_from_ruby (GIArgument *argument,
|
||||
GITypeInfo *type_info,
|
||||
VALUE rb_argument);
|
||||
GIArgument *rb_gi_in_argument_from_ruby (GIArgument *argument,
|
||||
GIArgInfo *arg_info,
|
||||
VALUE rb_argument);
|
||||
void rb_gi_value_argument_free (GIArgument *argument,
|
||||
GITypeInfo *type_info);
|
||||
void rb_gi_in_argument_free (GIArgument *argument,
|
||||
GIArgInfo *arg_info);
|
||||
|
||||
VALUE rb_gi_array_type_to_ruby (GIArrayType type);
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,145 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIEnumInfo
|
||||
#define SELF(self) (RVAL2GI_ENUM_INFO(self))
|
||||
|
||||
GType
|
||||
gi_enum_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIEnumInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_values(VALUE self)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_enum_info_get_n_values(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_value(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_enum_info_get_value(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_values(VALUE self)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
gint i, n;
|
||||
VALUE rb_values;
|
||||
|
||||
info = SELF(self);
|
||||
|
||||
rb_values = rb_ary_new();
|
||||
n = g_enum_info_get_n_values(info);
|
||||
for (i = 0; i < n; i++) {
|
||||
GIValueInfo *value_info;
|
||||
value_info = g_enum_info_get_value(info, i);
|
||||
rb_ary_push(rb_values, GI_BASE_INFO2RVAL_WITH_UNREF(value_info));
|
||||
}
|
||||
|
||||
return rb_values;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_methods(VALUE self)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_enum_info_get_n_methods(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_method(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_enum_info_get_method(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_methods(VALUE self)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
gint i, n;
|
||||
VALUE rb_methods;
|
||||
|
||||
info = SELF(self);
|
||||
|
||||
rb_methods = rb_ary_new();
|
||||
n = g_enum_info_get_n_methods(info);
|
||||
for (i = 0; i < n; i++) {
|
||||
GIFunctionInfo *function_info;
|
||||
function_info = g_enum_info_get_method(info, i);
|
||||
rb_ary_push(rb_methods, GI_BASE_INFO2RVAL_WITH_UNREF(function_info));
|
||||
}
|
||||
|
||||
return rb_methods;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_storage_type(VALUE self)
|
||||
{
|
||||
GIEnumInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_TYPE_TAG2RVAL(g_enum_info_get_storage_type(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_enum_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_ENUM_INFO, "EnumInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
RG_DEF_METHOD(n_values, 0);
|
||||
RG_DEF_METHOD(get_value, 1);
|
||||
RG_DEF_METHOD(values, 0);
|
||||
RG_DEF_METHOD(n_methods, 0);
|
||||
RG_DEF_METHOD(get_method, 1);
|
||||
RG_DEF_METHOD(methods, 0);
|
||||
RG_DEF_METHOD(storage_type, 0);
|
||||
|
||||
rb_gi_flags_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIFieldInfo
|
||||
#define SELF(self) (RVAL2GI_FIELD_INFO(self))
|
||||
|
||||
GType
|
||||
gi_field_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIFieldInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flags(VALUE self)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_FIELD_INFO_FLAGS2RVAL(g_field_info_get_flags(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_field_info_get_size(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_offset(VALUE self)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_field_info_get_offset(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type(VALUE self)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_field_info_get_type(info));
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_gi_field_info_get_field_raw(GIFieldInfo *info, gpointer memory)
|
||||
{
|
||||
GIArgument argument;
|
||||
GITypeInfo *type_info;
|
||||
VALUE rb_field_value;
|
||||
|
||||
if (!g_field_info_get_field(info, memory, &argument)) {
|
||||
rb_raise(rb_eArgError, "failed to get field value");
|
||||
}
|
||||
|
||||
type_info = g_field_info_get_type(info);
|
||||
rb_field_value = GI_ARGUMENT2RVAL(&argument, type_info);
|
||||
g_base_info_unref(type_info);
|
||||
|
||||
return rb_field_value;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_field_info_set_field_raw(GIFieldInfo *info, gpointer memory,
|
||||
VALUE rb_field_value)
|
||||
{
|
||||
GIArgument field_value;
|
||||
GITypeInfo *type_info;
|
||||
gboolean succeeded;
|
||||
|
||||
type_info = g_field_info_get_type(info);
|
||||
RVAL2GI_VALUE_ARGUMENT(&field_value, type_info, rb_field_value);
|
||||
|
||||
succeeded = g_field_info_set_field(info, memory, &field_value);
|
||||
rb_gi_value_argument_free(&field_value, type_info);
|
||||
g_base_info_unref(type_info);
|
||||
|
||||
if (!succeeded) {
|
||||
rb_raise(rb_eArgError, "failed to set field value");
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field(VALUE self, VALUE rb_memory)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
gpointer memory;
|
||||
|
||||
info = SELF(self);
|
||||
memory = GUINT_TO_POINTER(NUM2ULONG(rb_memory));
|
||||
return rb_gi_field_info_get_field_raw(info, memory);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_field(VALUE self, VALUE rb_memory, VALUE rb_field_value)
|
||||
{
|
||||
GIFieldInfo *info;
|
||||
gpointer memory;
|
||||
|
||||
info = SELF(self);
|
||||
memory = GUINT_TO_POINTER(NUM2ULONG(rb_memory));
|
||||
rb_gi_field_info_set_field_raw(info, memory, rb_field_value);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_field_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_FIELD_INFO, "FieldInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(flags, 0);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(offset, 0);
|
||||
RG_DEF_METHOD(type, 0);
|
||||
RG_DEF_METHOD(get_field, 1);
|
||||
RG_DEF_METHOD(set_field, 2);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_FIELD_INFO_FLAGS, "FieldInfoFlags", rb_mGI);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIFlagsInfo
|
||||
|
||||
GType
|
||||
gi_flags_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIFlagsInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_flags_info_init(VALUE rb_mGI, VALUE rb_cGIEnumInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_FLAGS_INFO, "FlagsInfo", rb_mGI,
|
||||
rb_cGIEnumInfo);
|
||||
|
||||
/* Suppress a warning. */
|
||||
(void)RG_TARGET_NAMESPACE;
|
||||
}
|
@ -0,0 +1,764 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#ifdef HAVE_RUBY_THREAD_H
|
||||
# include <ruby/thread.h>
|
||||
# define RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_TYPE void *
|
||||
# define RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_VALUE NULL
|
||||
#else
|
||||
# define rb_thread_call_without_gvl(func, func_data, ubf, ubf_data) \
|
||||
rb_thread_blocking_region(func, func_data, ubf, ubf_data)
|
||||
# define RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_TYPE VALUE
|
||||
# define RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_VALUE Qnil
|
||||
#endif
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIFunctionInfo
|
||||
#define SELF(self) RVAL2GI_FUNCTION_INFO(self)
|
||||
|
||||
static VALUE RG_TARGET_NAMESPACE;
|
||||
static VALUE rb_cGLibError;
|
||||
static const char *callbacks_key = "gi_callbacks";
|
||||
static GPtrArray *callback_finders;
|
||||
|
||||
GType
|
||||
gi_function_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIFunctionInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_symbol(VALUE self)
|
||||
{
|
||||
GIFunctionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_function_info_get_symbol(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flags(VALUE self)
|
||||
{
|
||||
GIFunctionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_FUNCTION_INFO_FLAGS2RVAL(g_function_info_get_flags(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_property(VALUE self)
|
||||
{
|
||||
GIFunctionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL(g_function_info_get_property(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_vfunc(VALUE self)
|
||||
{
|
||||
GIFunctionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL(g_function_info_get_vfunc(info));
|
||||
}
|
||||
|
||||
static void
|
||||
allocate_arguments(GICallableInfo *info,
|
||||
GArray *in_args, GArray *out_args,
|
||||
GPtrArray *args_metadata)
|
||||
{
|
||||
gint i, n_args;
|
||||
gint rb_arg_index = 0;
|
||||
|
||||
n_args = g_callable_info_get_n_args(info);
|
||||
for (i = 0; i < n_args; i++) {
|
||||
GIArgument argument;
|
||||
RBGIArgMetadata *metadata;
|
||||
GIArgInfo *arg_info;
|
||||
GIDirection direction;
|
||||
|
||||
memset(&argument, 0, sizeof(GIArgument));
|
||||
|
||||
metadata = ALLOC(RBGIArgMetadata);
|
||||
arg_info = &(metadata->arg_info);
|
||||
g_callable_info_load_arg(info, i, arg_info);
|
||||
metadata->scope_type = g_arg_info_get_scope(arg_info);
|
||||
metadata->direction = g_arg_info_get_direction(arg_info);
|
||||
metadata->callback_p = (metadata->scope_type != GI_SCOPE_TYPE_INVALID);
|
||||
metadata->closure_p = FALSE;
|
||||
metadata->destroy_p = FALSE;
|
||||
metadata->inout_argv_p = FALSE;
|
||||
metadata->in_arg_index = -1;
|
||||
metadata->closure_in_arg_index = -1;
|
||||
metadata->destroy_in_arg_index = -1;
|
||||
metadata->rb_arg_index = -1;
|
||||
metadata->out_arg_index = -1;
|
||||
metadata->inout_argc_arg_index = -1;
|
||||
|
||||
direction = metadata->direction;
|
||||
if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
|
||||
metadata->in_arg_index = in_args->len;
|
||||
g_array_append_val(in_args, argument);
|
||||
metadata->rb_arg_index = rb_arg_index++;
|
||||
}
|
||||
if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
|
||||
metadata->out_arg_index = out_args->len;
|
||||
g_array_append_val(out_args, argument);
|
||||
}
|
||||
|
||||
g_ptr_array_add(args_metadata, metadata);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fill_metadata_inout_argv(GPtrArray *args_metadata)
|
||||
{
|
||||
guint i;
|
||||
gint inout_argc_arg_index = -1;
|
||||
|
||||
for (i = 0; i < args_metadata->len; i++) {
|
||||
RBGIArgMetadata *metadata;
|
||||
GIArgInfo *arg_info;
|
||||
const gchar *name;
|
||||
|
||||
metadata = g_ptr_array_index(args_metadata, i);
|
||||
if (metadata->direction != GI_DIRECTION_INOUT) {
|
||||
continue;
|
||||
}
|
||||
arg_info = &(metadata->arg_info);
|
||||
name = g_base_info_get_name(arg_info);
|
||||
if (strcmp(name, "argc") == 0) {
|
||||
inout_argc_arg_index = i;
|
||||
} else if (strcmp(name, "argv") == 0) {
|
||||
metadata->inout_argv_p = TRUE;
|
||||
metadata->inout_argc_arg_index = inout_argc_arg_index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fill_metadata_callback(GPtrArray *args_metadata)
|
||||
{
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < args_metadata->len; i++) {
|
||||
RBGIArgMetadata *metadata;
|
||||
GIArgInfo *arg_info;
|
||||
gint closure_index;
|
||||
gint destroy_index;
|
||||
|
||||
metadata = g_ptr_array_index(args_metadata, i);
|
||||
if (!metadata->callback_p) {
|
||||
continue;
|
||||
}
|
||||
|
||||
arg_info = &(metadata->arg_info);
|
||||
closure_index = g_arg_info_get_closure(arg_info);
|
||||
if (closure_index != -1) {
|
||||
RBGIArgMetadata *closure_metadata;
|
||||
closure_metadata = g_ptr_array_index(args_metadata, closure_index);
|
||||
closure_metadata->closure_p = TRUE;
|
||||
metadata->closure_in_arg_index = closure_metadata->in_arg_index;
|
||||
closure_metadata->rb_arg_index = -1;
|
||||
}
|
||||
|
||||
destroy_index = g_arg_info_get_destroy(arg_info);
|
||||
if (destroy_index != -1) {
|
||||
RBGIArgMetadata *destroy_metadata;
|
||||
destroy_metadata = g_ptr_array_index(args_metadata, destroy_index);
|
||||
destroy_metadata->destroy_p = TRUE;
|
||||
metadata->destroy_in_arg_index = destroy_metadata->in_arg_index;
|
||||
destroy_metadata->rb_arg_index = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fill_metadata(GPtrArray *args_metadata)
|
||||
{
|
||||
fill_metadata_inout_argv(args_metadata);
|
||||
fill_metadata_callback(args_metadata);
|
||||
}
|
||||
|
||||
static void
|
||||
callback_data_guard_from_gc(RBGICallbackData *callback_data)
|
||||
{
|
||||
VALUE rb_callbacks;
|
||||
|
||||
rb_callbacks = rb_iv_get(RG_TARGET_NAMESPACE, callbacks_key);
|
||||
callback_data->rb_gc_guard_key = rb_class_new_instance(0, NULL, rb_cObject);
|
||||
rb_hash_aset(rb_callbacks,
|
||||
callback_data->rb_gc_guard_key,
|
||||
callback_data->rb_callback);
|
||||
}
|
||||
|
||||
static void
|
||||
callback_data_unguard_from_gc(RBGICallbackData *callback_data)
|
||||
{
|
||||
VALUE rb_callbacks;
|
||||
|
||||
rb_callbacks = rb_iv_get(RG_TARGET_NAMESPACE, callbacks_key);
|
||||
rb_hash_delete(rb_callbacks, callback_data->rb_gc_guard_key);
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_callback_data_free(RBGICallbackData *callback_data)
|
||||
{
|
||||
callback_data_unguard_from_gc(callback_data);
|
||||
xfree(callback_data->metadata);
|
||||
xfree(callback_data);
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_notify(gpointer data)
|
||||
{
|
||||
RBGICallbackData *callback_data = data;
|
||||
rb_gi_callback_data_free(callback_data);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
find_callback_function(GIArgInfo *info)
|
||||
{
|
||||
guint i;
|
||||
gpointer callback = NULL;
|
||||
|
||||
for (i = 0; i < callback_finders->len; i++) {
|
||||
RBGICallbackFinderFunc finder = g_ptr_array_index(callback_finders, i);
|
||||
callback = finder(info);
|
||||
if (callback) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return callback;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_callback_register_finder(RBGICallbackFinderFunc finder)
|
||||
{
|
||||
g_ptr_array_add(callback_finders, finder);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
source_func_p(GIArgInfo *info)
|
||||
{
|
||||
GITypeInfo type_info;
|
||||
GIBaseInfo *interface_info;
|
||||
GICallableInfo *callback_info;
|
||||
GITypeInfo return_type_info;
|
||||
GIArgInfo first_arg_info;
|
||||
GITypeInfo first_arg_type_info;
|
||||
|
||||
g_arg_info_load_type(info, &type_info);
|
||||
if (g_type_info_get_tag(&type_info) != GI_TYPE_TAG_INTERFACE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
interface_info = g_type_info_get_interface(&type_info);
|
||||
if (g_base_info_get_type(interface_info) != GI_INFO_TYPE_CALLBACK) {
|
||||
g_base_info_unref(interface_info);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
callback_info = (GICallableInfo *)interface_info;
|
||||
g_callable_info_load_return_type(callback_info, &return_type_info);
|
||||
if (g_type_info_get_tag(&return_type_info) != GI_TYPE_TAG_BOOLEAN) {
|
||||
g_base_info_unref(interface_info);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (g_callable_info_get_n_args(interface_info) != 1) {
|
||||
g_base_info_unref(interface_info);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_callable_info_load_arg(interface_info, 0, &first_arg_info);
|
||||
g_arg_info_load_type(&first_arg_info, &first_arg_type_info);
|
||||
if (g_type_info_get_tag(&first_arg_type_info) != GI_TYPE_TAG_VOID) {
|
||||
g_base_info_unref(interface_info);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_base_info_unref(interface_info);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
source_func_callback(gpointer user_data)
|
||||
{
|
||||
RBGICallbackData *callback_data = user_data;
|
||||
VALUE rb_keep;
|
||||
ID id_call;
|
||||
|
||||
CONST_ID(id_call, "call");
|
||||
rb_keep = rb_funcall(callback_data->rb_callback, id_call, 0);
|
||||
if (callback_data->metadata->scope_type == GI_SCOPE_TYPE_ASYNC) {
|
||||
rb_gi_callback_data_free(callback_data);
|
||||
}
|
||||
return RVAL2CBOOL(rb_keep);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
source_func_callback_finder(GIArgInfo *arg_info)
|
||||
{
|
||||
if (!source_func_p(arg_info)) {
|
||||
return NULL;
|
||||
}
|
||||
return source_func_callback;
|
||||
}
|
||||
|
||||
static void
|
||||
in_callback_argument_from_ruby(RBGIArgMetadata *metadata, GArray *in_args)
|
||||
{
|
||||
gpointer callback;
|
||||
GIArgInfo *arg_info;
|
||||
GIArgument *callback_argument;
|
||||
|
||||
arg_info = &(metadata->arg_info);
|
||||
callback = find_callback_function(arg_info);
|
||||
if (!callback) {
|
||||
GITypeInfo type_info;
|
||||
GIBaseInfo *interface_info;
|
||||
VALUE rb_type_name;
|
||||
g_arg_info_load_type(arg_info, &type_info);
|
||||
interface_info = g_type_info_get_interface(&type_info);
|
||||
rb_type_name = CSTR2RVAL(g_base_info_get_name(interface_info));
|
||||
g_base_info_unref(interface_info);
|
||||
rb_raise(rb_eNotImpError,
|
||||
"TODO: <%s>(%s) callback is not supported yet.",
|
||||
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) {
|
||||
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));
|
||||
destroy_argument->v_pointer = destroy_notify;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
|
||||
GArray *in_args)
|
||||
{
|
||||
if (metadata->rb_arg_index == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (metadata->callback_p) {
|
||||
in_callback_argument_from_ruby(metadata, in_args);
|
||||
} else {
|
||||
GIArgument *argument;
|
||||
VALUE rb_argument = Qnil;
|
||||
|
||||
if (RARRAY_LEN(rb_arguments) > metadata->rb_arg_index) {
|
||||
rb_argument = RARRAY_PTR(rb_arguments)[metadata->rb_arg_index];
|
||||
}
|
||||
argument = &(g_array_index(in_args, GIArgument, metadata->in_arg_index));
|
||||
RVAL2GI_IN_ARGUMENT(argument,
|
||||
&(metadata->arg_info),
|
||||
rb_argument);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
out_argument_from_ruby(RBGIArgMetadata *metadata, GArray *out_args)
|
||||
{
|
||||
GIArgument *argument;
|
||||
|
||||
argument = &(g_array_index(out_args, GIArgument, metadata->out_arg_index));
|
||||
rb_gi_out_argument_init(argument, &(metadata->arg_info));
|
||||
}
|
||||
|
||||
static void
|
||||
arg_metadata_free(gpointer data)
|
||||
{
|
||||
RBGIArgMetadata *metadata = data;
|
||||
if (metadata->scope_type == GI_SCOPE_TYPE_ASYNC ||
|
||||
metadata->scope_type == GI_SCOPE_TYPE_NOTIFIED) {
|
||||
return;
|
||||
}
|
||||
xfree(metadata);
|
||||
}
|
||||
|
||||
static void
|
||||
arguments_from_ruby(GICallableInfo *info, VALUE rb_arguments,
|
||||
GArray *in_args, GArray *out_args,
|
||||
GPtrArray *args_metadata)
|
||||
{
|
||||
gint i, n_args;
|
||||
|
||||
allocate_arguments(info, in_args, out_args, args_metadata);
|
||||
fill_metadata(args_metadata);
|
||||
|
||||
n_args = g_callable_info_get_n_args(info);
|
||||
for (i = 0; i < n_args; i++) {
|
||||
RBGIArgMetadata *metadata;
|
||||
|
||||
metadata = g_ptr_array_index(args_metadata, i);
|
||||
if (metadata->in_arg_index != -1) {
|
||||
in_argument_from_ruby(metadata, rb_arguments, in_args);
|
||||
} else {
|
||||
out_argument_from_ruby(metadata, out_args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
inout_argv_argument_to_ruby(GArray *in_args, RBGIArgMetadata *metadata)
|
||||
{
|
||||
GIArgument *inout_argc_argument;
|
||||
GIArgument *inout_argv_argument;
|
||||
gint i, argc;
|
||||
gchar **argv;
|
||||
VALUE rb_argv_argument;
|
||||
|
||||
inout_argc_argument = &g_array_index(in_args, GIArgument,
|
||||
metadata->inout_argc_arg_index);
|
||||
inout_argv_argument = &g_array_index(in_args, GIArgument,
|
||||
metadata->in_arg_index);
|
||||
argc = *((gint *)(inout_argc_argument->v_pointer));
|
||||
argv = *((gchar ***)(inout_argv_argument->v_pointer));
|
||||
rb_argv_argument = rb_ary_new2(argc);
|
||||
for (i = 0; i < argc; i++) {
|
||||
rb_ary_push(rb_argv_argument, CSTR2RVAL(argv[i]));
|
||||
}
|
||||
return rb_argv_argument;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
out_arguments_to_ruby(GICallableInfo *callable_info,
|
||||
GArray *in_args, GArray *out_args,
|
||||
GPtrArray *args_metadata)
|
||||
{
|
||||
gint i, n_args;
|
||||
VALUE rb_out_args;
|
||||
|
||||
rb_out_args = rb_ary_new();
|
||||
n_args = g_callable_info_get_n_args(callable_info);
|
||||
for (i = 0; i < n_args; i++) {
|
||||
RBGIArgMetadata *metadata;
|
||||
GIArgument *argument = NULL;
|
||||
VALUE rb_argument;
|
||||
|
||||
metadata = g_ptr_array_index(args_metadata, i);
|
||||
switch (metadata->direction) {
|
||||
case GI_DIRECTION_IN:
|
||||
break;
|
||||
case GI_DIRECTION_OUT:
|
||||
argument = &g_array_index(out_args, GIArgument,
|
||||
metadata->out_arg_index);
|
||||
break;
|
||||
case GI_DIRECTION_INOUT:
|
||||
argument = &g_array_index(in_args, GIArgument,
|
||||
metadata->in_arg_index);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!argument) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (metadata->inout_argv_p) {
|
||||
rb_argument = inout_argv_argument_to_ruby(in_args, metadata);
|
||||
} else {
|
||||
rb_argument = GI_OUT_ARGUMENT2RVAL(argument, &(metadata->arg_info));
|
||||
}
|
||||
rb_ary_push(rb_out_args, rb_argument);
|
||||
}
|
||||
|
||||
if (RARRAY_LEN(rb_out_args) == 0) {
|
||||
return Qnil;
|
||||
} else {
|
||||
return rb_out_args;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
arguments_init(GArray **in_args, GArray **out_args, GPtrArray **args_metadata)
|
||||
{
|
||||
*in_args = g_array_new(FALSE, FALSE, sizeof(GIArgument));
|
||||
*out_args = g_array_new(FALSE, FALSE, sizeof(GIArgument));
|
||||
*args_metadata = g_ptr_array_new_with_free_func(arg_metadata_free);
|
||||
}
|
||||
|
||||
static void
|
||||
arguments_free(GArray *in_args, GArray *out_args, GPtrArray *args_metadata)
|
||||
{
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < args_metadata->len; i++) {
|
||||
RBGIArgMetadata *metadata;
|
||||
gint in_arg_index;
|
||||
|
||||
metadata = g_ptr_array_index(args_metadata, i);
|
||||
if (metadata->direction == GI_DIRECTION_IN ||
|
||||
metadata->direction == GI_DIRECTION_INOUT) {
|
||||
in_arg_index = metadata->in_arg_index;
|
||||
if (in_arg_index != -1) {
|
||||
GIArgument *argument;
|
||||
argument = &(g_array_index(in_args, GIArgument, in_arg_index));
|
||||
rb_gi_in_argument_free(argument, &(metadata->arg_info));
|
||||
}
|
||||
} else {
|
||||
GIArgument *argument;
|
||||
argument = &(g_array_index(out_args, GIArgument,
|
||||
metadata->out_arg_index));
|
||||
rb_gi_out_argument_fin(argument, &(metadata->arg_info));
|
||||
}
|
||||
}
|
||||
|
||||
g_array_unref(in_args);
|
||||
g_array_unref(out_args);
|
||||
g_ptr_array_unref(args_metadata);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
GIFunctionInfo *info;
|
||||
GArray *in_args;
|
||||
GArray *out_args;
|
||||
GIArgument *return_value;
|
||||
GError **error;
|
||||
gboolean succeeded;
|
||||
} InvokeData;
|
||||
|
||||
static void
|
||||
rb_gi_function_info_invoke_raw_call(InvokeData *data)
|
||||
{
|
||||
data->succeeded =
|
||||
g_function_info_invoke(data->info,
|
||||
(GIArgument *)(data->in_args->data),
|
||||
data->in_args->len,
|
||||
(GIArgument *)(data->out_args->data),
|
||||
data->out_args->len,
|
||||
data->return_value,
|
||||
data->error);
|
||||
}
|
||||
|
||||
static RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_TYPE
|
||||
rb_gi_function_info_invoke_raw_call_without_gvl_body(void *user_data)
|
||||
{
|
||||
InvokeData *data = (InvokeData *)user_data;
|
||||
|
||||
rb_gi_function_info_invoke_raw_call(data);
|
||||
|
||||
return RB_THREAD_CALL_WITHOUT_GVL_FUNC_RETURN_VALUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gobject_based_p(GIBaseInfo *info)
|
||||
{
|
||||
GIBaseInfo *container_info;
|
||||
GIRegisteredTypeInfo *registered_type_info;
|
||||
|
||||
container_info = g_base_info_get_container(info);
|
||||
if (g_base_info_get_type(container_info) != GI_INFO_TYPE_STRUCT) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
registered_type_info = (GIRegisteredTypeInfo *)container_info;
|
||||
if (g_registered_type_info_get_type_init(registered_type_info)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_gi_function_info_invoke_raw(GIFunctionInfo *info, VALUE rb_options,
|
||||
GIArgument *return_value)
|
||||
{
|
||||
GICallableInfo *callable_info;
|
||||
GIArgument receiver;
|
||||
GArray *in_args, *out_args;
|
||||
GPtrArray *args_metadata;
|
||||
VALUE rb_out_args = Qnil;
|
||||
gboolean succeeded;
|
||||
GError *error = NULL;
|
||||
gboolean unlock_gvl = FALSE;
|
||||
VALUE rb_receiver, rb_arguments, rb_unlock_gvl;
|
||||
|
||||
if (RB_TYPE_P(rb_options, RUBY_T_ARRAY)) {
|
||||
rb_receiver = Qnil;
|
||||
rb_arguments = rb_options;
|
||||
rb_unlock_gvl = Qnil;
|
||||
} else if (NIL_P(rb_options)) {
|
||||
rb_receiver = Qnil;
|
||||
rb_arguments = rb_ary_new();
|
||||
rb_unlock_gvl = Qnil;
|
||||
} else {
|
||||
rb_options = rbg_check_hash_type(rb_options);
|
||||
rbg_scan_options(rb_options,
|
||||
"receiver", &rb_receiver,
|
||||
"arguments", &rb_arguments,
|
||||
"unlock_gvl", &rb_unlock_gvl,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (NIL_P(rb_receiver)) {
|
||||
receiver.v_pointer = NULL;
|
||||
} else {
|
||||
if (gobject_based_p((GIBaseInfo *)info)) {
|
||||
receiver.v_pointer = RVAL2GOBJ(rb_receiver);
|
||||
} else {
|
||||
receiver.v_pointer = DATA_PTR(rb_receiver);
|
||||
}
|
||||
}
|
||||
rb_arguments = rbg_to_array(rb_arguments);
|
||||
if (!NIL_P(rb_unlock_gvl) && RVAL2CBOOL(rb_unlock_gvl)) {
|
||||
unlock_gvl = TRUE;
|
||||
}
|
||||
|
||||
callable_info = (GICallableInfo *)info;
|
||||
arguments_init(&in_args, &out_args, &args_metadata);
|
||||
if (receiver.v_pointer) {
|
||||
g_array_append_val(in_args, receiver);
|
||||
}
|
||||
arguments_from_ruby(callable_info, 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(
|
||||
rb_gi_function_info_invoke_raw_call_without_gvl_body, &data,
|
||||
NULL, NULL);
|
||||
} else {
|
||||
rb_gi_function_info_invoke_raw_call(&data);
|
||||
}
|
||||
succeeded = data.succeeded;
|
||||
}
|
||||
|
||||
if (succeeded) {
|
||||
rb_out_args = out_arguments_to_ruby(callable_info,
|
||||
in_args, out_args,
|
||||
args_metadata);
|
||||
}
|
||||
arguments_free(in_args, out_args, args_metadata);
|
||||
if (!succeeded) {
|
||||
RG_RAISE_ERROR(error);
|
||||
}
|
||||
|
||||
if (!NIL_P(rb_out_args) && RARRAY_LEN(rb_out_args) == 1) {
|
||||
VALUE rb_out_arg;
|
||||
rb_out_arg = RARRAY_PTR(rb_out_args)[0];
|
||||
if (rb_obj_is_kind_of(rb_out_arg, rb_cGLibError)) {
|
||||
rb_exc_raise(rb_out_arg);
|
||||
}
|
||||
}
|
||||
|
||||
return rb_out_args;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
info = SELF(self);
|
||||
/* 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);
|
||||
|
||||
if (NIL_P(rb_out_args)) {
|
||||
return rb_return_value;
|
||||
} else {
|
||||
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) {
|
||||
rb_ary_unshift(rb_out_args, rb_return_value);
|
||||
}
|
||||
if (RARRAY_LEN(rb_out_args) == 1) {
|
||||
return RARRAY_PTR(rb_out_args)[0];
|
||||
} else {
|
||||
return rb_out_args;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_function_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
|
||||
{
|
||||
rb_cGLibError = rb_const_get(mGLib, rb_intern("Error"));
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_FUNCTION_INFO, "FunctionInfo", rb_mGI,
|
||||
rb_cGICallableInfo);
|
||||
|
||||
rb_iv_set(RG_TARGET_NAMESPACE, callbacks_key, rb_hash_new());
|
||||
|
||||
callback_finders = g_ptr_array_new();
|
||||
rb_gi_callback_register_finder(source_func_callback_finder);
|
||||
|
||||
RG_DEF_METHOD(symbol, 0);
|
||||
RG_DEF_METHOD(flags, 0);
|
||||
RG_DEF_METHOD(property, 0);
|
||||
RG_DEF_METHOD(vfunc, 0);
|
||||
RG_DEF_METHOD(invoke, 1);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_FUNCTION_INFO_FLAGS, "FunctionInfoFlags", rb_mGI);
|
||||
|
||||
rb_gi_method_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_constructor_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,222 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIInterfaceInfo
|
||||
#define SELF(self) (RVAL2GI_INTERFACE_INFO(self))
|
||||
|
||||
GType
|
||||
gi_interface_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIInterfaceInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_prerequisites(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_prerequisites(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_prerequisite(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_interface_info_get_prerequisite(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_properties(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_properties(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_property(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_interface_info_get_property(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_methods(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_methods(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_method(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
GIFunctionInfo *function_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
function_info = g_interface_info_get_method(info, n);
|
||||
} else {
|
||||
const char *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
function_info = g_interface_info_find_method(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(function_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_signals(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_signals(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_signal(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
GISignalInfo *signal_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
signal_info = g_interface_info_get_signal(info, n);
|
||||
} else {
|
||||
#ifdef HAVE_G_INTERFACE_INFO_FIND_SIGNAL
|
||||
const char *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
signal_info = g_interface_info_find_signal(info, name);
|
||||
#else
|
||||
rb_raise(rb_eArgError,
|
||||
"g_interface_info_find_signal() is defined "
|
||||
"since GObjectIntrospection 1.34");
|
||||
#endif
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(signal_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_vfuncs(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_vfuncs(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_vfunc(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
GIVFuncInfo *vfunc_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
vfunc_info = g_interface_info_get_vfunc(info, n);
|
||||
} else {
|
||||
const gchar *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
vfunc_info = g_interface_info_find_vfunc(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(vfunc_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_constants(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_interface_info_get_n_constants(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_constant(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_interface_info_get_constant(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_iface_struct(VALUE self)
|
||||
{
|
||||
GIInterfaceInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_interface_info_get_iface_struct(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_interface_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_INTERFACE_INFO, "InterfaceInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
RG_DEF_METHOD(n_prerequisites, 0);
|
||||
RG_DEF_METHOD(get_prerequisite, 1);
|
||||
RG_DEF_METHOD(n_properties, 0);
|
||||
RG_DEF_METHOD(get_property, 1);
|
||||
RG_DEF_METHOD(n_methods, 0);
|
||||
RG_DEF_METHOD(get_method, 1);
|
||||
RG_DEF_METHOD(n_signals, 0);
|
||||
RG_DEF_METHOD(get_signal, 1);
|
||||
RG_DEF_METHOD(n_vfuncs, 0);
|
||||
RG_DEF_METHOD(get_vfunc, 1);
|
||||
RG_DEF_METHOD(n_constants, 0);
|
||||
RG_DEF_METHOD(get_constant, 1);
|
||||
RG_DEF_METHOD(iface_struct, 0);
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGILoader
|
||||
|
||||
static const gchar *boxed_class_converters_name = "@@boxed_class_converters";
|
||||
|
||||
static VALUE
|
||||
rg_s_define_class(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
VALUE rb_gtype, rb_name, rb_module;
|
||||
VALUE rb_options, rb_parent;
|
||||
GType gtype;
|
||||
|
||||
rb_scan_args(argc, argv, "31", &rb_gtype, &rb_name, &rb_module, &rb_options);
|
||||
rbg_scan_options(rb_options,
|
||||
"parent", &rb_parent,
|
||||
NULL);
|
||||
|
||||
gtype = NUM2ULONG(rb_to_int(rb_gtype));
|
||||
return G_DEF_CLASS_WITH_PARENT(gtype, RVAL2CSTR(rb_name),
|
||||
rb_module, rb_parent);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_define_interface(G_GNUC_UNUSED VALUE klass,
|
||||
VALUE rb_gtype, VALUE rb_name, VALUE rb_module)
|
||||
{
|
||||
GType gtype;
|
||||
|
||||
gtype = NUM2ULONG(rb_to_int(rb_gtype));
|
||||
return G_DEF_INTERFACE(gtype, RVAL2CSTR(rb_name), rb_module);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
struct_alloc(VALUE klass)
|
||||
{
|
||||
VALUE rb_size;
|
||||
|
||||
rb_size = rb_iv_get(klass, "@size");
|
||||
return Data_Wrap_Struct(klass, NULL, xfree, xmalloc(NUM2ULONG(rb_size)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_define_struct(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
VALUE rb_size, rb_name, rb_module;
|
||||
VALUE rb_options, rb_parent;
|
||||
VALUE rb_class;
|
||||
|
||||
rb_scan_args(argc, argv, "31", &rb_size, &rb_name, &rb_module, &rb_options);
|
||||
rbg_scan_options(rb_options,
|
||||
"parent", &rb_parent,
|
||||
NULL);
|
||||
|
||||
rb_size = rb_to_int(rb_size);
|
||||
if (NIL_P(rb_parent)) {
|
||||
rb_parent = rb_cObject;
|
||||
}
|
||||
rb_class = rb_define_class_under(rb_module, RVAL2CSTR(rb_name), rb_parent);
|
||||
rb_iv_set(rb_class, "@size", rb_size);
|
||||
rb_define_alloc_func(rb_class, struct_alloc);
|
||||
return rb_class;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
GType type;
|
||||
VALUE rb_converters;
|
||||
VALUE rb_converter;
|
||||
} BoxedInstance2RObjData;
|
||||
|
||||
static void
|
||||
boxed_class_converter_free(gpointer user_data)
|
||||
{
|
||||
BoxedInstance2RObjData *data = user_data;
|
||||
rb_ary_delete(data->rb_converters, data->rb_converter);
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
boxed_instance2robj(gpointer instance, gpointer user_data)
|
||||
{
|
||||
BoxedInstance2RObjData *data = user_data;
|
||||
VALUE default_rb_instance;
|
||||
VALUE klass;
|
||||
gint flags = 0;
|
||||
ID id_call;
|
||||
|
||||
default_rb_instance = rbgobj_make_boxed_default(instance, data->type);
|
||||
CONST_ID(id_call, "call");
|
||||
klass = rb_funcall(data->rb_converter, id_call, 1, default_rb_instance);
|
||||
return rbgobj_make_boxed_raw(instance, data->type, klass, flags);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_register_boxed_class_converter(VALUE klass, VALUE rb_gtype)
|
||||
{
|
||||
RGConvertTable table;
|
||||
BoxedInstance2RObjData *data;
|
||||
ID id_to_i;
|
||||
VALUE boxed_class_converters;
|
||||
|
||||
memset(&table, 0, sizeof(RGConvertTable));
|
||||
CONST_ID(id_to_i, "to_i");
|
||||
table.type = NUM2UINT(rb_funcall(rb_gtype, id_to_i, 0));
|
||||
table.klass = Qnil;
|
||||
table.instance2robj = boxed_instance2robj;
|
||||
|
||||
data = g_new(BoxedInstance2RObjData, 1);
|
||||
data->type = table.type;
|
||||
data->rb_converter = rb_block_proc();
|
||||
boxed_class_converters = rb_cv_get(klass, boxed_class_converters_name);
|
||||
rb_ary_push(boxed_class_converters, data->rb_converter);
|
||||
table.user_data = data;
|
||||
table.notify = boxed_class_converter_free;
|
||||
|
||||
rbgobj_convert_define(&table);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_start_callback_dispatch_thread(G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
rbgutil_start_callback_dispatch_thread();
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_loader_init(VALUE rb_mGI)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE = rb_define_class_under(rb_mGI, "Loader", rb_cObject);
|
||||
|
||||
rb_cv_set(RG_TARGET_NAMESPACE, boxed_class_converters_name, rb_ary_new());
|
||||
|
||||
RG_DEF_SMETHOD(define_class, -1);
|
||||
RG_DEF_SMETHOD(define_interface, 3);
|
||||
RG_DEF_SMETHOD(define_struct, -1);
|
||||
RG_DEF_SMETHOD(register_boxed_class_converter, 1);
|
||||
RG_DEF_SMETHOD(start_callback_dispatch_thread, 0);
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIMethodInfo
|
||||
#define SELF(self) RVAL2GI_FUNCTION_INFO(self)
|
||||
|
||||
GType
|
||||
gi_method_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIMethodInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
info = SELF(self);
|
||||
|
||||
/* 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);
|
||||
|
||||
if (NIL_P(rb_out_args)) {
|
||||
return rb_return_value;
|
||||
} else {
|
||||
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) {
|
||||
rb_ary_unshift(rb_out_args, rb_return_value);
|
||||
}
|
||||
if (RARRAY_LEN(rb_out_args) == 1) {
|
||||
return RARRAY_PTR(rb_out_args)[0];
|
||||
} else {
|
||||
return rb_out_args;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_method_info_init(VALUE rb_mGI, VALUE rb_cGIFunctionInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_METHOD_INFO, "MethodInfo", rb_mGI,
|
||||
rb_cGIFunctionInfo);
|
||||
|
||||
RG_DEF_METHOD(invoke, 1);
|
||||
}
|
@ -0,0 +1,345 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIObjectInfo
|
||||
#define SELF(self) (RVAL2GI_OBJECT_INFO(self))
|
||||
|
||||
GType
|
||||
gi_object_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIObjectInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type_name(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_type_name(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type_init(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_type_init(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_abstract_p(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_object_info_get_abstract(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_fundamental_p(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_object_info_get_fundamental(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_parent(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_parent(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_interfaces(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_interfaces(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_interface(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_interface(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_fields(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_fields(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_field(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field_value(VALUE self, VALUE rb_object, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
VALUE rb_value;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_object_info_get_field(info, n);
|
||||
rb_value = rb_gi_field_info_get_field_raw(field_info, RVAL2GOBJ(rb_object));
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return rb_value;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_field_value(VALUE self, VALUE rb_object, VALUE rb_n, VALUE rb_value)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_object_info_get_field(info, n);
|
||||
rb_gi_field_info_set_field_raw(field_info, RVAL2GOBJ(rb_object), rb_value);
|
||||
/* TODO: use rb_ensure() to unref field_info. */
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_properties(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_properties(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_property(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_property(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_methods(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_methods(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_method(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
GIFunctionInfo *function_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
function_info = g_object_info_get_method(info, n);
|
||||
} else {
|
||||
const gchar *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
function_info = g_object_info_find_method(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(function_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_signals(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_signals(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_signal(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_signal(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_vfuncs(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_vfuncs(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_vfunc(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
GIVFuncInfo *vfunc_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
vfunc_info = g_object_info_get_vfunc(info, n);
|
||||
} else {
|
||||
const gchar *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
vfunc_info = g_object_info_find_vfunc(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(vfunc_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_constants(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_object_info_get_n_constants(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_constant(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_object_info_get_constant(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_unref_function(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_unref_function(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ref_function(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_ref_function(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_value_function(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_set_value_function(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_value_function(VALUE self)
|
||||
{
|
||||
GIObjectInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_object_info_get_get_value_function(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_object_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_OBJECT_INFO, "ObjectInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
RG_DEF_METHOD(type_name, 0);
|
||||
RG_DEF_METHOD(type_init, 0);
|
||||
RG_DEF_METHOD_P(abstract, 0);
|
||||
RG_DEF_METHOD_P(fundamental, 0);
|
||||
RG_DEF_METHOD(parent, 0);
|
||||
RG_DEF_METHOD(n_interfaces, 0);
|
||||
RG_DEF_METHOD(get_interface, 1);
|
||||
RG_DEF_METHOD(n_fields, 0);
|
||||
RG_DEF_METHOD(get_field, 1);
|
||||
RG_DEF_METHOD(get_field_value, 2);
|
||||
RG_DEF_METHOD(set_field_value, 3);
|
||||
RG_DEF_METHOD(n_properties, 0);
|
||||
RG_DEF_METHOD(get_property, 1);
|
||||
RG_DEF_METHOD(n_methods, 0);
|
||||
RG_DEF_METHOD(get_method, 1);
|
||||
RG_DEF_METHOD(n_signals, 0);
|
||||
RG_DEF_METHOD(get_signal, 1);
|
||||
RG_DEF_METHOD(n_vfuncs, 0);
|
||||
RG_DEF_METHOD(get_vfunc, 1);
|
||||
RG_DEF_METHOD(n_constants, 0);
|
||||
RG_DEF_METHOD(get_constant, 1);
|
||||
RG_DEF_METHOD(unref_function, 0);
|
||||
RG_DEF_METHOD(ref_function, 0);
|
||||
RG_DEF_METHOD(set_value_function, 0);
|
||||
RG_DEF_METHOD(get_value_function, 0);
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#ifndef RB_GI_PRIVATE_H
|
||||
#define RB_GI_PRIVATE_H
|
||||
|
||||
#include <ruby.h>
|
||||
#include <rbgobject.h>
|
||||
#include <glib-enum-types.h>
|
||||
|
||||
#include <girffi.h>
|
||||
#include "gobject-introspection-enum-types.h"
|
||||
|
||||
#include "rbgiversion.h"
|
||||
|
||||
#include "rb-gi-types.h"
|
||||
#include "rb-gi-conversions.h"
|
||||
|
||||
#include "rb-gobject-introspection.h"
|
||||
|
||||
#ifndef RB_TYPE_P
|
||||
# define RB_TYPE_P(object, type) (TYPE(object) == type)
|
||||
#endif
|
||||
|
||||
extern void Init_gobject_introspection(void);
|
||||
|
||||
void rb_gi_argument_init (void);
|
||||
|
||||
void rb_gi_type_tag_init (VALUE rb_mGI);
|
||||
void rb_gi_base_info_init (VALUE rb_mGI);
|
||||
void rb_gi_callable_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_function_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGICallableInfo);
|
||||
void rb_gi_method_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIFunctionInfo);
|
||||
void rb_gi_constructor_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIFunctionInfo);
|
||||
void rb_gi_callback_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGICallableInfo);
|
||||
void rb_gi_registered_type_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_struct_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_boxed_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_enum_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_flags_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIEnumInfo);
|
||||
void rb_gi_object_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_interface_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_constant_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_union_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIRegisteredTypeInfo);
|
||||
void rb_gi_value_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_signal_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGICallableInfo);
|
||||
void rb_gi_vfunc_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGICallableInfo);
|
||||
void rb_gi_property_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_field_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_arg_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_type_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_unresolved_info_init (VALUE rb_mGI,
|
||||
VALUE rb_cGIBaseInfo);
|
||||
void rb_gi_repository_init (VALUE rb_mGI);
|
||||
void rb_gi_loader_init (VALUE rb_mGI);
|
||||
|
||||
VALUE rb_gi_function_info_invoke_raw (GIFunctionInfo *info,
|
||||
VALUE rb_options,
|
||||
GIArgument *return_value);
|
||||
|
||||
VALUE rb_gi_field_info_get_field_raw (GIFieldInfo *info,
|
||||
gpointer memory);
|
||||
void rb_gi_field_info_set_field_raw (GIFieldInfo *info,
|
||||
gpointer memory,
|
||||
VALUE rb_field_value);
|
||||
|
||||
#endif
|
@ -0,0 +1,77 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIPropertyInfo
|
||||
#define SELF(self) RVAL2GI_BASE_INFO(self)
|
||||
|
||||
GType
|
||||
gi_property_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIPropertyInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flags(VALUE self)
|
||||
{
|
||||
GIPropertyInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_property_info_get_flags(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type(VALUE self)
|
||||
{
|
||||
GIPropertyInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_property_info_get_type(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ownership_transfer(VALUE self)
|
||||
{
|
||||
GIPropertyInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_TRANSFER2RVAL(g_property_info_get_ownership_transfer(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_property_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_PROPERTY_INFO, "PropertyInfo", rb_mGI,
|
||||
rb_cGICallableInfo);
|
||||
|
||||
RG_DEF_METHOD(flags, 0);
|
||||
RG_DEF_METHOD(type, 0);
|
||||
RG_DEF_METHOD(ownership_transfer, 0);
|
||||
}
|
@ -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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIRegisteredTypeInfo
|
||||
#define SELF(self) (RVAL2GI_REGISTERED_TYPE_INFO(self))
|
||||
|
||||
GType
|
||||
gi_registered_type_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIRegisteredTypeInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type_name(VALUE self)
|
||||
{
|
||||
GIRegisteredTypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_registered_type_info_get_type_name(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_type_init(VALUE self)
|
||||
{
|
||||
GIRegisteredTypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CSTR2RVAL(g_registered_type_info_get_type_init(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_gtype(VALUE self)
|
||||
{
|
||||
GIRegisteredTypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return rbgobj_gtype_new(g_registered_type_info_get_g_type(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_registered_type_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_REGISTERED_TYPE_INFO,
|
||||
"RegisteredTypeInfo",
|
||||
rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(type_name, 0);
|
||||
RG_DEF_METHOD(type_init, 0);
|
||||
RG_DEF_METHOD(gtype, 0);
|
||||
|
||||
rb_gi_struct_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_boxed_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_enum_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_object_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_interface_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
rb_gi_union_info_init(rb_mGI, RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIRepository
|
||||
#define SELF(self) RVAL2GI_REPOSITORY(self)
|
||||
|
||||
static VALUE
|
||||
rg_s_default(G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
return GOBJ2RVAL(g_irepository_get_default());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_require(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE rb_namespace, rb_version, rb_flags;
|
||||
const gchar *namespace_, *version;
|
||||
GIRepositoryLoadFlags flags = 0;
|
||||
GError *error = NULL;
|
||||
|
||||
rb_scan_args(argc, argv, "12", &rb_namespace, &rb_version, &rb_flags);
|
||||
|
||||
namespace_ = RVAL2CSTR(rb_namespace);
|
||||
version = RVAL2CSTR_ACCEPT_NIL(rb_version);
|
||||
if (!NIL_P(rb_flags)) {
|
||||
flags = RVAL2GI_REPOSITORY_LOAD_FLAGS(rb_flags);
|
||||
}
|
||||
|
||||
g_irepository_require(SELF(self), namespace_, version, flags, &error);
|
||||
if (error) {
|
||||
RG_RAISE_ERROR(error);
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_dependencies(VALUE self, VALUE rb_namespace)
|
||||
{
|
||||
GIRepository *repository;
|
||||
const gchar *namespace_;
|
||||
VALUE rb_dependencies;
|
||||
gchar **dependencies;
|
||||
gint i;
|
||||
|
||||
repository = SELF(self);
|
||||
namespace_ = RVAL2CSTR(rb_namespace);
|
||||
dependencies = g_irepository_get_dependencies(repository, namespace_);
|
||||
rb_dependencies = rb_ary_new();
|
||||
for (i = 0; dependencies[i]; i++) {
|
||||
rb_ary_push(rb_dependencies, CSTR2RVAL(dependencies[i]));
|
||||
}
|
||||
g_strfreev(dependencies);
|
||||
|
||||
return rb_dependencies;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_loaded_namespaces(VALUE self)
|
||||
{
|
||||
GIRepository *repository;
|
||||
VALUE rb_namespaces;
|
||||
gchar **namespaces;
|
||||
gint i;
|
||||
|
||||
repository = SELF(self);
|
||||
namespaces = g_irepository_get_loaded_namespaces(repository);
|
||||
rb_namespaces = rb_ary_new();
|
||||
for (i = 0; namespaces[i]; i++) {
|
||||
rb_ary_push(rb_namespaces, CSTR2RVAL(namespaces[i]));
|
||||
}
|
||||
g_strfreev(namespaces);
|
||||
|
||||
return rb_namespaces;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_n_infos(VALUE self, VALUE rb_namespace)
|
||||
{
|
||||
const gchar *namespace_;
|
||||
gint n_infos;
|
||||
|
||||
namespace_ = RVAL2CSTR(rb_namespace);
|
||||
n_infos = g_irepository_get_n_infos(SELF(self), namespace_);
|
||||
|
||||
return INT2NUM(n_infos);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_info(VALUE self, VALUE rb_namespace, VALUE rb_n)
|
||||
{
|
||||
GIRepository *repository;
|
||||
const gchar *namespace_;
|
||||
gint n;
|
||||
GIBaseInfo *info;
|
||||
|
||||
repository = SELF(self);
|
||||
namespace_ = RVAL2CSTR(rb_namespace);
|
||||
n = NUM2INT(rb_n);
|
||||
info = g_irepository_get_info(repository, namespace_, n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
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);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL(info);
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_repository_init(VALUE rb_mGI)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_IREPOSITORY, "Repository", rb_mGI);
|
||||
|
||||
RG_DEF_SMETHOD(default, 0);
|
||||
RG_DEF_METHOD(require, -1);
|
||||
RG_DEF_METHOD(get_dependencies, 1);
|
||||
RG_DEF_METHOD(loaded_namespaces, 0);
|
||||
RG_DEF_METHOD(get_n_infos, 1);
|
||||
RG_DEF_METHOD(get_info, 2);
|
||||
RG_DEF_METHOD(find, -1);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_REPOSITORY_LOAD_FLAGS, "RepositoryLoadFlags", rb_mGI);
|
||||
G_DEF_CLASS(G_TYPE_I_REPOSITORY_ERROR, "RepositoryError", rb_mGI);
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGISignalInfo
|
||||
#define SELF(self) RVAL2GI_BASE_INFO(self)
|
||||
|
||||
GType
|
||||
gi_signal_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GISignalInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flags(VALUE self)
|
||||
{
|
||||
GISignalInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_SIGNAL_FLAGS2RVAL(g_signal_info_get_flags(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_class_closure(VALUE self)
|
||||
{
|
||||
GISignalInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_signal_info_get_class_closure(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_true_stops_emit_p(VALUE self)
|
||||
{
|
||||
GISignalInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_signal_info_true_stops_emit(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_signal_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_SIGNAL_INFO, "SignalInfo", rb_mGI,
|
||||
rb_cGICallableInfo);
|
||||
|
||||
RG_DEF_METHOD(flags, 0);
|
||||
RG_DEF_METHOD(class_closure, 0);
|
||||
RG_DEF_METHOD_P(true_stops_emit, 0);
|
||||
}
|
@ -0,0 +1,190 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIStructInfo
|
||||
#define SELF(self) (RVAL2GI_STRUCT_INFO(self))
|
||||
|
||||
GType
|
||||
gi_struct_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIStructInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_fields(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_struct_info_get_n_fields(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_struct_info_get_field(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field_value(VALUE self, VALUE rb_struct, VALUE rb_n)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
VALUE rb_value;
|
||||
gpointer instance;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_struct_info_get_field(info, n);
|
||||
if (rb_respond_to(rb_struct, rb_intern("gtype"))) {
|
||||
VALUE rb_gtype;
|
||||
GType gtype;
|
||||
rb_gtype = rb_funcall(rb_struct, rb_intern("gtype"), 0);
|
||||
gtype = NUM2UINT(rb_funcall(rb_gtype, rb_intern("to_i"), 0));
|
||||
instance = RVAL2BOXED(rb_struct, gtype);
|
||||
} else {
|
||||
Data_Get_Struct(rb_struct, void, instance);
|
||||
}
|
||||
rb_value = rb_gi_field_info_get_field_raw(field_info, instance);
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return rb_value;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_field_value(VALUE self, VALUE rb_struct, VALUE rb_n, VALUE rb_value)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
GType gtype;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_struct_info_get_field(info, n);
|
||||
gtype = g_registered_type_info_get_g_type(info);
|
||||
rb_gi_field_info_set_field_raw(field_info,
|
||||
RVAL2BOXED(rb_struct, gtype),
|
||||
rb_value);
|
||||
/* TODO: use rb_ensure() to unref field_info. */
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_methods(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_struct_info_get_n_methods(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_method(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
GIFunctionInfo *function_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, RUBY_T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
function_info = g_struct_info_get_method(info, n);
|
||||
} else {
|
||||
const gchar *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
function_info = g_struct_info_find_method(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(function_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return UINT2NUM(g_struct_info_get_size(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_alignment(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return UINT2NUM(g_struct_info_get_alignment(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_gtype_struct_p(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_struct_info_is_gtype_struct(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_foreign_p(VALUE self)
|
||||
{
|
||||
GIStructInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_struct_info_is_foreign(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_struct_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_STRUCT_INFO, "StructInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
RG_DEF_METHOD(n_fields, 0);
|
||||
RG_DEF_METHOD(get_field, 1);
|
||||
RG_DEF_METHOD(get_field_value, 2);
|
||||
RG_DEF_METHOD(set_field_value, 3);
|
||||
RG_DEF_METHOD(n_methods, 0);
|
||||
RG_DEF_METHOD(get_method, 1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(alignment, 0);
|
||||
RG_DEF_METHOD_P(gtype_struct, 0);
|
||||
RG_DEF_METHOD_P(foreign, 0);
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGITypeInfo
|
||||
#define SELF(self) (RVAL2GI_TYPE_INFO(self))
|
||||
|
||||
GType
|
||||
gi_type_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GITypeInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_gi_array_type_to_ruby(GIArrayType type)
|
||||
{
|
||||
if (type == (GIArrayType)-1) {
|
||||
return Qnil;
|
||||
} else {
|
||||
return GENUM2RVAL(type, G_TYPE_I_ARRAY_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pointer_p(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_type_info_is_pointer(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_tag(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_TYPE_TAG2RVAL(g_type_info_get_tag(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_param_type(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_type_info_get_param_type(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_interface(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_type_info_get_interface(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_array_length(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_type_info_get_array_length(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_array_fixed_size(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_type_info_get_array_fixed_size(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_zero_terminated_p(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_type_info_is_zero_terminated(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_array_type(VALUE self)
|
||||
{
|
||||
GITypeInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_ARRAY_TYPE2RVAL(g_type_info_get_array_type(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_type_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_TYPE_INFO, "TypeInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD_P(pointer, 0);
|
||||
RG_DEF_METHOD(tag, 0);
|
||||
RG_DEF_METHOD(get_param_type, 1);
|
||||
RG_DEF_METHOD(interface, 0);
|
||||
RG_DEF_METHOD(array_length, 0);
|
||||
RG_DEF_METHOD(array_fixed_size, 0);
|
||||
RG_DEF_METHOD_P(zero_terminated, 0);
|
||||
RG_DEF_METHOD(array_type, 0);
|
||||
|
||||
rb_undef_method(RG_TARGET_NAMESPACE, "name");
|
||||
|
||||
G_DEF_CLASS(G_TYPE_I_ARRAY_TYPE, "ArrayType", rb_mGI);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGITypeTag
|
||||
#define SELF(self) (RVAL2GI_TYPE_TAG(self))
|
||||
|
||||
static VALUE
|
||||
rg_to_s(VALUE self)
|
||||
{
|
||||
GITypeTag tag;
|
||||
|
||||
tag = SELF(self);
|
||||
return CSTR2RVAL(g_type_tag_to_string(tag));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_type_tag_init(VALUE rb_mGI)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_I_TYPE_TAG, "TypeTag", rb_mGI);
|
||||
|
||||
RG_DEF_METHOD(to_s, 0);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/* -*- 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 RB_GI_TYPES_H
|
||||
#define RB_GI_TYPES_H
|
||||
|
||||
#define GI_TYPE_CALLABLE_INFO (gi_callable_info_get_type())
|
||||
#define GI_TYPE_FUNCTION_INFO (gi_function_info_get_type())
|
||||
#define GI_TYPE_METHOD_INFO (gi_method_info_get_type())
|
||||
#define GI_TYPE_CONSTRUCTOR_INFO (gi_constructor_info_get_type())
|
||||
#define GI_TYPE_CALLBACK_INFO (gi_callback_info_get_type())
|
||||
#define GI_TYPE_REGISTERED_TYPE_INFO (gi_registered_type_info_get_type())
|
||||
#define GI_TYPE_STRUCT_INFO (gi_struct_info_get_type())
|
||||
#define GI_TYPE_BOXED_INFO (gi_boxed_info_get_type())
|
||||
#define GI_TYPE_ENUM_INFO (gi_enum_info_get_type())
|
||||
#define GI_TYPE_FLAGS_INFO (gi_flags_info_get_type())
|
||||
#define GI_TYPE_OBJECT_INFO (gi_object_info_get_type())
|
||||
#define GI_TYPE_INTERFACE_INFO (gi_interface_info_get_type())
|
||||
#define GI_TYPE_CONSTANT_INFO (gi_constant_info_get_type())
|
||||
#define GI_TYPE_UNION_INFO (gi_union_info_get_type())
|
||||
#define GI_TYPE_VALUE_INFO (gi_value_info_get_type())
|
||||
#define GI_TYPE_SIGNAL_INFO (gi_signal_info_get_type())
|
||||
#define GI_TYPE_VFUNC_INFO (gi_vfunc_info_get_type())
|
||||
#define GI_TYPE_PROPERTY_INFO (gi_property_info_get_type())
|
||||
#define GI_TYPE_FIELD_INFO (gi_field_info_get_type())
|
||||
#define GI_TYPE_ARG_INFO (gi_arg_info_get_type())
|
||||
#define GI_TYPE_TYPE_INFO (gi_type_info_get_type())
|
||||
#define GI_TYPE_UNRESOLVED_INFO (gi_unresolved_info_get_type())
|
||||
|
||||
GType gi_callable_info_get_type (void);
|
||||
GType gi_function_info_get_type (void);
|
||||
GType gi_method_info_get_type (void);
|
||||
GType gi_constructor_info_get_type (void);
|
||||
GType gi_callback_info_get_type (void);
|
||||
GType gi_registered_type_info_get_type (void);
|
||||
GType gi_struct_info_get_type (void);
|
||||
GType gi_boxed_info_get_type (void);
|
||||
GType gi_enum_info_get_type (void);
|
||||
GType gi_flags_info_get_type (void);
|
||||
GType gi_object_info_get_type (void);
|
||||
GType gi_interface_info_get_type (void);
|
||||
GType gi_constant_info_get_type (void);
|
||||
GType gi_union_info_get_type (void);
|
||||
GType gi_value_info_get_type (void);
|
||||
GType gi_signal_info_get_type (void);
|
||||
GType gi_vfunc_info_get_type (void);
|
||||
GType gi_property_info_get_type (void);
|
||||
GType gi_field_info_get_type (void);
|
||||
GType gi_arg_info_get_type (void);
|
||||
GType gi_type_info_get_type (void);
|
||||
GType gi_unresolved_info_get_type (void);
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,206 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIUnionInfo
|
||||
#define SELF(self) (RVAL2GI_UNION_INFO(self))
|
||||
|
||||
GType
|
||||
gi_union_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIUnionInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_fields(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_union_info_get_n_fields(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_union_info_get_field(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_field_value(VALUE self, VALUE rb_union, VALUE rb_n)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
GType gtype;
|
||||
VALUE rb_value;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_union_info_get_field(info, n);
|
||||
gtype = g_registered_type_info_get_g_type(info);
|
||||
rb_value = rb_gi_field_info_get_field_raw(field_info,
|
||||
RVAL2BOXED(rb_union, gtype));
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return rb_value;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_field_value(VALUE self, VALUE rb_union, VALUE rb_n, VALUE rb_value)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
gint n;
|
||||
GIFieldInfo *field_info;
|
||||
GType gtype;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
field_info = g_union_info_get_field(info, n);
|
||||
gtype = g_registered_type_info_get_g_type(info);
|
||||
rb_gi_field_info_set_field_raw(field_info,
|
||||
RVAL2BOXED(rb_union, gtype),
|
||||
rb_value);
|
||||
/* TODO: use rb_ensure() to unref field_info. */
|
||||
g_base_info_unref(field_info);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_methods(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_union_info_get_n_methods(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_method(VALUE self, VALUE rb_n_or_name)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
GIFunctionInfo *function_info;
|
||||
|
||||
info = SELF(self);
|
||||
if (RB_TYPE_P(rb_n_or_name, T_FIXNUM)) {
|
||||
gint n;
|
||||
n = NUM2INT(rb_n_or_name);
|
||||
function_info = g_union_info_get_method(info, n);
|
||||
} else {
|
||||
const gchar *name;
|
||||
name = RVAL2CSTR(rb_n_or_name);
|
||||
function_info = g_union_info_find_method(info, name);
|
||||
}
|
||||
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(function_info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_discriminated_p(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return CBOOL2RVAL(g_union_info_is_discriminated(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_discriminator_offset(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_union_info_get_discriminator_offset(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_discriminator_type(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_union_info_get_discriminator_type(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_discriminator(VALUE self, VALUE rb_n)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
gint n;
|
||||
|
||||
info = SELF(self);
|
||||
n = NUM2INT(rb_n);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_union_info_get_discriminator(info, n));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return ULONG2NUM(g_union_info_get_size(info));
|
||||
}
|
||||
|
||||
|
||||
static VALUE
|
||||
rg_alignment(VALUE self)
|
||||
{
|
||||
GIUnionInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return ULONG2NUM(g_union_info_get_alignment(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_union_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_UNION_INFO, "UnionInfo", rb_mGI,
|
||||
rb_cGIRegisteredTypeInfo);
|
||||
|
||||
RG_DEF_METHOD(n_fields, 0);
|
||||
RG_DEF_METHOD(get_field, 1);
|
||||
RG_DEF_METHOD(get_field_value, 2);
|
||||
RG_DEF_METHOD(set_field_value, 3);
|
||||
RG_DEF_METHOD(n_methods, 0);
|
||||
RG_DEF_METHOD(get_method, 1);
|
||||
RG_DEF_METHOD_P(discriminated, 0);
|
||||
RG_DEF_METHOD(discriminator_offset, 0);
|
||||
RG_DEF_METHOD(discriminator_type, 0);
|
||||
RG_DEF_METHOD(get_discriminator, 1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(alignment, 0);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TUNRESOLVEDET_NAMESPACE rb_cGIUnresolvedInfo
|
||||
|
||||
GType
|
||||
gi_unresolved_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIUnresolvedInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_unresolved_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_UNRESOLVED_INFO,
|
||||
"UnresolvedInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
(void)RG_TARGET_NAMESPACE; /* suppress a warning. */
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIValueInfo
|
||||
#define SELF(self) (RVAL2GI_VALUE_INFO(self))
|
||||
|
||||
GType
|
||||
gi_value_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIValueInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_value(VALUE self)
|
||||
{
|
||||
GIValueInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return LONG2NUM(g_value_info_get_value(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_value_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_VALUE_INFO, "ValueInfo", rb_mGI,
|
||||
rb_cGIBaseInfo);
|
||||
|
||||
RG_DEF_METHOD(value, 0);
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/* -*- 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 "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cGIVFuncInfo
|
||||
#define SELF(self) RVAL2GI_BASE_INFO(self)
|
||||
|
||||
GType
|
||||
gi_vfunc_info_get_type(void)
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0) {
|
||||
type = g_boxed_type_register_static("GIVFuncInfo",
|
||||
(GBoxedCopyFunc)g_base_info_ref,
|
||||
(GBoxedFreeFunc)g_base_info_unref);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flags(VALUE self)
|
||||
{
|
||||
GIVFuncInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_VFUNC_INFO_FLAGS2RVAL(g_vfunc_info_get_flags(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_offset(VALUE self)
|
||||
{
|
||||
GIVFuncInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return INT2NUM(g_vfunc_info_get_offset(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_signal(VALUE self)
|
||||
{
|
||||
GIVFuncInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_vfunc_info_get_signal(info));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_invoker(VALUE self)
|
||||
{
|
||||
GIVFuncInfo *info;
|
||||
|
||||
info = SELF(self);
|
||||
return GI_BASE_INFO2RVAL_WITH_UNREF(g_vfunc_info_get_invoker(info));
|
||||
}
|
||||
|
||||
void
|
||||
rb_gi_vfunc_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE =
|
||||
G_DEF_CLASS_WITH_PARENT(GI_TYPE_VFUNC_INFO, "VFuncInfo", rb_mGI,
|
||||
rb_cGICallableInfo);
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "UNKNOWN_OFFSET", INT2NUM(0xFFFF));
|
||||
|
||||
RG_DEF_METHOD(flags, 0);
|
||||
RG_DEF_METHOD(offset, 0);
|
||||
RG_DEF_METHOD(signal, 0);
|
||||
RG_DEF_METHOD(invoker, 0);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_IV_FUNC_INFO_FLAGS, "VFuncInfoFlags", rb_mGI);
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#include "rb-gi-private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_mGObjectIntrospection
|
||||
|
||||
void
|
||||
Init_gobject_introspection(void)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
RG_TARGET_NAMESPACE = rb_define_module("GObjectIntrospection");
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
||||
rb_ary_new3(3,
|
||||
INT2FIX(GI_MAJOR_VERSION),
|
||||
INT2FIX(GI_MINOR_VERSION),
|
||||
INT2FIX(GI_MICRO_VERSION)));
|
||||
|
||||
rb_gi_argument_init();
|
||||
|
||||
rb_gi_type_tag_init(RG_TARGET_NAMESPACE);
|
||||
rb_gi_base_info_init(RG_TARGET_NAMESPACE);
|
||||
rb_gi_repository_init(RG_TARGET_NAMESPACE);
|
||||
rb_gi_loader_init(RG_TARGET_NAMESPACE);
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2012-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
|
||||
*/
|
||||
|
||||
#ifndef RB_GOBJECT_INTROSPECTION_H
|
||||
#define RB_GOBJECT_INTROSPECTION_H
|
||||
|
||||
#include <ruby.h>
|
||||
#include <rbgobject.h>
|
||||
|
||||
#include <girepository.h>
|
||||
|
||||
typedef gpointer (*RBGICallbackFinderFunc)(GIArgInfo *info);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GIArgInfo arg_info;
|
||||
GIScopeType scope_type;
|
||||
GIDirection direction;
|
||||
gboolean callback_p;
|
||||
gboolean closure_p;
|
||||
gboolean destroy_p;
|
||||
gboolean inout_argv_p;
|
||||
gint in_arg_index;
|
||||
gint closure_in_arg_index;
|
||||
gint destroy_in_arg_index;
|
||||
gint rb_arg_index;
|
||||
gint out_arg_index;
|
||||
gint inout_argc_arg_index;
|
||||
} RBGIArgMetadata;
|
||||
|
||||
typedef struct {
|
||||
RBGIArgMetadata *metadata;
|
||||
VALUE rb_gc_guard_key;
|
||||
VALUE rb_callback;
|
||||
} RBGICallbackData;
|
||||
|
||||
void rb_gi_callback_register_finder (RBGICallbackFinderFunc finder);
|
||||
void rb_gi_callback_data_free (RBGICallbackData *callback_data);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user