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:
parent
2e835fac51
commit
26e8968796
115
lib/ruby-gtk2-2.0.2/AUTHORS
Normal file
115
lib/ruby-gtk2-2.0.2/AUTHORS
Normal file
@ -0,0 +1,115 @@
|
||||
The Ruby-GNOME2 Project Team (in alphabetical order, M:Maintainer)
|
||||
------------------------------------------------------------------------
|
||||
Chikara Takamatsu <c_takamatu at ybb.ne.jp>
|
||||
Japanese Website, Website
|
||||
|
||||
Guillaume Cottenceau <ggc at users.sourceforge.net>
|
||||
Ruby/GLib, Ruby/GTK, Website.
|
||||
|
||||
Dario Linsky <dlinsky at web.de>
|
||||
German Website(M).
|
||||
|
||||
Franz Burgmann <franz.burgmann at gmx.net>
|
||||
German Website, Website, Provides some binary packages.
|
||||
|
||||
Hiroshi IGARASHI <iga at ruby-lang.org>
|
||||
rbbr, Technical advisor.
|
||||
|
||||
Geoff Youngs <g at intersect-uk.co.uk>
|
||||
Ruby/GTK, Ruby/GdkPixbuf, Ruby/GtkSourceView,
|
||||
Ruby/Pango, Ruby/GLib. Ruby-GNOME2 Icon, Website.
|
||||
|
||||
Joachim Glauche <jg at connection-net.de>
|
||||
Releases(M), since 0.17.0
|
||||
|
||||
Joao Pedrosa <joaopedrosa at yahoo.com>
|
||||
Portuguese-BR Website(M), Website, Ruby/GTK.
|
||||
|
||||
Joshua Keith <joshuakeith at linuxmail.org>
|
||||
Tutorial, Website, Ruby-GNOME2 Icon.
|
||||
|
||||
Junichiro Kita <kita at kitaj.no-ip.com>
|
||||
Ruby/GTK Tutorial(Japanese) (M)
|
||||
|
||||
KATO Kazuyoshi <kzys at 8-p.info>
|
||||
Ruby/GTK(mainly gtk-demo), Ruby/GdkPixbuf, Ruby/GLib, Ruby/Libart.
|
||||
|
||||
Kouhei Sutou <kou at cozmixng.org>
|
||||
Ruby/GnomePrint(M), Ruby/GnomePrintUI(M), Ruby/RSVG(M), Ruby/GdkPixbuf,
|
||||
Ruby/GnomeCanvas, Ruby/GTK, Ruby/Libart, Ruby/Pango, Ruby/GtkGLExt,
|
||||
Ruby/GLib.
|
||||
|
||||
KUBO Takehiro <kubo at jiubao.org>
|
||||
Ruby/GNOME, Ruby/GnomeCanvas, Ruby/Libart, Ruby/GTK, Ruby/GLib.
|
||||
|
||||
Laurent Sansonetti <lrz at gnome.org>
|
||||
Ruby/GStreamer(M), Ruby/Libgda(M), Ruby/GtkSourceView(M),
|
||||
Ruby/GLib, Ruby/GTK, French Website, Website, Tutorials.
|
||||
|
||||
Malte Milatz <malte at gmx-topmail.de>
|
||||
German Website.
|
||||
|
||||
Martin Povolný <xpovolny at fi.muni.cz>
|
||||
Ruby/GtkHtml2(M). Ruby/GTK,
|
||||
|
||||
Masahiro Sakai <sakai at tom.sfc.keio.ac.jp>
|
||||
Ruby/GLib and almost of the important design
|
||||
of Ruby-GNOME2. Porting to Win32 platform.
|
||||
|
||||
Masao Mutoh <mutoh at highway.ne.jp>
|
||||
Chief maintainer. Ruby/ATK(M), Ruby/GTK(M), Ruby/GdkPixbuf(M),
|
||||
Ruby/Libglade(M), Ruby/Pango(M), Ruby/PanelApplet(M), Ruby/rbbr(M),
|
||||
Website(M), Others. Project management.
|
||||
|
||||
Matthew Berg <galt at gothpoodle.com>
|
||||
Ruby/GTK TreeView Tutorial(M), Website, Ruby/GTK.
|
||||
|
||||
Mirko Maischberger <mirko at lilik.it>
|
||||
Ruby/GtkMozEmbed(M), Ruby/GTK, Ruby/Pango, Ruby/GdkPixbuf, Ruby/GNOME,
|
||||
Website.
|
||||
|
||||
Nikolai :: lone-star :: Weibull <lone-star at home.se>
|
||||
Ruby/GConf, Ruby/GnomeVFS(M), Ruby/GTK.
|
||||
|
||||
Nobuyoshi Nakada <nobu.nokada at softhome.net>
|
||||
Technical advisor.
|
||||
|
||||
OGASAWARA, Takeshi <t-ogs at earth.email.ne.jp>
|
||||
Ruby/GTK.
|
||||
|
||||
Pascal Terjan <pterjan at linuxfr.org>
|
||||
Ruby/GLib, Ruby/GTK, Ruby/GtkSourceView, Ruby/Pango, Ruby/GnomeVFS,
|
||||
Ruby/GConf.
|
||||
|
||||
Sam Stephenson <sstephenson at gmail.com>
|
||||
Website.
|
||||
|
||||
Sjoerd Simons <sjoerd at luon.net>
|
||||
Ruby/GLib, Ruby/GTK.
|
||||
|
||||
TAMURA.Kenichi <sgs02516 at nifty.com>
|
||||
Ruby/GLib.
|
||||
|
||||
Vincent Isambart <vincent.isambart at laposte.net>
|
||||
Ruby/GtkGLExt(M), Ruby/GnomeCanvas, Ruby/ATK, Ruby/Pango, Ruby/GLib,
|
||||
Ruby/GTK, Ruby/GtkHtml2, Ruby/Libart, Ruby/Libglade, French Website,
|
||||
Website.
|
||||
|
||||
All members of Ruby-GNOME2 Mailing lists.
|
||||
And many others who have contributed patches, reported bugs. Thanks!
|
||||
|
||||
----------------------------------------
|
||||
Ruby-GNOME Maintainers.
|
||||
(current)
|
||||
Kouhei Sutou <kou at cozmixng.org>
|
||||
(up to Ruby-GNOME2 ver. 0.16)
|
||||
Masao Mutoh <mutoh at highway.ne.jp>
|
||||
(up to Ruby-GNOME ver. 0.27)
|
||||
Neil Conway <neilconway at rogers.com>
|
||||
(up to Ruby-GNOME ver. 0.25)
|
||||
Hiroshi IGARASHI <iga at ruby-lang.org>
|
||||
(up to Ruby-GNOME ver. 0.18)
|
||||
by Dai.K. <MAP2303 at mapletown.net>
|
||||
|
||||
|
||||
charset = UTF-8.
|
504
lib/ruby-gtk2-2.0.2/COPYING.LIB
Normal file
504
lib/ruby-gtk2-2.0.2/COPYING.LIB
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
3625
lib/ruby-gtk2-2.0.2/NEWS
Normal file
3625
lib/ruby-gtk2-2.0.2/NEWS
Normal file
File diff suppressed because it is too large
Load Diff
206
lib/ruby-gtk2-2.0.2/README
Normal file
206
lib/ruby-gtk2-2.0.2/README
Normal file
@ -0,0 +1,206 @@
|
||||
# -*- RD -*-
|
||||
|
||||
= README
|
||||
|
||||
== Ruby-GNOME2 -- Ruby bindings for GNOME-2.x
|
||||
|
||||
This is a set of bindings for the GNOME-2.x and GNOME-3.x libraries to
|
||||
use from Ruby 1.8.6, 1.8.7, 1.9.x and 2.0.0.
|
||||
|
||||
== Release packages
|
||||
|
||||
=== ruby-gtk2
|
||||
|
||||
* Ruby/GLib2: GLib 2.0.x or later
|
||||
* Ruby/ATK: ATK 1.0.x or later
|
||||
* Ruby/Pango: Pango 1.1.x or later
|
||||
* Ruby/GdkPixbuf2: GTK+ 2.0.x or later
|
||||
* Ruby/GTK2: GTK+ 2.0.x or later
|
||||
* Ruby/GObjectIntrospection: GObject Introspection 1.32.1 or later
|
||||
|
||||
=== ruby-gtk3
|
||||
|
||||
* ruby-gtk2 - Ruby/GTK2
|
||||
* Ruby/GDK3: GTK+ 3.4.2 or later
|
||||
* Ruby/GTK3: GTK+ 3.4.2 or later
|
||||
|
||||
=== ruby-gnome2-all
|
||||
|
||||
* ruby-gtk2 + ruby-gtk3 - duplicated libraries
|
||||
* Ruby/RSVG: librsvg 2.8.0 or later
|
||||
* Ruby/Poppler: poppler-glib 0.8.0 or later
|
||||
* Ruby/VTE VTE 0.12.1 or later
|
||||
* Ruby/GtkSourceView2: GtkSourceView 2.0.0 or later
|
||||
* Ruby/GIO2: GIO 2.16.x or later
|
||||
* Ruby/CairoGObject: cairo-gobject 1.12.10 or later
|
||||
* Ruby/Clutter: Clutter 1.12.0 or later
|
||||
* Ruby/ClutterGTK: Clutter-GTK 1.2.0 or later
|
||||
* Ruby/ClutterGStreamer:Clutter-GStreamer 2.0.0 or later
|
||||
* Ruby/GtkSourceView3: GtkSourceView 3.4.2 or later
|
||||
* Ruby/VTE3: VTE 0.32.2 or later
|
||||
* Ruby/WebKitGTK: WebKitGTK+ 1.8.1 or later (for GTK+ 3)
|
||||
* Ruby/WebKitGTK2: WebKitGTK+ 1.8.1 or later (for GTK+ 2)
|
||||
* Ruby/GStreamer: GStreamer 1.0.0 or later
|
||||
* Ruby/GooCanvas: GooCanvas 0.8.0 or later
|
||||
|
||||
=== Experimental / Incomplete:
|
||||
|
||||
* ...
|
||||
|
||||
=== Deprecated
|
||||
|
||||
* Ruby/PanelApplet: gnome-panel 2.6.0 or later (deprecated since 0.16.0)
|
||||
* Ruby/GConf2: GConf 2.0.x or later
|
||||
* Ruby/GNOME2: libgnome-2.0.x, libgnomeui-2.0.x or later
|
||||
* Ruby/GnomeCanvas2: libgnomecanvas-2.0.x or later
|
||||
* Ruby/GnomePrint: libgnomeprint-2.8.x or later
|
||||
* Ruby/GnomePrintUI: libgnomeprintui-2.6.x or later
|
||||
* Ruby/GnomeVFS: GnomeVFS 2.0.x or later
|
||||
* Ruby/GtkHtml2: GtkHtml2 2.0.x or later
|
||||
* Ruby/GtkGLExt: GtkGLExt 1.0.3 or later
|
||||
* Ruby/Libart2: libart_lgpl 2.3.12 or later
|
||||
* Ruby/GtkSourceView: GtkSourceView 1.0.1 or later
|
||||
* Ruby/Libglade2: Libglade 2.0.x or later
|
||||
* Ruby/GtkMozEmbed: GtkMozEmbed (Mozilla 1.7.x or FireFox-1.0.x or later)
|
||||
|
||||
== Install
|
||||
|
||||
% ruby extconf.rb
|
||||
% make
|
||||
% sudo make install
|
||||
|
||||
To compile and install a particular sub-binding, you can add arguments:
|
||||
|
||||
% ruby extconf.rb [subdir]...
|
||||
e.g.) ruby extconf.rb glib2 pango atk gdk_pixbuf2 gtk2
|
||||
|
||||
Or you can compile each sub-binding:
|
||||
|
||||
% cd <each sub-directory>
|
||||
% ruby extconf.rb
|
||||
% make
|
||||
% sudo make install
|
||||
|
||||
=== extconf.rb options
|
||||
|
||||
: --ruby
|
||||
ruby directory
|
||||
|
||||
: --topsrcdir
|
||||
top source directory
|
||||
|
||||
: --topdir
|
||||
top directory
|
||||
|
||||
: --strict
|
||||
if some libraries fail to compile/install, "make"
|
||||
command returns 1(exit 1)
|
||||
|
||||
=== Environment Variables
|
||||
|
||||
: CAIRO_PATH
|
||||
rcairo path (for Win32).
|
||||
|
||||
=== Dependencies
|
||||
|
||||
You should install a sub-binding with its dependencies. The
|
||||
current dependencies are:
|
||||
|
||||
: Ruby/GLib
|
||||
none.
|
||||
|
||||
: Ruby/ATK
|
||||
depends on Ruby/GLib.
|
||||
|
||||
: Ruby/Pango
|
||||
depends on Ruby/GLib, rcairo(optional).
|
||||
|
||||
: Ruby/GdkPixbuf
|
||||
depends on Ruby/GLib.
|
||||
|
||||
: Ruby/GTK
|
||||
depends on Ruby/GLib, Ruby/ATK, Ruby/Pango,
|
||||
Ruby/GdkPixbuf, rcairo(optional)
|
||||
|
||||
: Ruby/RSVG
|
||||
depends on Ruby/GLib, Ruby/GdkPixbuf2.
|
||||
|
||||
: Ruby/Poppler
|
||||
depends on Ruby/GLib, Ruby/GdkPixbuf(optional), rcairo(optional).
|
||||
|
||||
: Ruby/VTE
|
||||
depends on Ruby/GTK.
|
||||
|
||||
: Ruby/GtkSourceView2
|
||||
depends on Ruby/GTK.
|
||||
|
||||
: Ruby/GIO2
|
||||
depends on Ruby/GLib.
|
||||
|
||||
=== Experimental
|
||||
|
||||
: Ruby/GStreamer
|
||||
depends on Ruby/GLib.
|
||||
|
||||
: Ruby/GooCanvas
|
||||
depends on Ruby/GTK.
|
||||
|
||||
=== Deprecated
|
||||
|
||||
: Ruby/PanelApplet
|
||||
depends on Ruby/GTK (since libpanel-applet 2.25) or
|
||||
Ruby/GNOME (before libpanel-applet 2.25).
|
||||
|
||||
: Ruby/Libart
|
||||
depends on Ruby/GLib(Use mkmf-gnome2.rb only).
|
||||
|
||||
: Ruby/GConf
|
||||
depends on Ruby/GLib.
|
||||
|
||||
: Ruby/GNOME
|
||||
depends on Ruby/GnomeCanvas.
|
||||
|
||||
: Ruby/GnomeCanvas
|
||||
depends on Ruby/GTK, Ruby/Libart.
|
||||
|
||||
: Ruby/GnomeVFS
|
||||
depends on Ruby/GLib.
|
||||
|
||||
: Ruby/GnomePrint
|
||||
depends on Ruby/GLib, Ruby/Pango, Ruby/Libart2.
|
||||
|
||||
: Ruby/GnomePrintUI
|
||||
depends on Ruby/GTK, Ruby/GnomePrint.
|
||||
|
||||
: Ruby/GtkHtml2
|
||||
depends on Ruby/GTK.
|
||||
|
||||
: Ruby/GtkGLExt
|
||||
depends on Ruby/GTK, rbogl.
|
||||
|
||||
: Ruby/GtkSourceView
|
||||
depends on Ruby/GTK.
|
||||
|
||||
: Ruby/Libglade
|
||||
depends on Ruby/GTK, Ruby/GNOME(optional), REXML(optional).
|
||||
|
||||
== Bugs
|
||||
|
||||
Please report bugs either in our bug tracker
|
||||
((<URL:http://sourceforge.net/tracker/?group_id=53614&atid=470969>))
|
||||
|
||||
or on the ruby-gnome2-devel-en / ruby-gnome2-devel-ja mailing list
|
||||
((<URL:http://sourceforge.net/mail/?group_id=53614>))
|
||||
|
||||
== Copying
|
||||
|
||||
Copyright (c) 2002-2009 Ruby-GNOME2 Project Team
|
||||
|
||||
This program is free software.
|
||||
You can distribute/modify this program under the terms of
|
||||
the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
||||
|
||||
== Project Website
|
||||
|
||||
((<URL:http://ruby-gnome2.sourceforge.jp/>))
|
||||
|
433
lib/ruby-gtk2-2.0.2/Rakefile
Normal file
433
lib/ruby-gtk2-2.0.2/Rakefile
Normal file
@ -0,0 +1,433 @@
|
||||
# -*- ruby -*-
|
||||
|
||||
require "pathname"
|
||||
require "tmpdir"
|
||||
require "open-uri"
|
||||
|
||||
repository_base_url = "https://ruby-gnome2.svn.sourceforge.net/svnroot/ruby-gnome2/ruby-gnome2"
|
||||
|
||||
task :default => :test
|
||||
|
||||
def version
|
||||
@version ||= ENV["VERSION"] || guess_version
|
||||
end
|
||||
|
||||
def guess_version
|
||||
versions = {}
|
||||
File.open("glib2/ext/glib2/rbglib.h") do |rbglib_h|
|
||||
rbglib_h.each_line do |line|
|
||||
if /#define\s+RBGLIB_([A-Z]+)_VERSION\s+(\d+)/ =~ line
|
||||
versions[$1.downcase] = $2.to_i
|
||||
end
|
||||
end
|
||||
end
|
||||
["major", "minor", "micro"].collect {|type| versions[type]}.compact.join(".")
|
||||
end
|
||||
|
||||
def dist_dir(base_name, _version=nil)
|
||||
_version ||= version
|
||||
"#{base_name}-#{_version}"
|
||||
end
|
||||
|
||||
def archive_name(base_name, _version=nil)
|
||||
dist_dir(base_name, _version) + ".tar.gz"
|
||||
end
|
||||
|
||||
@needless_paths = [".svn", ".test-result", ".gdb_history", "mkmf.log",
|
||||
"*.o", "*.so", "pkg", "vendor", "tmp"]
|
||||
def package(base_name, paths, needless_paths=nil)
|
||||
_dist_dir = dist_dir(base_name)
|
||||
|
||||
rm_rf(_dist_dir)
|
||||
mkdir_p(_dist_dir)
|
||||
cp_r(paths, _dist_dir, :preserve => true)
|
||||
|
||||
needless_paths ||= @needless_paths
|
||||
Dir.glob("#{_dist_dir}/**/{#{needless_paths.join(',')}}") do |needless_path|
|
||||
rm_rf(needless_path)
|
||||
end
|
||||
sh("tar", "cvfz", archive_name(base_name), _dist_dir)
|
||||
ensure
|
||||
rm_rf(_dist_dir) if _dist_dir
|
||||
end
|
||||
|
||||
def download(url, local_path=nil)
|
||||
local_path ||= File.basename(url)
|
||||
open(url) do |remote_file|
|
||||
File.open(local_path, "wb") do |local_file|
|
||||
local_file.print(remote_file.read)
|
||||
end
|
||||
end
|
||||
local_path
|
||||
end
|
||||
|
||||
def change_environment_variable(variables)
|
||||
original_variables = {}
|
||||
variables.each do |key, value|
|
||||
next if ENV[key]
|
||||
original_variables[key] = ENV[key]
|
||||
ENV[key] = value
|
||||
end
|
||||
|
||||
begin
|
||||
yield
|
||||
ensure
|
||||
original_variables.each do |key, value|
|
||||
ENV[key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "configure all packages"
|
||||
task :configure do
|
||||
ruby("extconf.rb")
|
||||
end
|
||||
|
||||
file "Makefile" do
|
||||
task(:configure).invoke
|
||||
end
|
||||
|
||||
desc "build all packages"
|
||||
task :build => ["Makefile"] do
|
||||
sh("make")
|
||||
end
|
||||
|
||||
desc "clean all packages"
|
||||
task :clean do
|
||||
sh("make", "clean") if File.exist?("Makefile")
|
||||
end
|
||||
|
||||
desc "more clean all packages"
|
||||
task :distclean do
|
||||
sh("make", "distclean") if File.exist?("Makefile")
|
||||
end
|
||||
|
||||
desc "run tests for all packages"
|
||||
task :test => [:build] do
|
||||
ruby("run-test.rb")
|
||||
end
|
||||
|
||||
gtk2_base_name = "ruby-gtk2"
|
||||
gtk3_base_name = "ruby-gtk3"
|
||||
gnome2_base_name = "ruby-gnome2-all"
|
||||
|
||||
gtk2_packages = [
|
||||
"glib2",
|
||||
"gobject-introspection",
|
||||
"gio2",
|
||||
"atk",
|
||||
"pango",
|
||||
"gdk_pixbuf2",
|
||||
"gtk2",
|
||||
]
|
||||
gtk3_packages = gtk2_packages - ["gtk2"] + ["gdk3", "gtk3"]
|
||||
gnome2_packages = gtk2_packages + gtk3_packages + [
|
||||
"goocanvas",
|
||||
"gstreamer",
|
||||
"gtksourceview2",
|
||||
"poppler",
|
||||
"rsvg2",
|
||||
"vte",
|
||||
"vte3",
|
||||
"cairo-gobject",
|
||||
"gtksourceview3",
|
||||
"clutter",
|
||||
"clutter-gtk",
|
||||
"clutter-gstreamer",
|
||||
"webkit-gtk",
|
||||
"webkit-gtk2",
|
||||
]
|
||||
gnome2_packages = gnome2_packages.uniq
|
||||
|
||||
namespace :dist do
|
||||
base_files = ["AUTHORS", "COPYING.LIB", "NEWS",
|
||||
"README", "Rakefile",
|
||||
"exec_make.rb", "extconf.rb", "run-test.rb"]
|
||||
desc "make Ruby/GTK2 package"
|
||||
task :gtk2 do
|
||||
package(gtk2_base_name, base_files + gtk2_packages)
|
||||
end
|
||||
|
||||
desc "make Ruby/GTK3 package"
|
||||
task :gtk3 do
|
||||
package(gtk3_base_name, base_files + gtk3_packages)
|
||||
end
|
||||
|
||||
desc "make Ruby/GNOME2 package"
|
||||
task :gnome2 do
|
||||
package(gnome2_base_name, base_files + gnome2_packages)
|
||||
end
|
||||
|
||||
ruby_versions = ["1.9.3-p392", "2.0.0-p0"]
|
||||
namespace :test do
|
||||
ruby_base_url = "ftp://ftp.ruby-lang.org/pub/ruby"
|
||||
ruby_versions.each do |ruby_version|
|
||||
base_dir = "tmp/dist-test-#{version}/#{ruby_version}"
|
||||
directory base_dir
|
||||
|
||||
prefix = Pathname.new(base_dir) + "local"
|
||||
ruby_tar_bz2_base = "ruby-#{ruby_version}.tar.bz2"
|
||||
file "#{base_dir}/#{ruby_tar_bz2_base}" => base_dir do
|
||||
generation = ruby_version.scan(/\A\d\.\d/)[0]
|
||||
ruby_tar_bz2_url = "#{ruby_base_url}/#{generation}/#{ruby_tar_bz2_base}"
|
||||
Dir.chdir(base_dir) do
|
||||
download(ruby_tar_bz2_url)
|
||||
end
|
||||
end
|
||||
|
||||
ruby_path = "#{prefix}/bin/ruby"
|
||||
expanded_ruby_path = File.expand_path(ruby_path)
|
||||
file ruby_path => "#{base_dir}/#{ruby_tar_bz2_base}" do
|
||||
expanded_prefix = prefix.expand_path
|
||||
Dir.chdir(base_dir) do
|
||||
sh("tar", "xvf", ruby_tar_bz2_base)
|
||||
Dir.chdir(File.basename(ruby_tar_bz2_base, ".tar.bz2")) do
|
||||
sh("./configure", "--prefix=#{expanded_prefix}")
|
||||
sh("make", "-j8")
|
||||
sh("make", "install-nodoc")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
rubygems_tgz_base = "rubygems-1.8.24.tgz"
|
||||
rubygems_tgz = "#{base_dir}/#{rubygems_tgz_base}"
|
||||
file rubygems_tgz => base_dir do
|
||||
rubygems_url_base = "http://production.cf.rubygems.org/rubygems"
|
||||
Dir.chdir(base_dir) do
|
||||
download("#{rubygems_url_base}/#{rubygems_tgz_base}")
|
||||
end
|
||||
end
|
||||
|
||||
gem_path = "#{prefix}/bin/gem"
|
||||
expanded_gem_path = File.expand_path(gem_path)
|
||||
file gem_path => [ruby_path, rubygems_tgz] do
|
||||
Dir.chdir(base_dir) do
|
||||
sh("tar", "xvf", rubygems_tgz_base)
|
||||
Dir.chdir(File.basename(rubygems_tgz_base, ".tgz")) do
|
||||
sh(expanded_ruby_path, "setup.rb")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
packages = {
|
||||
"gtk2" => {
|
||||
:archive_name => archive_name(gtk2_base_name),
|
||||
:packages => gtk2_packages,
|
||||
},
|
||||
"gtk3" => {
|
||||
:archive_name => archive_name(gtk3_base_name),
|
||||
:packages => gtk3_packages,
|
||||
},
|
||||
"gnome2" => {
|
||||
:archive_name => archive_name(gnome2_base_name),
|
||||
:packages => gnome2_packages,
|
||||
},
|
||||
}
|
||||
namespace "ruby-#{ruby_version}" do
|
||||
packages.each do |name, attributes|
|
||||
namespace name do
|
||||
tar_gz = File.expand_path(attributes[:archive_name])
|
||||
task :prepare => ["dist:#{name}", gem_path] do
|
||||
Dir.chdir(base_dir) do
|
||||
sh("tar", "xvf", tar_gz)
|
||||
end
|
||||
if /cairo/ !~ `#{expanded_gem_path} list cairo`
|
||||
sh(expanded_gem_path, "install", "cairo")
|
||||
end
|
||||
end
|
||||
|
||||
attributes[:packages].each do |sub_package_name|
|
||||
task sub_package_name => :prepare do
|
||||
Dir.chdir(base_dir) do
|
||||
package_base_dir = File.basename(tar_gz, ".tar.gz")
|
||||
rm_rf(sub_package_name)
|
||||
sh("cp", "-a",
|
||||
"#{package_base_dir}/#{sub_package_name}", sub_package_name)
|
||||
Dir.chdir(sub_package_name) do
|
||||
if File.exist?("extconf.rb")
|
||||
sh(expanded_ruby_path, "extconf.rb")
|
||||
sh("make", "-j8")
|
||||
sh("make", "install")
|
||||
end
|
||||
end
|
||||
rm_rf(sub_package_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
packages.each do |name, attributes|
|
||||
test_tasks = attributes[:packages].collect do |sub_package_name|
|
||||
"dist:test:ruby-#{ruby_version}:#{name}:#{sub_package_name}"
|
||||
end
|
||||
task name => test_tasks
|
||||
end
|
||||
end
|
||||
|
||||
test_tasks = packages.collect do |name, attributes|
|
||||
"dist:test:ruby-#{ruby_version}:#{name}"
|
||||
end
|
||||
task "ruby-#{ruby_version}" => test_tasks
|
||||
end
|
||||
end
|
||||
|
||||
test_tasks = ruby_versions.collect do |ruby_version|
|
||||
"dist:test:ruby-#{ruby_version}"
|
||||
end
|
||||
desc "run packages test"
|
||||
task :test => test_tasks
|
||||
end
|
||||
desc "make all packages"
|
||||
task :dist => ["dist:gtk2", "dist:gtk3", "dist:gnome2"]
|
||||
|
||||
directory "misc"
|
||||
file "misc/release.rb" => "misc" do |task|
|
||||
release_rb = "https://raw.github.com/clear-code/cutter/master/misc/release.rb"
|
||||
open(release_rb) do |remote_release_rb|
|
||||
File.open(task.name, "w") do |local_release_rb|
|
||||
local_release_rb.print(remote_release_rb.read)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "release Ruby-GNOME2 packages"
|
||||
task :release => ["misc/release.rb", :dist] do
|
||||
sf_user_name = ENV["SF_USER"] || ENV["USER"]
|
||||
project_id = "ruby-gnome2"
|
||||
project_name = "Ruby-GNOME 2"
|
||||
package_name = "ruby-gnome2"
|
||||
release_name = "ruby-gnome2-#{version}"
|
||||
package_base_names = [gtk2_base_name, gtk3_base_name, gnome2_base_name]
|
||||
archive_names = package_base_names.collect do |base_name|
|
||||
archive_name(base_name)
|
||||
end
|
||||
ruby("misc/release.rb", sf_user_name, project_id, project_name,
|
||||
package_name, release_name, "README:1", "NEWS",
|
||||
*archive_names)
|
||||
end
|
||||
|
||||
namespace :gem do
|
||||
desc "build all gems"
|
||||
task :build do
|
||||
gnome2_packages.each do |package|
|
||||
Dir.chdir(package) do
|
||||
ruby("-S", "rake", "gem")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "push all gems"
|
||||
task :push do
|
||||
gnome2_packages.each do |package|
|
||||
ruby("-S", "gem", "push",
|
||||
*Dir.glob(File.join(package, "pkg", "*-#{version}.gem")))
|
||||
end
|
||||
end
|
||||
|
||||
desc "install all gems"
|
||||
task :install do
|
||||
gnome2_packages.each do |package|
|
||||
ruby("-S", "gem", "install", "--user-install",
|
||||
*Dir.glob(File.join(package, "pkg", "*-#{version}.gem")))
|
||||
end
|
||||
end
|
||||
|
||||
desc "uninstall all gems"
|
||||
task :uninstall do
|
||||
gnome2_packages.each do |package|
|
||||
ruby("-S", "gem", "uninstall", "--version", version, package)
|
||||
end
|
||||
end
|
||||
|
||||
namespace :win32 do
|
||||
win32_unsupported_packages = [
|
||||
"goocanvas",
|
||||
"vte",
|
||||
"vte3",
|
||||
"webkit-gtk",
|
||||
"webkit-gtk2",
|
||||
]
|
||||
win32_gnome2_packages = gnome2_packages - win32_unsupported_packages
|
||||
|
||||
namespace :build do
|
||||
desc "build all Windows binaries"
|
||||
task :vendor do
|
||||
win32_gnome2_packages.each do |package|
|
||||
Dir.chdir(package) do
|
||||
ruby("-S", "rake", "native:build", "win32:build")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "build all Windows bindings"
|
||||
task :ext do
|
||||
change_environment_variable("MAKE" => "make debugflags=") do
|
||||
win32_gnome2_packages.each do |package|
|
||||
Dir.chdir(package) do
|
||||
tasks = [
|
||||
"cross",
|
||||
"win32:builder:build:prepare:pkg_config",
|
||||
"native",
|
||||
"gem",
|
||||
]
|
||||
ruby("-S", "rake", "RUBY_CC_VERSION=1.9.3:2.0.0", *tasks)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "build GSettings schemas for all Windows binaries"
|
||||
task :schema do
|
||||
Dir.mktmpdir do |dir|
|
||||
win32_gnome2_packages.each do |package|
|
||||
gschema_xml_glob = File.join(package, "vendor", "local", "share",
|
||||
"glib-2.0", "schemas", "*.gschema.xml")
|
||||
Dir.glob(gschema_xml_glob).each do |schema|
|
||||
cp(schema, dir)
|
||||
end
|
||||
end
|
||||
sh("glib-compile-schemas",
|
||||
"--targetdir", "glib2/vendor/local/share/glib-2.0/schemas",
|
||||
dir)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "build all Windows gems"
|
||||
task :build => [
|
||||
"gem:win32:build:vendor",
|
||||
"gem:win32:build:schema",
|
||||
"gem:win32:build:ext",
|
||||
]
|
||||
|
||||
desc "clean all Windows gems build"
|
||||
task :clean do
|
||||
win32_gnome2_packages.each do |package|
|
||||
rm_rf(File.join(package, "tmp"))
|
||||
end
|
||||
end
|
||||
|
||||
desc "download DLL for Windows all gems"
|
||||
task :download do
|
||||
win32_gnome2_packages.each do |package|
|
||||
Dir.chdir(package) do
|
||||
ruby("-S", "rake", "win32:download")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "push all Windows gems"
|
||||
task :push do
|
||||
win32_gnome2_packages.each do |package|
|
||||
ruby("-S", "gem", "push",
|
||||
*Dir.glob(File.join(package, "pkg", "*-#{version}-x86-mingw32.gem")))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "tag the current release"
|
||||
task :tag do
|
||||
sh("git", "tag", "-a", version, "-m", "release #{version}!!!")
|
||||
end
|
504
lib/ruby-gtk2-2.0.2/atk/COPYING.LIB
Normal file
504
lib/ruby-gtk2-2.0.2/atk/COPYING.LIB
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
30
lib/ruby-gtk2-2.0.2/atk/README
Normal file
30
lib/ruby-gtk2-2.0.2/atk/README
Normal file
@ -0,0 +1,30 @@
|
||||
Ruby/ATK
|
||||
===============
|
||||
Ruby/ATK is a Ruby binding of ATK-1.0.x or later.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
Ruby: http://www.ruby-lang.org/
|
||||
GLib: http://www.gtk.org/
|
||||
ATK: http://developer.gnome.org/projects/gap
|
||||
Ruby/GLib2: http://ruby-gnome2.sourceforge.net/
|
||||
|
||||
Install
|
||||
-------
|
||||
0. install ruby-1.6.x or later, GLib, ATK, Ruby/GLib2.
|
||||
1. ruby extconf.rb
|
||||
2. make
|
||||
3. su
|
||||
4. make install
|
||||
|
||||
Copying
|
||||
-------
|
||||
Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
|
||||
|
||||
This program is free software.
|
||||
You can distribute/modify this program under the terms of
|
||||
the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
||||
|
||||
Project Website
|
||||
---------------
|
||||
http://ruby-gnome2.sourceforge.jp/
|
30
lib/ruby-gtk2-2.0.2/atk/Rakefile
Normal file
30
lib/ruby-gtk2-2.0.2/atk/Rakefile
Normal file
@ -0,0 +1,30 @@
|
||||
# -*- ruby -*-
|
||||
|
||||
$LOAD_PATH.unshift("./../glib2/lib")
|
||||
require "gnome2/rake/package-task"
|
||||
|
||||
package_task = GNOME2::Rake::PackageTask.new do |package|
|
||||
package.summary = "Ruby/ATK is a Ruby binding of ATK-1.0.x."
|
||||
package.description = "Ruby/ATK is a Ruby binding of ATK-1.0.x."
|
||||
package.dependency.gem.runtime = ["glib2"]
|
||||
package.windows.packages = []
|
||||
package.windows.dependencies = []
|
||||
package.windows.build_dependencies = ["glib2", "gobject-introspection"]
|
||||
package.external_packages = [
|
||||
{
|
||||
:name => "atk",
|
||||
:download_site => :gnome,
|
||||
:label => "atk",
|
||||
:version => "2.8.0",
|
||||
:compression_method => "xz",
|
||||
:windows => {
|
||||
:configure_args => [
|
||||
"--enable-introspection",
|
||||
],
|
||||
:build_concurrently => false,
|
||||
},
|
||||
}
|
||||
]
|
||||
end
|
||||
package_task.define
|
||||
|
2
lib/ruby-gtk2-2.0.2/atk/ext/atk/atk.def
Normal file
2
lib/ruby-gtk2-2.0.2/atk/ext/atk/atk.def
Normal file
@ -0,0 +1,2 @@
|
||||
EXPORTS
|
||||
Init_atk
|
11
lib/ruby-gtk2-2.0.2/atk/ext/atk/depend
Normal file
11
lib/ruby-gtk2-2.0.2/atk/ext/atk/depend
Normal file
@ -0,0 +1,11 @@
|
||||
install-so: install-headers
|
||||
install-headers:
|
||||
$(INSTALL_DATA) $(srcdir)/rbatk.h $(RUBYARCHDIR)
|
||||
$(INSTALL_DATA) rbatkversion.h $(RUBYARCHDIR)
|
||||
|
||||
install: install-pc
|
||||
install-pc:
|
||||
if test -n "$(pkgconfigdir)"; then \
|
||||
$(MAKEDIRS) $(pkgconfigdir); \
|
||||
$(INSTALL_DATA) ruby-atk.pc $(pkgconfigdir); \
|
||||
fi
|
81
lib/ruby-gtk2-2.0.2/atk/ext/atk/extconf.rb
Normal file
81
lib/ruby-gtk2-2.0.2/atk/ext/atk/extconf.rb
Normal file
@ -0,0 +1,81 @@
|
||||
=begin
|
||||
extconf.rb for Ruby/Atk extention library
|
||||
=end
|
||||
|
||||
require 'pathname'
|
||||
|
||||
base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
|
||||
top_dir = base_dir.parent
|
||||
top_build_dir = Pathname(".").parent.parent.parent.expand_path
|
||||
|
||||
mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
|
||||
version_suffix = ""
|
||||
unless mkmf_gnome2_dir.exist?
|
||||
if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
|
||||
version_suffix = $1
|
||||
mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
|
||||
end
|
||||
end
|
||||
|
||||
$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
|
||||
|
||||
module_name = "atk"
|
||||
package_id = "atk"
|
||||
|
||||
begin
|
||||
require 'mkmf-gnome2'
|
||||
rescue LoadError
|
||||
require 'rubygems'
|
||||
gem 'glib2'
|
||||
require 'mkmf-gnome2'
|
||||
end
|
||||
|
||||
ruby_header = 'ruby.h'
|
||||
have_func 'rb_errinfo', ruby_header
|
||||
|
||||
["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 => "libatk1.0-dev",
|
||||
:redhat => "atk-devel",
|
||||
:homebrew => "atk",
|
||||
:macports => "atk")
|
||||
exit(false)
|
||||
end
|
||||
|
||||
atk_header = "atk/atk.h"
|
||||
have_func('atk_action_get_localized_name', atk_header)
|
||||
have_func('atk_hyperlink_is_inline', atk_header)
|
||||
have_func('atk_object_add_relationship', atk_header)
|
||||
have_func('atk_object_remove_relationship', atk_header)
|
||||
have_func('atk_component_get_layer', atk_header)
|
||||
have_func('atk_component_get_mdi_zorder', atk_header)
|
||||
have_func('atk_hyperlink_is_selected_link', atk_header)
|
||||
have_func('atk_text_get_bounded_ranges', atk_header)
|
||||
have_func('atk_role_get_localized_name', atk_header)
|
||||
have_func('atk_text_clip_type_get_type', atk_header)
|
||||
|
||||
have_func('atk_text_free_ranges', atk_header)
|
||||
|
||||
make_version_header("ATK", package_id, ".")
|
||||
|
||||
create_pkg_config_file("Ruby/ATK", package_id)
|
||||
$defs << " -DRUBY_ATK_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
|
66
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.c
Normal file
66
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.c
Normal file
@ -0,0 +1,66 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003-2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mAtk
|
||||
VALUE mAtk;
|
||||
|
||||
extern void Init_atk(void);
|
||||
|
||||
void
|
||||
Init_atk(void)
|
||||
{
|
||||
RG_TARGET_NAMESPACE = rb_define_module("Atk");
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
||||
rb_ary_new3(3,
|
||||
INT2FIX(ATK_MAJOR_VERSION),
|
||||
INT2FIX(ATK_MINOR_VERSION),
|
||||
INT2FIX(ATK_MICRO_VERSION)));
|
||||
|
||||
Init_atk_action(RG_TARGET_NAMESPACE);
|
||||
Init_atk_component(RG_TARGET_NAMESPACE);
|
||||
Init_atk_document(RG_TARGET_NAMESPACE);
|
||||
Init_atk_editabletext(RG_TARGET_NAMESPACE);
|
||||
Init_atk_gobjectaccessible(RG_TARGET_NAMESPACE);
|
||||
Init_atk_hyperlink(RG_TARGET_NAMESPACE);
|
||||
Init_atk_hypertext(RG_TARGET_NAMESPACE);
|
||||
Init_atk_image(RG_TARGET_NAMESPACE);
|
||||
Init_atk_implementor(RG_TARGET_NAMESPACE);
|
||||
Init_atk_noopobject(RG_TARGET_NAMESPACE);
|
||||
Init_atk_noopobjectfactory(RG_TARGET_NAMESPACE);
|
||||
Init_atk_object(RG_TARGET_NAMESPACE);
|
||||
Init_atk_objectfactory(RG_TARGET_NAMESPACE);
|
||||
Init_atk_registry(RG_TARGET_NAMESPACE);
|
||||
Init_atk_relation(RG_TARGET_NAMESPACE);
|
||||
Init_atk_relation_set(RG_TARGET_NAMESPACE);
|
||||
Init_atk_selection(RG_TARGET_NAMESPACE);
|
||||
Init_atk_state(RG_TARGET_NAMESPACE);
|
||||
Init_atk_state_set(RG_TARGET_NAMESPACE);
|
||||
Init_atk_streamable_content(RG_TARGET_NAMESPACE);
|
||||
Init_atk_table(RG_TARGET_NAMESPACE);
|
||||
Init_atk_text(RG_TARGET_NAMESPACE);
|
||||
Init_atk_text_range(RG_TARGET_NAMESPACE);
|
||||
Init_atk_text_rectangle(RG_TARGET_NAMESPACE);
|
||||
Init_atk_util(RG_TARGET_NAMESPACE);
|
||||
Init_atk_value(RG_TARGET_NAMESPACE);
|
||||
}
|
47
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.h
Normal file
47
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatk.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "ruby.h"
|
||||
#include <atk/atk.h>
|
||||
#include <atk/atk-enum-types.h>
|
||||
#include <atk/atknoopobject.h>
|
||||
#include <atk/atknoopobjectfactory.h>
|
||||
#include "rbgobject.h"
|
||||
#include "rbatkversion.h"
|
||||
#include "rbatkconversions.h"
|
||||
|
||||
#if defined(G_PLATFORM_WIN32) && !defined(RUBY_ATK_STATIC_COMPILATION)
|
||||
# ifdef RUBY_ATK_COMPILATION
|
||||
# define RUBY_ATK_VAR __declspec(dllexport)
|
||||
# else
|
||||
# define RUBY_ATK_VAR extern __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define RUBY_ATK_VAR extern
|
||||
#endif
|
||||
|
||||
extern GType atk_text_rectangle_get_type(void);
|
||||
extern GType atk_text_range_get_type(void);
|
||||
|
||||
RUBY_ATK_VAR VALUE mAtk;
|
||||
|
||||
#define ATK_TYPE_TEXT_RECTANGLE (atk_text_rectangle_get_type())
|
||||
#define ATK_TYPE_TEXT_RANGE (atk_text_range_get_type())
|
85
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkaction.c
Normal file
85
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkaction.c
Normal file
@ -0,0 +1,85 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mAction
|
||||
#define _SELF(s) (RVAL2ATKACTION(s))
|
||||
|
||||
static VALUE
|
||||
rg_do_action(VALUE self, VALUE i)
|
||||
{
|
||||
return CBOOL2RVAL(atk_action_do_action(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_actions(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_action_get_n_actions(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_description(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_action_get_description(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_name(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_action_get_name(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATK_ACTION_GET_LOCALIZED_NAME
|
||||
static VALUE
|
||||
rg_get_localized_name(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_action_get_localized_name(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_get_keybinding(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_action_get_keybinding(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_description(VALUE self, VALUE i, VALUE desc)
|
||||
{
|
||||
return CBOOL2RVAL(atk_action_set_description(_SELF(self), NUM2INT(i), RVAL2CSTR(desc)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_action(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_ACTION, "Action", mAtk);
|
||||
|
||||
RG_DEF_METHOD(do_action, 1);
|
||||
RG_DEF_METHOD(n_actions, 0);
|
||||
RG_DEF_METHOD(get_description, 1);
|
||||
RG_DEF_METHOD(get_name, 1);
|
||||
#ifdef HAVE_ATK_ACTION_GET_LOCALIZED_NAME
|
||||
RG_DEF_METHOD(get_localized_name, 1);
|
||||
#endif
|
||||
RG_DEF_METHOD(get_keybinding, 1);
|
||||
RG_DEF_METHOD(set_description, 2);
|
||||
}
|
179
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkcomponent.c
Normal file
179
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkcomponent.c
Normal file
@ -0,0 +1,179 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mComponent
|
||||
#define _SELF(s) (RVAL2ATKCOMPONENT(s))
|
||||
|
||||
/*
|
||||
static void
|
||||
focus_handler(AtkObject *aobj, gboolean bool)
|
||||
{
|
||||
VALUE ret = rb_funcall((VALUE)func, id_call, 2,
|
||||
GOBJ2RVAL(aobj), CBOOL2RVAL(bool));
|
||||
}
|
||||
static VALUE
|
||||
rg_add_focus_handler(VALUE self)
|
||||
{
|
||||
VALUE func = rb_block_proc();
|
||||
G_RELATIVE(self, func);
|
||||
return UINT2NUM(atk_component_add_focus_handler(_SELF(self), focus_handler));
|
||||
}
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_contains_p(VALUE self, VALUE x, VALUE y, VALUE coord_type)
|
||||
{
|
||||
return CBOOL2RVAL(atk_component_contains(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
RVAL2ATKCOORDTYPE(coord_type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_extents(VALUE self, VALUE coord_type)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
atk_component_get_extents(_SELF(self), &x, &y, &width, &height,
|
||||
RVAL2ATKCOORDTYPE(coord_type));
|
||||
return rb_ary_new3(4, INT2NUM(x), INT2NUM(y), INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATK_COMPONENT_GET_LAYER
|
||||
static VALUE
|
||||
rg_layer(VALUE self)
|
||||
{
|
||||
return ATKLAYER2RVAL(atk_component_get_layer(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATK_COMPONENT_GET_MDI_ZORDER
|
||||
static VALUE
|
||||
rg_mdi_zorder(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_component_get_mdi_zorder(_SELF(self)));
|
||||
}
|
||||
|
||||
#endif
|
||||
static VALUE
|
||||
rg_position(VALUE self, VALUE coord_type)
|
||||
{
|
||||
gint x, y;
|
||||
atk_component_get_position(_SELF(self), &x, &y,
|
||||
RVAL2ATKCOORDTYPE(coord_type));
|
||||
return rb_assoc_new(INT2NUM(x), INT2NUM(y));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
gint width, height;
|
||||
atk_component_get_size(_SELF(self), &width, &height);
|
||||
return rb_assoc_new(INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_grab_focus(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(atk_component_grab_focus(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ref_accessible_at_point(VALUE self, VALUE x, VALUE y, VALUE coord_type)
|
||||
{
|
||||
return GOBJ2RVAL(atk_component_ref_accessible_at_point(
|
||||
_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
RVAL2ATKCOORDTYPE(coord_type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_focus_handler(VALUE self, VALUE handler_id)
|
||||
{
|
||||
atk_component_remove_focus_handler(_SELF(self), NUM2UINT(handler_id));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_extents(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height, VALUE coord_type)
|
||||
{
|
||||
gboolean ret = atk_component_set_extents(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
NUM2INT(width), NUM2INT(height),
|
||||
RVAL2ATKCOORDTYPE(coord_type));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set extents");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_position(VALUE self, VALUE x, VALUE y, VALUE coord_type)
|
||||
{
|
||||
gboolean ret = atk_component_set_position(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
RVAL2ATKCOORDTYPE(coord_type));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set the position");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_size(VALUE self, VALUE width, VALUE height)
|
||||
{
|
||||
gboolean ret = atk_component_set_size(_SELF(self),
|
||||
NUM2INT(width), NUM2INT(height));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set the size");
|
||||
return self;
|
||||
}
|
||||
|
||||
#if ATK_CHECK_VERSION(1,12,0)
|
||||
static VALUE
|
||||
rg_alpha(VALUE self)
|
||||
{
|
||||
return rb_float_new(atk_component_get_alpha(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_component(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_COMPONENT, "Component", mAtk);
|
||||
/*
|
||||
RG_DEF_METHOD(add_focus_handler, 0);
|
||||
*/
|
||||
RG_DEF_METHOD_P(contains, 3);
|
||||
RG_DEF_METHOD(get_extents, 1);
|
||||
#ifdef HAVE_ATK_COMPONENT_GET_LAYER
|
||||
RG_DEF_METHOD(layer, 0);
|
||||
#endif
|
||||
#ifdef HAVE_ATK_COMPONENT_GET_MDI_ZORDER
|
||||
RG_DEF_METHOD(mdi_zorder, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(position, 1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(grab_focus, 0);
|
||||
RG_DEF_METHOD(ref_accessible_at_point, 3);
|
||||
RG_DEF_METHOD(remove_focus_handler, 1);
|
||||
RG_DEF_METHOD(set_extents, 5);
|
||||
RG_DEF_METHOD(set_position, 2);
|
||||
RG_DEF_METHOD(set_size, 2);
|
||||
#if ATK_CHECK_VERSION(1,12,0)
|
||||
RG_DEF_METHOD(alpha, 0);
|
||||
#endif
|
||||
}
|
70
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkconversions.h
Normal file
70
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkconversions.h
Normal file
@ -0,0 +1,70 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBATKCONVERSIONS_H__
|
||||
#define __RBATKCONVERSIONS_H__
|
||||
|
||||
#define RVAL2ATKACTION(o) (ATK_ACTION(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKCOMPONENT(o) (ATK_COMPONENT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKDOCUMENT(o) (ATK_DOCUMENT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKEDITABLETEXT(o) (ATK_EDITABLE_TEXT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKGOBJECTACCESSIBLE(o) (ATK_GOBJECT_ACCESSIBLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKHYPERLINK(o) (ATK_HYPERLINK(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKHYPERTEXT(o) (ATK_HYPERTEXT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKIMAGE(o) (ATK_IMAGE(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKIMPLEMENTOR(o) (ATK_IMPLEMENTOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKNOOPOBJECT(o) (ATK_NOOPOBJECT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKNOOPOBJECTFACTORY(o) (ATK_NO_OP_OBJECT_FACTORY(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKOBJECT(o) (ATK_OBJECT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKOBJECTFACTORY(o) (ATK_OBJECT_FACTORY(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKREGISTRY(o) (ATK_REGISTRY(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKRELATION(o) (ATK_RELATION(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKRELATIONSET(o) (ATK_RELATION_SET(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKSELECTION(o) (ATK_SELECTION(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKSTATE(o) (ATK_STATE(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKSTATESET(o) (ATK_STATE_SET(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKSTREAMABLECONTENT(o) (ATK_STREAMABLE_CONTENT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKTABLE(o) (ATK_TABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKTEXT(o) (ATK_TEXT(RVAL2GOBJ(o)))
|
||||
#define RVAL2ATKVALUE(o) (ATK_VALUE(RVAL2GOBJ(o)))
|
||||
|
||||
#define RVAL2ATKTEXTRANGE(o) ((AtkTextRange*)RVAL2BOXED(o, ATK_TYPE_TEXT_RANGE))
|
||||
#define ATKTEXTRANGE2RVAL(o) (BOXED2RVAL(o, ATK_TYPE_TEXT_RANGE))
|
||||
#define RVAL2ATKTEXTRECTANGLE(o) ((AtkTextRectangle*)RVAL2BOXED(o, ATK_TYPE_TEXT_RECTANGLE))
|
||||
#define ATKTEXTRECTANGLE2RVAL(o) (BOXED2RVAL(o, ATK_TYPE_TEXT_RECTANGLE))
|
||||
|
||||
#define RVAL2ATKCOORDTYPE(o) (RVAL2GENUM(o, ATK_TYPE_COORD_TYPE))
|
||||
#define ATKCOORDTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_COORD_TYPE))
|
||||
#define RVAL2ATKLAYER(o) (RVAL2GENUM(o, ATK_TYPE_LAYER))
|
||||
#define ATKLAYER2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_LAYER))
|
||||
#define RVAL2ATKRELATIONTYPE(o) (RVAL2GENUM(o, ATK_TYPE_RELATION_TYPE))
|
||||
#define ATKRELATIONTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_RELATION_TYPE))
|
||||
#define RVAL2ATKROLE(o) (RVAL2GENUM(o, ATK_TYPE_ROLE))
|
||||
#define ATKROLE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_ROLE))
|
||||
#define RVAL2ATKSTATETYPE(o) (RVAL2GENUM(o, ATK_TYPE_STATE_TYPE))
|
||||
#define ATKSTATETYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_STATE_TYPE))
|
||||
#define RVAL2ATKTEXTATTRIBUTE(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_ATTRIBUTE))
|
||||
#define ATKTEXTATTRIBUTE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_ATTRIBUTE))
|
||||
#define RVAL2ATKTEXTBOUNDARY(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_BOUNDARY))
|
||||
#define ATKTEXTBOUNDARY2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_BOUNDARY))
|
||||
#define RVAL2ATKTEXTCLIPTYPE(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_CLIP_TYPE))
|
||||
#define ATKTEXTCLIPTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_CLIP_TYPE))
|
||||
|
||||
#endif /* __RBATKCONVERSIONS_H__ */
|
100
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkdocument.c
Normal file
100
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkdocument.c
Normal file
@ -0,0 +1,100 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mDocument
|
||||
#define _SELF(s) (RVAL2ATKDOCUMENT(s))
|
||||
|
||||
static VALUE
|
||||
rg_document_type(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(atk_document_get_document_type(_SELF(self)));
|
||||
}
|
||||
|
||||
/*
|
||||
How can I implement this?
|
||||
static VALUE
|
||||
rg_document(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_document_get_document(_SELF(self)));
|
||||
}
|
||||
*/
|
||||
|
||||
#if ATK_CHECK_VERSION(1,12,0)
|
||||
static VALUE
|
||||
rg_get_attribute_value(VALUE self, VALUE name)
|
||||
{
|
||||
return CSTR2RVAL(atk_document_get_attribute_value(_SELF(self),
|
||||
RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_attribute_value(VALUE self, VALUE name, VALUE value)
|
||||
{
|
||||
gboolean ret = atk_document_set_attribute_value(_SELF(self),
|
||||
RVAL2CSTR(name),
|
||||
RVAL2CSTR(value));
|
||||
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set attribute value: %s, %s",
|
||||
RVAL2CSTR(name), RVAL2CSTR(value));
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_attributes(VALUE self)
|
||||
{
|
||||
AtkAttributeSet* list = atk_document_get_attributes(_SELF(self));
|
||||
VALUE ary = rb_ary_new();
|
||||
while (list) {
|
||||
AtkAttribute* attr = list->data;
|
||||
rb_ary_push(ary, rb_assoc_new(CSTR2RVAL(attr->name), CSTR2RVAL(attr->value)));
|
||||
list = list->next;
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_locale(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(atk_document_get_locale(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_document(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_DOCUMENT, "Document", mAtk);
|
||||
|
||||
RG_DEF_METHOD(document_type, 0);
|
||||
/*
|
||||
RG_DEF_METHOD(document, 0);
|
||||
*/
|
||||
#if ATK_CHECK_VERSION(1,12,0)
|
||||
RG_DEF_METHOD(get_attribute_value, 1);
|
||||
RG_DEF_ALIAS("[]", "get_attribute_value");
|
||||
RG_DEF_METHOD(set_attribute_value, 2);
|
||||
RG_DEF_ALIAS("[]=", "set_attribute_value");
|
||||
RG_DEF_METHOD(attributes, 0);
|
||||
RG_DEF_METHOD(locale, 0);
|
||||
#endif
|
||||
}
|
177
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkeditabletext.c
Normal file
177
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkeditabletext.c
Normal file
@ -0,0 +1,177 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mEditableText
|
||||
#define _SELF(s) (RVAL2ATKEDITABLETEXT(s))
|
||||
|
||||
struct rval2atkattributegslist_args {
|
||||
VALUE ary;
|
||||
long n;
|
||||
GSList *result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rbatk_rval2atkattributegslist_body(VALUE value)
|
||||
{
|
||||
long i;
|
||||
struct rval2atkattributegslist_args *args = (struct rval2atkattributegslist_args *)value;
|
||||
|
||||
for (i = 0; i < args->n; i++) {
|
||||
VALUE ary = rb_ary_to_ary(RARRAY_PTR(args->ary)[i]);
|
||||
AtkAttribute *attribute;
|
||||
|
||||
if (RARRAY_LEN(ary) != 2)
|
||||
rb_raise(rb_eArgError, "attribute %ld should be an array of length 2", i);
|
||||
|
||||
attribute = g_new(AtkAttribute, 1);
|
||||
args->result = g_slist_append(args->result, attribute);
|
||||
attribute->name = g_strdup(RVAL2CSTR(RARRAY_PTR(ary)[0]));
|
||||
attribute->value = g_strdup(RVAL2CSTR(RARRAY_PTR(ary)[1]));
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static void
|
||||
rbatk_atkattributegslist_free(GSList *list)
|
||||
{
|
||||
GSList *p;
|
||||
|
||||
for (p = list; p != NULL; p = g_slist_next(p)) {
|
||||
AtkAttribute *attribute = (AtkAttribute *)p->data;
|
||||
|
||||
g_free(attribute->value);
|
||||
g_free(attribute->name);
|
||||
g_free(attribute);
|
||||
}
|
||||
|
||||
g_slist_free(list);
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN VALUE
|
||||
rbatk_rval2atkattributegslist_rescue(VALUE value)
|
||||
{
|
||||
rbatk_atkattributegslist_free(((struct rval2atkattributegslist_args *)value)->result);
|
||||
|
||||
rb_exc_raise(rb_errinfo());
|
||||
}
|
||||
|
||||
static GSList *
|
||||
rbatk_rval2atkattributegslist(VALUE value)
|
||||
{
|
||||
struct rval2atkattributegslist_args args;
|
||||
|
||||
args.ary = rb_ary_to_ary(value);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = NULL;
|
||||
|
||||
rb_rescue(rbatk_rval2atkattributegslist_body, (VALUE)&args,
|
||||
rbatk_rval2atkattributegslist_rescue, (VALUE)&args);
|
||||
|
||||
return args.result;
|
||||
}
|
||||
|
||||
#define RVAL2ATKATTRIBUTEGSLIST(value) rbatk_rval2atkattributegslist(value)
|
||||
|
||||
static VALUE
|
||||
rg_set_run_attributes(VALUE self,
|
||||
VALUE attributes,
|
||||
VALUE rbstart_offset,
|
||||
VALUE rbend_offset)
|
||||
{
|
||||
AtkEditableText *editable;
|
||||
gint start_offset, end_offset;
|
||||
AtkAttributeSet *list;
|
||||
gboolean result;
|
||||
|
||||
if (NIL_P(attributes))
|
||||
return Qfalse;
|
||||
|
||||
editable = _SELF(self);
|
||||
start_offset = NUM2INT(rbstart_offset);
|
||||
end_offset = NUM2INT(rbend_offset);
|
||||
list = RVAL2ATKATTRIBUTEGSLIST(attributes);
|
||||
result = atk_editable_text_set_run_attributes(editable, list, start_offset, end_offset);
|
||||
rbatk_atkattributegslist_free(list);
|
||||
|
||||
return CBOOL2RVAL(result);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_text_contents(VALUE self, VALUE str)
|
||||
{
|
||||
atk_editable_text_set_text_contents(_SELF(self), RVAL2CSTR(str));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_insert_text(VALUE self, VALUE str, VALUE position)
|
||||
{
|
||||
gint pos = NUM2INT(position);
|
||||
|
||||
StringValue(str);
|
||||
atk_editable_text_insert_text(_SELF(self), RVAL2CSTR(str), RSTRING_LEN(str), &pos);
|
||||
return INT2NUM(pos);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_copy_text(VALUE self, VALUE start_pos, VALUE end_pos)
|
||||
{
|
||||
atk_editable_text_copy_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_cut_text(VALUE self, VALUE start_pos, VALUE end_pos)
|
||||
{
|
||||
atk_editable_text_cut_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_delete_text(VALUE self, VALUE start_pos, VALUE end_pos)
|
||||
{
|
||||
atk_editable_text_delete_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_paste_text(VALUE self, VALUE position)
|
||||
{
|
||||
atk_editable_text_paste_text(_SELF(self), NUM2INT(position));
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_editabletext(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_EDITABLE_TEXT, "EditableText", mAtk);
|
||||
|
||||
RG_DEF_METHOD(set_run_attributes, 3);
|
||||
RG_DEF_METHOD(set_text_contents, 1);
|
||||
RG_DEF_METHOD(insert_text, 2);
|
||||
RG_DEF_METHOD(copy_text, 2);
|
||||
RG_DEF_METHOD(cut_text, 2);
|
||||
RG_DEF_METHOD(delete_text, 2);
|
||||
RG_DEF_METHOD(paste_text, 1);
|
||||
}
|
46
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkgobjectaccessible.c
Normal file
46
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkgobjectaccessible.c
Normal file
@ -0,0 +1,46 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cGObjectAccessible
|
||||
#define _SELF(s) (RVAL2ATKGOBJECTACCESSIBLE(s))
|
||||
|
||||
static VALUE
|
||||
rg_s_for_object(G_GNUC_UNUSED VALUE self, VALUE obj)
|
||||
{
|
||||
return GOBJ2RVAL(atk_gobject_accessible_for_object(RVAL2GOBJ(obj)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_object(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_gobject_accessible_get_object(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_gobjectaccessible(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_GOBJECT_ACCESSIBLE, "GObjectAccessible", mAtk);
|
||||
|
||||
RG_DEF_SMETHOD(for_object, 1);
|
||||
RG_DEF_METHOD(object, 0);
|
||||
}
|
71
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhyperlink.c
Normal file
71
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhyperlink.c
Normal file
@ -0,0 +1,71 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cHyperlink
|
||||
#define _SELF(s) (RVAL2ATKHYPERLINK(s))
|
||||
|
||||
static VALUE
|
||||
rg_get_uri(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_hyperlink_get_uri(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_object(VALUE self, VALUE i)
|
||||
{
|
||||
return GOBJ2RVAL(atk_hyperlink_get_object(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_valid_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(atk_hyperlink_is_valid(_SELF(self)));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATK_HYPERLINK_IS_INLINE
|
||||
static VALUE
|
||||
rg_inline_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(atk_hyperlink_is_inline(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_n_anchors(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_hyperlink_get_n_anchors(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_hyperlink(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_HYPERLINK, "Hyperlink", mAtk);
|
||||
|
||||
RG_DEF_METHOD(get_uri, 1);
|
||||
RG_DEF_METHOD(get_object, 1);
|
||||
RG_DEF_METHOD_P(valid, 0);
|
||||
#ifdef HAVE_ATK_HYPERLINK_IS_INLINE
|
||||
RG_DEF_METHOD_P(inline, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(n_anchors, 0);
|
||||
}
|
53
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhypertext.c
Normal file
53
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkhypertext.c
Normal file
@ -0,0 +1,53 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mHypertext
|
||||
#define _SELF(s) (RVAL2ATKHYPERTEXT(s))
|
||||
|
||||
static VALUE
|
||||
rg_get_link(VALUE self, VALUE link_index)
|
||||
{
|
||||
return GOBJ2RVAL(atk_hypertext_get_link(_SELF(self), NUM2INT(link_index)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_links(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_hypertext_get_n_links(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_link_index(VALUE self, VALUE char_index)
|
||||
{
|
||||
return INT2NUM(atk_hypertext_get_link_index(_SELF(self), NUM2INT(char_index)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_hypertext(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_HYPERTEXT, "Hypertext", mAtk);
|
||||
|
||||
RG_DEF_METHOD(get_link, 1);
|
||||
RG_DEF_METHOD(n_links, 0);
|
||||
RG_DEF_METHOD(link_index, 1);
|
||||
}
|
68
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimage.c
Normal file
68
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimage.c
Normal file
@ -0,0 +1,68 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mImage
|
||||
#define _SELF(s) (RVAL2ATKIMAGE(s))
|
||||
|
||||
static VALUE
|
||||
rg_image_position(VALUE self, VALUE coord_type)
|
||||
{
|
||||
gint x, y;
|
||||
atk_image_get_image_position(_SELF(self), &x, &y,
|
||||
RVAL2ATKCOORDTYPE(coord_type));
|
||||
return rb_assoc_new(INT2NUM(x), INT2NUM(y));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_image_description(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(atk_image_get_image_description(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_image_description(VALUE self, VALUE description)
|
||||
{
|
||||
gboolean ret = atk_image_set_image_description(_SELF(self),
|
||||
RVAL2CSTR(description));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set image description");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_image_size(VALUE self)
|
||||
{
|
||||
gint width, height;
|
||||
atk_image_get_image_size(_SELF(self), &width, &height);
|
||||
return rb_assoc_new(INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_image(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_IMAGE, "Image", mAtk);
|
||||
|
||||
RG_DEF_METHOD(image_position, 1);
|
||||
RG_DEF_METHOD(image_description, 0);
|
||||
RG_DEF_METHOD(set_image_description, 1);
|
||||
RG_DEF_METHOD(image_size, 0);
|
||||
}
|
38
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimplementor.c
Normal file
38
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkimplementor.c
Normal file
@ -0,0 +1,38 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mImplementor
|
||||
#define _SELF(s) (RVAL2ATKIMPLEMENTOR(s))
|
||||
|
||||
static VALUE
|
||||
rg_ref_accessible(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_implementor_ref_accessible(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_implementor(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_IMPLEMENTOR, "Implementor", mAtk);
|
||||
RG_DEF_METHOD(ref_accessible, 0);
|
||||
}
|
40
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobject.c
Normal file
40
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobject.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cNoOpObject
|
||||
#define _SELF(s) (RVAL2ATKNOOPOBJECT(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE gobj)
|
||||
{
|
||||
G_INITIALIZE(self, atk_no_op_object_new(RVAL2GOBJ(gobj)));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_noopobject(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_NO_OP_OBJECT, "NoOpObject", mAtk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
}
|
40
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobjectfactory.c
Normal file
40
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatknoopobjectfactory.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cNoOpObjectFactory
|
||||
#define _SELF(s) (RVAL2ATKNOOPOBJECTFACTORY(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, atk_no_op_object_factory_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_noopobjectfactory(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_NO_OP_OBJECT_FACTORY, "NoOpObjectFactory", mAtk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
}
|
153
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobject.c
Normal file
153
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobject.c
Normal file
@ -0,0 +1,153 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cObject
|
||||
#define _SELF(s) RVAL2ATKOBJECT(s)
|
||||
|
||||
/* How can I implement this? Since 1.10
|
||||
AtkObject* atk_implementor_ref_accessible (AtkImplementor *implementor);
|
||||
*/
|
||||
|
||||
/* Use properties accessible_*
|
||||
G_CONST_RETURN gchar* atk_object_get_name (AtkObject *accessible);
|
||||
G_CONST_RETURN gchar* atk_object_get_description
|
||||
(AtkObject *accessible);
|
||||
AtkObject* atk_object_get_parent (AtkObject *accessible);
|
||||
(AtkObject *accessible);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_n_accessible_children(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_object_get_n_accessible_children(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ref_accessible_child(VALUE self, VALUE i)
|
||||
{
|
||||
return GOBJ2RVAL(atk_object_ref_accessible_child(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ref_relation_set(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_object_ref_relation_set(_SELF(self)));
|
||||
}
|
||||
|
||||
/* Use properties accessible_*
|
||||
AtkLayer atk_object_get_layer (AtkObject *accessible);
|
||||
gint atk_object_get_mdi_zorder (AtkObject *accessible);
|
||||
AtkRole atk_object_get_role (AtkObject *accessible);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_ref_state_set(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_object_ref_state_set(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_index_in_parent(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_object_get_index_in_parent(_SELF(self)));
|
||||
}
|
||||
/* Use properties accessible_*
|
||||
void atk_object_set_name (AtkObject *accessible,
|
||||
const gchar *name);
|
||||
void atk_object_set_description (AtkObject *accessible,
|
||||
const gchar *description);
|
||||
void atk_object_set_parent (AtkObject *accessible,
|
||||
AtkObject *parent);
|
||||
void atk_object_set_role (AtkObject *accessible,
|
||||
AtkRole role);
|
||||
*/
|
||||
|
||||
/*
|
||||
guint atk_object_connect_property_change_handler
|
||||
(AtkObject *accessible,
|
||||
AtkPropertyChangeHandler *handler);
|
||||
void atk_object_remove_property_change_handler
|
||||
(AtkObject *accessible,
|
||||
guint handler_id);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_notify_state_change(VALUE self, VALUE state, VALUE value)
|
||||
{
|
||||
atk_object_notify_state_change(_SELF(self),
|
||||
RVAL2ATKSTATETYPE(state),
|
||||
RVAL2CBOOL(value));
|
||||
return self;
|
||||
}
|
||||
|
||||
/* I don't have a good idea to implement this method. Any idea?
|
||||
void atk_object_initialize (AtkObject *accessible,
|
||||
gpointer data);
|
||||
*/
|
||||
|
||||
#ifdef HAVE_ATK_OBJECT_ADD_RELATIONSHIP
|
||||
static VALUE
|
||||
rg_add_relationship(VALUE self, VALUE relationship, VALUE target)
|
||||
{
|
||||
return CBOOL2RVAL(atk_object_add_relationship(
|
||||
_SELF(self),
|
||||
RVAL2ATKRELATIONTYPE(relationship),
|
||||
_SELF(target)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATK_OBJECT_REMOVE_RELATIONSHIP
|
||||
static VALUE
|
||||
rg_remove_relationship(VALUE self, VALUE relationship, VALUE target)
|
||||
{
|
||||
return CBOOL2RVAL(atk_object_remove_relationship(
|
||||
_SELF(self),
|
||||
RVAL2ATKRELATIONTYPE(relationship),
|
||||
_SELF(target)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_object(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_OBJECT, "Object", mAtk);
|
||||
|
||||
RG_DEF_METHOD(n_accessible_children, 0);
|
||||
RG_DEF_METHOD(ref_accessible_child, 1);
|
||||
RG_DEF_METHOD(ref_relation_set, 0);
|
||||
RG_DEF_METHOD(ref_state_set, 0);
|
||||
RG_DEF_METHOD(index_in_parent, 0);
|
||||
RG_DEF_METHOD(notify_state_change, 2);
|
||||
#ifdef HAVE_ATK_OBJECT_ADD_RELATIONSHIP
|
||||
RG_DEF_METHOD(add_relationship, 2);
|
||||
#endif
|
||||
#ifdef HAVE_ATK_OBJECT_REMOVE_RELATIONSHIP
|
||||
RG_DEF_METHOD(remove_relationship, 2);
|
||||
#endif
|
||||
|
||||
Init_atk_object_role(RG_TARGET_NAMESPACE);
|
||||
|
||||
/* AtkLayer */
|
||||
G_DEF_CLASS(ATK_TYPE_LAYER, "Layer", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_LAYER, "ATK_");
|
||||
}
|
53
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectfactory.c
Normal file
53
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectfactory.c
Normal file
@ -0,0 +1,53 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cObjectFactory
|
||||
#define _SELF(s) (RVAL2ATKOBJECTFACTORY(s))
|
||||
|
||||
static VALUE
|
||||
rg_create_accessible(VALUE self, VALUE obj)
|
||||
{
|
||||
return GOBJ2RVAL(atk_object_factory_create_accessible(_SELF(self), RVAL2GOBJ(obj)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_accessible_type(VALUE self)
|
||||
{
|
||||
return GTYPE2CLASS(atk_object_factory_get_accessible_type(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_invalidate(VALUE self)
|
||||
{
|
||||
atk_object_factory_invalidate(_SELF(self));
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_objectfactory(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_OBJECT_FACTORY, "ObjectFactory", mAtk);
|
||||
RG_DEF_METHOD(create_accessible, 0);
|
||||
RG_DEF_METHOD(accessible_type, 0);
|
||||
RG_DEF_METHOD(invalidate, 0);
|
||||
}
|
50
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectrole.c
Normal file
50
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkobjectrole.c
Normal file
@ -0,0 +1,50 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cRole
|
||||
|
||||
static VALUE
|
||||
rg_localized_name(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
#ifdef HAVE_ATK_ROLE_GET_LOCALIZED_NAME
|
||||
return CSTR2RVAL(atk_role_get_localized_name(RVAL2ATKROLE(self)));
|
||||
#else
|
||||
rb_warning("not supported in this version of ATK.");
|
||||
return Qnil;
|
||||
#endif
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_for_name(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKROLE2RVAL(atk_role_for_name(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_object_role(VALUE cObject)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_ROLE, "Role", cObject);
|
||||
RG_DEF_METHOD(localized_name, 0);
|
||||
RG_DEF_SMETHOD(for_name, 1);
|
||||
G_DEF_CONSTANTS(cObject, ATK_TYPE_ROLE, "ATK_");
|
||||
}
|
48
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkprivate.h
Normal file
48
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkprivate.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef RB_ATK_PRIVATE_H
|
||||
#define RB_ATK_PRIVATE_H
|
||||
|
||||
#include "rbatk.h"
|
||||
|
||||
#ifndef HAVE_RB_ERRINFO
|
||||
# define rb_errinfo() (ruby_errinfo)
|
||||
#endif
|
||||
|
||||
#ifndef G_VALUE_INIT
|
||||
# define G_VALUE_INIT { 0, { { 0 } } }
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_GNUC_INTERNAL void Init_atk_action(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_component(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_document(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_editabletext(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_gobjectaccessible(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_hyperlink(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_hypertext(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_image(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_implementor(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_noopobject(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_noopobjectfactory(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_object(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_object_role(VALUE cObject);
|
||||
G_GNUC_INTERNAL void Init_atk_objectfactory(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_registry(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_relation(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_relation_type(VALUE cRelation);
|
||||
G_GNUC_INTERNAL void Init_atk_relation_set(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_selection(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_state(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_state_set(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_streamable_content(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_table(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_text(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_text_attribute(VALUE mText);
|
||||
G_GNUC_INTERNAL void Init_atk_text_range(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_text_rectangle(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_util(VALUE mAtk);
|
||||
G_GNUC_INTERNAL void Init_atk_value(VALUE mAtk);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* RB_ATK_PRIVATE_H */
|
63
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkregistry.c
Normal file
63
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkregistry.c
Normal file
@ -0,0 +1,63 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cRegistry
|
||||
#define _SELF(s) (RVAL2ATKREGISTRY(s))
|
||||
|
||||
static VALUE
|
||||
rg_set_factory_type(VALUE self, VALUE type, VALUE factory_type)
|
||||
{
|
||||
atk_registry_set_factory_type(_SELF(self),
|
||||
CLASS2GTYPE(type),
|
||||
CLASS2GTYPE(factory_type));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_factory_type(VALUE self, VALUE type)
|
||||
{
|
||||
return GTYPE2CLASS(atk_registry_get_factory_type(_SELF(self), CLASS2GTYPE(type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_factory(VALUE self, VALUE type)
|
||||
{
|
||||
return GOBJ2RVAL(atk_registry_get_factory(_SELF(self),
|
||||
CLASS2GTYPE(type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_default_registry(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_get_default_registry());
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_registry(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_REGISTRY, "Registry", mAtk);
|
||||
RG_DEF_METHOD(set_factory_type, 2);
|
||||
RG_DEF_METHOD(get_factory_type, 1);
|
||||
RG_DEF_METHOD(get_factory, 1);
|
||||
RG_DEF_SMETHOD(default_registry, 0);
|
||||
}
|
102
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelation.c
Normal file
102
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelation.c
Normal file
@ -0,0 +1,102 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cRelation
|
||||
#define _SELF(s) (RVAL2ATKRELATION(s))
|
||||
|
||||
static VALUE
|
||||
rg_s_type_register(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKRELATIONTYPE2RVAL(atk_relation_type_register(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
struct rval2atkobjects_args {
|
||||
VALUE ary;
|
||||
long n;
|
||||
AtkObject **result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rval2atkobjects_body(VALUE value)
|
||||
{
|
||||
long i;
|
||||
struct rval2atkobjects_args *args = (struct rval2atkobjects_args *)value;
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
args->result[i] = RVAL2ATKOBJECT(RARRAY_PTR(args->ary)[i]);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN VALUE
|
||||
rval2atkobjects_rescue(VALUE value)
|
||||
{
|
||||
g_free(((struct rval2atkobjects_args *)value)->result);
|
||||
|
||||
rb_exc_raise(rb_errinfo());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE targets, VALUE rbrelationship)
|
||||
{
|
||||
AtkRelationType relationship = RVAL2ATKRELATIONTYPE(rbrelationship);
|
||||
struct rval2atkobjects_args args;
|
||||
AtkRelation *relation;
|
||||
|
||||
args.ary = rb_ary_to_ary(targets);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = g_new(AtkObject *, args.n + 1);
|
||||
|
||||
rb_rescue(rval2atkobjects_body, (VALUE)&args,
|
||||
rval2atkobjects_rescue, (VALUE)&args);
|
||||
|
||||
relation = atk_relation_new(args.result, args.n, relationship);
|
||||
|
||||
g_free(args.result);
|
||||
|
||||
G_INITIALIZE(self, relation);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#if ATK_CHECK_VERSION(1,9,0)
|
||||
static VALUE
|
||||
rg_add_target(VALUE self, VALUE obj)
|
||||
{
|
||||
atk_relation_add_target(_SELF(self), RVAL2ATKOBJECT(obj));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_relation(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_RELATION, "Relation", mAtk);
|
||||
RG_DEF_SMETHOD(type_register, 1);
|
||||
RG_DEF_METHOD(initialize, 2);
|
||||
#if ATK_CHECK_VERSION(1,9,0)
|
||||
RG_DEF_METHOD(add_target, 1);
|
||||
#endif
|
||||
|
||||
Init_atk_relation_type(RG_TARGET_NAMESPACE);
|
||||
}
|
99
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationset.c
Normal file
99
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationset.c
Normal file
@ -0,0 +1,99 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cRelationSet
|
||||
#define _SELF(s) (RVAL2ATKRELATIONSET(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, atk_relation_set_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_contains_p(VALUE self, VALUE relationship)
|
||||
{
|
||||
return CBOOL2RVAL(atk_relation_set_contains(
|
||||
_SELF(self),
|
||||
RVAL2ATKRELATIONTYPE(relationship)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove(VALUE self, VALUE relation)
|
||||
{
|
||||
atk_relation_set_remove(_SELF(self), RVAL2ATKRELATION(relation));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add(VALUE self, VALUE relation)
|
||||
{
|
||||
atk_relation_set_add(_SELF(self), RVAL2ATKRELATION(relation));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_relations(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_relation_set_get_n_relations(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_relation(VALUE self, VALUE i)
|
||||
{
|
||||
if (rb_obj_is_kind_of(i, GTYPE2CLASS(ATK_TYPE_RELATION_TYPE))){
|
||||
return GOBJ2RVAL(atk_relation_set_get_relation_by_type(
|
||||
_SELF(self),
|
||||
RVAL2ATKRELATIONTYPE(i)));
|
||||
} else {
|
||||
return GOBJ2RVAL(atk_relation_set_get_relation(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
}
|
||||
|
||||
#if ATK_CHECK_VERSION(1,9,0)
|
||||
static VALUE
|
||||
rg_add_relation(VALUE self, VALUE relationship, VALUE obj)
|
||||
{
|
||||
atk_relation_set_add_relation_by_type(_SELF(self),
|
||||
RVAL2ATKRELATIONTYPE(relationship),
|
||||
RVAL2ATKOBJECT(obj));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_relation_set(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_RELATION_SET, "RelationSet", mAtk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD_P(contains, 1);
|
||||
RG_DEF_METHOD(remove, 1);
|
||||
RG_DEF_METHOD(add, 1);
|
||||
RG_DEF_METHOD(n_relations, 0);
|
||||
RG_DEF_METHOD(get_relation, 1);
|
||||
#if ATK_CHECK_VERSION(1,9,0)
|
||||
RG_DEF_METHOD(add_relation, 2);
|
||||
#endif
|
||||
}
|
38
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationtype.c
Normal file
38
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkrelationtype.c
Normal file
@ -0,0 +1,38 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cType
|
||||
|
||||
static VALUE
|
||||
rg_s_for_name(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKRELATIONTYPE2RVAL(atk_relation_type_for_name(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_relation_type(VALUE cRelation)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_RELATION_TYPE, "Type", cRelation);
|
||||
RG_DEF_SMETHOD(for_name, 1);
|
||||
G_DEF_CONSTANTS(cRelation, ATK_TYPE_RELATION_TYPE, "ATK_");
|
||||
}
|
87
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkselection.c
Normal file
87
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkselection.c
Normal file
@ -0,0 +1,87 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mSelection
|
||||
#define _SELF(s) (RVAL2ATKSELECTION(s))
|
||||
|
||||
static VALUE
|
||||
rg_add_selection(VALUE self, VALUE i)
|
||||
{
|
||||
gboolean ret = atk_selection_add_selection(_SELF(self), NUM2INT(i));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't add selection");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_clear_selection(VALUE self)
|
||||
{
|
||||
gboolean ret = atk_selection_clear_selection(_SELF(self));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't clear selection");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ref_selection(VALUE self, VALUE i)
|
||||
{
|
||||
return GOBJ2RVAL(atk_selection_ref_selection(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_selection_count(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_selection_get_selection_count(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_child_selected_p(VALUE self, VALUE i)
|
||||
{
|
||||
return CBOOL2RVAL(atk_selection_is_child_selected(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_selection(VALUE self, VALUE i)
|
||||
{
|
||||
gboolean ret = atk_selection_remove_selection(_SELF(self), NUM2INT(i));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't remove selection");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_select_all_selection(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(atk_selection_select_all_selection(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_selection(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_SELECTION, "Selection", mAtk);
|
||||
|
||||
RG_DEF_METHOD(add_selection, 1);
|
||||
RG_DEF_METHOD(clear_selection, 0);
|
||||
RG_DEF_METHOD(ref_selection, 1);
|
||||
RG_DEF_METHOD(selection_count, 0);
|
||||
RG_DEF_METHOD_P(child_selected, 1);
|
||||
RG_DEF_METHOD(remove_selection, 1);
|
||||
RG_DEF_METHOD(select_all_selection, 0);
|
||||
}
|
51
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstate.c
Normal file
51
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstate.c
Normal file
@ -0,0 +1,51 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cState
|
||||
#define _SELF(s) (RVAL2ATKSTATE(s))
|
||||
|
||||
static VALUE
|
||||
rg_s_type_register(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKSTATETYPE2RVAL(atk_state_type_register(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
/* We don't need this.
|
||||
G_CONST_RETURN gchar* atk_state_type_get_name
|
||||
(AtkStateType type);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_s_for_name(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKSTATETYPE2RVAL(atk_state_type_for_name(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_state(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_STATE_TYPE, "State", mAtk);
|
||||
RG_DEF_SMETHOD(type_register, 1);
|
||||
RG_DEF_SMETHOD(for_name, 1);
|
||||
G_DEF_CONSTANTS(mAtk, ATK_TYPE_STATE_TYPE, "ATK_");
|
||||
}
|
180
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstateset.c
Normal file
180
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstateset.c
Normal file
@ -0,0 +1,180 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cStateSet
|
||||
#define _SELF(s) (RVAL2ATKSTATESET(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, atk_state_set_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_empty_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(atk_state_set_is_empty(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_state(VALUE self, VALUE type)
|
||||
{
|
||||
return CBOOL2RVAL(atk_state_set_add_state(_SELF(self),
|
||||
RVAL2ATKSTATETYPE(type)));
|
||||
}
|
||||
|
||||
struct rval2atkstatetype_args {
|
||||
VALUE ary;
|
||||
long n;
|
||||
AtkStateType *result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rval2atkstatetype_body(VALUE value)
|
||||
{
|
||||
long i;
|
||||
struct rval2atkstatetype_args *args = (struct rval2atkstatetype_args *)value;
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
args->result[i] = RVAL2ATKSTATETYPE(RARRAY_PTR(args->ary)[i]);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN VALUE
|
||||
rval2atkstatetype_rescue(VALUE value)
|
||||
{
|
||||
g_free(((struct rval2atkstatetype_args *)value)->result);
|
||||
|
||||
rb_exc_raise(rb_errinfo());
|
||||
}
|
||||
|
||||
static AtkStateType *
|
||||
rval2atkstatetype(VALUE value, long *n)
|
||||
{
|
||||
struct rval2atkstatetype_args args;
|
||||
|
||||
args.ary = rb_ary_to_ary(value);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = g_new(AtkStateType, args.n + 1);
|
||||
|
||||
rb_rescue(rval2atkstatetype_body, (VALUE)&args,
|
||||
rval2atkstatetype_rescue, (VALUE)&args);
|
||||
|
||||
if (n != NULL)
|
||||
*n = args.n;
|
||||
|
||||
return args.result;
|
||||
}
|
||||
|
||||
#define RVAL2ATKSTATETYPES(value, n) rval2atkstatetype(value, n)
|
||||
|
||||
static VALUE
|
||||
rg_add_states(VALUE self, VALUE rbtypes)
|
||||
{
|
||||
AtkStateSet *set = _SELF(self);
|
||||
long n;
|
||||
AtkStateType *types = RVAL2ATKSTATETYPES(rbtypes, &n);
|
||||
|
||||
atk_state_set_add_states(set, types, n);
|
||||
|
||||
g_free(types);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_clear_states(VALUE self)
|
||||
{
|
||||
atk_state_set_clear_states(_SELF(self));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_contains_state(VALUE self, VALUE type)
|
||||
{
|
||||
return CBOOL2RVAL(atk_state_set_contains_state(_SELF(self),
|
||||
RVAL2ATKSTATETYPE(type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_contains_states(VALUE self, VALUE rbtypes)
|
||||
{
|
||||
AtkStateSet *set = _SELF(self);
|
||||
long n;
|
||||
AtkStateType *types = RVAL2ATKSTATETYPES(rbtypes, &n);
|
||||
gboolean result;
|
||||
|
||||
result = atk_state_set_contains_states(set, types, n);
|
||||
|
||||
g_free(types);
|
||||
|
||||
return CBOOL2RVAL(result);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_state(VALUE self, VALUE type)
|
||||
{
|
||||
return CBOOL2RVAL(atk_state_set_remove_state(_SELF(self),
|
||||
RVAL2ATKSTATETYPE(type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_and(VALUE self, VALUE compare_set)
|
||||
{
|
||||
return GOBJ2RVAL(atk_state_set_and_sets(_SELF(self), _SELF(compare_set)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_or(VALUE self, VALUE compare_set)
|
||||
{
|
||||
return GOBJ2RVAL(atk_state_set_or_sets(_SELF(self), _SELF(compare_set)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_xor(VALUE self, VALUE compare_set)
|
||||
{
|
||||
return GOBJ2RVAL(atk_state_set_xor_sets(_SELF(self), _SELF(compare_set)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_state_set(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_STATE_SET, "StateSet", mAtk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD_P(empty, 0);
|
||||
RG_DEF_METHOD(add_state, 1);
|
||||
RG_DEF_METHOD(add_states, 1);
|
||||
RG_DEF_METHOD(clear_states, 0);
|
||||
RG_DEF_METHOD(contains_state, 1);
|
||||
RG_DEF_METHOD(contains_states, 1);
|
||||
RG_DEF_METHOD(remove_state, 1);
|
||||
RG_DEF_METHOD(and, 1);
|
||||
RG_DEF_ALIAS("&", "and");
|
||||
RG_DEF_METHOD(or, 1);
|
||||
RG_DEF_ALIAS("|", "or");
|
||||
RG_DEF_METHOD(xor, 1);
|
||||
RG_DEF_ALIAS("^", "xor");
|
||||
}
|
57
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstreamablecontent.c
Normal file
57
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkstreamablecontent.c
Normal file
@ -0,0 +1,57 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mStreamableContent
|
||||
#define _SELF(s) (RVAL2ATKSTREAMABLECONTENT(s))
|
||||
|
||||
static VALUE
|
||||
rg_n_mime_types(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_streamable_content_get_n_mime_types(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_mime_type(VALUE self, VALUE i)
|
||||
{
|
||||
return CSTR2RVAL(atk_streamable_content_get_mime_type(_SELF(self), NUM2INT(i)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_stream(VALUE self, VALUE mime_type)
|
||||
{
|
||||
GIOChannel* io = atk_streamable_content_get_stream(_SELF(self), RVAL2CSTR(mime_type));
|
||||
if (!io)
|
||||
rb_raise(rb_eRuntimeError, "Couldn't get the stream.");
|
||||
|
||||
return GIOCHANNEL2RVAL(io);
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_streamable_content(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_STREAMABLE_CONTENT, "StreamableContent", mAtk);
|
||||
|
||||
RG_DEF_METHOD(n_mime_types, 0);
|
||||
RG_DEF_METHOD(mime_type, 1);
|
||||
RG_DEF_METHOD(get_stream, 1);
|
||||
}
|
271
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktable.c
Normal file
271
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktable.c
Normal file
@ -0,0 +1,271 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003,2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mTable
|
||||
#define _SELF(s) (RVAL2ATKTABLE(s))
|
||||
|
||||
static VALUE
|
||||
rg_ref_at(VALUE self, VALUE row, VALUE column)
|
||||
{
|
||||
return GOBJ2RVAL(atk_table_ref_at(_SELF(self), NUM2INT(row), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_index_at(VALUE self, VALUE row, VALUE column)
|
||||
{
|
||||
return INT2NUM(atk_table_get_index_at(_SELF(self), NUM2INT(row), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_column_at_index(VALUE self, VALUE index_)
|
||||
{
|
||||
return INT2NUM(atk_table_get_column_at_index(_SELF(self), NUM2INT(index_)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_row_at_index(VALUE self, VALUE index_)
|
||||
{
|
||||
return INT2NUM(atk_table_get_row_at_index(_SELF(self), NUM2INT(index_)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_columns(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_table_get_n_columns(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_n_rows(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_table_get_n_rows(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_column_extent_at(VALUE self, VALUE row, VALUE column)
|
||||
{
|
||||
return INT2NUM(atk_table_get_column_extent_at(_SELF(self), NUM2INT(row), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_row_extent_at(VALUE self, VALUE row, VALUE column)
|
||||
{
|
||||
return INT2NUM(atk_table_get_row_extent_at(_SELF(self), NUM2INT(row), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_caption(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_table_get_caption(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_column_description(VALUE self, VALUE column)
|
||||
{
|
||||
return CSTR2RVAL(atk_table_get_column_description(_SELF(self), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_row_description(VALUE self, VALUE row)
|
||||
{
|
||||
return CSTR2RVAL(atk_table_get_row_description(_SELF(self), NUM2INT(row)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_column_header(VALUE self, VALUE column)
|
||||
{
|
||||
return GOBJ2RVAL(atk_table_get_column_header(_SELF(self), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_row_header(VALUE self, VALUE row)
|
||||
{
|
||||
return GOBJ2RVAL(atk_table_get_row_header(_SELF(self), NUM2INT(row)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_summary(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_table_get_summary(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_caption(VALUE self, VALUE caption)
|
||||
{
|
||||
atk_table_set_caption(_SELF(self), RVAL2ATKOBJECT(caption));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_row_description(VALUE self, VALUE row, VALUE description)
|
||||
{
|
||||
atk_table_set_row_description(_SELF(self), NUM2INT(row), RVAL2CSTR(description));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_column_description(VALUE self, VALUE column, VALUE description)
|
||||
{
|
||||
atk_table_set_column_description(_SELF(self), NUM2INT(column), RVAL2CSTR(description));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_row_header(VALUE self, VALUE row, VALUE header)
|
||||
{
|
||||
atk_table_set_row_header(_SELF(self), NUM2INT(row), RVAL2ATKOBJECT(header));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_column_header(VALUE self, VALUE column, VALUE header)
|
||||
{
|
||||
atk_table_set_column_header(_SELF(self), NUM2INT(column), RVAL2ATKOBJECT(header));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_summary(VALUE self, VALUE accessible)
|
||||
{
|
||||
atk_table_set_summary(_SELF(self), RVAL2ATKOBJECT(accessible));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_selected_columns(VALUE self)
|
||||
{
|
||||
gint ret;
|
||||
gint* selected;
|
||||
VALUE result = Qnil;
|
||||
ret = atk_table_get_selected_columns(_SELF(self), &selected);
|
||||
if (ret > 0){
|
||||
gint i;
|
||||
result = rb_ary_new2(ret);
|
||||
for (i = 0; i < ret; i++){
|
||||
rb_ary_push(result, INT2NUM(selected[i]));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_selected_rows(VALUE self)
|
||||
{
|
||||
gint ret;
|
||||
gint* selected;
|
||||
VALUE result = Qnil;
|
||||
ret = atk_table_get_selected_rows(_SELF(self), &selected);
|
||||
if (ret > 0){
|
||||
gint i;
|
||||
result = rb_ary_new2(ret);
|
||||
for (i = 0; i < ret; i++){
|
||||
rb_ary_push(result, INT2NUM(selected[i]));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_column_selected_p(VALUE self, VALUE column)
|
||||
{
|
||||
return CBOOL2RVAL(atk_table_is_column_selected(_SELF(self), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_row_selected_p(VALUE self, VALUE row)
|
||||
{
|
||||
return CBOOL2RVAL(atk_table_is_row_selected(_SELF(self), NUM2INT(row)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_selected_p(VALUE self, VALUE row, VALUE column)
|
||||
{
|
||||
return CBOOL2RVAL(atk_table_is_selected(_SELF(self), NUM2INT(row), NUM2INT(column)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_column_selection(VALUE self, VALUE column)
|
||||
{
|
||||
gboolean ret = atk_table_add_column_selection(_SELF(self), NUM2INT(column));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "not implement this interface");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_row_selection(VALUE self, VALUE row)
|
||||
{
|
||||
gboolean ret = atk_table_add_row_selection(_SELF(self), NUM2INT(row));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "not implement this interface");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_column_selection(VALUE self, VALUE column)
|
||||
{
|
||||
gboolean ret = atk_table_remove_column_selection(_SELF(self), NUM2INT(column));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "not implement this interface");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_row_selection(VALUE self, VALUE row)
|
||||
{
|
||||
gboolean ret = atk_table_remove_row_selection(_SELF(self), NUM2INT(row));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "not implement this interface");
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_table(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_TABLE, "Table", mAtk);
|
||||
|
||||
RG_DEF_METHOD(ref_at, 2);
|
||||
RG_DEF_METHOD(get_index_at, 2);
|
||||
RG_DEF_METHOD(get_column_at_index, 1);
|
||||
RG_DEF_METHOD(get_row_at_index, 1);
|
||||
RG_DEF_METHOD(n_columns, 0);
|
||||
RG_DEF_METHOD(n_rows, 0);
|
||||
RG_DEF_METHOD(get_column_extent_at, 2);
|
||||
RG_DEF_METHOD(get_row_extent_at, 2);
|
||||
RG_DEF_METHOD(caption, 0);
|
||||
RG_DEF_METHOD(get_column_description, 1);
|
||||
RG_DEF_METHOD(get_row_description, 1);
|
||||
RG_DEF_METHOD(get_column_header, 1);
|
||||
RG_DEF_METHOD(get_row_header, 1);
|
||||
RG_DEF_METHOD(summary, 0);
|
||||
RG_DEF_METHOD(set_caption, 1);
|
||||
RG_DEF_METHOD(set_row_description, 2);
|
||||
RG_DEF_METHOD(set_column_description, 2);
|
||||
RG_DEF_METHOD(set_row_header, 2);
|
||||
RG_DEF_METHOD(set_column_header, 2);
|
||||
RG_DEF_METHOD(set_summary, 1);
|
||||
RG_DEF_METHOD(selected_columns, 0);
|
||||
RG_DEF_METHOD(selected_rows, 0);
|
||||
RG_DEF_METHOD_P(column_selected, 1);
|
||||
RG_DEF_METHOD_P(row_selected, 1);
|
||||
RG_DEF_METHOD_P(selected, 2);
|
||||
RG_DEF_METHOD(add_column_selection, 1);
|
||||
RG_DEF_METHOD(add_row_selection, 1);
|
||||
RG_DEF_METHOD(remove_column_selection, 1);
|
||||
RG_DEF_METHOD(remove_row_selection, 1);
|
||||
}
|
318
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktext.c
Normal file
318
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktext.c
Normal file
@ -0,0 +1,318 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mText
|
||||
#define _SELF(s) (RVAL2ATKTEXT(s))
|
||||
|
||||
static VALUE
|
||||
rg_get_text(VALUE self, VALUE start_offset, VALUE end_offset)
|
||||
{
|
||||
VALUE ret;
|
||||
gchar* text = atk_text_get_text(_SELF(self),
|
||||
NUM2INT(start_offset),
|
||||
NUM2INT(end_offset));
|
||||
ret = CSTR2RVAL(text);
|
||||
g_free(text);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_character_at_offset(VALUE self, VALUE offset)
|
||||
{
|
||||
gchar buf[10];
|
||||
gint len = g_unichar_to_utf8(atk_text_get_character_at_offset
|
||||
(_SELF(self), NUM2INT(offset)), buf);
|
||||
buf[len] = '\0';
|
||||
return rb_str_new2(buf);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_text_after_offset(VALUE self, VALUE offset, VALUE boundary_type)
|
||||
{
|
||||
gchar* ret;
|
||||
VALUE result;
|
||||
gint start_offset, end_offset;
|
||||
|
||||
ret = atk_text_get_text_after_offset(_SELF(self), NUM2INT(offset),
|
||||
RVAL2ATKTEXTBOUNDARY(boundary_type),
|
||||
&start_offset, &end_offset);
|
||||
result = rb_ary_new3(3, CSTR2RVAL(ret),
|
||||
INT2NUM(start_offset), INT2NUM(end_offset));
|
||||
g_free(ret);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_text_at_offset(VALUE self, VALUE offset, VALUE boundary_type)
|
||||
{
|
||||
gchar* ret;
|
||||
VALUE result;
|
||||
gint start_offset, end_offset;
|
||||
|
||||
ret = atk_text_get_text_at_offset(_SELF(self), NUM2INT(offset),
|
||||
RVAL2ATKTEXTBOUNDARY(boundary_type),
|
||||
&start_offset, &end_offset);
|
||||
result = rb_ary_new3(3, CSTR2RVAL(ret),
|
||||
INT2NUM(start_offset), INT2NUM(end_offset));
|
||||
g_free(ret);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_text_before_offset(VALUE self, VALUE offset, VALUE boundary_type)
|
||||
{
|
||||
gchar* ret;
|
||||
VALUE result;
|
||||
gint start_offset, end_offset;
|
||||
|
||||
ret = atk_text_get_text_before_offset(_SELF(self), NUM2INT(offset),
|
||||
RVAL2ATKTEXTBOUNDARY(boundary_type),
|
||||
&start_offset, &end_offset);
|
||||
result = rb_ary_new3(3, CSTR2RVAL(ret),
|
||||
INT2NUM(start_offset), INT2NUM(end_offset));
|
||||
g_free(ret);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_caret_offset(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_text_get_caret_offset(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_character_extents(VALUE self, VALUE offset, VALUE coords)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
atk_text_get_character_extents(_SELF(self), NUM2INT(offset),
|
||||
&x, &y, &width, &height,
|
||||
RVAL2ATKCOORDTYPE(coords));
|
||||
return rb_ary_new3(4, INT2NUM(x), INT2NUM(y), INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_run_attributes(VALUE self, VALUE offset)
|
||||
{
|
||||
gint start_offset, end_offset;
|
||||
AtkAttributeSet* list;
|
||||
VALUE ary;
|
||||
|
||||
list = atk_text_get_run_attributes(_SELF(self), NUM2INT(offset),
|
||||
&start_offset, &end_offset);
|
||||
|
||||
ary = rb_ary_new();
|
||||
|
||||
while (list) {
|
||||
AtkAttribute* data = (AtkAttribute*)list->data;
|
||||
rb_ary_push(ary, rb_assoc_new(CSTR2RVAL(data->name),
|
||||
CSTR2RVAL(data->value)));
|
||||
list = list->next;
|
||||
}
|
||||
atk_attribute_set_free(list);
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_default_attributes(VALUE self)
|
||||
{
|
||||
AtkAttributeSet* list;
|
||||
VALUE ary;
|
||||
|
||||
list = atk_text_get_default_attributes(_SELF(self));
|
||||
ary = rb_ary_new();
|
||||
|
||||
while (list) {
|
||||
AtkAttribute* data = (AtkAttribute*)list->data;
|
||||
rb_ary_push(ary, rb_assoc_new(CSTR2RVAL(data->name),
|
||||
CSTR2RVAL(data->value)));
|
||||
list = list->next;
|
||||
}
|
||||
atk_attribute_set_free(list);
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_character_count(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_text_get_character_count(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_offset_at_point(VALUE self, VALUE x, VALUE y, VALUE coords)
|
||||
{
|
||||
return INT2NUM(atk_text_get_offset_at_point(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
RVAL2ATKCOORDTYPE(coords)));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
#ifdef HAVE_ATK_TEXT_CLIP_TYPE_GET_TYPE
|
||||
static VALUE
|
||||
rg_get_bounded_ranges(VALUE self, VALUE rect, VALUE coord_type, VALUE x_clip_type, VALUE y_clip_type)
|
||||
{
|
||||
AtkTextRange** ranges;
|
||||
int i = 0;
|
||||
VALUE ary;
|
||||
ranges = atk_text_get_bounded_ranges(_SELF(self),
|
||||
RVAL2ATKTEXTRECTANGLE(rect),
|
||||
RVAL2ATKCOORDTYPE(coord_type),
|
||||
RVAL2ATKTEXTCLIPTYPE(x_clip_type),
|
||||
RVAL2ATKTEXTCLIPTYPE(y_clip_type));
|
||||
ary = rb_ary_new();
|
||||
while(ranges[i]){
|
||||
rb_ary_push(ary, ATKTEXTRANGE2RVAL(ranges[i]));
|
||||
i++;
|
||||
}
|
||||
#ifdef HAVE_ATK_TEXT_FREE_RANGES
|
||||
atk_text_free_ranges(ranges);
|
||||
#endif
|
||||
return ary;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_get_range_extents(VALUE self, VALUE start_offset, VALUE end_offset, VALUE coord_type)
|
||||
{
|
||||
AtkTextRectangle rect;
|
||||
atk_text_get_range_extents(_SELF(self), NUM2INT(start_offset),
|
||||
NUM2INT(end_offset),
|
||||
RVAL2ATKCOORDTYPE(coord_type),
|
||||
&rect);
|
||||
return ATKTEXTRECTANGLE2RVAL(&rect);
|
||||
}
|
||||
|
||||
/* Don't need this
|
||||
void atk_text_free_ranges (AtkTextRange **ranges);
|
||||
*/
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_n_selections(VALUE self)
|
||||
{
|
||||
return INT2NUM(atk_text_get_n_selections(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_selection(VALUE self, VALUE selection_num)
|
||||
{
|
||||
gint start_offset, end_offset;
|
||||
VALUE ret;
|
||||
gchar* text = atk_text_get_selection(_SELF(self), NUM2INT(selection_num),
|
||||
&start_offset, &end_offset);
|
||||
ret = CSTR2RVAL(text);
|
||||
g_free(text);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_selection(VALUE self, VALUE start_offset, VALUE end_offset)
|
||||
{
|
||||
gboolean ret = atk_text_add_selection(_SELF(self), NUM2INT(start_offset),
|
||||
NUM2INT(end_offset));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't add selection");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_selection(VALUE self, VALUE selection_num)
|
||||
{
|
||||
gint num;
|
||||
gboolean ret;
|
||||
|
||||
num = NUM2INT(selection_num);
|
||||
ret = atk_text_remove_selection(_SELF(self), num);
|
||||
if (! ret)
|
||||
rb_raise(rb_eRuntimeError, "Can't remove selection. num = %d", num);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_selection(VALUE self, VALUE selection_num, VALUE start_offset, VALUE end_offset)
|
||||
{
|
||||
gboolean ret = atk_text_set_selection(_SELF(self), NUM2INT(selection_num),
|
||||
NUM2INT(start_offset),
|
||||
NUM2INT(end_offset));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set selection");
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_caret_offset(VALUE self, VALUE offset)
|
||||
{
|
||||
gboolean ret = atk_text_set_caret_offset(_SELF(self), NUM2INT(offset));
|
||||
if (! ret) rb_raise(rb_eRuntimeError, "Can't set caret offset");
|
||||
return self;
|
||||
}
|
||||
|
||||
/* We don't need them.
|
||||
void atk_attribute_set_free (AtkAttributeSet *attrib_set);
|
||||
*/
|
||||
|
||||
void
|
||||
Init_atk_text(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_TEXT, "Text", mAtk);
|
||||
|
||||
RG_DEF_METHOD(get_text, 2);
|
||||
RG_DEF_METHOD(get_character_at_offset, 1);
|
||||
RG_DEF_METHOD(get_text_after_offset, 2);
|
||||
RG_DEF_METHOD(get_text_at_offset, 2);
|
||||
RG_DEF_METHOD(get_text_before_offset, 2);
|
||||
RG_DEF_METHOD(caret_offset, 0);
|
||||
RG_DEF_METHOD(get_character_extents, 2);
|
||||
RG_DEF_METHOD(get_run_attributes, 1);
|
||||
RG_DEF_METHOD(default_attributes, 0);
|
||||
RG_DEF_METHOD(character_count, 0);
|
||||
RG_DEF_METHOD(get_offset_at_point, 3);
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
#ifdef HAVE_ATK_TEXT_CLIP_TYPE_GET_TYPE
|
||||
RG_DEF_METHOD(get_bounded_ranges, 4);
|
||||
RG_DEF_METHOD(get_range_extents, 3);
|
||||
#endif
|
||||
#endif
|
||||
RG_DEF_METHOD(n_selections, 0);
|
||||
RG_DEF_METHOD(get_selection, 1);
|
||||
RG_DEF_METHOD(add_selection, 2);
|
||||
RG_DEF_METHOD(remove_selection, 1);
|
||||
RG_DEF_METHOD(set_selection, 3);
|
||||
RG_DEF_METHOD(set_caret_offset, 1);
|
||||
|
||||
/* AtkTextBoundary */
|
||||
#ifdef ATK_TYPE_TEXT_BOUNDARY
|
||||
G_DEF_CLASS(ATK_TYPE_TEXT_BOUNDARY, "Boundary", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_TEXT_BOUNDARY, "ATK_TEXT_");
|
||||
#endif
|
||||
/* AtkTextClipType */
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
#ifdef HAVE_ATK_TEXT_CLIP_TYPE_GET_TYPE
|
||||
G_DEF_CLASS(ATK_TYPE_TEXT_CLIP_TYPE, "ClipType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_TEXT_CLIP_TYPE, "ATK_TEXT_");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Init_atk_text_attribute(RG_TARGET_NAMESPACE);
|
||||
}
|
54
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextattribute.c
Normal file
54
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextattribute.c
Normal file
@ -0,0 +1,54 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cAttribute
|
||||
|
||||
static VALUE
|
||||
rg_s_type_register(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKTEXTATTRIBUTE2RVAL(atk_text_attribute_register(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_for_name(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return ATKTEXTATTRIBUTE2RVAL(atk_text_attribute_for_name(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_value(VALUE self, VALUE index)
|
||||
{
|
||||
return CSTR2RVAL(atk_text_attribute_get_value(RVAL2ATKTEXTATTRIBUTE(self),
|
||||
NUM2INT(index)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_text_attribute(VALUE mText)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_TEXT_ATTRIBUTE, "Attribute", mText);
|
||||
G_DEF_CONSTANTS(mText, ATK_TYPE_TEXT_ATTRIBUTE, "ATK_TEXT_");
|
||||
|
||||
RG_DEF_SMETHOD(type_register, 1);
|
||||
RG_DEF_SMETHOD(for_name, 1);
|
||||
RG_DEF_METHOD(get_value, 1);
|
||||
}
|
92
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrange.c
Normal file
92
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrange.c
Normal file
@ -0,0 +1,92 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
* Copyright (C) 2002,2003 Masao Mutoh
|
||||
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
||||
* Daisuke Kanda,
|
||||
* Hiroshi Igarashi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
#define RG_TARGET_NAMESPACE cTextRange
|
||||
#define _SELF(r) (RVAL2ATKTEXTRANGE(r))
|
||||
|
||||
/**********************************/
|
||||
static AtkTextRange*
|
||||
atk_text_range_copy(const AtkTextRange* val)
|
||||
{
|
||||
AtkTextRange* new_val;
|
||||
g_return_val_if_fail (val != NULL, NULL);
|
||||
new_val = g_new(AtkTextRange, 1);
|
||||
*new_val = *val;
|
||||
return new_val;
|
||||
}
|
||||
|
||||
GType
|
||||
atk_text_range_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("AtkTextRange",
|
||||
(GBoxedCopyFunc)atk_text_range_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
/* Struct accessors */
|
||||
static VALUE
|
||||
rg_bounds(VALUE self)
|
||||
{
|
||||
return ATKTEXTRECTANGLE2RVAL(&_SELF(self)->bounds);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_start_offset(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->start_offset);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_end_offset(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->end_offset);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_content(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(_SELF(self)->content);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_text_range(VALUE mAtk)
|
||||
{
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_TEXT_RANGE, "TextRange", mAtk);
|
||||
|
||||
RG_DEF_METHOD(bounds, 0);
|
||||
RG_DEF_METHOD(start_offset, 0);
|
||||
RG_DEF_METHOD(end_offset, 0);
|
||||
RG_DEF_METHOD(content, 0);
|
||||
#endif
|
||||
}
|
149
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrectangle.c
Normal file
149
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatktextrectangle.c
Normal file
@ -0,0 +1,149 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
* Copyright (C) 2002,2003 Masao Mutoh
|
||||
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
||||
* Daisuke Kanda,
|
||||
* Hiroshi Igarashi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
#define RG_TARGET_NAMESPACE cTextRectangle
|
||||
#define _SELF(r) (RVAL2ATKTEXTRECTANGLE(r))
|
||||
|
||||
/**********************************/
|
||||
static AtkTextRectangle*
|
||||
atk_text_rectangle_copy(const AtkTextRectangle* val)
|
||||
{
|
||||
AtkTextRectangle* new_val;
|
||||
g_return_val_if_fail (val != NULL, NULL);
|
||||
new_val = g_new(AtkTextRectangle, 1);
|
||||
*new_val = *val;
|
||||
return new_val;
|
||||
}
|
||||
|
||||
GType
|
||||
atk_text_rectangle_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("AtkTextRectangle",
|
||||
(GBoxedCopyFunc)atk_text_rectangle_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
AtkTextRectangle rectangle;
|
||||
|
||||
rectangle.x = NUM2INT(x);
|
||||
rectangle.y = NUM2INT(y);
|
||||
rectangle.width = NUM2INT(width);
|
||||
rectangle.height = NUM2INT(height);
|
||||
|
||||
G_INITIALIZE(self, g_boxed_copy(ATK_TYPE_TEXT_RECTANGLE, &rectangle));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
/* Struct accessors */
|
||||
static VALUE
|
||||
rg_x(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->x);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_y(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->y);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->width);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_height(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->height);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_x(VALUE self, VALUE x)
|
||||
{
|
||||
_SELF(self)->x = NUM2INT(x);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_y(VALUE self, VALUE y)
|
||||
{
|
||||
_SELF(self)->y = NUM2INT(y);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_width(VALUE self, VALUE width)
|
||||
{
|
||||
_SELF(self)->width = NUM2INT(width);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_height(VALUE self, VALUE height)
|
||||
{
|
||||
_SELF(self)->height = NUM2INT(height);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_a(VALUE self)
|
||||
{
|
||||
AtkTextRectangle* a = _SELF(self);
|
||||
return rb_ary_new3(4, INT2FIX(a->x), INT2FIX(a->y),
|
||||
INT2FIX(a->width), INT2FIX(a->height));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_atk_text_rectangle(VALUE mAtk)
|
||||
{
|
||||
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_TEXT_RECTANGLE, "TextRectangle", mAtk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 4);
|
||||
RG_DEF_METHOD(x, 0);
|
||||
RG_DEF_METHOD(y, 0);
|
||||
RG_DEF_METHOD(width, 0);
|
||||
RG_DEF_METHOD(height, 0);
|
||||
RG_DEF_METHOD(set_x, 1);
|
||||
RG_DEF_METHOD(set_y, 1);
|
||||
RG_DEF_METHOD(set_width, 1);
|
||||
RG_DEF_METHOD(set_height, 1);
|
||||
RG_DEF_METHOD(to_a, 0);
|
||||
#endif
|
||||
}
|
126
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkutil.c
Normal file
126
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkutil.c
Normal file
@ -0,0 +1,126 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cUtil
|
||||
static ID id_call;
|
||||
|
||||
/* How can I implement them?
|
||||
guint atk_add_focus_tracker (AtkEventListener focus_tracker);
|
||||
void atk_remove_focus_tracker (guint tracker_id);
|
||||
void atk_focus_tracker_init (AtkEventListenerInit add_function);
|
||||
void (*AtkEventListener) (AtkObject*);
|
||||
void (*AtkEventListenerInit) (void);
|
||||
guint atk_add_global_event_listener (GSignalEmissionHook listener,
|
||||
const gchar *event_type);
|
||||
void atk_remove_global_event_listener
|
||||
(guint listener_id);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_s_focus_tracker_notify(VALUE self, VALUE obj)
|
||||
{
|
||||
atk_focus_tracker_notify(RVAL2ATKOBJECT(obj));
|
||||
return self;
|
||||
}
|
||||
|
||||
static gint
|
||||
key_snoop_func(AtkKeyEventStruct* event, gpointer func)
|
||||
{
|
||||
VALUE ret = rb_funcall((VALUE)func, id_call, 7,
|
||||
INT2NUM(event->type), UINT2NUM(event->state),
|
||||
UINT2NUM(event->keyval), INT2NUM(event->length),
|
||||
CSTR2RVAL(event->string), UINT2NUM(event->keycode),
|
||||
UINT2NUM(event->timestamp));
|
||||
return NUM2INT(ret);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_add_key_event_listener(VALUE self)
|
||||
{
|
||||
guint ret;
|
||||
VALUE func = rb_block_proc();
|
||||
G_RELATIVE(self, func);
|
||||
ret = atk_add_key_event_listener((AtkKeySnoopFunc)key_snoop_func, (gpointer)func);
|
||||
return UINT2NUM(ret);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_remove_key_event_listener(VALUE self, VALUE id)
|
||||
{
|
||||
atk_remove_key_event_listener(NUM2UINT(id));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_root(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_get_root());
|
||||
}
|
||||
|
||||
#if ATK_CHECK_VERSION(1,6,0)
|
||||
static VALUE
|
||||
rg_s_focus_object(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(atk_get_focus_object());
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_s_toolkit_name(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(atk_get_toolkit_name());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_toolkit_version(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(atk_get_toolkit_version());
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_util(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_UTIL, "Util", mAtk);
|
||||
|
||||
id_call = rb_intern("call");
|
||||
|
||||
RG_DEF_SMETHOD(focus_tracker_notify, 1);
|
||||
RG_DEF_SMETHOD(add_key_event_listener, 0);
|
||||
RG_DEF_SMETHOD(remove_key_event_listener, 1);
|
||||
|
||||
RG_DEF_SMETHOD(root, 0);
|
||||
#if ATK_CHECK_VERSION(1,6,0)
|
||||
RG_DEF_SMETHOD(focus_object, 0);
|
||||
#endif
|
||||
RG_DEF_SMETHOD(toolkit_name, 0);
|
||||
RG_DEF_SMETHOD(toolkit_version, 0);
|
||||
|
||||
/* AtkCoordType */
|
||||
G_DEF_CLASS(ATK_TYPE_COORD_TYPE, "CoordType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_COORD_TYPE, "ATK_");
|
||||
|
||||
/* AtkKeyEventType */
|
||||
G_DEF_CLASS(ATK_TYPE_KEY_EVENT_TYPE, "KeyEventType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_KEY_EVENT_TYPE, "ATK_");
|
||||
|
||||
}
|
78
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkvalue.c
Normal file
78
lib/ruby-gtk2-2.0.2/atk/ext/atk/rbatkvalue.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbatkprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mValue
|
||||
#define _SELF(s) (RVAL2ATKVALUE(s))
|
||||
|
||||
static VALUE
|
||||
rg_current(VALUE self)
|
||||
{
|
||||
GValue gval = G_VALUE_INIT;
|
||||
atk_value_get_current_value(_SELF(self), &gval);
|
||||
|
||||
return GVAL2RVAL(&gval);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_max(VALUE self)
|
||||
{
|
||||
GValue gval = G_VALUE_INIT;
|
||||
atk_value_get_maximum_value(_SELF(self), &gval);
|
||||
|
||||
return GVAL2RVAL(&gval);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_min(VALUE self)
|
||||
{
|
||||
GValue gval = G_VALUE_INIT;
|
||||
atk_value_get_minimum_value(_SELF(self), &gval);
|
||||
|
||||
return GVAL2RVAL(&gval);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_current(VALUE self, VALUE value)
|
||||
{
|
||||
GValue gval = G_VALUE_INIT;
|
||||
g_value_init(&gval, RVAL2GTYPE(value));
|
||||
|
||||
rbgobj_rvalue_to_gvalue(value, &gval);
|
||||
|
||||
if (! atk_value_set_current_value(_SELF(self), &gval)){
|
||||
rb_raise(rb_eRuntimeError, "Can't set the current value.");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_atk_value(VALUE mAtk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_VALUE, "Value", mAtk);
|
||||
|
||||
RG_DEF_METHOD(current, 0);
|
||||
RG_DEF_METHOD(max, 0);
|
||||
RG_DEF_METHOD(min, 0);
|
||||
RG_DEF_METHOD(set_current, 1);
|
||||
}
|
49
lib/ruby-gtk2-2.0.2/atk/extconf.rb
Normal file
49
lib/ruby-gtk2-2.0.2/atk/extconf.rb
Normal file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'pathname'
|
||||
require 'mkmf'
|
||||
require 'rbconfig'
|
||||
require 'fileutils'
|
||||
|
||||
package = "atk"
|
||||
|
||||
base_dir = Pathname(__FILE__).dirname.expand_path
|
||||
ext_dir = base_dir + "ext" + package
|
||||
mkmf_gnome2_dir = base_dir + 'lib'
|
||||
|
||||
ruby = File.join(RbConfig::CONFIG['bindir'],
|
||||
RbConfig::CONFIG['ruby_install_name'] +
|
||||
RbConfig::CONFIG["EXEEXT"])
|
||||
|
||||
build_dir = Pathname("ext") + package
|
||||
FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
|
||||
extconf_rb_path = ext_dir + "extconf.rb"
|
||||
system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
|
||||
|
||||
create_makefile(package)
|
||||
FileUtils.mv("Makefile", "Makefile.lib")
|
||||
|
||||
File.open("Makefile", "w") do |makefile|
|
||||
makefile.puts(<<-EOM)
|
||||
all:
|
||||
(cd ext/#{package} && $(MAKE))
|
||||
$(MAKE) -f Makefile.lib
|
||||
|
||||
install:
|
||||
(cd ext/#{package} && $(MAKE) install)
|
||||
$(MAKE) -f Makefile.lib install
|
||||
|
||||
site-install:
|
||||
(cd ext/#{package} && $(MAKE) site-install)
|
||||
$(MAKE) -f Makefile.lib site-install
|
||||
|
||||
clean:
|
||||
(cd ext/#{package} && $(MAKE) clean)
|
||||
$(MAKE) -f Makefile.lib clean
|
||||
|
||||
distclean:
|
||||
(cd ext/#{package} && $(MAKE) distclean)
|
||||
$(MAKE) -f Makefile.lib distclean
|
||||
@rm -f Makefile.lib
|
||||
EOM
|
||||
end
|
21
lib/ruby-gtk2-2.0.2/atk/lib/atk.rb
Normal file
21
lib/ruby-gtk2-2.0.2/atk/lib/atk.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require 'glib2'
|
||||
|
||||
base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
|
||||
vendor_dir = base_dir + "vendor" + "local"
|
||||
vendor_bin_dir = vendor_dir + "bin"
|
||||
GLib.prepend_dll_path(vendor_bin_dir)
|
||||
begin
|
||||
major, minor, _ = RUBY_VERSION.split(/\./)
|
||||
require "#{major}.#{minor}/atk.so"
|
||||
rescue LoadError
|
||||
require 'atk.so'
|
||||
end
|
||||
|
||||
if vendor_dir.exist?
|
||||
begin
|
||||
require "gobject-introspection"
|
||||
vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
|
||||
GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
21
lib/ruby-gtk2-2.0.2/atk/test/atk-test-utils.rb
Normal file
21
lib/ruby-gtk2-2.0.2/atk/test/atk-test-utils.rb
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
require "test-unit"
|
||||
require "test/unit/notify"
|
||||
|
||||
module AtkTestUtils
|
||||
end
|
45
lib/ruby-gtk2-2.0.2/atk/test/run-test.rb
Executable file
45
lib/ruby-gtk2-2.0.2/atk/test/run-test.rb
Executable file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
||||
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
||||
|
||||
glib_base = File.join(ruby_gnome2_base, "glib2")
|
||||
atk_base = File.join(ruby_gnome2_base, "atk")
|
||||
|
||||
modules = [
|
||||
[glib_base, "glib2"],
|
||||
[atk_base, "atk"]
|
||||
]
|
||||
modules.each do |target, module_name|
|
||||
if system("which make > /dev/null")
|
||||
`make -C #{target.dump} > /dev/null` or exit(false)
|
||||
end
|
||||
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
||||
$LOAD_PATH.unshift(File.join(target, "lib"))
|
||||
end
|
||||
|
||||
$LOAD_PATH.unshift(File.join(glib_base, "test"))
|
||||
require "glib-test-init"
|
||||
|
||||
$LOAD_PATH.unshift(File.join(atk_base, "test"))
|
||||
require "atk-test-utils"
|
||||
|
||||
require "atk"
|
||||
|
||||
exit Test::Unit::AutoRunner.run(true)
|
26
lib/ruby-gtk2-2.0.2/atk/test/test-text-rectangle.rb
Normal file
26
lib/ruby-gtk2-2.0.2/atk/test/test-text-rectangle.rb
Normal file
@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
class TestAtkRectangle < Test::Unit::TestCase
|
||||
include AtkTestUtils
|
||||
|
||||
def test_width
|
||||
rectangle = Atk::TextRectangle.new(0, 10, 20, 30)
|
||||
assert_equal(20, rectangle.width)
|
||||
end
|
||||
end
|
48
lib/ruby-gtk2-2.0.2/exec_make.rb
Normal file
48
lib/ruby-gtk2-2.0.2/exec_make.rb
Normal file
@ -0,0 +1,48 @@
|
||||
=begin
|
||||
exec_make.rb is called by top-level Makefile.
|
||||
|
||||
$Id: exec_make.rb,v 1.5 2005/01/31 10:34:33 mutoh Exp $
|
||||
|
||||
Copyright (C) 2003-2005 Ruby-GNOME2 Project Team
|
||||
=end
|
||||
|
||||
argv = ARGV
|
||||
strict = false
|
||||
if ARGV[0] == "--strict" || ARGV[0] == "-s"
|
||||
strict = true
|
||||
argv = ARGV[1..-1]
|
||||
end
|
||||
|
||||
SUBDIRS = argv[0].split(" ")
|
||||
EXECUTE = argv[1..-1].join(' ')
|
||||
|
||||
success = []
|
||||
failure = []
|
||||
SUBDIRS.each do |subdir|
|
||||
Dir.chdir(subdir)
|
||||
begin
|
||||
ret = system(EXECUTE)
|
||||
ensure
|
||||
Dir.chdir("..")
|
||||
end
|
||||
|
||||
if ret
|
||||
success << subdir
|
||||
else
|
||||
failure << subdir
|
||||
end
|
||||
end
|
||||
|
||||
success << "NONE" if success.size == 0
|
||||
failure << "NONE" if failure.size == 0
|
||||
|
||||
puts "\n"
|
||||
puts "-----"
|
||||
puts "SUCCEEDED: #{success.join(' ')}" if success.size > 0
|
||||
puts "FAILED: #{failure.join(' ')}" if failure.size > 0
|
||||
puts "-----"
|
||||
puts "Done."
|
||||
|
||||
if strict && (failure.select { |x| x != "NONE" }.length > 0)
|
||||
exit(1)
|
||||
end
|
144
lib/ruby-gtk2-2.0.2/extconf.rb
Normal file
144
lib/ruby-gtk2-2.0.2/extconf.rb
Normal file
@ -0,0 +1,144 @@
|
||||
=begin
|
||||
top-level extconf.rb for Ruby-GNOME2
|
||||
|
||||
$Id: extconf.rb,v 1.17 2007/10/22 12:19:17 ktou Exp $
|
||||
|
||||
Copyright (C) 2003-2005 Ruby-GNOME2 Project Team
|
||||
=end
|
||||
|
||||
require 'English'
|
||||
require 'mkmf'
|
||||
require 'fileutils'
|
||||
require 'pathname'
|
||||
|
||||
priorlibs = [
|
||||
"glib2",
|
||||
"gobject-introspection",
|
||||
"gio2",
|
||||
"gdk_pixbuf2",
|
||||
"pango",
|
||||
"atk",
|
||||
"gtk2",
|
||||
"gdk3",
|
||||
"gtk3",
|
||||
]
|
||||
|
||||
#
|
||||
# detect sub-directories
|
||||
#
|
||||
$ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'] + RbConfig::CONFIG['EXEEXT'])
|
||||
$ruby = arg_config("--ruby", $ruby)
|
||||
|
||||
rm = "rm -f"
|
||||
if /mswin/ =~ RUBY_PLATFORM
|
||||
rm = "del"
|
||||
end
|
||||
|
||||
|
||||
$srcdir = File.dirname(__FILE__)
|
||||
$topsrcdir = $configure_args["--topsrcdir"] ||= $srcdir
|
||||
$topdir = $configure_args["--topdir"] ||= Dir.pwd
|
||||
$strict = $configure_args["--strict"] ? "--strict" : ""
|
||||
|
||||
$srcdir = File.expand_path($srcdir)
|
||||
$topsrcdir = File.expand_path($topsrcdir)
|
||||
$topdir = File.expand_path($topdir)
|
||||
|
||||
subdirs = ARGV.select{|v| /^--/ !~ v}
|
||||
|
||||
if subdirs.size == 0
|
||||
subdirs = Dir.glob($topsrcdir+"/*/extconf.rb")
|
||||
subdirs.collect! do |subdir|
|
||||
subdir[0..$topsrcdir.size] = ""
|
||||
File.dirname(subdir)
|
||||
end
|
||||
priorlibs &= subdirs
|
||||
subdirs -= priorlibs
|
||||
subdirs = priorlibs + subdirs #Change the order
|
||||
end
|
||||
|
||||
#
|
||||
# generate sub-directory Makefiles
|
||||
#
|
||||
target_modules = []
|
||||
ignore_modules = []
|
||||
|
||||
ruby, *ruby_args = Shellwords.shellwords($ruby)
|
||||
if ARGV.grep(/\A--ruby=/)
|
||||
extra_args = ["--ruby=#{$ruby}"] + ARGV.reject {|arg| /\A--ruby=/ =~ arg}
|
||||
else
|
||||
extra_args = ARGV.dup
|
||||
end
|
||||
|
||||
subdirs.each do |subdir|
|
||||
STDERR.puts("#{$0}: Entering directory `#{subdir}'")
|
||||
FileUtils.mkdir_p(subdir)
|
||||
topdir = File.join(*([".."] * subdir.split(/\/+/).size))
|
||||
dir = $topsrcdir
|
||||
dir = File.join(topdir, dir) unless Pathname.new(dir).absolute?
|
||||
srcdir = File.join(dir, subdir)
|
||||
args = ruby_args + ["-C", subdir, File.join(srcdir, "extconf.rb"),
|
||||
"--topsrcdir=#{dir}", "--topdir=#{topdir}",
|
||||
*extra_args]
|
||||
ret = system(ruby, *args)
|
||||
STDERR.puts("#{$0}: Leaving directory '#{subdir}'")
|
||||
if ret
|
||||
target_modules << subdir
|
||||
else
|
||||
ignore_modules << subdir
|
||||
end
|
||||
end
|
||||
puts "\n-----"
|
||||
unless target_modules.empty?
|
||||
puts "Target libraries: #{target_modules.join(', ')}"
|
||||
end
|
||||
unless ignore_modules.empty?
|
||||
puts "Ignored libraries: #{ignore_modules.join(', ')}"
|
||||
end
|
||||
|
||||
#
|
||||
# generate top-level Makefile
|
||||
#
|
||||
|
||||
def run_make_in_sub_dir(sub_dir, target)
|
||||
if /mswin/ =~ RUBY_PLATFORM
|
||||
" $(COMMAND) '#{sub_dir}' $(MAKE) #{target}"
|
||||
else
|
||||
" (cd '#{sub_dir}' && $(MAKE) #{target})"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
File.open("Makefile", "w") do |makefile|
|
||||
makefile.print(<<-EOM)
|
||||
TOPSRCDIR = #{$topsrcdir}
|
||||
COMMAND = #{$ruby} #{$topsrcdir}/exec_make.rb #{$strict}
|
||||
RM = #{rm}
|
||||
EOM
|
||||
|
||||
["all", "install", "site-install", "clean", "distclean"].each do |target|
|
||||
makefile.print(<<-EOM)
|
||||
#{target}:
|
||||
EOM
|
||||
target_modules.each do |target_module|
|
||||
sub_target = "#{target}-#{target_module}"
|
||||
makefile.print(<<-EOM)
|
||||
#{target}: #{sub_target}
|
||||
#{sub_target}:
|
||||
#{run_make_in_sub_dir(target_module, target)}
|
||||
|
||||
EOM
|
||||
end
|
||||
end
|
||||
|
||||
makefile.print(<<-EOM)
|
||||
distclean: distclean-toplevel
|
||||
distclean-toplevel:
|
||||
$(RM) Makefile mkmf.log
|
||||
EOM
|
||||
end
|
||||
|
||||
puts "-----"
|
||||
puts "Done."
|
||||
|
||||
$makefile_created = true
|
504
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/COPYING.LIB
Normal file
504
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/COPYING.LIB
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
29
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/README
Normal file
29
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/README
Normal file
@ -0,0 +1,29 @@
|
||||
Ruby/GdkPixbuf2
|
||||
===============
|
||||
Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
Ruby: http://www.ruby-lang.org/
|
||||
GTK+: http://www.gtk.org/
|
||||
Ruby/GLib2, Ruby/GTK2: http://ruby-gnome2.sourceforge.net/
|
||||
|
||||
Install
|
||||
-------
|
||||
0. install ruby-1.6.x or later, GTK+, Ruby/GLib2 and Ruby/GTK2.
|
||||
1. ruby extconf.rb
|
||||
2. make
|
||||
3. su
|
||||
4. make install
|
||||
|
||||
Copying
|
||||
-------
|
||||
Copyright (c) 2002-2005 Ruby-GNOME2 Project Team
|
||||
|
||||
This program is free software.
|
||||
You can distribute/modify this program under the terms of
|
||||
the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
||||
|
||||
Project Website
|
||||
---------------
|
||||
http://ruby-gnome2.sourceforge.jp/
|
32
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/Rakefile
Normal file
32
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/Rakefile
Normal file
@ -0,0 +1,32 @@
|
||||
# -*- ruby -*-
|
||||
|
||||
$LOAD_PATH.unshift("./../glib2/lib")
|
||||
require "gnome2/rake/package-task"
|
||||
|
||||
package_task = GNOME2::Rake::PackageTask.new do |package|
|
||||
package.summary = "Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x."
|
||||
package.description = "Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x."
|
||||
package.dependency.gem.runtime = ["glib2"]
|
||||
package.windows.packages = []
|
||||
package.windows.dependencies = ["zlib", "libpng"]
|
||||
package.windows.build_dependencies = [
|
||||
"glib2",
|
||||
"gobject-introspection",
|
||||
]
|
||||
package.external_packages = [
|
||||
{
|
||||
:name => "gdk-pixbuf",
|
||||
:download_site => :gnome,
|
||||
:label => "gdk-pixbuf",
|
||||
:version => "2.28.1",
|
||||
:compression_method => "xz",
|
||||
:windows => {
|
||||
:configure_args => [
|
||||
"--with-included-loaders",
|
||||
"--enable-introspection",
|
||||
],
|
||||
},
|
||||
}
|
||||
]
|
||||
end
|
||||
package_task.define
|
11
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/depend
Normal file
11
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/depend
Normal file
@ -0,0 +1,11 @@
|
||||
install-so: install-headers
|
||||
install-headers:
|
||||
$(INSTALL_DATA) $(srcdir)/rbgdk-pixbuf.h $(RUBYARCHDIR)
|
||||
$(INSTALL_DATA) $(srcdir)/rbgdk-pixbuf2conversions.h $(RUBYARCHDIR)
|
||||
|
||||
install: install-pc
|
||||
install-pc:
|
||||
if test -n "$(pkgconfigdir)"; then \
|
||||
$(MAKEDIRS) $(pkgconfigdir); \
|
||||
$(INSTALL_DATA) ruby-gdk-pixbuf2.pc $(pkgconfigdir); \
|
||||
fi
|
66
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/extconf.rb
Normal file
66
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/extconf.rb
Normal file
@ -0,0 +1,66 @@
|
||||
=begin
|
||||
extconf.rb for Ruby/GdkPixbuf2 extention library
|
||||
=end
|
||||
|
||||
require 'pathname'
|
||||
|
||||
base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
|
||||
top_dir = base_dir.parent
|
||||
top_build_dir = Pathname(".").parent.parent.parent.expand_path
|
||||
|
||||
mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
|
||||
version_suffix = ""
|
||||
unless mkmf_gnome2_dir.exist?
|
||||
if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
|
||||
version_suffix = $1
|
||||
mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
|
||||
end
|
||||
end
|
||||
|
||||
$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
|
||||
|
||||
module_name = "gdk_pixbuf2"
|
||||
package_id = "gdk-pixbuf-2.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 => "libgdk-pixbuf2.0-dev",
|
||||
:redhat => "gtk2-devel",
|
||||
:fedora => "gdk-pixbuf2-devel",
|
||||
:homebrew => "gdk-pixbuf",
|
||||
:macports => "gdk-pixbuf2")
|
||||
exit(false)
|
||||
end
|
||||
|
||||
have_func("gdk_pixbuf_set_option", "gdk-pixbuf/gdk-pixbuf.h") do |src|
|
||||
"#define GDK_PIXBUF_ENABLE_BACKEND\n#{src}"
|
||||
end
|
||||
|
||||
create_pkg_config_file("Ruby/GdkPixbuf2", package_id, nil, "ruby-gdk-pixbuf2.pc")
|
||||
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,2 @@
|
||||
EXPORTS
|
||||
Init_gdk_pixbuf2
|
@ -0,0 +1,179 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgdk-pixbuf2private.h"
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
|
||||
#ifdef HAVE_GDK_PIXBUF_GDK_PIXBUF_IO_H
|
||||
#include <gdk-pixbuf/gdk-pixbuf-io.h>
|
||||
#endif
|
||||
|
||||
#define RG_TARGET_NAMESPACE cPixbufFormat
|
||||
#define _SELF(r) (RVAL2GDKPIXBUFFORMAT(r))
|
||||
|
||||
/**********************************/
|
||||
static GdkPixbufFormat*
|
||||
format_copy(const GdkPixbufFormat* val)
|
||||
{
|
||||
GdkPixbufFormat* new_val;
|
||||
g_return_val_if_fail (val != NULL, NULL);
|
||||
new_val = g_new(GdkPixbufFormat, 1);
|
||||
*new_val = *val;
|
||||
return new_val;
|
||||
}
|
||||
|
||||
GType
|
||||
gdk_pixbuf_format_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("GdkPixbufFormat",
|
||||
(GBoxedCopyFunc)format_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
/* Move to rbgdk-pixbuf.c
|
||||
gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf,
|
||||
const gchar *key,
|
||||
const gchar *value);
|
||||
GSList* gdk_pixbuf_get_formats (void);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_name(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL_FREE(gdk_pixbuf_format_get_name(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_description(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL_FREE(gdk_pixbuf_format_get_description(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_mime_types(VALUE self)
|
||||
{
|
||||
gint i = 0;
|
||||
gchar** mime_types = gdk_pixbuf_format_get_mime_types(_SELF(self));
|
||||
VALUE array = rb_ary_new();
|
||||
while(mime_types[i]){
|
||||
rb_ary_push(array, CSTR2RVAL(mime_types[i]));
|
||||
i++;
|
||||
}
|
||||
g_strfreev(mime_types);
|
||||
return array;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_extensions(VALUE self)
|
||||
{
|
||||
gint i = 0;
|
||||
gchar** extensions = gdk_pixbuf_format_get_extensions(_SELF(self));
|
||||
VALUE array = rb_ary_new();
|
||||
|
||||
while(extensions[i]){
|
||||
rb_ary_push(array, CSTR2RVAL(extensions[i]));
|
||||
i++;
|
||||
}
|
||||
g_strfreev(extensions);
|
||||
return array;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_writable_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_format_is_writable(_SELF(self)));
|
||||
}
|
||||
|
||||
/* Structure */
|
||||
static VALUE
|
||||
rg_domain(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(_SELF(self)->domain);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_signature(VALUE self)
|
||||
{
|
||||
GdkPixbufModulePattern* signature = _SELF(self)->signature;
|
||||
|
||||
VALUE array = rb_ary_new();
|
||||
int i = 0;
|
||||
while(signature[i].prefix){
|
||||
rb_ary_push(array, rb_ary_new3(3, CSTR2RVAL((const char*)signature[i].prefix),
|
||||
CSTR2RVAL((const char*)signature[i].mask),
|
||||
INT2NUM(signature[i].relevance)));
|
||||
i++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
static VALUE
|
||||
rg_scalable_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_format_is_scalable(_SELF(self)));
|
||||
}
|
||||
static VALUE
|
||||
rg_disabled_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_format_is_disabled(_SELF(self)));
|
||||
}
|
||||
static VALUE
|
||||
rg_set_disabled(VALUE self, VALUE disabled)
|
||||
{
|
||||
gdk_pixbuf_format_set_disabled(_SELF(self), RVAL2CBOOL(disabled));
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_license(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(gdk_pixbuf_format_get_license(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf_format(VALUE mGdk)
|
||||
{
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF_FORMAT, "PixbufFormat", mGdk);
|
||||
|
||||
RG_DEF_METHOD(name, 0);
|
||||
RG_DEF_METHOD(description, 0);
|
||||
RG_DEF_METHOD(mime_types, 0);
|
||||
RG_DEF_METHOD(extensions, 0);
|
||||
RG_DEF_METHOD_P(writable, 0);
|
||||
RG_DEF_METHOD(domain, 0);
|
||||
RG_DEF_METHOD(signature, 0);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
RG_DEF_METHOD_P(scalable, 0);
|
||||
RG_DEF_METHOD_P(disabled, 0);
|
||||
RG_DEF_METHOD(set_disabled, 1);
|
||||
RG_DEF_METHOD(license, 0);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2004 Masao Mutoh
|
||||
* Copyright (C) 2003 Geoff Youngs
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgdk-pixbuf2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cPixbufLoader
|
||||
#define _SELF(s) RVAL2GDKPIXBUFLOADER(s)
|
||||
|
||||
/****************************************************/
|
||||
/* File opening */
|
||||
/* Image Data in Memory */
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
GdkPixbufLoader* loader;
|
||||
GError* error = NULL;
|
||||
VALUE arg1, is_mime_type;
|
||||
|
||||
rb_scan_args(argc, argv, "02", &arg1, &is_mime_type);
|
||||
|
||||
if (NIL_P(arg1)) {
|
||||
loader = gdk_pixbuf_loader_new();
|
||||
} else {
|
||||
if (is_mime_type == Qtrue) {
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
loader = gdk_pixbuf_loader_new_with_mime_type(RVAL2CSTR(arg1), &error);
|
||||
#else
|
||||
rb_warning("Not supported GTK+-2.0/2.2.");
|
||||
loader = gdk_pixbuf_loader_new();
|
||||
#endif
|
||||
} else {
|
||||
/* Default behavior */
|
||||
loader = gdk_pixbuf_loader_new_with_type(RVAL2CSTR(arg1), &error);
|
||||
}
|
||||
if(error) RAISE_GERROR(error);
|
||||
}
|
||||
|
||||
G_INITIALIZE(self, loader);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
static VALUE
|
||||
rg_format(VALUE self)
|
||||
{
|
||||
GdkPixbufFormat* format = gdk_pixbuf_loader_get_format(_SELF(self));
|
||||
return GDKPIXBUFFORMAT2RVAL(format);
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_write(VALUE self, VALUE data)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
StringValue(data);
|
||||
if (!gdk_pixbuf_loader_write(_SELF(self),
|
||||
(const guchar *)RSTRING_PTR(data),
|
||||
RSTRING_LEN(data),
|
||||
&error))
|
||||
RAISE_GERROR(error);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_last_write(VALUE self, VALUE data)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
StringValue(data);
|
||||
if (!gdk_pixbuf_loader_write(_SELF(self),
|
||||
(const guchar *)RSTRING_PTR(data),
|
||||
RSTRING_LEN(data),
|
||||
&error))
|
||||
RAISE_GERROR(error);
|
||||
|
||||
if (!gdk_pixbuf_loader_close(_SELF(self), &error))
|
||||
RAISE_GERROR(error);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
static VALUE
|
||||
rg_set_size(VALUE self, VALUE width, VALUE height)
|
||||
{
|
||||
gdk_pixbuf_loader_set_size(_SELF(self), NUM2INT(width), NUM2INT(height));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_close(VALUE self)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gboolean res;
|
||||
|
||||
res = gdk_pixbuf_loader_close(_SELF(self), &error);
|
||||
if(error)
|
||||
RAISE_GERROR(error);
|
||||
|
||||
return CBOOL2RVAL(res);
|
||||
}
|
||||
|
||||
/****************************************************/
|
||||
/* Creating image */
|
||||
static VALUE
|
||||
rg_pixbuf(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(gdk_pixbuf_loader_get_pixbuf(_SELF(self)));
|
||||
}
|
||||
|
||||
/* Creating animation */
|
||||
static VALUE
|
||||
rg_animation(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(gdk_pixbuf_loader_get_animation(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf_loader(VALUE mGdk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
/* initialize it */
|
||||
RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF_LOADER, "PixbufLoader", mGdk);
|
||||
|
||||
/*
|
||||
* File Loading, Image Data in Memory
|
||||
*/
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
|
||||
rb_undef_method(RG_TARGET_NAMESPACE, "dup");
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
RG_DEF_METHOD(format, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(write, 1);
|
||||
RG_DEF_METHOD(last_write, 1);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
RG_DEF_METHOD(set_size, 2);
|
||||
#endif
|
||||
RG_DEF_METHOD(close, 0);
|
||||
RG_DEF_METHOD(pixbuf, 0);
|
||||
RG_DEF_METHOD(animation, 0);
|
||||
}
|
737
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf.c
Normal file
737
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixbuf.c
Normal file
@ -0,0 +1,737 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-2004 Masao Mutoh
|
||||
* Copyright (C) 2000 Yasushi Shoji
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgdk-pixbuf2private.h"
|
||||
#include <string.h>
|
||||
|
||||
#define RG_TARGET_NAMESPACE cPixbuf
|
||||
#define _SELF(s) RVAL2GDKPIXBUF(s)
|
||||
|
||||
#define NOMEM_ERROR(error) g_set_error(error,\
|
||||
GDK_PIXBUF_ERROR,\
|
||||
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,\
|
||||
"Insufficient memory to load image file");
|
||||
|
||||
static ID id_pixdata;
|
||||
|
||||
/****************************************************/
|
||||
/* The GdkPixbuf Structure */
|
||||
static int
|
||||
pixels_size(GdkPixbuf *pixbuf)
|
||||
{
|
||||
int height, width, rowstride, n_channels, bits_per_sample;
|
||||
|
||||
height = gdk_pixbuf_get_height(pixbuf);
|
||||
width = gdk_pixbuf_get_width(pixbuf);
|
||||
rowstride = gdk_pixbuf_get_rowstride(pixbuf);
|
||||
n_channels = gdk_pixbuf_get_n_channels(pixbuf);
|
||||
bits_per_sample = gdk_pixbuf_get_bits_per_sample(pixbuf);
|
||||
|
||||
return ((height - 1) * rowstride +
|
||||
width * ((n_channels * bits_per_sample + 7) / 8));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
get_pixels(VALUE self)
|
||||
{
|
||||
GdkPixbuf *pixbuf = _SELF(self);
|
||||
int size;
|
||||
|
||||
size = pixels_size(pixbuf);
|
||||
return rb_str_new((const char *)gdk_pixbuf_get_pixels(pixbuf), size);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_set_pixels(VALUE self, VALUE pixels)
|
||||
{
|
||||
GdkPixbuf *pixbuf = _SELF(self);
|
||||
int size;
|
||||
int arg_size;
|
||||
|
||||
size = pixels_size(pixbuf);
|
||||
|
||||
StringValue(pixels);
|
||||
arg_size = RSTRING_LEN(pixels);
|
||||
if (arg_size != size)
|
||||
rb_raise(rb_eRangeError,
|
||||
"Pixels are %i bytes, %i bytes supplied.",
|
||||
size, arg_size);
|
||||
|
||||
/* The user currently cannot get a pointer to the actual
|
||||
* pixels, the data is copied to a String. */
|
||||
memcpy(gdk_pixbuf_get_pixels(pixbuf),
|
||||
RSTRING_PTR(pixels), MIN(RSTRING_LEN(pixels), size));
|
||||
|
||||
return pixels;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_option(VALUE self, VALUE key)
|
||||
{
|
||||
const gchar* ret = gdk_pixbuf_get_option(_SELF(self), RVAL2CSTR(key));
|
||||
return ret ? CSTR2RVAL(ret) : Qnil;
|
||||
}
|
||||
|
||||
/****************************************************/
|
||||
/* File opening */
|
||||
/* Image Data in Memory */
|
||||
static GdkPixbuf *
|
||||
pixbuf_initialize_by_hash(VALUE self, VALUE arg, GError **error)
|
||||
{
|
||||
GdkPixbuf *buf = NULL;
|
||||
|
||||
VALUE rb_colorspace, rb_has_alpha, rb_bits_per_sample, rb_width, rb_height,
|
||||
rb_data, rb_rowstride, rb_xpm, rb_inline, rb_copy_pixels,
|
||||
rb_src_pixbuf, rb_src_x, rb_src_y,
|
||||
rb_file, rb_scale_width, rb_scale_height, rb_preserve_aspect_ratio;
|
||||
rbg_scan_options(arg,
|
||||
"colorspace", &rb_colorspace,
|
||||
"has_alpha", &rb_has_alpha,
|
||||
"bits_per_sample", &rb_bits_per_sample,
|
||||
"width", &rb_width,
|
||||
"height", &rb_height,
|
||||
"data", &rb_data,
|
||||
"rowstride", &rb_rowstride,
|
||||
"xpm", &rb_xpm,
|
||||
"inline", &rb_inline,
|
||||
"copy_pixels", &rb_copy_pixels,
|
||||
"src_pixbuf", &rb_src_pixbuf,
|
||||
"src_x", &rb_src_x,
|
||||
"src_y", &rb_src_y,
|
||||
"file", &rb_file,
|
||||
"scale_width", &rb_scale_width,
|
||||
"scale_height", &rb_scale_height,
|
||||
"preserve_aspect_ratio", &rb_preserve_aspect_ratio,
|
||||
NULL);
|
||||
|
||||
if (!NIL_P(rb_data)) {
|
||||
buf = gdk_pixbuf_new_from_data((const guchar*)RVAL2CSTR(rb_data),
|
||||
NIL_P(rb_colorspace) ? GDK_COLORSPACE_RGB : RVAL2GDKCOLORSPACE(rb_colorspace),
|
||||
RVAL2CBOOL(rb_has_alpha),
|
||||
NIL_P(rb_bits_per_sample) ? 8 : NUM2INT(rb_bits_per_sample),
|
||||
NUM2INT(rb_width),
|
||||
NUM2INT(rb_height),
|
||||
NUM2INT(rb_rowstride),
|
||||
NULL, NULL);
|
||||
if (buf == NULL)
|
||||
NOMEM_ERROR(error);
|
||||
// Save a reference to the string because the pixbuf doesn't copy it.
|
||||
G_RELATIVE(self, rb_data);
|
||||
} else if (!NIL_P(rb_xpm)) {
|
||||
const gchar **data = RVAL2STRV(rb_xpm);
|
||||
buf = gdk_pixbuf_new_from_xpm_data(data);
|
||||
g_free(data);
|
||||
if (buf == NULL)
|
||||
NOMEM_ERROR(error);
|
||||
} else if (!NIL_P(rb_inline)) {
|
||||
/* TODO: Is this really up to the caller to decide? */
|
||||
long n;
|
||||
guint8 *data = RVAL2GUINT8S(rb_inline, n);
|
||||
buf = gdk_pixbuf_new_from_inline(n, data, RVAL2CBOOL(rb_copy_pixels), error);
|
||||
/* need to manage the returned value */
|
||||
rb_ivar_set(self, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, data));
|
||||
} else if (!NIL_P(rb_src_pixbuf)) {
|
||||
buf = gdk_pixbuf_new_subpixbuf(_SELF(rb_src_pixbuf),
|
||||
NUM2INT(rb_src_x),
|
||||
NUM2INT(rb_src_y),
|
||||
NUM2INT(rb_width),
|
||||
NUM2INT(rb_height));
|
||||
if (buf == NULL)
|
||||
NOMEM_ERROR(error);
|
||||
} else if (!NIL_P(rb_file)) {
|
||||
if (!NIL_P(rb_width)) {
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
buf = gdk_pixbuf_new_from_file_at_size(RVAL2CSTR(rb_file),
|
||||
NUM2INT(rb_width),
|
||||
NUM2INT(rb_height),
|
||||
error);
|
||||
#else
|
||||
rb_warning("Sizing on load not supported in GTK+ < 2.4.0");
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(rb_file), error);
|
||||
#endif
|
||||
} else if (!NIL_P(rb_scale_width)) {
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
int width = NUM2INT(rb_scale_width);
|
||||
int height = NUM2INT(rb_scale_height);
|
||||
#if !RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
if (width < 0 || height < 0)
|
||||
rb_warning("For scaling on load, a negative value for width or height are not supported in GTK+ < 2.8.0");
|
||||
#endif
|
||||
buf = gdk_pixbuf_new_from_file_at_scale(RVAL2CSTR(rb_file),
|
||||
width, height,
|
||||
NIL_P(rb_preserve_aspect_ratio) ? TRUE : RVAL2CBOOL(rb_preserve_aspect_ratio),
|
||||
error);
|
||||
#else
|
||||
rb_warning("Scaling on load not supported in GTK+ < 2.6.0");
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(rb_file), error);
|
||||
#endif
|
||||
} else {
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(rb_file), error);
|
||||
}
|
||||
} else {
|
||||
buf = gdk_pixbuf_new(NIL_P(rb_colorspace) ? GDK_COLORSPACE_RGB : RVAL2GDKCOLORSPACE(rb_colorspace),
|
||||
RVAL2CBOOL(rb_has_alpha),
|
||||
NIL_P(rb_bits_per_sample) ? 8 : NUM2INT(rb_bits_per_sample),
|
||||
NUM2INT(rb_width),
|
||||
NUM2INT(rb_height));
|
||||
if (buf == NULL)
|
||||
NOMEM_ERROR(error);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* TODO: make deprecated */
|
||||
static GdkPixbuf *
|
||||
pixbuf_initialize(VALUE self, int argc, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6, VALUE arg7, GError **error)
|
||||
{
|
||||
GdkPixbuf* buf;
|
||||
|
||||
if (argc == 7){
|
||||
buf = gdk_pixbuf_new_from_data((const guchar*)RVAL2CSTR(arg1),
|
||||
RVAL2GDKCOLORSPACE(arg2),
|
||||
RVAL2CBOOL(arg3), NUM2INT(arg4),
|
||||
NUM2INT(arg5), NUM2INT(arg6),
|
||||
NUM2INT(arg7), NULL, NULL);
|
||||
if (buf == NULL) NOMEM_ERROR(error);
|
||||
// Save a reference to the string because the pixbuf doesn't copy it.
|
||||
G_RELATIVE(self, arg1);
|
||||
} else if (argc == 5){
|
||||
if (rb_obj_is_kind_of(arg1, GTYPE2CLASS(GDK_TYPE_PIXBUF))){
|
||||
buf = gdk_pixbuf_new_subpixbuf(_SELF(arg1),
|
||||
NUM2INT(arg2), NUM2INT(arg3),
|
||||
NUM2INT(arg4), NUM2INT(arg5));
|
||||
if (buf == NULL) NOMEM_ERROR(error);
|
||||
} else if (rb_obj_is_kind_of(arg1, GTYPE2CLASS(GDK_TYPE_COLORSPACE))){
|
||||
buf = gdk_pixbuf_new(RVAL2GDKCOLORSPACE(arg1),
|
||||
RVAL2CBOOL(arg2), NUM2INT(arg3),
|
||||
NUM2INT(arg4), NUM2INT(arg5));
|
||||
if (buf == NULL) NOMEM_ERROR(error);
|
||||
} else {
|
||||
rb_raise(rb_eArgError, "Wrong type of 1st argument or wrong number of arguments");
|
||||
}
|
||||
} else if (argc == 4) {
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
int width = NUM2INT(arg2);
|
||||
int height = NUM2INT(arg3);
|
||||
#if ! RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
if (width < 0 || height < 0)
|
||||
rb_warning("For scaling on load, a negative value for width or height are not supported in GTK+ < 2.8.0");
|
||||
#endif
|
||||
buf = gdk_pixbuf_new_from_file_at_scale(RVAL2CSTR(arg1),
|
||||
width, height,
|
||||
RVAL2CBOOL(arg4), error);
|
||||
#else
|
||||
rb_warning("Scaling on load not supported in GTK+ < 2.6.0");
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(arg1), error);
|
||||
#endif
|
||||
} else if (argc == 3) {
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
buf = gdk_pixbuf_new_from_file_at_size(RVAL2CSTR(arg1),
|
||||
NUM2INT(arg2), NUM2INT(arg3), error);
|
||||
#else
|
||||
rb_warning("Sizing on load not supported in GTK+ < 2.4.0");
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(arg1), error);
|
||||
#endif
|
||||
} else if (argc == 2) {
|
||||
/* TODO: Is this really up to the caller to decide? */
|
||||
gboolean copy_pixels = RVAL2CBOOL(arg2);
|
||||
long n;
|
||||
guint8 *data = RVAL2GUINT8S(arg1, n);
|
||||
buf = gdk_pixbuf_new_from_inline(n, data, copy_pixels, error);
|
||||
/* need to manage the returned value */
|
||||
rb_ivar_set(self, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, data));
|
||||
} else if (argc == 1){
|
||||
if (TYPE(arg1) == T_STRING) {
|
||||
buf = gdk_pixbuf_new_from_file(RVAL2CSTR(arg1), error);
|
||||
} else if (TYPE(arg1) == T_ARRAY) {
|
||||
const gchar **data = RVAL2STRV(arg1);
|
||||
buf = gdk_pixbuf_new_from_xpm_data(data);
|
||||
g_free(data);
|
||||
if (buf == NULL)
|
||||
NOMEM_ERROR(error);
|
||||
} else if (TYPE(arg1) == T_HASH) {
|
||||
buf = pixbuf_initialize_by_hash(self, arg1, error);
|
||||
} else {
|
||||
rb_raise(rb_eArgError, "Wrong type of 1st argument or wrong number of arguments");
|
||||
}
|
||||
} else {
|
||||
rb_raise(rb_eArgError, "Wrong number of arguments");
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE arg1, arg2, arg3, arg4, arg5, arg6, arg7;
|
||||
GdkPixbuf *buf;
|
||||
GError *error = NULL;
|
||||
|
||||
rb_scan_args(argc, argv, "16", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7);
|
||||
buf = pixbuf_initialize(self, argc, arg1, arg2, arg3, arg4, arg5, arg6, arg7, &error);
|
||||
if (buf == NULL) {
|
||||
rb_gc();
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
buf = pixbuf_initialize(self, argc, arg1, arg2, arg3, arg4, arg5, arg6, arg7, &error);
|
||||
}
|
||||
if (error || !buf)
|
||||
RAISE_GERROR(error);
|
||||
|
||||
G_INITIALIZE(self, buf);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_dup(VALUE self)
|
||||
{
|
||||
VALUE ret;
|
||||
GdkPixbuf* dest = gdk_pixbuf_copy(_SELF(self));
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
static VALUE
|
||||
rg_s_get_file_info(G_GNUC_UNUSED VALUE self, VALUE filename)
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
GdkPixbufFormat* format = gdk_pixbuf_get_file_info(RVAL2CSTR(filename),
|
||||
&width, &height);
|
||||
return format ? rb_ary_new3(3, GDKPIXBUFFORMAT2RVAL(format), INT2NUM(width), INT2NUM(height)) : Qnil;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
save_to(VALUE self, const gchar *filename, const gchar *type, VALUE options)
|
||||
{
|
||||
VALUE result = self;
|
||||
GError *error = NULL;
|
||||
gchar **keys = NULL;
|
||||
gchar **values = NULL;
|
||||
|
||||
if (!NIL_P(options)) {
|
||||
VALUE ary, key, value;
|
||||
ID to_s;
|
||||
gint len, i;
|
||||
|
||||
Check_Type(options, T_HASH);
|
||||
to_s = rb_intern("to_s");
|
||||
|
||||
ary = rb_funcall(options, rb_intern("to_a"), 0);
|
||||
len = RARRAY_LEN(ary);
|
||||
keys = ALLOCA_N(gchar *, len + 1);
|
||||
values = ALLOCA_N(gchar *, len + 1);
|
||||
for (i = 0; i < len; i++) {
|
||||
key = RARRAY_PTR(RARRAY_PTR(ary)[i])[0];
|
||||
if (SYMBOL_P(key)) {
|
||||
const char *const_key;
|
||||
const_key = rb_id2name(SYM2ID(key));
|
||||
keys[i] = (gchar *)const_key;
|
||||
} else {
|
||||
keys[i] = (gchar *)RVAL2CSTR(key);
|
||||
}
|
||||
value = rb_funcall(RARRAY_PTR(RARRAY_PTR(ary)[i])[1], to_s, 0);
|
||||
values[i] = (gchar *)RVAL2CSTR(value);
|
||||
}
|
||||
keys[len] = NULL;
|
||||
values[len] = NULL;
|
||||
}
|
||||
|
||||
if (filename) {
|
||||
gdk_pixbuf_savev(_SELF(self), filename, type, keys, values, &error);
|
||||
}
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
else {
|
||||
gchar *buffer;
|
||||
gsize buffer_size;
|
||||
if (gdk_pixbuf_save_to_bufferv(_SELF(self), &buffer, &buffer_size,
|
||||
type, keys, values, &error))
|
||||
result = rb_str_new(buffer, buffer_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (error)
|
||||
RAISE_GERROR(error);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/****************************************************/
|
||||
/* File saving */
|
||||
static VALUE
|
||||
rg_save(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE filename, type, options;
|
||||
|
||||
rb_scan_args(argc, argv, "21", &filename, &type, &options);
|
||||
|
||||
return save_to(self, RVAL2CSTR(filename), RVAL2CSTR(type), options);
|
||||
}
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
/* XXX
|
||||
gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,
|
||||
GdkPixbufSaveFunc save_func,
|
||||
gpointer user_data,
|
||||
const char *type,
|
||||
char **option_keys,
|
||||
char **option_values,
|
||||
GError **error);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_save_to_buffer(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE type, options;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &type, &options);
|
||||
|
||||
return save_to(self, NULL, RVAL2CSTR(type), options);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************/
|
||||
/* Scaling */
|
||||
static VALUE
|
||||
rg_scale(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
GdkPixbuf* dest;
|
||||
VALUE dest_width, dest_height, interp_type, ret;
|
||||
GdkInterpType type = GDK_INTERP_BILINEAR;
|
||||
|
||||
rb_scan_args(argc, argv, "21", &dest_width, &dest_height,
|
||||
&interp_type);
|
||||
|
||||
if (!NIL_P(interp_type))
|
||||
type = RVAL2GDKINTERPTYPE(interp_type);
|
||||
|
||||
dest = gdk_pixbuf_scale_simple(_SELF(self),
|
||||
NUM2INT(dest_width),
|
||||
NUM2INT(dest_height),
|
||||
type);
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_scale_bang(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
GdkInterpType type = GDK_INTERP_BILINEAR;
|
||||
|
||||
VALUE src, src_x, src_y, src_width, src_height;
|
||||
VALUE offset_x, offset_y, scale_x, scale_y, interp_type;
|
||||
|
||||
rb_scan_args(argc, argv, "91", &src, &src_x, &src_y,
|
||||
&src_width, &src_height, &offset_x, &offset_y,
|
||||
&scale_x, &scale_y, &interp_type);
|
||||
|
||||
if (!NIL_P(interp_type))
|
||||
type = RVAL2GDKINTERPTYPE(interp_type);
|
||||
|
||||
gdk_pixbuf_scale(_SELF(src), _SELF(self),
|
||||
NUM2INT(src_x), NUM2INT(src_y),
|
||||
NUM2INT(src_width), NUM2INT(src_height),
|
||||
NUM2DBL(offset_x), NUM2DBL(offset_y),
|
||||
NUM2DBL(scale_x), NUM2DBL(scale_y), type);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_composite(VALUE self, VALUE dest_width, VALUE dest_height, VALUE interp_type, VALUE overall_alpha, VALUE check_size, VALUE color1, VALUE color2)
|
||||
{
|
||||
GdkPixbuf* dest;
|
||||
VALUE ret;
|
||||
GdkInterpType type = GDK_INTERP_BILINEAR;
|
||||
|
||||
if (!NIL_P(interp_type))
|
||||
type = RVAL2GDKINTERPTYPE(interp_type);
|
||||
|
||||
dest = gdk_pixbuf_composite_color_simple(
|
||||
_SELF(self), NUM2INT(dest_width), NUM2INT(dest_height),
|
||||
type, NUM2INT(overall_alpha), NUM2INT(check_size),
|
||||
NUM2UINT(color1), NUM2UINT(color2));
|
||||
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_composite_bang(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE ret;
|
||||
VALUE args[16];
|
||||
GdkInterpType interp_type = GDK_INTERP_BILINEAR;
|
||||
|
||||
rb_scan_args(argc, argv, "97",
|
||||
&args[0], &args[1], &args[2], &args[3], &args[4],
|
||||
&args[5], &args[6], &args[7], &args[8], &args[9],
|
||||
&args[10], &args[11], &args[12], &args[13], &args[14],
|
||||
&args[15]);
|
||||
|
||||
switch (argc) {
|
||||
case 11:
|
||||
if (!NIL_P(args[9]))
|
||||
interp_type = RVAL2GDKINTERPTYPE(args[9]);
|
||||
|
||||
gdk_pixbuf_composite(_SELF(args[0]), _SELF(self),
|
||||
NUM2INT(args[1]), NUM2INT(args[2]),
|
||||
NUM2INT(args[3]), NUM2INT(args[4]),
|
||||
NUM2DBL(args[5]), NUM2DBL(args[6]),
|
||||
NUM2DBL(args[7]), NUM2DBL(args[8]),
|
||||
interp_type, NUM2INT(args[10]));
|
||||
ret = self;
|
||||
break;
|
||||
case 16:
|
||||
if (!NIL_P(args[9]))
|
||||
interp_type = RVAL2GDKINTERPTYPE(args[9]);
|
||||
|
||||
gdk_pixbuf_composite_color(_SELF(args[0]), _SELF(self),
|
||||
NUM2INT(args[1]), NUM2INT(args[2]),
|
||||
NUM2INT(args[3]), NUM2INT(args[4]),
|
||||
NUM2DBL(args[5]), NUM2DBL(args[6]),
|
||||
NUM2DBL(args[7]), NUM2DBL(args[8]),
|
||||
interp_type, NUM2INT(args[10]),
|
||||
NUM2INT(args[11]), NUM2INT(args[12]),
|
||||
NUM2INT(args[13]), NUM2UINT(args[14]),
|
||||
NUM2UINT(args[15]));
|
||||
ret = self;
|
||||
break;
|
||||
default:
|
||||
rb_raise(rb_eArgError, "Wrong number of arguments: %d", argc);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
static VALUE
|
||||
rg_rotate(VALUE self, VALUE angle)
|
||||
{
|
||||
VALUE ret;
|
||||
GdkPixbuf* dest = gdk_pixbuf_rotate_simple(_SELF(self), RVAL2GDKPIXBUFROTATION(angle));
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_flip(VALUE self, VALUE horizontal)
|
||||
{
|
||||
VALUE ret;
|
||||
GdkPixbuf* dest = gdk_pixbuf_flip(_SELF(self), RVAL2CBOOL(horizontal));
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_add_alpha(VALUE self, VALUE substitute_color, VALUE r, VALUE g, VALUE b)
|
||||
{
|
||||
VALUE ret;
|
||||
GdkPixbuf* dest = gdk_pixbuf_add_alpha(_SELF(self),
|
||||
RVAL2CBOOL(substitute_color),
|
||||
FIX2INT(r), FIX2INT(g), FIX2INT(b));
|
||||
if (dest == NULL)
|
||||
return Qnil;
|
||||
ret = GOBJ2RVAL(dest);
|
||||
g_object_unref(dest);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_copy_area(VALUE self, VALUE src_x, VALUE src_y, VALUE width, VALUE height, VALUE dest, VALUE dest_x, VALUE dest_y)
|
||||
{
|
||||
gdk_pixbuf_copy_area(_SELF(self), NUM2INT(src_x), NUM2INT(src_y),
|
||||
NUM2INT(width), NUM2INT(height),
|
||||
_SELF(dest), NUM2INT(dest_x), NUM2INT(dest_y));
|
||||
return dest;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_saturate_and_pixelate(VALUE self, VALUE staturation, VALUE pixelate)
|
||||
{
|
||||
GdkPixbuf* dest = gdk_pixbuf_copy(_SELF(self));
|
||||
gdk_pixbuf_saturate_and_pixelate(_SELF(self), dest,
|
||||
NUM2DBL(staturation), RVAL2CBOOL(pixelate));
|
||||
return GOBJ2RVAL(dest);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_fill_bang(VALUE self, VALUE pixel)
|
||||
{
|
||||
gdk_pixbuf_fill(_SELF(self), NUM2UINT(pixel));
|
||||
return self;
|
||||
}
|
||||
|
||||
/* From Module Interface */
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
static VALUE
|
||||
rg_s_formats(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return GSLIST2ARY2(gdk_pixbuf_get_formats(), GDK_TYPE_PIXBUF_FORMAT);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GDK_PIXBUF_SET_OPTION
|
||||
static VALUE
|
||||
rg_set_option(VALUE self, VALUE key, VALUE value)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_set_option(_SELF(self),
|
||||
RVAL2CSTR(key), RVAL2CSTR(value)));
|
||||
}
|
||||
#else
|
||||
static VALUE
|
||||
rg_set_option(G_GNUC_UNUSED VALUE self, G_GNUC_UNUSED VALUE key, G_GNUC_UNUSED VALUE value)
|
||||
{
|
||||
rb_warning("not supported in this version of GTK+");
|
||||
return Qfalse;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern void Init_gdk_pixbuf2(void);
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf2(void)
|
||||
{
|
||||
VALUE mGdk = rb_define_module("Gdk");
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF, "Pixbuf", mGdk);
|
||||
|
||||
id_pixdata = rb_intern("pixdata");
|
||||
|
||||
/*
|
||||
gdk_rgb_init();*/ /* initialize it anyway */
|
||||
|
||||
/*
|
||||
* Initialization and Versions
|
||||
*/
|
||||
/* Removed. This crashes Ruby/GTK on Windows + GTK+-2.4.x.
|
||||
Pointed out by Laurent.
|
||||
#ifdef HAVE_GDK_PIXBUF_VERSION
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "VERSION", CSTR2RVAL(gdk_pixbuf_version));
|
||||
#endif
|
||||
*/
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "MAJOR", INT2FIX(GDK_PIXBUF_MAJOR));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "MINOR", INT2FIX(GDK_PIXBUF_MINOR));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "MICRO", INT2FIX(GDK_PIXBUF_MICRO));
|
||||
|
||||
/*
|
||||
* The GdkPixbuf Structure
|
||||
*/
|
||||
G_REPLACE_GET_PROPERTY(RG_TARGET_NAMESPACE, "pixels", get_pixels, 0);
|
||||
RG_DEF_METHOD_OPERATOR("pixels=", set_pixels, 1);
|
||||
RG_DEF_METHOD(get_option, 1);
|
||||
|
||||
/* GdkPixbufError */
|
||||
G_DEF_ERROR(GDK_PIXBUF_ERROR, "PixbufError", mGdk, rb_eRuntimeError, GDK_TYPE_PIXBUF_ERROR);
|
||||
|
||||
/* GdkColorspace */
|
||||
G_DEF_CLASS(GDK_TYPE_COLORSPACE, "ColorSpace", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_COLORSPACE, "GDK_");
|
||||
|
||||
/* GdkPixbufAlphaMode */
|
||||
G_DEF_CLASS(GDK_TYPE_PIXBUF_ALPHA_MODE, "AlphaMode", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_PIXBUF_ALPHA_MODE, "GDK_PIXBUF_");
|
||||
|
||||
/*
|
||||
* File Loading, Image Data in Memory
|
||||
*/
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
RG_DEF_METHOD(dup, 0);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
RG_DEF_SMETHOD(get_file_info, 1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* File saving
|
||||
*/
|
||||
RG_DEF_METHOD(save, -1);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,4,0)
|
||||
RG_DEF_METHOD(save_to_buffer, -1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Scaling
|
||||
*/
|
||||
RG_DEF_METHOD(scale, -1);
|
||||
RG_DEF_METHOD_BANG(scale, -1);
|
||||
RG_DEF_METHOD(composite, 7);
|
||||
RG_DEF_METHOD_BANG(composite, -1);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
RG_DEF_METHOD(rotate, 1);
|
||||
RG_DEF_METHOD(flip, 1);
|
||||
#endif
|
||||
|
||||
/* GdkInterpType */
|
||||
G_DEF_CLASS(GDK_TYPE_INTERP_TYPE, "InterpType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_INTERP_TYPE, "GDK_");
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,6,0)
|
||||
/* GdkPixbufRotation */
|
||||
G_DEF_CLASS(GDK_TYPE_PIXBUF_ROTATION, "GdkPixbufRotation", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_PIXBUF_ROTATION, "GDK_PIXBUF_");
|
||||
#endif
|
||||
/*
|
||||
* Utilities
|
||||
*/
|
||||
RG_DEF_METHOD(add_alpha, 4);
|
||||
RG_DEF_METHOD(copy_area, 7);
|
||||
RG_DEF_METHOD(saturate_and_pixelate, 2);
|
||||
RG_DEF_METHOD_BANG(fill, 1);
|
||||
|
||||
/*
|
||||
* Module Interface
|
||||
*/
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,2,0)
|
||||
RG_DEF_SMETHOD(formats, 0);
|
||||
RG_DEF_METHOD(set_option, 2);
|
||||
#endif
|
||||
|
||||
Init_gdk_pixbuf_animation(mGdk);
|
||||
Init_gdk_pixbuf_animation_iter(mGdk);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
Init_gdk_pixbuf_simpleanim(mGdk);
|
||||
#endif
|
||||
Init_gdk_pixdata(mGdk);
|
||||
Init_gdk_pixbuf_loader(mGdk);
|
||||
Init_gdk_pixbuf_format(mGdk);
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-2004 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBGDK_PIXBUF_H__
|
||||
#define __RBGDK_PIXBUF_H__
|
||||
|
||||
#define GDK_PIXBUF_ENABLE_BACKEND
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf/gdk-pixdata.h>
|
||||
#include "rbgobject.h"
|
||||
#include "rbgdk-pixbuf2conversions.h"
|
||||
|
||||
extern GType gdk_pixbuf_format_get_type(void);
|
||||
|
||||
#define RBGDK_PIXBUF_CHECK_VERSION(major,minor,micro) \
|
||||
(GDK_PIXBUF_MAJOR > (major) || \
|
||||
(GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR > (minor)) || \
|
||||
(GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \
|
||||
GDK_PIXBUF_MICRO >= (micro)))
|
||||
|
||||
#define GDK_TYPE_PIXBUF_FORMAT (gdk_pixbuf_format_get_type())
|
||||
|
||||
#endif /* __RBGDK_PIXBUF_H__ */
|
@ -0,0 +1,42 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBGDK_PIXBUF2CONVERSIONS_H__
|
||||
#define __RBGDK_PIXBUF2CONVERSIONS_H__
|
||||
|
||||
#define RVAL2GDKPIXBUF(o) (GDK_PIXBUF(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDKPIXBUFANIMATION(o) (GDK_PIXBUF_ANIMATION(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDKPIXBUFANIMATIONITER(o) (GDK_PIXBUF_ANIMATION_ITER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDKPIXBUFLOADER(o) (GDK_PIXBUF_LOADER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDKPIXBUFSIMPLEANIM(o) (GDK_PIXBUF_SIMPLE_ANIM(RVAL2GOBJ(o)))
|
||||
|
||||
#define RVAL2GDKPIXBUFFORMAT(o) ((GdkPixbufFormat*)RVAL2BOXED(o, GDK_TYPE_PIXBUF_FORMAT))
|
||||
#define GDKPIXBUFFORMAT2RVAL(o) (BOXED2RVAL(o, GDK_TYPE_PIXBUF_FORMAT))
|
||||
#define RVAL2GDKPIXDATA(o) ((GdkPixdata*)RVAL2BOXED(o, GDK_TYPE_PIXDATA))
|
||||
#define GDKPIXDATA2RVAL(o) (BOXED2RVAL(o, GDK_TYPE_PIXDATA))
|
||||
|
||||
#define RVAL2GDKCOLORSPACE(o) (RVAL2GENUM(o, GDK_TYPE_COLORSPACE))
|
||||
#define GDKCOLORSPACE2RVAL(o) (GENUM2RVAL(o, GDK_TYPE_COLORSPACE))
|
||||
#define RVAL2GDKINTERPTYPE(o) (RVAL2GENUM(o, GDK_TYPE_INTERP_TYPE))
|
||||
#define GDKINTERPTYPE2RVAL(o) (GENUM2RVAL(o, GDK_TYPE_INTERP_TYPE))
|
||||
#define RVAL2GDKPIXBUFROTATION(o) (RVAL2GENUM(o, GDK_TYPE_PIXBUF_ROTATION))
|
||||
#define GDKPIXBUFROTATION2RVAL(o) (GENUM2RVAL(o, GDK_TYPE_PIXBUF_ROTATION))
|
||||
|
||||
#endif /* __RBGDK_PIXBUF2CONVERSIONS_H__ */
|
@ -0,0 +1,35 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBGDK_PIXBUF2PRIVATE_H__
|
||||
#define __RBGDK_PIXBUF2PRIVATE_H__
|
||||
|
||||
#include "rbgdk-pixbuf.h"
|
||||
|
||||
G_GNUC_INTERNAL void Init_gdk_pixbuf_animation(VALUE mGLib);
|
||||
G_GNUC_INTERNAL void Init_gdk_pixbuf_animation_iter(VALUE mGLib);
|
||||
G_GNUC_INTERNAL void Init_gdk_pixbuf_format(VALUE mGLib);
|
||||
G_GNUC_INTERNAL void Init_gdk_pixbuf_loader(VALUE mGLib);
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
G_GNUC_INTERNAL void Init_gdk_pixbuf_simpleanim(VALUE mGLib);
|
||||
#endif
|
||||
G_GNUC_INTERNAL void Init_gdk_pixdata(VALUE mGLib);
|
||||
|
||||
#endif /* __RBGDK_PIXBUF2PRIVATE_H__ */
|
@ -0,0 +1,93 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgdk-pixbuf2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cPixbufAnimation
|
||||
#define _SELF(s) (RVAL2GDKPIXBUFANIMATION(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE filename)
|
||||
{
|
||||
GdkPixbufAnimation* ret;
|
||||
GError* error = NULL;
|
||||
|
||||
ret = gdk_pixbuf_animation_new_from_file(RVAL2CSTR(filename), &error);
|
||||
if (ret == NULL)
|
||||
RAISE_GERROR(error);
|
||||
|
||||
G_INITIALIZE(self, ret);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(gdk_pixbuf_animation_get_width(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_height(VALUE self)
|
||||
{
|
||||
return INT2NUM(gdk_pixbuf_animation_get_height(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_iter(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE start_time_sec, start_time_usec;
|
||||
GTimeVal start_time;
|
||||
|
||||
rb_scan_args(argc, argv, "02", &start_time_sec, &start_time_usec);
|
||||
|
||||
if (NIL_P(start_time_sec))
|
||||
return GOBJ2RVAL(gdk_pixbuf_animation_get_iter(_SELF(self), NULL));
|
||||
|
||||
start_time.tv_sec = NUM2LONG(start_time_sec);
|
||||
start_time.tv_usec = NIL_P(start_time_usec) ? 0 : NUM2LONG(start_time_usec);
|
||||
|
||||
return GOBJ2RVAL(gdk_pixbuf_animation_get_iter(_SELF(self), &start_time));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_static_image_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_animation_is_static_image(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_static_image(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(gdk_pixbuf_animation_get_static_image(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf_animation(VALUE mGdk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF_ANIMATION, "PixbufAnimation", mGdk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
RG_DEF_METHOD(width, 0);
|
||||
RG_DEF_METHOD(height, 0);
|
||||
RG_DEF_METHOD(get_iter, -1);
|
||||
RG_DEF_METHOD_P(static_image, 0);
|
||||
RG_DEF_METHOD(static_image, 0);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgdk-pixbuf2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cPixbufAnimationIter
|
||||
#define _SELF(i) (RVAL2GDKPIXBUFANIMATIONITER(i))
|
||||
|
||||
static VALUE
|
||||
rg_advance(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE current_time_sec, current_time_usec;
|
||||
GTimeVal current_time;
|
||||
|
||||
rb_scan_args(argc, argv, "02", ¤t_time_sec, ¤t_time_usec);
|
||||
|
||||
if (NIL_P(current_time_sec))
|
||||
return CBOOL2RVAL(gdk_pixbuf_animation_iter_advance(_SELF(self), NULL));
|
||||
|
||||
current_time.tv_sec = NUM2LONG(current_time_sec);
|
||||
current_time.tv_usec = NIL_P(current_time_usec) ? 0 : NUM2LONG(current_time_usec);
|
||||
|
||||
return CBOOL2RVAL(gdk_pixbuf_animation_iter_advance(_SELF(self), ¤t_time));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_delay_time(VALUE self)
|
||||
{
|
||||
return INT2NUM(gdk_pixbuf_animation_iter_get_delay_time(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_on_currently_loading_frame_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(gdk_pixbuf_animation_iter_on_currently_loading_frame(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixbuf(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(gdk_pixbuf_animation_iter_get_pixbuf(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf_animation_iter(VALUE mGdk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF_ANIMATION_ITER, "PixbufAnimationIter", mGdk);
|
||||
|
||||
RG_DEF_METHOD(advance, -1);
|
||||
RG_DEF_METHOD(delay_time, 0);
|
||||
RG_DEF_METHOD_P(on_currently_loading_frame, 0);
|
||||
RG_DEF_METHOD(pixbuf, 0);
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 the ruby-gnome2 project
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgdk-pixbuf2private.h"
|
||||
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
#define RG_TARGET_NAMESPACE cPixbufSimpleAnim
|
||||
#define _SELF(s) (RVAL2GDKPIXBUFSIMPLEANIM(s))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE width, VALUE height, VALUE rate)
|
||||
{
|
||||
GdkPixbufSimpleAnim* ret = gdk_pixbuf_simple_anim_new(NUM2INT(width), NUM2INT(height), NUM2DBL(rate));
|
||||
G_INITIALIZE(self, ret);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_frame(VALUE self, VALUE pixbuf)
|
||||
{
|
||||
gdk_pixbuf_simple_anim_add_frame(_SELF(self), RVAL2GDKPIXBUF(pixbuf));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_gdk_pixbuf_simpleanim(VALUE mGdk)
|
||||
{
|
||||
#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXBUF_SIMPLE_ANIM, "PixbufSimpleAnim", mGdk);
|
||||
|
||||
RG_DEF_METHOD(initialize, 3);
|
||||
RG_DEF_METHOD(add_frame, 1);
|
||||
#endif
|
||||
}
|
213
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixdata.c
Normal file
213
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/ext/gdk_pixbuf2/rbgdk-pixdata.c
Normal file
@ -0,0 +1,213 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgdk-pixbuf2private.h"
|
||||
|
||||
#define GDK_TYPE_PIXDATA (gdk_pixdata_get_type())
|
||||
#define RG_TARGET_NAMESPACE cPixdata
|
||||
#define _SELF(s) (RVAL2GDKPIXDATA(s))
|
||||
|
||||
static ID id_pixdata;
|
||||
|
||||
/*****************************************/
|
||||
static GdkPixdata *
|
||||
gdk_pixdata_copy(const GdkPixdata* src)
|
||||
{
|
||||
GdkPixdata* data;
|
||||
g_return_val_if_fail (src != NULL, NULL);
|
||||
data = g_new(GdkPixdata, 1);
|
||||
*data = *src;
|
||||
return data;
|
||||
}
|
||||
|
||||
static GType
|
||||
gdk_pixdata_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("GdkPixdata",
|
||||
(GBoxedCopyFunc)gdk_pixdata_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/*****************************************/
|
||||
static VALUE
|
||||
rg_s_from_pixbuf(G_GNUC_UNUSED VALUE self, VALUE pixbuf, VALUE use_rle)
|
||||
{
|
||||
GdkPixdata pixdata;
|
||||
gpointer rle_data = gdk_pixdata_from_pixbuf(&pixdata, RVAL2GDKPIXBUF(pixbuf), RVAL2CBOOL(use_rle));
|
||||
VALUE ret = GDKPIXDATA2RVAL(&pixdata);
|
||||
if (use_rle){
|
||||
/* need to manage the returned value */
|
||||
rb_ivar_set(ret, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, rle_data));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_pixbuf(VALUE self, VALUE copy_pixels)
|
||||
{
|
||||
GError* error = NULL;
|
||||
GdkPixbuf* ret = gdk_pixbuf_from_pixdata(_SELF(self), RVAL2CBOOL(copy_pixels), &error);
|
||||
if (error)
|
||||
RAISE_GERROR(error);
|
||||
return GOBJ2RVAL(ret);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_serialize(VALUE self)
|
||||
{
|
||||
guint stream_length;
|
||||
guint i;
|
||||
guint8* ret = gdk_pixdata_serialize(_SELF(self), &stream_length);
|
||||
VALUE ary = rb_ary_new2(stream_length);
|
||||
for (i = 0; i < stream_length; i++) {
|
||||
rb_ary_push(ary, UINT2NUM(ret[i]));
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_deserialize(VALUE self, VALUE rbstream)
|
||||
{
|
||||
GdkPixdata pixdata;
|
||||
long n;
|
||||
guint8 *stream = RVAL2GUINT8S(rbstream, n);
|
||||
GError *error = NULL;
|
||||
|
||||
/* TODO: Should we really be creating a new array here? As far as I can
|
||||
tell, the data is copied. */
|
||||
if (!gdk_pixdata_deserialize(&pixdata, n, stream, &error))
|
||||
RAISE_GERROR(error);
|
||||
|
||||
/* need to manage the returned value */
|
||||
rb_ivar_set(self, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, stream));
|
||||
|
||||
return GDKPIXDATA2RVAL(&pixdata);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_csource(VALUE self, VALUE name, VALUE dump_type)
|
||||
{
|
||||
GString* str = gdk_pixdata_to_csource(_SELF(self), RVAL2CSTR(name), FIX2INT(dump_type));
|
||||
VALUE ret = CSTR2RVAL(str->str);
|
||||
g_string_free(str, TRUE);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* GdkPixdata */
|
||||
static VALUE
|
||||
rg_magic(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->magic);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_length(VALUE self)
|
||||
{
|
||||
gint32 length = _SELF(self)->length;
|
||||
|
||||
if(length > 0)
|
||||
length -= GDK_PIXDATA_HEADER_LENGTH;
|
||||
return INT2NUM(length);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixdata_type(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->pixdata_type);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_rowstride(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->rowstride);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->width);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_height(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->height);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixel_data(VALUE self)
|
||||
{
|
||||
gint i;
|
||||
guint8* ret = _SELF(self)->pixel_data;
|
||||
gint32 length = _SELF(self)->length - GDK_PIXDATA_HEADER_LENGTH;
|
||||
|
||||
VALUE ary = rb_ary_new2(length);
|
||||
for (i = 0; i < length; i++) {
|
||||
rb_ary_push(ary, UINT2NUM(ret[i]));
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
void
|
||||
Init_gdk_pixdata(VALUE mGdk)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXDATA, "Pixdata", mGdk);
|
||||
|
||||
id_pixdata = rb_intern("pixdata");
|
||||
|
||||
RG_DEF_SMETHOD(from_pixbuf, 2);
|
||||
RG_DEF_SMETHOD(deserialize, 1);
|
||||
RG_DEF_METHOD(to_pixbuf, 1);
|
||||
RG_DEF_METHOD(serialize, 0);
|
||||
RG_DEF_METHOD(to_csource, 2);
|
||||
RG_DEF_METHOD(magic, 0);
|
||||
RG_DEF_METHOD(length, 0);
|
||||
RG_DEF_METHOD(pixdata_type, 0);
|
||||
RG_DEF_METHOD(rowstride, 0);
|
||||
RG_DEF_METHOD(width, 0);
|
||||
RG_DEF_METHOD(height, 0);
|
||||
RG_DEF_METHOD(pixel_data, 0);
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "PIXBUF_MAGIC_NUMBER", INT2NUM(GDK_PIXBUF_MAGIC_NUMBER));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "HEADER_LENGTH", INT2NUM(GDK_PIXDATA_HEADER_LENGTH));
|
||||
|
||||
/* GdkPixdataType */
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_RGB", INT2FIX(GDK_PIXDATA_COLOR_TYPE_RGB));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_RGBA", INT2FIX(GDK_PIXDATA_COLOR_TYPE_RGBA));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_MASK", INT2FIX(GDK_PIXDATA_COLOR_TYPE_MASK));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "SAMPLE_WIDTH_8", INT2FIX(GDK_PIXDATA_SAMPLE_WIDTH_8));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "SAMPLE_WIDTH_MASK", INT2FIX(GDK_PIXDATA_SAMPLE_WIDTH_MASK));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_RAW", INT2FIX(GDK_PIXDATA_ENCODING_RAW));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_RLE", INT2FIX(GDK_PIXDATA_ENCODING_RLE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_MASK", INT2FIX(GDK_PIXDATA_ENCODING_MASK));
|
||||
|
||||
/* GdkPixdataDumpType */
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_PIXDATA_STREAM", INT2FIX(GDK_PIXDATA_DUMP_PIXDATA_STREAM));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_PIXDATA_STRUCT", INT2FIX(GDK_PIXDATA_DUMP_PIXDATA_STRUCT));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_MACROS", INT2FIX(GDK_PIXDATA_DUMP_MACROS));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_GTYPES", INT2FIX(GDK_PIXDATA_DUMP_GTYPES));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_CTYPES", INT2FIX(GDK_PIXDATA_DUMP_CTYPES));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_STATIC", INT2FIX(GDK_PIXDATA_DUMP_STATIC));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_CONST", INT2FIX(GDK_PIXDATA_DUMP_CONST));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_RLE_DECODER", INT2FIX(GDK_PIXDATA_DUMP_RLE_DECODER));
|
||||
}
|
49
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/extconf.rb
Normal file
49
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/extconf.rb
Normal file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'pathname'
|
||||
require 'mkmf'
|
||||
require 'rbconfig'
|
||||
require 'fileutils'
|
||||
|
||||
package = "gdk_pixbuf2"
|
||||
|
||||
base_dir = Pathname(__FILE__).dirname.expand_path
|
||||
ext_dir = base_dir + "ext" + package
|
||||
mkmf_gnome2_dir = base_dir + 'lib'
|
||||
|
||||
ruby = File.join(RbConfig::CONFIG['bindir'],
|
||||
RbConfig::CONFIG['ruby_install_name'] +
|
||||
RbConfig::CONFIG["EXEEXT"])
|
||||
|
||||
build_dir = Pathname("ext") + package
|
||||
FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
|
||||
extconf_rb_path = ext_dir + "extconf.rb"
|
||||
system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
|
||||
|
||||
create_makefile(package)
|
||||
FileUtils.mv("Makefile", "Makefile.lib")
|
||||
|
||||
File.open("Makefile", "w") do |makefile|
|
||||
makefile.puts(<<-EOM)
|
||||
all:
|
||||
(cd ext/#{package} && $(MAKE))
|
||||
$(MAKE) -f Makefile.lib
|
||||
|
||||
install:
|
||||
(cd ext/#{package} && $(MAKE) install)
|
||||
$(MAKE) -f Makefile.lib install
|
||||
|
||||
site-install:
|
||||
(cd ext/#{package} && $(MAKE) site-install)
|
||||
$(MAKE) -f Makefile.lib site-install
|
||||
|
||||
clean:
|
||||
(cd ext/#{package} && $(MAKE) clean)
|
||||
$(MAKE) -f Makefile.lib clean
|
||||
|
||||
distclean:
|
||||
(cd ext/#{package} && $(MAKE) distclean)
|
||||
$(MAKE) -f Makefile.lib distclean
|
||||
@rm -f Makefile.lib
|
||||
EOM
|
||||
end
|
52
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/lib/gdk_pixbuf2.rb
Normal file
52
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/lib/gdk_pixbuf2.rb
Normal file
@ -0,0 +1,52 @@
|
||||
require 'glib2'
|
||||
|
||||
base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
|
||||
vendor_dir = base_dir + "vendor" + "local"
|
||||
vendor_bin_dir = vendor_dir + "bin"
|
||||
GLib.prepend_dll_path(vendor_bin_dir)
|
||||
begin
|
||||
major, minor, _ = RUBY_VERSION.split(/\./)
|
||||
require "#{major}.#{minor}/gdk_pixbuf2.so"
|
||||
rescue LoadError
|
||||
require "gdk_pixbuf2.so"
|
||||
end
|
||||
|
||||
if vendor_dir.exist?
|
||||
begin
|
||||
require "gobject-introspection"
|
||||
vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
|
||||
GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
|
||||
module Gdk
|
||||
class PixbufLoader
|
||||
def self.open(type = nil, mime_type = false)
|
||||
loader = Gdk::PixbufLoader.new(type, mime_type)
|
||||
if block_given?
|
||||
begin
|
||||
yield(loader)
|
||||
ensure
|
||||
loader.close
|
||||
end
|
||||
end
|
||||
loader
|
||||
end
|
||||
end
|
||||
class Pixbuf
|
||||
LOG_DOMAIN = "GdkPixbuf"
|
||||
|
||||
class << self
|
||||
def cairo_available?
|
||||
if Gdk.respond_to?(:cairo_available?)
|
||||
Gdk.cairo_available?
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
GLib::Log.set_log_domain(Gdk::Pixbuf::LOG_DOMAIN)
|
38
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/anim.rb
Normal file
38
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/anim.rb
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
anim.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: anim.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
w = Gtk::Window.new
|
||||
w.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
box = Gtk::VBox.new
|
||||
src = Gdk::PixbufAnimation.new("floppybuddy.gif")
|
||||
box.pack_start(Gtk::Image.new(src))
|
||||
p src.width
|
||||
p src.height
|
||||
p src.static_image?
|
||||
|
||||
static_image = src.static_image
|
||||
box.pack_start(Gtk::Image.new(static_image))
|
||||
|
||||
iter = src.get_iter
|
||||
p iter.advance
|
||||
p iter.delay_time
|
||||
p iter.on_currently_loading_frame?
|
||||
|
||||
box.pack_start(Gtk::Image.new(iter.pixbuf))
|
||||
|
||||
w.add(box)
|
||||
w.show_all
|
||||
|
||||
Gtk.main
|
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/composite.rb
Normal file
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/composite.rb
Normal file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
composite.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: composite.rb,v 1.6 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
src = Gdk::Pixbuf.new(filename)
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
|
||||
dst = src.composite(100, 100, Gdk::Pixbuf::INTERP_HYPER,
|
||||
200, 32, 0xFF0000, 0x00FF00)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
|
||||
dst.composite!(src, 0, 0, 200, 200, 0, 0, 1.8, 1.8,
|
||||
Gdk::Pixbuf::INTERP_HYPER, 200)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
|
||||
dst.composite!(src, 10, 10, 180, 180, 15, 15, 3, 2,
|
||||
Gdk::Pixbuf::INTERP_BILINEAR, 200, 100, 100, 16,
|
||||
0x999999, 0xdddddd)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
window = Gtk::Window.new.add(vbox)
|
||||
window.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
window.show_all
|
||||
|
||||
Gtk.main
|
47
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/flip.rb
Normal file
47
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/flip.rb
Normal file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
flip.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2005,2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: flip.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if str = Gtk.check_version(2, 6, 0)
|
||||
puts "This sample requires GTK+ 2.6.0 or later"
|
||||
puts str
|
||||
exit
|
||||
end
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
|
||||
src = Gdk::Pixbuf.new(filename)
|
||||
vbox.add(Gtk::Image.new(src))
|
||||
|
||||
# Horizontal
|
||||
dst = src.flip(true)
|
||||
vbox.add(Gtk::Image.new(dst))
|
||||
|
||||
# Vertical
|
||||
dst2 = src.flip(false)
|
||||
vbox.add(Gtk::Image.new(dst2))
|
||||
|
||||
window = Gtk::Window.new
|
||||
window.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
window.add(vbox).show_all
|
||||
|
||||
Gtk.main
|
||||
|
BIN
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/floppybuddy.gif
Normal file
BIN
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/floppybuddy.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
39
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/format.rb
Normal file
39
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/format.rb
Normal file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
format.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: format.rb,v 1.4 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
if str = Gtk.check_version(2, 2, 0)
|
||||
puts "This sample requires GTK+ 2.2.0 or later"
|
||||
puts str
|
||||
exit
|
||||
end
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
puts fileinfo = Gdk::Pixbuf.get_file_info(filename)[0]
|
||||
puts "name = #{fileinfo.name}"
|
||||
puts "description = #{fileinfo.description}"
|
||||
puts "mime_types = #{fileinfo.mime_types.inspect}"
|
||||
puts "extensions = #{fileinfo.extensions.inspect}"
|
||||
puts "writable = #{fileinfo.writable?}"
|
||||
puts "domain = #{fileinfo.domain}"
|
||||
puts "signature = #{fileinfo.signature.inspect}"
|
||||
|
||||
if Gtk.check_version?(2, 6, 0)
|
||||
puts "Since 2.6 --- "
|
||||
puts "scalable = #{fileinfo.scalable?}"
|
||||
puts "disabled = #{fileinfo.disabled?}"
|
||||
puts "license = #{fileinfo.license.inspect}"
|
||||
end
|
BIN
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/gnome-foot.png
Normal file
BIN
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/gnome-foot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
37
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/inline.rb
Normal file
37
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/inline.rb
Normal file
@ -0,0 +1,37 @@
|
||||
=begin
|
||||
inline.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: inline.rb,v 1.2 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
pixbuf = Gdk::Pixbuf.new("gnome-foot.png")
|
||||
|
||||
#pixbuf = Gdk::Pixbuf.new(ARGV[0])
|
||||
|
||||
# Create Gdk::Pixbuf from pixels(String).
|
||||
pixbuf2 = Gdk::Pixbuf.new(pixbuf.pixels, Gdk::Pixbuf::COLORSPACE_RGB,
|
||||
true, pixbuf.bits_per_sample,
|
||||
pixbuf.width, pixbuf.height,
|
||||
pixbuf.rowstride)
|
||||
|
||||
# Create Gdk::Pixbuf from an array of numbers
|
||||
# which created by Gdk::Pixdata#serialize.
|
||||
pixdata = Gdk::Pixdata.from_pixbuf(pixbuf, false)
|
||||
data = pixdata.serialize
|
||||
pixbuf3 = Gdk::Pixbuf.new(data, false)
|
||||
|
||||
# Create Gdk::Pixbuf from Gdk::Pixbuf.
|
||||
pixbuf4 = Gdk::Pixbuf.new(pixbuf, 10, 10, 20, 20)
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
vbox.add(Gtk::Image.new(pixbuf))
|
||||
vbox.add(Gtk::Image.new(pixbuf2))
|
||||
vbox.add(Gtk::Image.new(pixbuf3))
|
||||
vbox.add(Gtk::Image.new(pixbuf4))
|
||||
Gtk::Window.new.add(vbox).show_all
|
||||
Gtk.main
|
20
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/loader.rb
Normal file
20
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/loader.rb
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
loader.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2003,2006: Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: loader.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
require 'gtk2'
|
||||
|
||||
loader = Gdk::PixbufLoader.new
|
||||
File.open("gnome-foot.png","rb") { |f|
|
||||
loader.last_write(f.read)
|
||||
}
|
||||
pixbuf = loader.pixbuf
|
||||
|
||||
Gtk::Window.new.add(Gtk::Image.new(pixbuf)).show_all
|
||||
|
||||
Gtk.main
|
39
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/pixdata.rb
Normal file
39
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/pixdata.rb
Normal file
@ -0,0 +1,39 @@
|
||||
=begin
|
||||
pixdata.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: pixdata.rb,v 1.2 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
require 'gtk2'
|
||||
|
||||
r_xpm = [
|
||||
"10 10 3 1",
|
||||
" c None",
|
||||
". c #FE0B0B",
|
||||
"+ c #FFFFFF",
|
||||
"+.......++",
|
||||
"+.. ..+",
|
||||
"+.. ..+",
|
||||
"+.. ...+",
|
||||
"+.......++",
|
||||
"+.....++++",
|
||||
"+..++..+++",
|
||||
"+..++...++",
|
||||
"+..+++...+",
|
||||
"+..++++..+"]
|
||||
|
||||
pixbuf = Gdk::Pixbuf.new(r_xpm)
|
||||
pixdata = Gdk::Pixdata.from_pixbuf(pixbuf, false)
|
||||
|
||||
#Serialize data
|
||||
p data = pixdata.serialize
|
||||
|
||||
#Deserialize data
|
||||
pixdata = Gdk::Pixdata.deserialize(data)
|
||||
pixbuf2 = pixdata.to_pixbuf(false)
|
||||
|
||||
dst = pixbuf2.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
|
||||
Gtk::Window.new.add(Gtk::Image.new(dst)).show_all
|
||||
Gtk.main
|
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/rotate.rb
Normal file
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/rotate.rb
Normal file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
rotate.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2005,2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: rotate.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if str = Gtk.check_version(2, 6, 0)
|
||||
puts "This sample requires GTK+ 2.6.0 or later"
|
||||
puts str
|
||||
exit
|
||||
end
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
|
||||
src = Gdk::Pixbuf.new(filename)
|
||||
vbox.add(Gtk::Image.new(src))
|
||||
|
||||
dst = src.rotate(Gdk::Pixbuf::ROTATE_COUNTERCLOCKWISE)
|
||||
vbox.add(Gtk::Image.new(dst))
|
||||
|
||||
dst2 = src.rotate(Gdk::Pixbuf::ROTATE_UPSIDEDOWN)
|
||||
vbox.add(Gtk::Image.new(dst2))
|
||||
|
||||
window = Gtk::Window.new
|
||||
window.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
window.add(vbox).show_all
|
||||
|
||||
Gtk.main
|
||||
|
25
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/save.rb
Normal file
25
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/save.rb
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
save.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: save.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gdk_pixbuf2'
|
||||
|
||||
from = ARGV[0]
|
||||
to = ARGV[1]
|
||||
if ! from or ! to
|
||||
puts "ruby #{$0} from_file to_file"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
src = Gdk::Pixbuf.new(from)
|
||||
|
||||
dst = src.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
|
||||
# This doesn't work ....
|
||||
#dst.save(to, "jpeg", {:quality => 100})
|
||||
dst.save(to, "png")
|
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/scale.rb
Normal file
45
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/scale.rb
Normal file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
scale.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: scale.rb,v 1.10 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
|
||||
src = Gdk::Pixbuf.new(filename)
|
||||
vbox.add(Gtk::Image.new(src))
|
||||
|
||||
dst = src.scale(200, 200, Gdk::Pixbuf::INTERP_NEAREST)
|
||||
dst.scale!(src, 60, 60, 90, 90, -50, 50, 6, 3)
|
||||
vbox.add(Gtk::Image.new(dst))
|
||||
|
||||
dst2 = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
|
||||
dst2.scale!(src, 0, 0, 100, 100, 0, 0, 1.5, 1.5)
|
||||
|
||||
vbox.add(Gtk::Image.new(dst2))
|
||||
|
||||
dst3 = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
|
||||
dst3.scale!(src, 0, 0, 200, 200, 0, 0, 5, 3, Gdk::Pixbuf::INTERP_HYPER)
|
||||
vbox.add(Gtk::Image.new(dst3))
|
||||
|
||||
window = Gtk::Window.new
|
||||
window.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
window.add(vbox).show_all
|
||||
|
||||
Gtk.main
|
||||
|
34
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/simpleanim.rb
Normal file
34
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/simpleanim.rb
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
simpleanim.rb - Ruby/GdkPixbuf sample script for Gdk::PixbufSimpleAnim.
|
||||
|
||||
Inspired by http://mail.gnome.org/archives/gtk-perl-list/2005-September/msg00110.html
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: simpleanim.rb,v 1.2 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
$stdout.sync = true
|
||||
|
||||
simple_anim = Gdk::PixbufSimpleAnim.new(64, 64, 24)
|
||||
store_pixels = []
|
||||
|
||||
print 'generating frames'
|
||||
for red in 0 .. 126
|
||||
store_pixels << pixels = ([ 4*(63-red).abs, 0, 0 ] * (64*64)).pack('C*')
|
||||
pixbuf = Gdk::Pixbuf.new(pixels, Gdk::Pixbuf::COLORSPACE_RGB, false, 8, 64, 64, 64*3)
|
||||
simple_anim.add_frame(pixbuf)
|
||||
print '.'
|
||||
end
|
||||
puts 'done'
|
||||
|
||||
window = Gtk::Window.new
|
||||
image = Gtk::Image.new(simple_anim)
|
||||
window.add(image)
|
||||
window.show_all
|
||||
window.signal_connect('destroy') { Gtk.main_quit }
|
||||
Gtk.main
|
44
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/utils.rb
Normal file
44
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/utils.rb
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
utils.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: utils.rb,v 1.4 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
filename = ARGV[0]
|
||||
unless filename
|
||||
puts "ruby #{$0} filename"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
src = Gdk::Pixbuf.new(filename)
|
||||
|
||||
vbox = Gtk::VBox.new
|
||||
|
||||
dst = src.add_alpha(true, 0, 0, 0)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8,
|
||||
src.width + 20, src.height + 30)
|
||||
src.copy_area(0, 0, src.width / 2, src.height / 2, dst, 10, 20)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
dst = src.saturate_and_pixelate(0.3, true)
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
dst = src.fill!(0xff000099) #RGBA
|
||||
vbox.pack_start(Gtk::Image.new(dst))
|
||||
|
||||
w = Gtk::Window.new.add(vbox)
|
||||
w.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
w.show_all
|
||||
|
||||
Gtk.main
|
40
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/xpm.rb
Normal file
40
lib/ruby-gtk2-2.0.2/gdk_pixbuf2/sample/xpm.rb
Normal file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env ruby
|
||||
=begin
|
||||
xpm.rb - Ruby/GdkPixbuf sample script.
|
||||
|
||||
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
||||
This program is licenced under the same licence as Ruby-GNOME2.
|
||||
|
||||
$Id: xpm.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
|
||||
=end
|
||||
|
||||
require 'gtk2'
|
||||
|
||||
r_xpm = [
|
||||
"10 10 3 1",
|
||||
" c None",
|
||||
". c #FE0B0B",
|
||||
"+ c #FFFFFF",
|
||||
"+.......++",
|
||||
"+.. ..+",
|
||||
"+.. ..+",
|
||||
"+.. ...+",
|
||||
"+.......++",
|
||||
"+.....++++",
|
||||
"+..++..+++",
|
||||
"+..++...++",
|
||||
"+..+++...+",
|
||||
"+..++++..+"]
|
||||
|
||||
w = Gtk::Window.new
|
||||
w.signal_connect('delete-event') do
|
||||
Gtk.main_quit
|
||||
end
|
||||
|
||||
src = Gdk::Pixbuf.new(r_xpm)
|
||||
dst = src.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
|
||||
|
||||
w.add(Gtk::Image.new(dst))
|
||||
w.show_all
|
||||
|
||||
Gtk.main
|
34
lib/ruby-gtk2-2.0.2/gio2/README
Normal file
34
lib/ruby-gtk2-2.0.2/gio2/README
Normal file
@ -0,0 +1,34 @@
|
||||
Ruby/GIO2
|
||||
=========
|
||||
|
||||
|
||||
Ruby/GIO2 is a Ruby binding of gio-2.0.x.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Ruby: http://www.ruby-lang.org/
|
||||
GIO: http://library.gnome.org/devel/gio/stable
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
0. install Ruby and GLib.
|
||||
1. ruby extconf.rb
|
||||
2. make
|
||||
3. su
|
||||
4. make install
|
||||
|
||||
Copying
|
||||
-------
|
||||
|
||||
Copyright (c) 2008-2010 Ruby-GNOME2 Project Team
|
||||
|
||||
This program is free software.
|
||||
You can distribute/modify this program under the terms of
|
||||
the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
||||
|
||||
Project Website
|
||||
---------------
|
||||
|
||||
http://ruby-gnome2.sourceforge.jp/
|
14
lib/ruby-gtk2-2.0.2/gio2/Rakefile
Normal file
14
lib/ruby-gtk2-2.0.2/gio2/Rakefile
Normal file
@ -0,0 +1,14 @@
|
||||
# -*- ruby -*-
|
||||
|
||||
$LOAD_PATH.unshift("./../glib2/lib")
|
||||
require 'gnome2-raketask'
|
||||
|
||||
package = GNOME2Package.new do |_package|
|
||||
_package.summary = "Ruby/GIO2 is a Ruby binding of gio-2.x."
|
||||
_package.description = "Ruby/GIO2 is a Ruby binding of gio-2.x."
|
||||
_package.dependency.gem.runtime = ["glib2"]
|
||||
_package.win32.packages = []
|
||||
_package.win32.dependencies = []
|
||||
end
|
||||
package.define_tasks
|
||||
|
27
lib/ruby-gtk2-2.0.2/gio2/TODO
Normal file
27
lib/ruby-gtk2-2.0.2/gio2/TODO
Normal file
@ -0,0 +1,27 @@
|
||||
Unimplementable?
|
||||
----------------
|
||||
|
||||
GIOExtension
|
||||
|
||||
Other
|
||||
-----
|
||||
|
||||
When we use GOBJ2RVAL on properties of objects, should we call G_CHILD_ADD?
|
||||
|
||||
g_unix_socket_address_new_abstract is deprecated
|
||||
|
||||
Need to document GLib::Socket
|
||||
|
||||
Glib::FileAttribute should be an object so that we can use | on them
|
||||
|
||||
GLib::InputStream#read_all can read bytes /and/ return error at the same time
|
||||
|
||||
GLib::OutputStream#write_all can write bytes /and/ return error at the same
|
||||
time
|
||||
|
||||
GConverterFlags
|
||||
|
||||
Remove implementation of methods that only fetch or set properties (and thus
|
||||
are automatically generated anyway)
|
||||
|
||||
Update to 2.26
|
11
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/depend
Normal file
11
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/depend
Normal file
@ -0,0 +1,11 @@
|
||||
install-so: install-headers
|
||||
install-headers:
|
||||
$(INSTALL_DATA) $(srcdir)/rbgio2.h $(RUBYARCHDIR)
|
||||
$(INSTALL_DATA) $(srcdir)/rbgio2conversions.h $(RUBYARCHDIR)
|
||||
|
||||
install: install-pc
|
||||
install-pc:
|
||||
if test -n "$(pkgconfigdir)"; then \
|
||||
$(MAKEDIRS) $(pkgconfigdir); \
|
||||
$(INSTALL_DATA) ruby-gio2.pc $(pkgconfigdir); \
|
||||
fi
|
67
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/extconf.rb
Normal file
67
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/extconf.rb
Normal file
@ -0,0 +1,67 @@
|
||||
=begin
|
||||
extconf.rb for Ruby/GIO extention library
|
||||
=end
|
||||
|
||||
require 'pathname'
|
||||
|
||||
base_dir = Pathname(__FILE__).dirname.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 = "gio2"
|
||||
package_id = "gio-2.0"
|
||||
|
||||
begin
|
||||
require 'mkmf-gnome2'
|
||||
rescue LoadError
|
||||
require 'rubygems'
|
||||
gem 'glib2'
|
||||
require 'mkmf-gnome2'
|
||||
end
|
||||
|
||||
ruby_header = 'ruby.h'
|
||||
have_func 'rb_exec_recursive', ruby_header
|
||||
have_func 'rb_errinfo', ruby_header
|
||||
|
||||
["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
|
||||
|
||||
win32 = setup_win32(module_name, base_dir)
|
||||
|
||||
defines = '-DRUBY_GIO2_COMPILATION'
|
||||
|
||||
PKGConfig.have_package(package_id) or exit 1
|
||||
unless win32
|
||||
PKGConfig.have_package('gio-unix-2.0') and defines += ' -DHAVE_GIO_UNIX'
|
||||
end
|
||||
PKGConfig.have_package('gobject-2.0') or exit 1
|
||||
|
||||
create_pkg_config_file("Ruby/GIO2", package_id)
|
||||
|
||||
$defs << defines
|
||||
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
|
31
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.c
Normal file
31
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgio2private.h"
|
||||
|
||||
void Init_gio2(void);
|
||||
|
||||
void
|
||||
Init_gio2(void)
|
||||
{
|
||||
Init_util();
|
||||
Init_gio();
|
||||
}
|
2
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.def
Normal file
2
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.def
Normal file
@ -0,0 +1,2 @@
|
||||
EXPORTS
|
||||
Init_gio2
|
30
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.h
Normal file
30
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/gio2.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __GIO2_H__
|
||||
#define __GIO2_H__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning "<gio2.h> has been deprecated. Use <rbgio2.h> instead."
|
||||
#endif
|
||||
|
||||
#include "rbgio2.h"
|
||||
|
||||
#endif /* __GIO2_H__ */
|
133
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio.c
Normal file
133
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio.c
Normal file
@ -0,0 +1,133 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbgio2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mGio
|
||||
|
||||
static VALUE
|
||||
rg_s_has_unix_p(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
#ifdef HAVE_GIO_UNIX
|
||||
return Qtrue;
|
||||
#else
|
||||
return Qfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
Init_gio(void)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = rb_define_module("Gio");
|
||||
G_DEF_CLASS(G_TYPE_FILESYSTEM_PREVIEW_TYPE, "FilesystemPreviewType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CLASS(G_TYPE_DATA_STREAM_BYTE_ORDER, "DataStreamByteOrder", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CLASS(G_TYPE_DATA_STREAM_NEWLINE_TYPE, "DataStreamNewlineType", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CLASS(G_TYPE_ASK_PASSWORD_FLAGS, "AskPasswordFlags", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CLASS(G_TYPE_PASSWORD_SAVE, "PasswordSave", RG_TARGET_NAMESPACE);
|
||||
|
||||
RG_DEF_SMETHOD_P(has_unix, 0);
|
||||
|
||||
Init_gappinfo(RG_TARGET_NAMESPACE);
|
||||
Init_gapplaunchcontext(RG_TARGET_NAMESPACE);
|
||||
Init_gasyncinitable(RG_TARGET_NAMESPACE);
|
||||
Init_gasyncresult(RG_TARGET_NAMESPACE);
|
||||
Init_gbufferedinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gbufferedoutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gcancellable(RG_TARGET_NAMESPACE);
|
||||
Init_gcharsetconverter(RG_TARGET_NAMESPACE);
|
||||
Init_gcontenttype(RG_TARGET_NAMESPACE);
|
||||
Init_gconverter(RG_TARGET_NAMESPACE);
|
||||
Init_gconverterinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gconverteroutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gdatainputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gdesktopappinfo(RG_TARGET_NAMESPACE);
|
||||
Init_gdataoutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gdrive(RG_TARGET_NAMESPACE);
|
||||
Init_gemblem(RG_TARGET_NAMESPACE);
|
||||
Init_gemblemedicon(RG_TARGET_NAMESPACE);
|
||||
Init_gfile(RG_TARGET_NAMESPACE);
|
||||
Init_gfileattribute(RG_TARGET_NAMESPACE);
|
||||
Init_gfileattributeinfo(RG_TARGET_NAMESPACE);
|
||||
Init_gfileattributematcher(RG_TARGET_NAMESPACE);
|
||||
Init_gfiledescriptorbased(RG_TARGET_NAMESPACE);
|
||||
Init_gfileenumerator(RG_TARGET_NAMESPACE);
|
||||
Init_gfileicon(RG_TARGET_NAMESPACE);
|
||||
Init_gfileinfo(RG_TARGET_NAMESPACE);
|
||||
Init_gfileinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gfileiostream(RG_TARGET_NAMESPACE);
|
||||
Init_gfilemonitor(RG_TARGET_NAMESPACE);
|
||||
Init_gfilenamecompleter(RG_TARGET_NAMESPACE);
|
||||
Init_gfileoutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gfilterinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gfilteroutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gicon(RG_TARGET_NAMESPACE);
|
||||
Init_ginetaddress(RG_TARGET_NAMESPACE);
|
||||
Init_ginetsocketaddress(RG_TARGET_NAMESPACE);
|
||||
Init_ginitable(RG_TARGET_NAMESPACE);
|
||||
Init_ginputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gioerror(RG_TARGET_NAMESPACE);
|
||||
Init_giomodule(RG_TARGET_NAMESPACE);
|
||||
Init_giomodules(RG_TARGET_NAMESPACE);
|
||||
Init_gioscheduler(RG_TARGET_NAMESPACE);
|
||||
Init_gioschedulerjob(RG_TARGET_NAMESPACE);
|
||||
Init_giostream(RG_TARGET_NAMESPACE);
|
||||
Init_gloadableicon(RG_TARGET_NAMESPACE);
|
||||
Init_gmemoryinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gmemoryoutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gmount(RG_TARGET_NAMESPACE);
|
||||
Init_gmountoperation(RG_TARGET_NAMESPACE);
|
||||
Init_gnetworkaddress(RG_TARGET_NAMESPACE);
|
||||
Init_gnetworkservice(RG_TARGET_NAMESPACE);
|
||||
Init_goutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gresolver(RG_TARGET_NAMESPACE);
|
||||
Init_gseekable(RG_TARGET_NAMESPACE);
|
||||
Init_gsimpleasyncresult(RG_TARGET_NAMESPACE);
|
||||
Init_gsocket(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketaddress(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketclient(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketconnectable(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketaddressenumerator(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketconnection(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketconnectionfactory(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketcontrolmessage(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketlistener(RG_TARGET_NAMESPACE);
|
||||
Init_gsocketservice(RG_TARGET_NAMESPACE);
|
||||
Init_gsrvtarget(RG_TARGET_NAMESPACE);
|
||||
Init_gtcpconnection(RG_TARGET_NAMESPACE);
|
||||
Init_gthemedicon(RG_TARGET_NAMESPACE);
|
||||
Init_gthreadedsocketservice(RG_TARGET_NAMESPACE);
|
||||
Init_gtlscertificate(RG_TARGET_NAMESPACE);
|
||||
Init_gunixconnection(RG_TARGET_NAMESPACE);
|
||||
Init_gunixfdlist(RG_TARGET_NAMESPACE);
|
||||
Init_gunixfdmessage(RG_TARGET_NAMESPACE);
|
||||
Init_gunixinputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gunixmount(RG_TARGET_NAMESPACE);
|
||||
Init_gunixmounts(RG_TARGET_NAMESPACE);
|
||||
Init_gunixmountpoint(RG_TARGET_NAMESPACE);
|
||||
Init_gunixmountpoints(RG_TARGET_NAMESPACE);
|
||||
Init_gunixmountmonitor(RG_TARGET_NAMESPACE);
|
||||
Init_gunixoutputstream(RG_TARGET_NAMESPACE);
|
||||
Init_gunixsocketaddress(RG_TARGET_NAMESPACE);
|
||||
Init_gvfs(RG_TARGET_NAMESPACE);
|
||||
Init_gvolume(RG_TARGET_NAMESPACE);
|
||||
Init_gvolumemonitor(RG_TARGET_NAMESPACE);
|
||||
Init_gzlibcompressor(RG_TARGET_NAMESPACE);
|
||||
Init_gzlibdecompressor(RG_TARGET_NAMESPACE);
|
||||
}
|
158
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2.h
Normal file
158
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2.h
Normal file
@ -0,0 +1,158 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 __RBGIO2_H__
|
||||
#define __RBGIO2_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "rbgio2conversions.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Block Handling */
|
||||
#define SAVE_BLOCK(block) G_STMT_START { \
|
||||
if (!NIL_P(block)) \
|
||||
G_CHILD_ADD(mGLib, (block)); \
|
||||
} G_STMT_END
|
||||
|
||||
#define USE_BLOCK(data) \
|
||||
rbgio_child_remove_and_return(mGLib, (VALUE)(data))
|
||||
|
||||
#define USE_BLOCK_AND_SAVE(data) ((VALUE)data)
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 34, 0)
|
||||
#define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type())
|
||||
GType g_file_attribute_matcher_get_type(void);
|
||||
|
||||
#define G_TYPE_FILE_ATTRIBUTE_INFO_LIST (g_file_attribute_info_list_get_type())
|
||||
GType g_file_attribute_info_list_get_type(void);
|
||||
#endif
|
||||
|
||||
#define G_TYPE_FILE_ATTRIBUTE_INFO (g_file_attribute_info_get_type())
|
||||
GType g_file_attribute_info_get_type(void);
|
||||
|
||||
/* Conversion Macros */
|
||||
#define RVAL2TYPE_WITH_DEFAULT(value, type, default_value) \
|
||||
(NIL_P(value) ? (default_value) : type(value))
|
||||
|
||||
#define RVAL2ATTRIBUTESDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), RVAL2CSTR, "standard::*")
|
||||
|
||||
#define RVAL2GDRIVESTARTFLAGSDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GDRIVESTARTFLAGS, \
|
||||
G_DRIVE_START_NONE)
|
||||
|
||||
#define RVAL2GMOUNTMOUNTFLAGSDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GMOUNTMOUNTFLAGS, \
|
||||
G_MOUNT_MOUNT_NONE)
|
||||
|
||||
#define RVAL2GMOUNTUNMOUNTFLAGSDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GMOUNTUNMOUNTFLAGS, \
|
||||
G_MOUNT_UNMOUNT_NONE)
|
||||
|
||||
#define RVAL2GSOCKETPROTOCOLDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GSOCKETPROTOCOL, \
|
||||
G_SOCKET_PROTOCOL_DEFAULT)
|
||||
|
||||
#define GTIMEVAL2RVAL(value) rb_time_new((value)->tv_sec, (value)->tv_usec)
|
||||
|
||||
#define RVAL2GZLIBCOMPRESSORFORMATDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GZLIBCOMPRESSORFORMAT, \
|
||||
G_ZLIB_COMPRESSOR_FORMAT_ZLIB)
|
||||
|
||||
#define RVAL2IOPRIORITYDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), NUM2INT, G_PRIORITY_DEFAULT)
|
||||
|
||||
/* Integer Type Conversion Macros */
|
||||
#define FD2RVAL(value) INT2FIX(value)
|
||||
#define RVAL2FD(value) FIX2INT(value)
|
||||
#define RVAL2FDS(value, n) RVAL2GINTS(value, n)
|
||||
|
||||
#define GINT2RVAL(value) INT2NUM(value)
|
||||
#define RVAL2GINT(value) NUM2INT(value)
|
||||
|
||||
#define GINT162RVAL(value) INT2FIX(value)
|
||||
#define RVAL2GINT16(value) FIX2INT(value)
|
||||
|
||||
#define GINT322RVAL(value) INT2NUM(value)
|
||||
#define RVAL2GINT32(value) NUM2INT(value)
|
||||
|
||||
#define GINT642RVAL(value) rbglib_int64_to_num(value)
|
||||
#define RVAL2GINT64(value) rbglib_num_to_int64(value)
|
||||
|
||||
#define GSIZE2RVAL(value) ULONG2NUM(value)
|
||||
#define RVAL2GSIZE(value) NUM2ULONG(value)
|
||||
|
||||
#define GLONG2RVAL(value) LONG2NUM(value)
|
||||
#define RVAL2GLONG(value) NUM2LONG(value)
|
||||
|
||||
#define GOFFSET2RVAL(value) rbglib_int64_to_num(value)
|
||||
#define RVAL2GOFFSET(value) rbglib_num_to_int64(value)
|
||||
|
||||
#define GSSIZE2RVAL(value) LONG2NUM(value)
|
||||
#define RVAL2GSSIZE(value) NUM2LONG(value)
|
||||
|
||||
/* TODO: Should we be zeroing out bits? */
|
||||
#define GUCHAR2RVAL(value) INT2FIX(value)
|
||||
#define RVAL2GUCHAR(value) FIX2INT(value)
|
||||
|
||||
#define GUINT2RVAL(value) UINT2NUM(value)
|
||||
#define RVAL2GUINT(value) NUM2UINT(value)
|
||||
|
||||
/* TODO: Should we be zeroing out bits? */
|
||||
#define GUINT162RVAL(value) INT2FIX(value)
|
||||
#define RVAL2GUINT16(value) FIX2INT(value)
|
||||
|
||||
#define GUINT322RVAL(value) UINT2NUM(value)
|
||||
#define RVAL2GUINT32(value) NUM2UINT(value)
|
||||
|
||||
#define GUINT642RVAL(value) rbglib_uint64_to_num(value)
|
||||
#define RVAL2GUINT64(value) rbglib_num_to_uint64(value)
|
||||
|
||||
#define GULONG2RVAL(value) ULONG2NUM(value)
|
||||
#define RVAL2GULONG(value) NUM2ULONG(value)
|
||||
|
||||
VALUE rbgio_define_domain_error(VALUE module,
|
||||
const char *name,
|
||||
GQuark domain,
|
||||
const char *enum_name,
|
||||
VALUE parent);
|
||||
VALUE rbgio_define_error(VALUE module,
|
||||
const char *name,
|
||||
gint code,
|
||||
VALUE domain_error);
|
||||
NORETURN(void rbgio_raise_error(GError *error));
|
||||
GObject *rbgio_ginitable_new(GType type, VALUE parameters, VALUE cancellable);
|
||||
void rbgio_gasyncinitable_new_async(GType type,
|
||||
VALUE parameters,
|
||||
VALUE io_priority,
|
||||
VALUE cancellable,
|
||||
VALUE block);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __RBGIO2_H__ */
|
154
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2conversions.h
Normal file
154
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2conversions.h
Normal file
@ -0,0 +1,154 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBGIO2CONVERSIONS_H__
|
||||
#define __RBGIO2CONVERSIONS_H__
|
||||
|
||||
#define RVAL2GAPPINFO(o) (G_APP_INFO(RVAL2GOBJ(o)))
|
||||
#define RVAL2GAPPLAUNCHCONTEXT(o) (G_APP_LAUNCH_CONTEXT(RVAL2GOBJ(o)))
|
||||
#define RVAL2GASYNCINITABLE(o) (G_ASYNC_INITABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GASYNCRESULT(o) (G_ASYNC_RESULT(RVAL2GOBJ(o)))
|
||||
#define RVAL2GBUFFEREDINPUTSTREAM(o) (G_BUFFERED_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GBUFFEREDOUTPUTSTREAM(o) (G_BUFFERED_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GCANCELLABLE(o) (G_CANCELLABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GCHARSETCONVERTER(o) (G_CHARSET_CONVERTER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GCONVERTER(o) (G_CONVERTER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GCONVERTERINPUTSTREAM(o) (G_CONVERTER_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GCONVERTEROUTPUTSTREAM(o) (G_CONVERTER_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDATAINPUTSTREAM(o) (G_DATA_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDATAOUTPUTSTREAM(o) (G_DATA_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDESKTOPAPPINFO(o) (G_DESKTOP_APP_INFO(RVAL2GOBJ(o)))
|
||||
#define RVAL2GDRIVE(o) (G_DRIVE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GEMBLEM(o) (G_EMBLEM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GEMBLEMEDICON(o) (G_EMBLEMED_ICON(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILE(o) (G_FILE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEDESCRIPTORBASED(o) (G_FILE_DESCRIPTOR_BASED(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEENUMERATOR(o) (G_FILE_ENUMERATOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEICON(o) (G_FILE_ICON(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEINFO(o) (G_FILE_INFO(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEINPUTSTREAM(o) (G_FILE_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEIOSTREAM(o) (G_FILE_IO_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEMONITOR(o) (G_FILE_MONITOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILENAMECOMPLETER(o) (G_FILENAME_COMPLETER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GFILEOUTPUTSTREAM(o) (G_FILE_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GICON(o) (G_ICON(RVAL2GOBJ(o)))
|
||||
#define RVAL2GINETADDRESS(o) (G_INET_ADDRESS(RVAL2GOBJ(o)))
|
||||
#define RVAL2GINITABLE(o) (G_INITABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GINPUTSTREAM(o) (G_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GIOMODULE(o) (G_IO_MODULE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GIOSTREAM(o) (G_IO_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GLOADABLEICON(o) (G_LOADABLE_ICON(RVAL2GOBJ(o)))
|
||||
#define RVAL2GMEMORYINPUTSTREAM(o) (G_MEMORY_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GMOUNT(o) (G_MOUNT(RVAL2GOBJ(o)))
|
||||
#define RVAL2GMOUNTOPERATION(o) (G_MOUNT_OPERATION(RVAL2GOBJ(o)))
|
||||
#define RVAL2GNETWORKADDRESS(o) (G_NETWORK_ADDRESS(RVAL2GOBJ(o)))
|
||||
#define RVAL2GNETWORKSERVICE(o) (G_NETWORK_SERVICE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GOUTPUTSTREAM(o) (G_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GPERMISSION(o) (G_PERMISSION(RVAL2GOBJ(o)))
|
||||
#define RVAL2GRESOLVER(o) (G_RESOLVER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSEEKABLE(o) (G_SEEKABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSIMPLEASYNCRESULT(o) (G_SIMPLE_ASYNC_RESULT(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKET(o) (G_SOCKET(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETADDRESS(o) (G_SOCKET_ADDRESS(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETADDRESSENUMERATOR(o) (G_SOCKET_ADDRESS_ENUMERATOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETCLIENT(o) (G_SOCKET_CLIENT(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETCONNECTABLE(o) (G_SOCKET_CONNECTABLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETCONNECTION(o) (G_SOCKET_CONNECTION(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETCONTROLMESSAGE(o) (G_SOCKET_CONTROL_MESSAGE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETLISTENER(o) (G_SOCKET_LISTENER(RVAL2GOBJ(o)))
|
||||
#define RVAL2GSOCKETSERVICE(o) (G_SOCKET_SERVICE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GTHEMEDICON(o) (G_THEMED_ICON(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXCONNECTION(o) (G_UNIX_CONNECTION(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXFDLIST(o) (G_UNIX_FD_LIST(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXFDMESSAGE(o) (G_UNIX_FD_MESSAGE(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXINPUTSTREAM(o) (G_UNIX_INPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXMOUNTMONITOR(o) (G_UNIX_MOUNT_MONITOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXOUTPUTSTREAM(o) (G_UNIX_OUTPUT_STREAM(RVAL2GOBJ(o)))
|
||||
#define RVAL2GUNIXSOCKETADDRESS(o) (G_UNIX_SOCKET_ADDRESS(RVAL2GOBJ(o)))
|
||||
#define RVAL2GVFS(o) (G_VFS(RVAL2GOBJ(o)))
|
||||
#define RVAL2GVOLUME(o) (G_VOLUME(RVAL2GOBJ(o)))
|
||||
#define RVAL2GVOLUMEMONITOR(o) (G_VOLUME_MONITOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GZLIBCOMPRESSOR(o) (G_ZLIB_COMPRESSOR(RVAL2GOBJ(o)))
|
||||
#define RVAL2GZLIBDECOMPRESSOR(o) (G_ZLIB_DECOMPRESSOR(RVAL2GOBJ(o)))
|
||||
|
||||
#define RVAL2GFILEATTRIBUTEINFO(o) ((GFileAttributeInfo*)RVAL2BOXED(o, G_TYPE_FILE_ATTRIBUTE_INFO))
|
||||
#define GFILEATTRIBUTEINFO2RVAL(o) (BOXED2RVAL(o, G_TYPE_FILE_ATTRIBUTE_INFO))
|
||||
#define RVAL2GFILEATTRIBUTEINFOLIST(o) ((GFileAttributeInfoList*)RVAL2BOXED(o, G_TYPE_FILE_ATTRIBUTE_INFO_LIST))
|
||||
#define GFILEATTRIBUTEINFOLIST2RVAL(o) (BOXED2RVAL(o, G_TYPE_FILE_ATTRIBUTE_INFO_LIST))
|
||||
#define RVAL2GFILEATTRIBUTEMATCHER(o) ((GFileAttributeMatcher*)RVAL2BOXED(o, G_TYPE_FILE_ATTRIBUTE_MATCHER))
|
||||
#define GFILEATTRIBUTEMATCHER2RVAL(o) (BOXED2RVAL(o, G_TYPE_FILE_ATTRIBUTE_MATCHER))
|
||||
#define RVAL2GSRVTARGET(o) ((GSrvTarget*)RVAL2BOXED(o, G_TYPE_SRV_TARGET))
|
||||
#define GSRVTARGET2RVAL(o) (BOXED2RVAL(o, G_TYPE_SRV_TARGET))
|
||||
|
||||
#define RVAL2GDATASTREAMBYTEORDER(o) (RVAL2GENUM(o, G_TYPE_DATA_STREAM_BYTE_ORDER))
|
||||
#define GDATASTREAMBYTEORDER2RVAL(o) (GENUM2RVAL(o, G_TYPE_DATA_STREAM_BYTE_ORDER))
|
||||
#define RVAL2GDATASTREAMNEWLINETYPE(o) (RVAL2GENUM(o, G_TYPE_DATA_STREAM_NEWLINE_TYPE))
|
||||
#define GDATASTREAMNEWLINETYPE2RVAL(o) (GENUM2RVAL(o, G_TYPE_DATA_STREAM_NEWLINE_TYPE))
|
||||
#define RVAL2GDRIVESTARTFLAGS(o) (RVAL2GENUM(o, G_TYPE_DRIVE_START_FLAGS))
|
||||
#define GDRIVESTARTFLAGS2RVAL(o) (GENUM2RVAL(o, G_TYPE_DRIVE_START_FLAGS))
|
||||
#define RVAL2GDRIVESTARTSTOPTYPE(o) (RVAL2GENUM(o, G_TYPE_DRIVE_START_STOP_TYPE))
|
||||
#define GDRIVESTARTSTOPTYPE2RVAL(o) (GENUM2RVAL(o, G_TYPE_DRIVE_START_STOP_TYPE))
|
||||
#define RVAL2GEMBLEMORIGIN(o) (RVAL2GENUM(o, G_TYPE_EMBLEM_ORIGIN))
|
||||
#define GEMBLEMORIGIN2RVAL(o) (GENUM2RVAL(o, G_TYPE_EMBLEM_ORIGIN))
|
||||
#define RVAL2GFILEATTRIBUTESTATUS(o) (RVAL2GENUM(o, G_TYPE_FILE_ATTRIBUTE_STATUS))
|
||||
#define GFILEATTRIBUTESTATUS2RVAL(o) (GENUM2RVAL(o, G_TYPE_FILE_ATTRIBUTE_STATUS))
|
||||
#define RVAL2GFILEATTRIBUTETYPE(o) (RVAL2GENUM(o, G_TYPE_FILE_ATTRIBUTE_TYPE))
|
||||
#define GFILEATTRIBUTETYPE2RVAL(o) (GENUM2RVAL(o, G_TYPE_FILE_ATTRIBUTE_TYPE))
|
||||
#define RVAL2GFILETYPE(o) (RVAL2GENUM(o, G_TYPE_FILE_TYPE))
|
||||
#define GFILETYPE2RVAL(o) (GENUM2RVAL(o, G_TYPE_FILE_TYPE))
|
||||
#define RVAL2GMOUNTMOUNTFLAGS(o) (RVAL2GENUM(o, G_TYPE_MOUNT_MOUNT_FLAGS))
|
||||
#define GMOUNTMOUNTFLAGS2RVAL(o) (GENUM2RVAL(o, G_TYPE_MOUNT_MOUNT_FLAGS))
|
||||
#define RVAL2GMOUNTOPERATIONRESULT(o) (RVAL2GENUM(o, G_TYPE_MOUNT_OPERATION_RESULT))
|
||||
#define GMOUNTOPERATIONRESULT2RVAL(o) (GENUM2RVAL(o, G_TYPE_MOUNT_OPERATION_RESULT))
|
||||
#define RVAL2GPASSWORDSAVE(o) (RVAL2GENUM(o, G_TYPE_PASSWORD_SAVE))
|
||||
#define GPASSWORDSAVE2RVAL(o) (GENUM2RVAL(o, G_TYPE_PASSWORD_SAVE))
|
||||
#define RVAL2GSOCKETFAMILY(o) (RVAL2GENUM(o, G_TYPE_SOCKET_FAMILY))
|
||||
#define GSOCKETFAMILY2RVAL(o) (GENUM2RVAL(o, G_TYPE_SOCKET_FAMILY))
|
||||
#define RVAL2GSOCKETPROTOCOL(o) (RVAL2GENUM(o, G_TYPE_SOCKET_PROTOCOL))
|
||||
#define GSOCKETPROTOCOL2RVAL(o) (GENUM2RVAL(o, G_TYPE_SOCKET_PROTOCOL))
|
||||
#define RVAL2GSOCKETTYPE(o) (RVAL2GENUM(o, G_TYPE_SOCKET_TYPE))
|
||||
#define GSOCKETTYPE2RVAL(o) (GENUM2RVAL(o, G_TYPE_SOCKET_TYPE))
|
||||
|
||||
#define RVAL2GAPPINFOCREATEFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_APP_INFO_CREATE_FLAGS))
|
||||
#define GAPPINFOCREATEFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_APP_INFO_CREATE_FLAGS))
|
||||
#define RVAL2GAPPLICATIONFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_APPLICATION_FLAGS))
|
||||
#define GAPPLICATIONFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_APPLICATION_FLAGS))
|
||||
#define RVAL2GCONVERTERFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_CONVERTER_FLAGS))
|
||||
#define GCONVERTERFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_CONVERTER_FLAGS))
|
||||
#define RVAL2GCONVERTERRESULT(o) (RVAL2GFLAGS(o, G_TYPE_CONVERTER_RESULT))
|
||||
#define GCONVERTERRESULT2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_CONVERTER_RESULT))
|
||||
#define RVAL2GFILEATTRIBUTEINFOFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS))
|
||||
#define GFILEATTRIBUTEINFOFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS))
|
||||
#define RVAL2GFILECOPYFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_FILE_COPY_FLAGS))
|
||||
#define GFILECOPYFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_FILE_COPY_FLAGS))
|
||||
#define RVAL2GFILECREATEFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_FILE_CREATE_FLAGS))
|
||||
#define GFILECREATEFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_FILE_CREATE_FLAGS))
|
||||
#define RVAL2GFILEMONITORFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_FILE_MONITOR_FLAGS))
|
||||
#define GFILEMONITORFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_FILE_MONITOR_FLAGS))
|
||||
#define RVAL2GFILEQUERYINFOFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_FILE_QUERY_INFO_FLAGS))
|
||||
#define GFILEQUERYINFOFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_FILE_QUERY_INFO_FLAGS))
|
||||
#define RVAL2GMOUNTUNMOUNTFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_MOUNT_UNMOUNT_FLAGS))
|
||||
#define GMOUNTUNMOUNTFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_MOUNT_UNMOUNT_FLAGS))
|
||||
#define RVAL2GOUTPUTSTREAMSPLICEFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS))
|
||||
#define GOUTPUTSTREAMSPLICEFLAGS2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS))
|
||||
#define RVAL2GZLIBCOMPRESSORFORMAT(o) (RVAL2GFLAGS(o, G_TYPE_ZLIB_COMPRESSOR_FORMAT))
|
||||
#define GZLIBCOMPRESSORFORMAT2RVAL(o) (GFLAGS2RVAL(o, G_TYPE_ZLIB_COMPRESSOR_FORMAT))
|
||||
|
||||
#endif /* __RBGIO2CONVERSIONS_H__ */
|
148
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2private.h
Normal file
148
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgio2private.h
Normal file
@ -0,0 +1,148 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __RBGIO2PRIVATE_H__
|
||||
#define __RBGIO2PRIVATE_H__
|
||||
|
||||
#include <ruby.h>
|
||||
|
||||
#include <rbglib.h>
|
||||
#include <rbgobject.h>
|
||||
#include "rbgio2.h"
|
||||
|
||||
#define CSTR2RVAL_TAINTED(string, length) \
|
||||
rbgio_cstr_to_rval_tainted((string), (length))
|
||||
#define CSTR2RVAL_TAINTED_FREE(string, length) \
|
||||
rbgio_cstr_to_rval_tainted_free((string), (length))
|
||||
|
||||
#define GLIST2ARY_UNREF_FREE(list) rbgio_glist_to_ary_unref_free(list)
|
||||
|
||||
#define GFDS2ARY(fds) rbgio_fds_to_ary(fds)
|
||||
#define GFDS2ARY_FREE(fds) rbgio_fds_to_ary_free(fds)
|
||||
|
||||
#define GFILEARY2GLIST(ary) rbgio_gfile_ary_to_glist(ary)
|
||||
#define GFILEARY2GLIST_ACCEPT_NIL(ary) rbgio_gfile_ary_to_glist_accept_nil(ary)
|
||||
|
||||
G_GNUC_INTERNAL VALUE rbgio_cstr_to_rval_tainted(const char *string,
|
||||
gsize length);
|
||||
G_GNUC_INTERNAL VALUE rbgio_cstr_to_rval_tainted_free(char *string,
|
||||
gsize length);
|
||||
G_GNUC_INTERNAL VALUE rbgio_glist_to_ary_unref_free(GList *list);
|
||||
G_GNUC_INTERNAL VALUE rbgio_fds_to_ary(const gint *fds);
|
||||
G_GNUC_INTERNAL VALUE rbgio_fds_to_ary_free(gint *fds);
|
||||
G_GNUC_INTERNAL GList *rbgio_gfile_ary_to_glist(VALUE ary);
|
||||
G_GNUC_INTERNAL GList *rbgio_gfile_ary_to_glist_accept_nil(VALUE ary);
|
||||
G_GNUC_INTERNAL void rbgio_rval_to_gtimeval(VALUE value, GTimeVal *time);
|
||||
G_GNUC_INTERNAL void rbgio_async_ready_callback(GObject *source,
|
||||
GAsyncResult *result,
|
||||
gpointer data);
|
||||
G_GNUC_INTERNAL VALUE rbgio_child_remove_and_return(VALUE parent, VALUE child);
|
||||
|
||||
G_GNUC_INTERNAL void Init_gio(void);
|
||||
G_GNUC_INTERNAL void Init_gappinfo(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gapplaunchcontext(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gasyncinitable(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gasyncresult(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gbufferedinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gbufferedoutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gcancellable(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gcharsetconverter(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gcontenttype(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gconverter(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gconverterinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gconverteroutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gdatainputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gdataoutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gdesktopappinfo(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gdrive(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gemblem(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gemblemedicon(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfile(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileattribute(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileattributeinfo(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_fileattributeinfolist(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileattributematcher(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfiledescriptorbased(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileenumerator(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileicon(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileinfo(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileiostream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfilemonitor(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfilenamecompleter(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfileoutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfilterinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gfilteroutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gicon(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_ginetaddress(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_ginetsocketaddress(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_ginitable(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_ginputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gioerror(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_giomodule(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_giomodules(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gioscheduler(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gioschedulerjob(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_giostream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gloadableicon(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gmemoryinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gmemoryoutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gmount(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gmountoperation(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gnetworkaddress(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gnetworkservice(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_goutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gresolver(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gseekable(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsimpleasyncresult(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocket(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketaddress(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketclient(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketconnectable(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketaddressenumerator(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketconnection(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketconnectionfactory(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketcontrolmessage(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketlistener(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsocketservice(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gsrvtarget(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gtcpconnection(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gthreadedsocketservice(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gthemedicon(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gtlscertificate(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixconnection(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixfdlist(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixfdmessage(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixinputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixmount(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixmounts(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixmountpoint(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixmountpoints(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixmountmonitor(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixoutputstream(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gunixsocketaddress(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gvfs(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gvolume(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gvolumemonitor(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gzlibcompressor(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_gzlibdecompressor(VALUE mGio);
|
||||
G_GNUC_INTERNAL void Init_util(void);
|
||||
|
||||
#endif /* __RBGIO2PRIVATE_H__ */
|
317
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioappinfo.c
Normal file
317
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioappinfo.c
Normal file
@ -0,0 +1,317 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgio2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mAppInfo
|
||||
#define _SELF(value) RVAL2GAPPINFO(value)
|
||||
|
||||
#define RVAL2GAPPINFOCREATEFLAGSDEFAULT(value) \
|
||||
RVAL2TYPE_WITH_DEFAULT((value), \
|
||||
RVAL2GAPPINFOCREATEFLAGS, \
|
||||
G_APP_INFO_CREATE_NONE)
|
||||
|
||||
static VALUE
|
||||
rg_s_create_from_commandline(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
VALUE commandline, application_name, flags;
|
||||
GError *error = NULL;
|
||||
GAppInfo *info;
|
||||
|
||||
rb_scan_args(argc, argv, "12", &commandline, &application_name, &flags);
|
||||
info = g_app_info_create_from_commandline(RVAL2CSTR(commandline),
|
||||
RVAL2CSTR_ACCEPT_NIL(application_name),
|
||||
RVAL2GAPPINFOCREATEFLAGSDEFAULT(flags),
|
||||
&error);
|
||||
if (info == NULL)
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return GOBJ2RVAL_UNREF(info);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_reset_type_associations(VALUE self, VALUE content_type)
|
||||
{
|
||||
g_app_info_reset_type_associations(RVAL2CSTR(content_type));
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_get_all_for_type(G_GNUC_UNUSED VALUE self, VALUE content_type)
|
||||
{
|
||||
return GLIST2ARY_FREE(g_app_info_get_all_for_type(RVAL2CSTR(content_type)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_all(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE content_type;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &content_type);
|
||||
if (!NIL_P(content_type))
|
||||
return rg_s_get_all_for_type(self, content_type);
|
||||
|
||||
return GLIST2ARY_FREE(g_app_info_get_all());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_get_default_for_type(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
VALUE content_type, must_support_uris;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &content_type, &must_support_uris);
|
||||
|
||||
return GOBJ2RVAL_UNREF(g_app_info_get_default_for_type(RVAL2CSTR(content_type),
|
||||
RVAL2CBOOL(must_support_uris)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_get_default_for_uri_scheme(G_GNUC_UNUSED VALUE self, VALUE uri_scheme)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(g_app_info_get_default_for_uri_scheme(RVAL2CSTR(uri_scheme)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_launch_default_for_uri(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE uri, launch_context;
|
||||
GError *error;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &uri, &launch_context);
|
||||
if (!g_app_info_launch_default_for_uri(RVAL2CSTR(uri),
|
||||
RVAL2GAPPLAUNCHCONTEXT(launch_context),
|
||||
&error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_dup(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(g_app_info_dup(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_equal_p(VALUE self, VALUE other)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_equal(_SELF(self), _SELF(other)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_id(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_id(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_name(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_name(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_display_name(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_display_name(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_description(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_description(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_executable(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_executable(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_commandline(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(g_app_info_get_commandline(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_icon(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(g_app_info_get_icon(_SELF(self)));
|
||||
}
|
||||
|
||||
typedef gboolean (*LaunchMethod)(GAppInfo *,
|
||||
GList *,
|
||||
GAppLaunchContext *,
|
||||
GError **);
|
||||
|
||||
static VALUE
|
||||
launch_method(LaunchMethod method, int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE rbfiles, rblaunch_context;
|
||||
GList *files;
|
||||
GAppLaunchContext *launch_context;
|
||||
GError *error = NULL;
|
||||
gboolean launched;
|
||||
|
||||
rb_scan_args(argc, argv, "02", &rbfiles, &rblaunch_context);
|
||||
launch_context = RVAL2GAPPLAUNCHCONTEXT(rblaunch_context);
|
||||
files = GFILEARY2GLIST_ACCEPT_NIL(rbfiles);
|
||||
launched = method(_SELF(self), files, launch_context, &error);
|
||||
g_list_free(files);
|
||||
|
||||
if (!launched)
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_launch(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
return launch_method(g_app_info_launch, argc, argv, self);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_supports_files_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_supports_files(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_supports_uris_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_supports_uris(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_launch_uris(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
return launch_method(g_app_info_launch_uris, argc, argv, self);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_should_show_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_should_show(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_can_delete_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_can_delete(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_delete(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_delete(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_as_default_for_type(VALUE self, VALUE value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_app_info_set_as_default_for_type(_SELF(self), RVAL2CSTR(value), &error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_as_default_for_extension(VALUE self, VALUE value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_app_info_set_as_default_for_extension(_SELF(self), RVAL2CSTR(value), &error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_add_supports_type(VALUE self, VALUE value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_app_info_add_supports_type(_SELF(self), RVAL2CSTR(value), &error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_remove_supports_type(VALUE self, VALUE value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_app_info_remove_supports_type(_SELF(self), RVAL2CSTR(value), &error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_can_remove_supports_type_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(g_app_info_can_remove_supports_type(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_gappinfo(VALUE mGio)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(G_TYPE_APP_INFO, "AppInfo", mGio);
|
||||
|
||||
G_DEF_CLASS(G_TYPE_APP_INFO_CREATE_FLAGS, "CreateFlags", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_APP_INFO_CREATE_FLAGS, "G_APP_INFO_");
|
||||
|
||||
RG_DEF_SMETHOD(create_from_commandline, -1);
|
||||
RG_DEF_SMETHOD(reset_type_associations, -1);
|
||||
RG_DEF_SMETHOD(all, 0);
|
||||
RG_DEF_SMETHOD(get_all_for_type, 1);
|
||||
RG_DEF_SMETHOD(get_default_for_type, -1);
|
||||
RG_DEF_SMETHOD(get_default_for_uri_scheme, 1);
|
||||
RG_DEF_SMETHOD(launch_default_for_uri, 0);
|
||||
|
||||
RG_DEF_METHOD(dup, 0);
|
||||
RG_DEF_METHOD_P(equal, 1);
|
||||
RG_DEF_METHOD(id, 0);
|
||||
RG_DEF_METHOD(name, 0);
|
||||
RG_DEF_METHOD(display_name, 0);
|
||||
RG_DEF_METHOD(description, 0);
|
||||
RG_DEF_METHOD(executable, 0);
|
||||
RG_DEF_METHOD(commandline, 0);
|
||||
RG_DEF_METHOD(icon, 0);
|
||||
RG_DEF_METHOD(launch, -1);
|
||||
RG_DEF_METHOD_P(supports_files, 0);
|
||||
RG_DEF_METHOD_P(supports_uris, 0);
|
||||
RG_DEF_METHOD(launch_uris, -1);
|
||||
RG_DEF_METHOD_P(should_show, 0);
|
||||
RG_DEF_METHOD_P(can_delete, 0);
|
||||
RG_DEF_METHOD(delete, 0);
|
||||
RG_DEF_METHOD(set_as_default_for_type, 1);
|
||||
RG_DEF_METHOD(set_as_default_for_extension, 1);
|
||||
RG_DEF_METHOD(add_supports_type, 1);
|
||||
RG_DEF_METHOD_P(can_remove_supports_type, 1);
|
||||
RG_DEF_METHOD(remove_supports_type, 1);
|
||||
}
|
81
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioapplaunchcontext.c
Normal file
81
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioapplaunchcontext.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgio2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cAppLaunchContext
|
||||
#define _SELF(value) RVAL2GAPPLAUNCHCONTEXT(value)
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, g_app_launch_context_new());
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
typedef char *(*GetMethod)(GAppLaunchContext *, GAppInfo *, GList *);
|
||||
|
||||
static VALUE
|
||||
get_value_by(GetMethod method, int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE info, rbfiles;
|
||||
GList *files;
|
||||
char *value;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &info, &rbfiles);
|
||||
files = GFILEARY2GLIST_ACCEPT_NIL(rbfiles);
|
||||
value = method(_SELF(self), RVAL2GAPPINFO(info), files);
|
||||
g_list_free(files);
|
||||
|
||||
return CSTR2RVAL_FREE(value);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_display(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
return get_value_by(g_app_launch_context_get_display, argc, argv, self);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_startup_notify_id(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
return get_value_by(g_app_launch_context_get_startup_notify_id, argc, argv, self);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_launch_failed(VALUE self, VALUE sn_id)
|
||||
{
|
||||
g_app_launch_context_launch_failed(_SELF(self), RVAL2CSTR(sn_id));
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_gapplaunchcontext(VALUE mGio)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_APP_LAUNCH_CONTEXT, "AppLaunchContext", mGio);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(get_display, -1);
|
||||
RG_DEF_METHOD(get_startup_notify_id, -1);
|
||||
RG_DEF_METHOD(launch_failed, 1);
|
||||
}
|
246
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncinitable.c
Normal file
246
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncinitable.c
Normal file
@ -0,0 +1,246 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgio2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mAsyncInitable
|
||||
#define _SELF(value) RVAL2GASYNCINITABLE(value)
|
||||
|
||||
static VALUE
|
||||
rg_init_async(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE rbio_priority, rbcancellable, block;
|
||||
int io_priority;
|
||||
GCancellable *cancellable;
|
||||
|
||||
rb_scan_args(argc, argv, "02&", &rbio_priority, &rbcancellable, &block);
|
||||
io_priority = RVAL2IOPRIORITYDEFAULT(rbio_priority);
|
||||
cancellable = RVAL2GCANCELLABLE(rbcancellable);
|
||||
SAVE_BLOCK(block);
|
||||
g_async_initable_init_async(_SELF(self),
|
||||
io_priority,
|
||||
cancellable,
|
||||
rbgio_async_ready_callback,
|
||||
(gpointer)block);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_init_finish(VALUE self, VALUE result)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_async_initable_init_finish(_SELF(self),
|
||||
RVAL2GASYNCRESULT(result),
|
||||
&error))
|
||||
rbgio_raise_error(error);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
/* NOTE: We don't implement g_async_initable_new_async. */
|
||||
|
||||
/* NOTE: We don't implement g_async_initable_new_valist_async. */
|
||||
|
||||
struct rbgio_gasyncinitable_new_async_data {
|
||||
GObjectClass *gclass;
|
||||
int io_priority;
|
||||
GCancellable *cancellable;
|
||||
VALUE block;
|
||||
VALUE rbparameters;
|
||||
guint index;
|
||||
guint n_parameters;
|
||||
GParameter *parameters;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rbgio_gasyncinitiable_new_async_parameters_initialize(VALUE key_value,
|
||||
struct rbgio_gasyncinitable_new_async_data *data)
|
||||
{
|
||||
VALUE key, value;
|
||||
GParamSpec *spec;
|
||||
|
||||
if (data->index >= data->n_parameters)
|
||||
rb_raise(rb_eArgError,
|
||||
"too many parameters (%d >= %d)",
|
||||
data->index, data->n_parameters);
|
||||
|
||||
key = rb_ary_entry(key_value, 0);
|
||||
value = rb_ary_entry(key_value, 1);
|
||||
|
||||
data->parameters[data->index].name = SYMBOL_P(key) ?
|
||||
rb_id2name(SYM2ID(key)) :
|
||||
StringValuePtr(key);
|
||||
spec = g_object_class_find_property(data->gclass,
|
||||
data->parameters[data->index].name);
|
||||
if (spec == NULL)
|
||||
rb_raise(rb_eArgError,
|
||||
"%s: no such property",
|
||||
data->parameters[data->index].name);
|
||||
g_value_init(&(data->parameters[data->index].value),
|
||||
G_PARAM_SPEC_VALUE_TYPE(spec));
|
||||
rbgobj_rvalue_to_gvalue(value, &(data->parameters[data->index].value));
|
||||
|
||||
data->index++;
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rbgio_gasyncinitable_new_async_body(struct rbgio_gasyncinitable_new_async_data *data)
|
||||
{
|
||||
rb_iterate(rb_each,
|
||||
data->rbparameters,
|
||||
rbgio_gasyncinitiable_new_async_parameters_initialize,
|
||||
(VALUE)data);
|
||||
|
||||
SAVE_BLOCK(data->block);
|
||||
|
||||
g_async_initable_newv_async(G_TYPE_FROM_CLASS(data->gclass),
|
||||
data->n_parameters,
|
||||
data->parameters,
|
||||
data->io_priority,
|
||||
data->cancellable,
|
||||
rbgio_async_ready_callback,
|
||||
(gpointer)data->block);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rbgio_gasyncinitable_new_async_ensure(struct rbgio_gasyncinitable_new_async_data *data)
|
||||
{
|
||||
guint i;
|
||||
|
||||
g_type_class_unref(data->gclass);
|
||||
for (i = 0; i < data->n_parameters; i++)
|
||||
if (G_IS_VALUE(&data->parameters[i].value))
|
||||
g_value_unset(&data->parameters[i].value);
|
||||
|
||||
g_free(data->parameters);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
rbgio_gasyncinitable_new_async(GType type,
|
||||
VALUE parameters,
|
||||
VALUE io_priority,
|
||||
VALUE cancellable,
|
||||
VALUE block)
|
||||
{
|
||||
static ID s_id_length;
|
||||
struct rbgio_gasyncinitable_new_async_data data;
|
||||
|
||||
if (s_id_length == 0)
|
||||
s_id_length = rb_intern("length");
|
||||
|
||||
if (!g_type_is_a(type, G_TYPE_OBJECT))
|
||||
rb_raise(rb_eArgError,
|
||||
"%s is not a descendant of GObject",
|
||||
g_type_name(type));
|
||||
|
||||
if (NIL_P(parameters)) {
|
||||
SAVE_BLOCK(block);
|
||||
g_async_initable_newv_async(type,
|
||||
0,
|
||||
NULL,
|
||||
RVAL2IOPRIORITYDEFAULT(io_priority),
|
||||
RVAL2GCANCELLABLE(cancellable),
|
||||
rbgio_async_ready_callback,
|
||||
(gpointer)block);
|
||||
|
||||
return;
|
||||
} else {
|
||||
parameters = rb_convert_type(parameters,
|
||||
T_HASH,
|
||||
"Hash",
|
||||
"to_hash");
|
||||
}
|
||||
|
||||
data.gclass = G_OBJECT_CLASS(g_type_class_ref(type));
|
||||
data.io_priority = RVAL2IOPRIORITYDEFAULT(io_priority);
|
||||
data.cancellable = RVAL2GCANCELLABLE(cancellable);
|
||||
data.block = block;
|
||||
data.rbparameters = parameters;
|
||||
data.index = 0;
|
||||
data.n_parameters = RVAL2GUINT(rb_funcall(parameters, s_id_length, 0));
|
||||
data.parameters = g_new(GParameter, data.n_parameters);
|
||||
|
||||
rb_ensure(rbgio_gasyncinitable_new_async_body, (VALUE)&data,
|
||||
rbgio_gasyncinitable_new_async_ensure, (VALUE)&data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
const RGObjClassInfo* info;
|
||||
VALUE io_priority, cancellable, parameters, block;
|
||||
|
||||
rb_scan_args(argc, argv, "03&", &io_priority, &cancellable, ¶meters, &block);
|
||||
|
||||
info = CLASS2CINFO(self);
|
||||
if (info->klass != self)
|
||||
rb_raise(rb_eTypeError,
|
||||
"%s: class not registered with GLib",
|
||||
rb_class2name(self));
|
||||
|
||||
rbgio_gasyncinitable_new_async(info->gtype,
|
||||
parameters,
|
||||
io_priority,
|
||||
cancellable,
|
||||
block);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize_finish(VALUE self, VALUE result)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GObject *object;
|
||||
VALUE rbobject;
|
||||
|
||||
object = g_async_initable_new_finish(_SELF(self),
|
||||
RVAL2GASYNCRESULT(result),
|
||||
&error);
|
||||
if (object == NULL)
|
||||
rbgio_raise_error(error);
|
||||
|
||||
rbobject = GOBJ2RVAL(object);
|
||||
g_object_unref(object);
|
||||
|
||||
return rbobject;
|
||||
}
|
||||
|
||||
void
|
||||
Init_gasyncinitable(VALUE mGio)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(G_TYPE_ASYNC_INITABLE, "AsyncInitable", mGio);
|
||||
|
||||
RG_DEF_METHOD(init_async, -1);
|
||||
RG_DEF_METHOD(init_finish, 1);
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
RG_DEF_METHOD(initialize_finish, 1);
|
||||
}
|
41
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncresult.c
Normal file
41
lib/ruby-gtk2-2.0.2/gio2/ext/gio2/rbgioasyncresult.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbgio2private.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mAsyncResult
|
||||
#define _SELF(value) RVAL2GASYNCRESULT(value)
|
||||
|
||||
/* NOTE: g_async_result_get_user_data isn't of any use from Ruby. */
|
||||
|
||||
static VALUE
|
||||
rg_source_object(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(g_async_result_get_source_object(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_gasyncresult(VALUE mGio)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(G_TYPE_ASYNC_RESULT, "AsyncResult", mGio);
|
||||
|
||||
RG_DEF_METHOD(source_object, 0);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user