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:
12
lib/ruby-gtk2-2.0.2/pango/ext/pango/depend
Normal file
12
lib/ruby-gtk2-2.0.2/pango/ext/pango/depend
Normal file
@ -0,0 +1,12 @@
|
||||
install-so: install-headers
|
||||
install-headers:
|
||||
$(INSTALL_DATA) $(srcdir)/rbpango.h $(RUBYARCHDIR)
|
||||
$(INSTALL_DATA) $(srcdir)/rbpangoconversions.h $(RUBYARCHDIR)
|
||||
$(INSTALL_DATA) rbpangoversion.h $(RUBYARCHDIR)
|
||||
|
||||
install: install-pc
|
||||
install-pc:
|
||||
if test -n "$(pkgconfigdir)"; then \
|
||||
$(MAKEDIRS) $(pkgconfigdir); \
|
||||
$(INSTALL_DATA) ruby-pango.pc $(pkgconfigdir); \
|
||||
fi
|
102
lib/ruby-gtk2-2.0.2/pango/ext/pango/extconf.rb
Normal file
102
lib/ruby-gtk2-2.0.2/pango/ext/pango/extconf.rb
Normal file
@ -0,0 +1,102 @@
|
||||
=begin
|
||||
extconf.rb for Ruby/Pango 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 = "pango"
|
||||
package_id = "pango"
|
||||
|
||||
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
|
||||
|
||||
rcairo_options = {}
|
||||
rcairo_source_dir_names = ["rcairo"]
|
||||
if /mingw|cygwin|mswin/ =~ RUBY_PLATFORM
|
||||
rcairo_source_dir_names.unshift("rcairo.win32")
|
||||
end
|
||||
rcairo_source_dir_names.each do |rcairo_source_dir_name|
|
||||
rcairo_source_dir = top_dir.parent.expand_path + rcairo_source_dir_name
|
||||
if rcairo_source_dir.exist?
|
||||
rcairo_options[:rcairo_source_dir] = rcairo_source_dir.to_s
|
||||
break
|
||||
end
|
||||
end
|
||||
check_cairo(rcairo_options)
|
||||
|
||||
setup_win32(module_name, base_dir)
|
||||
|
||||
unless required_pkg_config_package(package_id,
|
||||
:debian => "libpango1.0-dev",
|
||||
:redhat => "pango-devel",
|
||||
:homebrew => "pango",
|
||||
:macports => "pango")
|
||||
exit(false)
|
||||
end
|
||||
PKGConfig.have_package('pangocairo')
|
||||
|
||||
if PKGConfig.have_package("pangowin32")
|
||||
$defs << " -DHAVE_PANGO_WIN32"
|
||||
end
|
||||
if PKGConfig.have_package("pangoft2")
|
||||
$defs << " -DHAVE_PANGO_FT2"
|
||||
end
|
||||
|
||||
pango_header = "pango/pango.h"
|
||||
have_func("pango_layout_iter_get_type", pango_header)
|
||||
have_func("pango_layout_set_ellipsize", pango_header)
|
||||
have_func("pango_layout_get_font_description", pango_header)
|
||||
have_func("pango_render_part_get_type", pango_header)
|
||||
have_func("pango_attr_strikethrough_color_new", pango_header)
|
||||
have_func("pango_attr_underline_color_new", pango_header)
|
||||
have_func("pango_glyph_item_free", pango_header)
|
||||
have_func("pango_glyph_item_get_type", pango_header)
|
||||
have_func("pango_attr_iterator_get_attrs", pango_header)
|
||||
have_func("pango_itemize_with_base_dir", pango_header)
|
||||
have_func("pango_font_family_is_monospace", pango_header)
|
||||
|
||||
make_version_header("PANGO", "pango", ".")
|
||||
|
||||
create_pkg_config_file("Ruby/Pango", package_id)
|
||||
$defs << " -DRUBY_PANGO_COMPILATION"
|
||||
create_makefile(module_name)
|
||||
|
||||
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
|
18
lib/ruby-gtk2-2.0.2/pango/ext/pango/pango.def
Normal file
18
lib/ruby-gtk2-2.0.2/pango/ext/pango/pango.def
Normal file
@ -0,0 +1,18 @@
|
||||
EXPORTS
|
||||
Init_pango
|
||||
mPango DATA
|
||||
attrstring DATA
|
||||
pattr DATA
|
||||
pattrbool DATA
|
||||
pattrcolor DATA
|
||||
pattrfloat DATA
|
||||
pattrint DATA
|
||||
pango_add_attribute
|
||||
pango_attr_iter_get_type
|
||||
pango_get_attribute
|
||||
pango_get_attribute_klass
|
||||
pango_item_get_type
|
||||
pango_layout_iter_get_type
|
||||
pango_layout_line_get_type
|
||||
pango_make_attribute
|
||||
pango_rectangle_get_type
|
327
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.c
Normal file
327
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.c
Normal file
@ -0,0 +1,327 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE mPango
|
||||
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
extern void Init_pango(void);
|
||||
|
||||
/*
|
||||
* Rendering
|
||||
*/
|
||||
|
||||
struct rpango_reorder_items_args {
|
||||
PangoItem *item;
|
||||
VALUE ary;
|
||||
long n;
|
||||
GList *result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rpango_reorder_items_body(VALUE value)
|
||||
{
|
||||
struct rpango_reorder_items_args *args = (struct rpango_reorder_items_args *)value;
|
||||
long i;
|
||||
GList *result;
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
args->result = g_list_append(args->result,
|
||||
RVAL2PANGOITEM(RARRAY_PTR(args->ary)[i]));
|
||||
|
||||
result = pango_reorder_items(args->result);
|
||||
g_list_free(args->result);
|
||||
|
||||
return GLIST2ARY2(result, PANGO_TYPE_ITEM);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rpango_reorder_items_ensure(VALUE value)
|
||||
{
|
||||
g_list_free(((struct rpango_reorder_items_args *)value)->result);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_reorder_items(G_GNUC_UNUSED VALUE self, VALUE attrs)
|
||||
{
|
||||
struct rpango_reorder_items_args args;
|
||||
args.ary = rb_ary_to_ary(attrs);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = NULL;
|
||||
|
||||
return rb_ensure(rpango_reorder_items_body, (VALUE)&args,
|
||||
rpango_reorder_items_ensure, (VALUE)&args);
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_s_unichar_direction(G_GNUC_UNUSED VALUE self, VALUE ch)
|
||||
{
|
||||
return PANGODIRECTION2RVAL(pango_unichar_direction(NUM2UINT(ch)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_find_base_dir(G_GNUC_UNUSED VALUE self, VALUE text)
|
||||
{
|
||||
StringValue(text);
|
||||
return PANGODIRECTION2RVAL(pango_find_base_dir(RSTRING_PTR(text), RSTRING_LEN(text)));
|
||||
}
|
||||
#endif
|
||||
|
||||
struct rbg_pangologattrs2rval_free_args {
|
||||
PangoLogAttr *attrs;
|
||||
long n;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
rbg_pangologattrs2rval_free_body(VALUE value)
|
||||
{
|
||||
struct rbg_pangologattrs2rval_free_args *args = (struct rbg_pangologattrs2rval_free_args *)value;
|
||||
long i;
|
||||
VALUE ary = rb_ary_new();
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
rb_ary_push(ary, PANGOLOGATTR2RVAL(&args->attrs[i]));
|
||||
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rbg_pangologattrs2rval_free_ensure(VALUE value)
|
||||
{
|
||||
g_free(((struct rbg_pangologattrs2rval_free_args *)value)->attrs);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rbg_pangologattrs2rval_free(PangoLogAttr *attrs, long n)
|
||||
{
|
||||
struct rbg_pangologattrs2rval_free_args args = { attrs, n };
|
||||
|
||||
return rb_ensure(rbg_pangologattrs2rval_free_body, (VALUE)&args,
|
||||
rbg_pangologattrs2rval_free_ensure, (VALUE)&args);
|
||||
}
|
||||
|
||||
#define PANGOLOGATTRS2RVAL_FREE(attrs, n) rbg_pangologattrs2rval_free(attrs, n)
|
||||
|
||||
static VALUE
|
||||
rg_s_break(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
||||
{
|
||||
const gchar *text = RVAL2CSTR(rbtext);
|
||||
long length = RSTRING_LEN(rbtext);
|
||||
PangoAnalysis *analysis = RVAL2PANGOANALYSIS(rbanalysis);
|
||||
long n = g_utf8_strlen(text, length) + 1;
|
||||
PangoLogAttr *attrs = g_new(PangoLogAttr, n);
|
||||
|
||||
pango_break(text, length, analysis, attrs, n);
|
||||
|
||||
return PANGOLOGATTRS2RVAL_FREE(attrs, n);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_get_log_attrs(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rblevel, VALUE rblanguage)
|
||||
{
|
||||
const gchar *text = RVAL2CSTR(rbtext);
|
||||
long length = RSTRING_LEN(rbtext);
|
||||
int level = NUM2INT(rblevel);
|
||||
PangoLanguage *language = RVAL2PANGOLANGUAGE(rblanguage);
|
||||
long n = g_utf8_strlen(text, length) + 1;
|
||||
PangoLogAttr *attrs = g_new(PangoLogAttr, n);
|
||||
|
||||
pango_get_log_attrs(text, length, level, language, attrs, n);
|
||||
|
||||
return PANGOLOGATTRS2RVAL_FREE(attrs, n);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_find_paragraph_boundary(G_GNUC_UNUSED VALUE self, VALUE text)
|
||||
{
|
||||
gint paragraph_delimiter_index, next_paragraph_start;
|
||||
|
||||
StringValue(text);
|
||||
pango_find_paragraph_boundary(RSTRING_PTR(text), RSTRING_LEN(text),
|
||||
¶graph_delimiter_index,
|
||||
&next_paragraph_start);
|
||||
return rb_ary_new3(2, INT2NUM(paragraph_delimiter_index),
|
||||
INT2NUM(next_paragraph_start));
|
||||
}
|
||||
|
||||
/*
|
||||
Don't need to implement this. Use pango_break instead.
|
||||
void pango_default_break (const gchar *text,
|
||||
int length,
|
||||
PangoAnalysis *analysis,
|
||||
PangoLogAttr *attrs,
|
||||
int attrs_len);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rpango_shape_result(VALUE value)
|
||||
{
|
||||
return PANGOGLYPHSTRING2RVAL((PangoGlyphString *)value);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rpango_shape_ensure(VALUE value)
|
||||
{
|
||||
pango_glyph_string_free((PangoGlyphString *)value);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_shape(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
||||
{
|
||||
const gchar *text = RVAL2CSTR(rbtext);
|
||||
long length = RSTRING_LEN(rbtext);
|
||||
PangoAnalysis *analysis = RVAL2PANGOANALYSIS(rbanalysis);
|
||||
PangoGlyphString *glyphs = pango_glyph_string_new();
|
||||
|
||||
pango_shape(text, length, analysis, glyphs);
|
||||
|
||||
return rb_ensure(rpango_shape_result, (VALUE)glyphs,
|
||||
rpango_shape_ensure, (VALUE)glyphs);
|
||||
}
|
||||
|
||||
/* This method is from rbpangoattribute.c */
|
||||
static VALUE
|
||||
rg_s_parse_markup(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
VALUE markup_text, accel_marker;
|
||||
PangoAttrList *pattr_list;
|
||||
gchar* gtext;
|
||||
gunichar accel_char;
|
||||
GError *error = NULL;
|
||||
gboolean ret;
|
||||
char c;
|
||||
VALUE text = Qnil;
|
||||
VALUE attr_list = Qnil;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &markup_text, &accel_marker);
|
||||
|
||||
if (NIL_P(markup_text)) rb_raise(rb_eRuntimeError, "1st argument can't accept nil");
|
||||
|
||||
StringValue(markup_text);
|
||||
ret = pango_parse_markup(RSTRING_PTR(markup_text),
|
||||
RSTRING_LEN(markup_text),
|
||||
NIL_P(accel_marker) ? 0 : NUM2CHR(accel_marker),
|
||||
&pattr_list, >ext, &accel_char, &error);
|
||||
|
||||
if (!ret) RAISE_GERROR(error);
|
||||
|
||||
if (pattr_list){
|
||||
attr_list = PANGOATTRLIST2RVAL(pattr_list);
|
||||
pango_attr_list_unref(pattr_list);
|
||||
}
|
||||
|
||||
c = (char)accel_char;
|
||||
if (text){
|
||||
text = CSTR2RVAL(gtext);
|
||||
g_free(gtext);
|
||||
}
|
||||
return rb_ary_new3(3, attr_list, text,
|
||||
accel_char ? rb_str_new(&c, 1) : Qnil);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_pixels(G_GNUC_UNUSED VALUE self, VALUE pixels)
|
||||
{
|
||||
return rb_float_new(PANGO_PIXELS(NUM2DBL(pixels)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
#ifdef CAIRO_AVAILABLE
|
||||
return Qtrue;
|
||||
#else
|
||||
return Qfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango(void)
|
||||
{
|
||||
RG_TARGET_NAMESPACE = rb_define_module("Pango");
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
||||
rb_ary_new3(3,
|
||||
INT2FIX(PANGO_MAJOR_VERSION),
|
||||
INT2FIX(PANGO_MINOR_VERSION),
|
||||
INT2FIX(PANGO_MICRO_VERSION)));
|
||||
|
||||
RG_DEF_SMETHOD(reorder_items, 1);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_SMETHOD(unichar_direction, 1);
|
||||
RG_DEF_SMETHOD(find_base_dir, 1);
|
||||
#endif
|
||||
RG_DEF_SMETHOD(break, 2);
|
||||
RG_DEF_SMETHOD(get_log_attrs, 3);
|
||||
RG_DEF_SMETHOD(find_paragraph_boundary, 1);
|
||||
RG_DEF_SMETHOD(shape, 2);
|
||||
RG_DEF_SMETHOD(parse_markup, -1);
|
||||
RG_DEF_SMETHOD(pixels, 1);
|
||||
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "SCALE", INT2FIX(PANGO_SCALE));
|
||||
|
||||
RG_DEF_SMETHOD_P(cairo_available, 0);
|
||||
|
||||
Init_pango_analysis(RG_TARGET_NAMESPACE);
|
||||
Init_pango_attribute(RG_TARGET_NAMESPACE);
|
||||
Init_pango_attriterator(RG_TARGET_NAMESPACE);
|
||||
Init_pango_attrlist(RG_TARGET_NAMESPACE);
|
||||
Init_pango_cairo(RG_TARGET_NAMESPACE);
|
||||
Init_pango_cairo_context(RG_TARGET_NAMESPACE);
|
||||
Init_pango_color(RG_TARGET_NAMESPACE);
|
||||
Init_pango_context(RG_TARGET_NAMESPACE);
|
||||
Init_pango_coverage(RG_TARGET_NAMESPACE);
|
||||
Init_pango_engine(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font_description(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font_face(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font_family(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font_map(RG_TARGET_NAMESPACE);
|
||||
Init_pango_font_metrics(RG_TARGET_NAMESPACE);
|
||||
Init_pango_fontset(RG_TARGET_NAMESPACE);
|
||||
Init_pango_fontset_simple(RG_TARGET_NAMESPACE);
|
||||
Init_pango_glyph_info(RG_TARGET_NAMESPACE);
|
||||
Init_pango_glyph_item(RG_TARGET_NAMESPACE);
|
||||
Init_pango_glyph_string(RG_TARGET_NAMESPACE);
|
||||
Init_pango_gravity(RG_TARGET_NAMESPACE);
|
||||
Init_pango_item(RG_TARGET_NAMESPACE);
|
||||
Init_pango_language(RG_TARGET_NAMESPACE);
|
||||
Init_pango_layout(RG_TARGET_NAMESPACE);
|
||||
Init_pango_layout_iter(RG_TARGET_NAMESPACE);
|
||||
Init_pango_layout_line(RG_TARGET_NAMESPACE);
|
||||
Init_pango_logattr(RG_TARGET_NAMESPACE);
|
||||
Init_pango_matrix(RG_TARGET_NAMESPACE);
|
||||
Init_pango_rectangle(RG_TARGET_NAMESPACE);
|
||||
Init_pangorenderer(RG_TARGET_NAMESPACE);
|
||||
Init_pango_script(RG_TARGET_NAMESPACE);
|
||||
Init_pango_script_iter(RG_TARGET_NAMESPACE);
|
||||
Init_pango_array(RG_TARGET_NAMESPACE);
|
||||
}
|
104
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.h
Normal file
104
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpango.h
Normal file
@ -0,0 +1,104 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "ruby.h"
|
||||
#define PANGO_ENABLE_ENGINE
|
||||
#define PANGO_ENABLE_BACKEND
|
||||
#include <pango/pango.h>
|
||||
|
||||
#ifdef HAVE_FREETYPE2
|
||||
#include <pango/pangofc-font.h>
|
||||
#endif
|
||||
|
||||
#include "rbgobject.h"
|
||||
#include "rbpangoversion.h"
|
||||
#include "rbpangoconversions.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,10,0)
|
||||
#include <pango/pangocairo.h>
|
||||
# ifdef HAVE_RB_CAIRO_H
|
||||
#include <rb_cairo.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(G_PLATFORM_WIN32) && !defined(RUBY_PANGO_STATIC_COMPILATION)
|
||||
# ifdef RUBY_PANGO_COMPILATION
|
||||
# define RUBY_PANGO_VAR __declspec(dllexport)
|
||||
# else
|
||||
# define RUBY_PANGO_VAR extern __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define RUBY_PANGO_VAR extern
|
||||
#endif
|
||||
|
||||
extern void Init_pango_inits();
|
||||
RUBY_PANGO_VAR VALUE mPango;
|
||||
|
||||
#ifndef PANGO_TYPE_ITEM
|
||||
#define PANGO_TYPE_ITEM (pango_item_get_type())
|
||||
#endif
|
||||
#define PANGO_TYPE_ANALYSIS (pango_analysis_get_type())
|
||||
#define PANGO_TYPE_LOG_ATTR (pango_log_attr_get_type())
|
||||
#ifndef PANGO_TYPE_LAYOUT_ITER
|
||||
#define PANGO_TYPE_LAYOUT_ITER (pango_layout_iter_get_type())
|
||||
#endif
|
||||
#ifndef PANGO_TYPE_LAYOUT_LINE
|
||||
#define PANGO_TYPE_LAYOUT_LINE (pango_layout_line_get_type())
|
||||
#endif
|
||||
#define PANGO_TYPE_RECTANGLE (pango_rectangle_get_type())
|
||||
#define PANGO_TYPE_ATTR_ITERATOR (pango_attr_iter_get_type())
|
||||
#define PANGO_TYPE_COVERAGE (pango_coverage_get_type())
|
||||
#define PANGO_TYPE_GLYPH_INFO (pango_glyph_info_get_type())
|
||||
#ifndef PANGO_TYPE_GLYPH_ITEM
|
||||
# define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type())
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
#define PANGO_TYPE_SCRIPT_ITER (pango_script_iter_get_type())
|
||||
#endif
|
||||
|
||||
#define ATTR2RVAL(attr) (pango_make_attribute(attr))
|
||||
#define RVAL2ATTR(attr) (pango_get_attribute(attr))
|
||||
#define ATTRTYPE2CLASS(attr_type) (pango_get_attribute_klass(attr_type))
|
||||
#define RBPANGO_ADD_ATTRIBUTE(type, klass) (pango_add_attribute(type, klass))
|
||||
|
||||
extern VALUE pango_make_attribute(PangoAttribute* attr);
|
||||
extern PangoAttribute* pango_get_attribute(VALUE attr);
|
||||
|
||||
extern GType pango_item_get_type(void);
|
||||
extern GType pango_analysis_get_type(void);
|
||||
extern GType pango_log_attr_get_type(void);
|
||||
extern GType pango_layout_iter_get_type(void);
|
||||
extern GType pango_layout_line_get_type(void);
|
||||
extern GType pango_rectangle_get_type(void);
|
||||
extern GType pango_attr_iter_get_type(void);
|
||||
extern GType pango_coverage_get_type(void);
|
||||
extern GType pango_glyph_info_get_type(void);
|
||||
#ifndef HAVE_PANGO_GLYPH_ITEM_GET_TYPE
|
||||
extern GType pango_glyph_item_get_type(void);
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
extern GType pango_script_iter_get_type(void);
|
||||
#endif
|
||||
|
||||
extern VALUE pango_get_attribute_klass(VALUE attr_type);
|
||||
extern void pango_add_attribute(int attr_type, VALUE klass);
|
222
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoanalysis.c
Normal file
222
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoanalysis.c
Normal file
@ -0,0 +1,222 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cAnalysis
|
||||
#define _SELF(s) (RVAL2PANGOANALYSIS(s))
|
||||
|
||||
/**********************************/
|
||||
static PangoAnalysis*
|
||||
ana_copy(const PangoAnalysis* val)
|
||||
{
|
||||
PangoAnalysis* new_val;
|
||||
g_return_val_if_fail (val != NULL, NULL);
|
||||
new_val = g_new(PangoAnalysis, 1);
|
||||
*new_val = *val;
|
||||
return new_val;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_analysis_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoAnalysis",
|
||||
(GBoxedCopyFunc)ana_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
PangoAnalysis analysis = { NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL };
|
||||
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_ANALYSIS, &analysis));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_set_shape_engine(VALUE self, VALUE engine)
|
||||
{
|
||||
_SELF(self)->shape_engine = RVAL2PANGOENGINESHAPE(engine);
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_shape_engine(VALUE self)
|
||||
{
|
||||
VALUE ret;
|
||||
if (_SELF(self)->shape_engine){
|
||||
const gchar* gname = G_OBJECT_TYPE_NAME(_SELF(self)->shape_engine);
|
||||
gchar* name = g_strdup(gname);
|
||||
name[0] = g_ascii_toupper(name[0]);
|
||||
G_DEF_CLASS3(gname, name, mPango);
|
||||
ret = GOBJ2RVAL(_SELF(self)->shape_engine);
|
||||
} else {
|
||||
ret = Qnil;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_lang_engine(VALUE self, VALUE engine)
|
||||
{
|
||||
_SELF(self)->lang_engine = RVAL2PANGOENGINELANG(engine);
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_lang_engine(VALUE self)
|
||||
{
|
||||
VALUE ret;
|
||||
if (_SELF(self)->lang_engine){
|
||||
const gchar* gname = G_OBJECT_TYPE_NAME(_SELF(self)->lang_engine);
|
||||
gchar* name = g_strdup(gname);
|
||||
name[0] = g_ascii_toupper(name[0]);
|
||||
G_DEF_CLASS3(name, name, mPango);
|
||||
ret = GOBJ2RVAL(_SELF(self)->lang_engine);
|
||||
} else {
|
||||
ret = Qnil;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_set_font(VALUE self, VALUE font)
|
||||
{
|
||||
_SELF(self)->font = RVAL2PANGOFONT(font);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_font(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(_SELF(self)->font);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_level(VALUE self, VALUE level)
|
||||
{
|
||||
_SELF(self)->level = NUM2UINT(level);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_level(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->level);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_language(VALUE self, VALUE lang)
|
||||
{
|
||||
_SELF(self)->language = RVAL2PANGOLANGUAGE(lang);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_language(VALUE self)
|
||||
{
|
||||
return PANGOLANGUAGE2RVAL(_SELF(self)->language);
|
||||
}
|
||||
|
||||
struct ana_set_extra_attrs_args {
|
||||
PangoAnalysis *analysis;
|
||||
VALUE ary;
|
||||
long n;
|
||||
GSList *result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
ana_set_extra_attrs_body(VALUE value)
|
||||
{
|
||||
struct ana_set_extra_attrs_args *args = (struct ana_set_extra_attrs_args *)value;
|
||||
long i;
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
args->result = g_slist_append(args->result, RVAL2ATTR(RARRAY_PTR(args->ary)[i]));
|
||||
|
||||
args->analysis->extra_attrs = args->result;
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN VALUE
|
||||
ana_set_extra_attrs_rescue(VALUE value)
|
||||
{
|
||||
g_slist_free(((struct ana_set_extra_attrs_args *)value)->result);
|
||||
|
||||
rb_exc_raise(rb_errinfo());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_extra_attrs(VALUE self, VALUE attrs)
|
||||
{
|
||||
struct ana_set_extra_attrs_args args;
|
||||
args.analysis = _SELF(self);
|
||||
args.ary = rb_ary_to_ary(attrs);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = NULL;
|
||||
|
||||
rb_rescue(ana_set_extra_attrs_body, (VALUE)&args,
|
||||
ana_set_extra_attrs_rescue, (VALUE)&args);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_extra_attrs(VALUE self)
|
||||
{
|
||||
VALUE ary = rb_ary_new();
|
||||
GSList* list = _SELF(self)->extra_attrs;
|
||||
|
||||
while (list) {
|
||||
rb_ary_push(ary, ATTR2RVAL(list->data));
|
||||
list = list->next;
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_analysis(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ANALYSIS, "Analysis", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(set_shape_engine, 1);
|
||||
RG_DEF_METHOD(shape_engine, 0);
|
||||
RG_DEF_METHOD(set_lang_engine, 1);
|
||||
RG_DEF_METHOD(lang_engine, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_font, 1);
|
||||
RG_DEF_METHOD(font, 0);
|
||||
RG_DEF_METHOD(set_level, 1);
|
||||
RG_DEF_METHOD(level, 0);
|
||||
RG_DEF_METHOD(set_language, 1);
|
||||
RG_DEF_METHOD(language, 0);
|
||||
|
||||
RG_DEF_METHOD(set_extra_attrs, 1);
|
||||
RG_DEF_METHOD(extra_attrs, 0);
|
||||
}
|
524
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattribute.c
Normal file
524
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattribute.c
Normal file
@ -0,0 +1,524 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE pattr
|
||||
|
||||
VALUE RG_TARGET_NAMESPACE, attrstring, pattrint, pattrfloat, pattrcolor, pattrbool;
|
||||
static VALUE type_to_klass;
|
||||
|
||||
/***********************************************/
|
||||
void
|
||||
pango_add_attribute(int attr_type, VALUE klass)
|
||||
{
|
||||
rb_hash_aset(type_to_klass, INT2FIX(attr_type), klass);
|
||||
}
|
||||
|
||||
/* This is for Attributes which has PangoAttrType. */
|
||||
VALUE
|
||||
pango_get_attribute_klass(VALUE attr_type)
|
||||
{
|
||||
VALUE type = Qnil;
|
||||
if (TYPE(attr_type) == T_STRING){
|
||||
const char *strtype = RVAL2CSTR(attr_type);
|
||||
if (strcmp(strtype, "Attribute") == 0){
|
||||
type = RG_TARGET_NAMESPACE;
|
||||
} else if (strcmp(strtype, "AttrString") == 0){
|
||||
type = attrstring;
|
||||
} else if (strcmp(strtype, "AttrInt") == 0){
|
||||
type = pattrint;
|
||||
} else if (strcmp(strtype, "AttrFloat") == 0){
|
||||
type = pattrfloat;
|
||||
} else if (strcmp(strtype, "AttrColor") == 0){
|
||||
type = pattrcolor;
|
||||
} else if (strcmp(strtype, "AttrBool") == 0){
|
||||
type = pattrbool;
|
||||
}
|
||||
} else {
|
||||
type = rb_hash_aref(type_to_klass, INT2FIX(attr_type));
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
VALUE
|
||||
pango_make_attribute(PangoAttribute *attr)
|
||||
{
|
||||
if (attr == NULL) return Qnil;
|
||||
return Data_Wrap_Struct(rb_hash_aref(type_to_klass, INT2FIX(attr->klass->type)), 0,
|
||||
pango_attribute_destroy,
|
||||
pango_attribute_copy(attr));
|
||||
}
|
||||
|
||||
PangoAttribute*
|
||||
pango_get_attribute(VALUE attr)
|
||||
{
|
||||
PangoAttribute *gattr;
|
||||
|
||||
if (NIL_P(attr)) return NULL;
|
||||
|
||||
if (!rb_obj_is_kind_of(attr, RG_TARGET_NAMESPACE)) {
|
||||
rb_raise(rb_eTypeError, "not a Pango::Attribute...");
|
||||
}
|
||||
Data_Get_Struct(attr, PangoAttribute, gattr);
|
||||
return gattr;
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
static VALUE
|
||||
rg_s_allocate(VALUE klass)
|
||||
{
|
||||
/* Don't define destroy method here.
|
||||
return Data_Wrap_Struct(klass, 0, pango_attribute_destroy, 0);
|
||||
*/
|
||||
return Data_Wrap_Struct(klass, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OBJECT_ALLOCATE
|
||||
#define attr_s_new rb_class_new_instance
|
||||
#else
|
||||
static VALUE
|
||||
rg_s_new(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE obj = rg_s_allocate(klass);
|
||||
rb_obj_call_init(obj, argc, argv);
|
||||
return obj;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************/
|
||||
|
||||
/* This method implemented at rbpangomain.c
|
||||
gboolean pango_parse_markup (const char *markup_text,
|
||||
int length,
|
||||
gunichar accel_marker,
|
||||
PangoAttrList **attr_list,
|
||||
char **text,
|
||||
gunichar *accel_char,
|
||||
GError **error);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_s_type_register(G_GNUC_UNUSED VALUE self, VALUE name)
|
||||
{
|
||||
return INT2NUM(pango_attr_type_register(RVAL2CSTR(name)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_attr_equal(VALUE self, VALUE other)
|
||||
{
|
||||
return CBOOL2RVAL(pango_attribute_equal(RVAL2ATTR(self), RVAL2ATTR(other)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Structure accessors
|
||||
*/
|
||||
/* PangoAttribute */
|
||||
static VALUE
|
||||
rg_start_index(VALUE self)
|
||||
{
|
||||
return UINT2NUM(RVAL2ATTR(self)->start_index);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_start_index(VALUE self, VALUE value)
|
||||
{
|
||||
RVAL2ATTR(self)->start_index = NUM2UINT(value);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_end_index(VALUE self)
|
||||
{
|
||||
return UINT2NUM(RVAL2ATTR(self)->end_index);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_end_index(VALUE self, VALUE value)
|
||||
{
|
||||
RVAL2ATTR(self)->end_index = NUM2UINT(value);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
/* PangoAttrString */
|
||||
static VALUE
|
||||
attr_string_value(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(((PangoAttrString*)RVAL2ATTR(self))->value);
|
||||
}
|
||||
|
||||
/* PangoAttrLanguage */
|
||||
static VALUE
|
||||
attr_language_value(VALUE self)
|
||||
{
|
||||
return PANGOLANGUAGE2RVAL(((PangoAttrLanguage*)RVAL2ATTR(self))->value);
|
||||
}
|
||||
|
||||
/* PangoAttrColor */
|
||||
static VALUE
|
||||
attr_color_value(VALUE self)
|
||||
{
|
||||
PangoColor color = ((PangoAttrColor*)RVAL2ATTR(self))->color;
|
||||
return PANGOCOLOR2RVAL(&color);
|
||||
}
|
||||
|
||||
/* PangoAttrInt */
|
||||
static VALUE
|
||||
attr_int_value(VALUE self)
|
||||
{
|
||||
return INT2NUM(((PangoAttrInt*)RVAL2ATTR(self))->value);
|
||||
}
|
||||
|
||||
/* PangoAttrFloat */
|
||||
static VALUE
|
||||
attr_float_value(VALUE self)
|
||||
{
|
||||
return rb_float_new(((PangoAttrFloat*)RVAL2ATTR(self))->value);
|
||||
}
|
||||
|
||||
/* PangoAttrBool(This is Ruby/Pango's original class) */
|
||||
static VALUE
|
||||
attr_bool_value(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(((PangoAttrInt*)RVAL2ATTR(self))->value);
|
||||
}
|
||||
|
||||
/* PangoAttrFontDesc */
|
||||
static VALUE
|
||||
attr_fontdesc_value(VALUE self)
|
||||
{
|
||||
return PANGOFONTDESCRIPTION2RVAL(((PangoAttrFontDesc*)RVAL2ATTR(self))->desc);
|
||||
}
|
||||
|
||||
/* PangoAttrShape */
|
||||
static VALUE
|
||||
attr_shape_ink_rect(VALUE self)
|
||||
{
|
||||
PangoRectangle rect = ((PangoAttrShape*)RVAL2ATTR(self))->ink_rect;
|
||||
return PANGORECTANGLE2RVAL(&rect);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_shape_logical_rect(VALUE self)
|
||||
{
|
||||
PangoRectangle rect = ((PangoAttrShape*)RVAL2ATTR(self))->logical_rect;
|
||||
return PANGORECTANGLE2RVAL(&rect);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_shape_value(VALUE self)
|
||||
{
|
||||
return rb_ary_new3(2, attr_shape_ink_rect(self), attr_shape_logical_rect(self));
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize methods
|
||||
*/
|
||||
#define MAKE_ATTRINT_INIT(klassname, funcname)\
|
||||
static VALUE \
|
||||
attr_ ## klassname ## _initialize(VALUE self, VALUE val)\
|
||||
{\
|
||||
DATA_PTR(self) = pango_attr_ ## funcname ## _new(NUM2INT(val));\
|
||||
return Qnil;\
|
||||
}
|
||||
|
||||
#define MAKE_ATTRENUM_INIT(klassname, funcname, type)\
|
||||
static VALUE \
|
||||
attr_ ## klassname ## _initialize(VALUE self, VALUE val)\
|
||||
{\
|
||||
DATA_PTR(self) = pango_attr_ ## funcname ## _new(RVAL2GENUM(val, type));\
|
||||
return Qnil;\
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrLanguage_initialize(VALUE self, VALUE lang)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_language_new(
|
||||
RVAL2PANGOLANGUAGE(lang));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrFamily_initialize(VALUE self, VALUE family)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_family_new(RVAL2CSTR(family));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
MAKE_ATTRENUM_INIT(AttrStyle, style, PANGO_TYPE_STYLE);
|
||||
MAKE_ATTRENUM_INIT(AttrVariant, variant, PANGO_TYPE_VARIANT);
|
||||
MAKE_ATTRENUM_INIT(AttrStretch, stretch, PANGO_TYPE_STRETCH);
|
||||
MAKE_ATTRENUM_INIT(AttrWeight, weight, PANGO_TYPE_WEIGHT);
|
||||
|
||||
static VALUE
|
||||
attr_AttrSize_initialize(VALUE self, VALUE size)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_size_new(NUM2INT(size));
|
||||
return Qnil;
|
||||
}
|
||||
#if PANGO_CHECK_VERSION(1,8,1)
|
||||
static VALUE
|
||||
attr_AttrAbsoluteSize_initialize(VALUE self, VALUE size)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_size_new_absolute(NUM2INT(size));
|
||||
return Qnil;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
static VALUE
|
||||
attr_AttrGravity_initialize(VALUE self, VALUE gravity)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_gravity_new(RVAL2PANGOGRAVITY(gravity));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrGravityHint_initialize(VALUE self, VALUE gravity_hint)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_gravity_hint_new(RVAL2PANGOGRAVITYHINT(gravity_hint));
|
||||
return Qnil;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
attr_AttrFontDescription_initialize(VALUE self, VALUE fontdescription)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_font_desc_new(RVAL2PANGOFONTDESCRIPTION(fontdescription));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrForeground_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_foreground_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrBackground_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_background_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrStrikethrough_initialize(VALUE self, VALUE strikethrough)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_strikethrough_new(RVAL2CBOOL(strikethrough));
|
||||
return Qnil;
|
||||
}
|
||||
#ifdef HAVE_PANGO_ATTR_STRIKETHROUGH_COLOR_NEW
|
||||
static VALUE
|
||||
attr_AttrStrikethroughColor_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_strikethrough_color_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
|
||||
return Qnil;
|
||||
}
|
||||
#endif
|
||||
|
||||
MAKE_ATTRENUM_INIT(AttrUnderline, underline, PANGO_TYPE_UNDERLINE);
|
||||
#ifdef HAVE_PANGO_ATTR_UNDERLINE_COLOR_NEW
|
||||
static VALUE
|
||||
attr_AttrUnderlineColor_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_underline_color_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
|
||||
return Qnil;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
attr_AttrShape_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE ink_rect, logical_rect, data;
|
||||
|
||||
rb_scan_args(argc, argv, "21", &ink_rect, &logical_rect, &data);
|
||||
|
||||
if (NIL_P(data)){
|
||||
DATA_PTR(self) = pango_attr_shape_new(
|
||||
RVAL2PANGORECTANGLE(ink_rect),
|
||||
RVAL2PANGORECTANGLE(logical_rect));
|
||||
} else {
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
G_RELATIVE(self, data);
|
||||
DATA_PTR(self) = pango_attr_shape_new_with_data(
|
||||
RVAL2PANGORECTANGLE(ink_rect),
|
||||
RVAL2PANGORECTANGLE(logical_rect),
|
||||
(gpointer)data, NULL, NULL);
|
||||
#else
|
||||
rb_warning("not supported in Pango-1.6.x. the 3rd parameter was ignored.");
|
||||
DATA_PTR(self) = pango_attr_shape_new(
|
||||
RVAL2PANGORECTANGLE(ink_rect),
|
||||
RVAL2PANGORECTANGLE(logical_rect));
|
||||
#endif
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
attr_AttrScale_initialize(VALUE self, VALUE scale)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_scale_new(NUM2DBL(scale));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
attr_AttrFallback_initialize(VALUE self, VALUE enable_fallback)
|
||||
{
|
||||
DATA_PTR(self) = pango_attr_fallback_new(RVAL2CBOOL(enable_fallback));
|
||||
return Qnil;
|
||||
}
|
||||
#endif
|
||||
|
||||
MAKE_ATTRINT_INIT(AttrRise, rise);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
MAKE_ATTRINT_INIT(AttrLetterSpacing, letter_spacing);
|
||||
#endif
|
||||
|
||||
#define MAKE_ATTR(gtype, name, parent, num)\
|
||||
tmpklass = rb_define_class_under(mPango, #name, parent);\
|
||||
rb_hash_aset(type_to_klass, INT2FIX(gtype), tmpklass);\
|
||||
rbg_define_method(tmpklass, "initialize", attr_## name ## _initialize , num);
|
||||
|
||||
void
|
||||
Init_pango_attribute(VALUE mPango)
|
||||
{
|
||||
VALUE tmpklass;
|
||||
RG_TARGET_NAMESPACE = rb_define_class_under(mPango, "Attribute", rb_cData);
|
||||
|
||||
RG_DEF_SMETHOD(type_register, 1);
|
||||
RG_DEF_METHOD_OPERATOR("==", attr_equal, 1);
|
||||
RG_DEF_METHOD(start_index, 0);
|
||||
RG_DEF_METHOD(set_start_index, 1);
|
||||
RG_DEF_METHOD(end_index, 0);
|
||||
RG_DEF_METHOD(set_end_index, 1);
|
||||
|
||||
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
||||
RG_DEF_SMETHOD(allocate, 0);
|
||||
#else
|
||||
rb_define_alloc_func(RG_TARGET_NAMESPACE, (VALUE(*)_((VALUE)))rg_s_allocate);
|
||||
#endif
|
||||
#ifndef HAVE_OBJECT_ALLOCATE
|
||||
RG_DEF_SMETHOD(new, -1);
|
||||
#endif
|
||||
|
||||
attrstring = rb_define_class_under(mPango, "AttrString", RG_TARGET_NAMESPACE);
|
||||
rbg_define_method(attrstring, "value", attr_string_value, 0);
|
||||
|
||||
pattrint = rb_define_class_under(mPango, "AttrInt", RG_TARGET_NAMESPACE);
|
||||
rbg_define_method(pattrint, "value", attr_int_value, 0);
|
||||
|
||||
pattrfloat = rb_define_class_under(mPango, "AttrFloat", RG_TARGET_NAMESPACE);
|
||||
rbg_define_method(pattrfloat, "value", attr_float_value, 0);
|
||||
|
||||
pattrcolor = rb_define_class_under(mPango, "AttrColor", RG_TARGET_NAMESPACE);
|
||||
rbg_define_method(pattrcolor, "value", attr_color_value, 0);
|
||||
|
||||
pattrbool = rb_define_class_under(mPango, "AttrBool", RG_TARGET_NAMESPACE);
|
||||
rbg_define_method(pattrbool, "value", attr_bool_value, 0);
|
||||
|
||||
rb_global_variable(&type_to_klass);
|
||||
type_to_klass = rb_hash_new();
|
||||
|
||||
MAKE_ATTR(PANGO_ATTR_LANGUAGE, AttrLanguage, RG_TARGET_NAMESPACE, 1);
|
||||
rbg_define_method(tmpklass, "value", attr_language_value, 0);
|
||||
|
||||
MAKE_ATTR(PANGO_ATTR_FAMILY, AttrFamily, attrstring, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_STYLE, AttrStyle, pattrint, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_WEIGHT, AttrWeight, pattrint, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_VARIANT, AttrVariant, pattrint, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_STRETCH, AttrStretch, pattrint, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_SIZE, AttrSize, pattrint, 1);
|
||||
#if PANGO_CHECK_VERSION(1,8,1)
|
||||
MAKE_ATTR(PANGO_ATTR_ABSOLUTE_SIZE, AttrAbsoluteSize, pattrint, 1);
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
MAKE_ATTR(PANGO_ATTR_GRAVITY, AttrGravity, pattrint, 1);
|
||||
MAKE_ATTR(PANGO_ATTR_GRAVITY_HINT, AttrGravityHint, pattrint, 1);
|
||||
#endif
|
||||
MAKE_ATTR(PANGO_ATTR_FONT_DESC, AttrFontDescription, RG_TARGET_NAMESPACE, 1);
|
||||
rbg_define_method(tmpklass, "value", attr_fontdesc_value, 0);
|
||||
MAKE_ATTR(PANGO_ATTR_FOREGROUND, AttrForeground, pattrcolor, 3);
|
||||
MAKE_ATTR(PANGO_ATTR_BACKGROUND, AttrBackground, pattrcolor, 3);
|
||||
MAKE_ATTR(PANGO_ATTR_UNDERLINE, AttrUnderline, pattrint, 1);
|
||||
/* PangoUnderline */
|
||||
G_DEF_CLASS(PANGO_TYPE_UNDERLINE, "Underline", tmpklass);
|
||||
G_DEF_CONSTANTS(tmpklass, PANGO_TYPE_UNDERLINE, "PANGO_UNDERLINE_");
|
||||
#ifdef HAVE_PANGO_ATTR_UNDERLINE_COLOR_NEW
|
||||
MAKE_ATTR(PANGO_ATTR_UNDERLINE_COLOR, AttrUnderlineColor, pattrcolor, 3);
|
||||
#endif
|
||||
|
||||
MAKE_ATTR(PANGO_ATTR_STRIKETHROUGH, AttrStrikethrough, pattrbool, 1);
|
||||
#ifdef HAVE_PANGO_ATTR_STRIKETHROUGH_COLOR_NEW
|
||||
MAKE_ATTR(PANGO_ATTR_STRIKETHROUGH_COLOR, AttrStrikethroughColor, pattrcolor, 3);
|
||||
#endif
|
||||
MAKE_ATTR(PANGO_ATTR_RISE, AttrRise, pattrint, 1);
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
MAKE_ATTR(PANGO_ATTR_LETTER_SPACING, AttrLetterSpacing, pattrint, 1);
|
||||
#endif
|
||||
MAKE_ATTR(PANGO_ATTR_SHAPE, AttrShape, RG_TARGET_NAMESPACE, -1);
|
||||
rbg_define_method(tmpklass, "ink_rect", attr_shape_ink_rect, 0);
|
||||
rbg_define_method(tmpklass, "logical_rect", attr_shape_logical_rect, 0);
|
||||
rbg_define_method(tmpklass, "value", attr_shape_value, 0);
|
||||
MAKE_ATTR(PANGO_ATTR_SCALE, AttrScale, pattrfloat, 1);
|
||||
/* PangoScale */
|
||||
rb_define_const(tmpklass, "XX_SMALL", rb_float_new(PANGO_SCALE_XX_SMALL));
|
||||
rb_define_const(tmpklass, "X_SMALL", rb_float_new(PANGO_SCALE_X_SMALL));
|
||||
rb_define_const(tmpklass, "SMALL", rb_float_new(PANGO_SCALE_SMALL));
|
||||
rb_define_const(tmpklass, "MEDIUM", rb_float_new(PANGO_SCALE_MEDIUM));
|
||||
rb_define_const(tmpklass, "LARGE", rb_float_new(PANGO_SCALE_LARGE));
|
||||
rb_define_const(tmpklass, "X_LARGE", rb_float_new(PANGO_SCALE_X_LARGE));
|
||||
rb_define_const(tmpklass, "XX_LARGE", rb_float_new(PANGO_SCALE_XX_LARGE));
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
MAKE_ATTR(PANGO_ATTR_FALLBACK, AttrFallback, pattrbool, 1);
|
||||
#endif
|
||||
/* PangoAttrType */
|
||||
G_DEF_CLASS(PANGO_TYPE_ATTR_TYPE, "Type", RG_TARGET_NAMESPACE);
|
||||
#define INT2ATTRTYPE(x) rbgobj_make_enum((x), PANGO_TYPE_ATTR_TYPE)
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_INVALID", INT2ATTRTYPE(PANGO_ATTR_INVALID));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_LANGUAGE", INT2ATTRTYPE(PANGO_ATTR_LANGUAGE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_FAMILY", INT2ATTRTYPE(PANGO_ATTR_FAMILY));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STYLE", INT2ATTRTYPE(PANGO_ATTR_STYLE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_WEIGHT", INT2ATTRTYPE(PANGO_ATTR_WEIGHT));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_VARIANT", INT2ATTRTYPE(PANGO_ATTR_VARIANT));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRETCH", INT2ATTRTYPE(PANGO_ATTR_STRETCH));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_SIZE", INT2ATTRTYPE(PANGO_ATTR_SIZE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_FONT_DESC", INT2ATTRTYPE(PANGO_ATTR_FONT_DESC));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_FOREGROUND", INT2ATTRTYPE(PANGO_ATTR_FOREGROUND));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_BACKGROUND", INT2ATTRTYPE(PANGO_ATTR_BACKGROUND));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_UNDERLINE", INT2ATTRTYPE(PANGO_ATTR_UNDERLINE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRIKETHROUGH", INT2ATTRTYPE(PANGO_ATTR_STRIKETHROUGH));
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRIKETHROUGH_COLOR", INT2ATTRTYPE(PANGO_ATTR_STRIKETHROUGH_COLOR));
|
||||
#endif
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_RISE", INT2ATTRTYPE(PANGO_ATTR_RISE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_SHAPE", INT2ATTRTYPE(PANGO_ATTR_SHAPE));
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_SCALE", INT2ATTRTYPE(PANGO_ATTR_SCALE));
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_FALLBACK", INT2ATTRTYPE(PANGO_ATTR_FALLBACK));
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
rb_define_const(RG_TARGET_NAMESPACE, "TYPE_LETTER_SPACING", INT2ATTRTYPE(PANGO_ATTR_LETTER_SPACING));
|
||||
#endif
|
||||
}
|
141
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattriterator.c
Normal file
141
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattriterator.c
Normal file
@ -0,0 +1,141 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cAttrIterator
|
||||
#define _SELF(self) (RVAL2PANGOATTRITERATOR(self))
|
||||
|
||||
/**********************************/
|
||||
GType
|
||||
pango_attr_iter_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoAttrIterator",
|
||||
(GBoxedCopyFunc)pango_attr_iterator_copy,
|
||||
(GBoxedFreeFunc)pango_attr_iterator_destroy);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_next_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_attr_iterator_next(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_range(VALUE self)
|
||||
{
|
||||
gint start = 0;
|
||||
gint end = 0;
|
||||
pango_attr_iterator_range(_SELF(self), &start, &end);
|
||||
return rb_ary_new3(2, INT2NUM(start), INT2NUM(end));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE type, ret;
|
||||
PangoAttribute* attr;
|
||||
int i;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &type);
|
||||
|
||||
if (NIL_P(type)){
|
||||
PangoAttrIterator* iter = _SELF(self);
|
||||
ret = rb_ary_new();
|
||||
for (i = 0; i < PANGO_ATTR_SCALE + 1; i++){
|
||||
attr = pango_attr_iterator_get(iter, i);
|
||||
if (attr)
|
||||
rb_ary_push(ret, ATTR2RVAL(attr));
|
||||
}
|
||||
} else {
|
||||
attr = pango_attr_iterator_get(_SELF(self), FIX2INT(type));
|
||||
ret = attr ? ATTR2RVAL(attr) : Qnil;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_font(VALUE self)
|
||||
{
|
||||
PangoFontDescription* desc;
|
||||
PangoLanguage* lang;
|
||||
GSList* extra_attrs;
|
||||
VALUE ary, ret;
|
||||
|
||||
desc = pango_font_description_new();
|
||||
|
||||
pango_attr_iterator_get_font(_SELF(self), desc, &lang, &extra_attrs);
|
||||
|
||||
ary = rb_ary_new();
|
||||
while(extra_attrs) {
|
||||
rb_ary_push(ary, ATTR2RVAL(extra_attrs->data));
|
||||
extra_attrs = extra_attrs->next;
|
||||
}
|
||||
|
||||
ret = rb_ary_new3(3, PANGOFONTDESCRIPTION2RVAL(desc),
|
||||
PANGOLANGUAGE2RVAL(lang),
|
||||
ary);
|
||||
|
||||
pango_font_description_free(desc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGO_ATTR_ITERATOR_GET_ATTRS
|
||||
static VALUE
|
||||
rg_attrs(VALUE self)
|
||||
{
|
||||
GSList* list = pango_attr_iterator_get_attrs(_SELF(self));
|
||||
GSList* base = list;
|
||||
GSList* old = list;
|
||||
VALUE ary = rb_ary_new();
|
||||
|
||||
while (list) {
|
||||
rb_ary_push(ary, ATTR2RVAL(list->data));
|
||||
list = list->next;
|
||||
}
|
||||
while (old) {
|
||||
pango_attribute_destroy((PangoAttribute*)old);
|
||||
old = old->next;
|
||||
}
|
||||
g_slist_free(base);
|
||||
|
||||
return ary;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_attriterator(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ATTR_ITERATOR, "AttrIterator", mPango);
|
||||
|
||||
RG_DEF_METHOD_BANG(next, 0);
|
||||
RG_DEF_METHOD(range, 0);
|
||||
RG_DEF_METHOD(get, -1);
|
||||
RG_DEF_METHOD(font, 0);
|
||||
#ifdef HAVE_PANGO_ATTR_ITERATOR_GET_ATTRS
|
||||
RG_DEF_METHOD(attrs, 0);
|
||||
#endif
|
||||
}
|
105
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattrlist.c
Normal file
105
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoattrlist.c
Normal file
@ -0,0 +1,105 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
static ID id_call;
|
||||
|
||||
#define RG_TARGET_NAMESPACE cAttrList
|
||||
#define _SELF(self) (RVAL2PANGOATTRLIST(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_attr_list_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_insert(VALUE self, VALUE attr)
|
||||
{
|
||||
pango_attr_list_insert(_SELF(self), RVAL2ATTR(attr));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_insert_before(VALUE self, VALUE attr)
|
||||
{
|
||||
pango_attr_list_insert_before(_SELF(self), RVAL2ATTR(attr));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_change(VALUE self, VALUE attr)
|
||||
{
|
||||
pango_attr_list_change(_SELF(self), RVAL2ATTR(attr));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_splice(VALUE self, VALUE other, VALUE pos, VALUE len)
|
||||
{
|
||||
pango_attr_list_splice(_SELF(self), _SELF(other), NUM2INT(pos), NUM2INT(len));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static gboolean
|
||||
filter_func(PangoAttribute *attr, gpointer data)
|
||||
{
|
||||
return CBOOL2RVAL(rb_funcall((VALUE)data, id_call, 1, ATTR2RVAL(attr)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_filter(VALUE self)
|
||||
{
|
||||
VALUE func = rb_block_proc();
|
||||
G_RELATIVE(self, func);
|
||||
return PANGOATTRLIST2RVAL(pango_attr_list_filter(_SELF(self),
|
||||
(PangoAttrFilterFunc)filter_func,
|
||||
(gpointer)func));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_iterator(VALUE self)
|
||||
{
|
||||
return PANGOATTRITERATOR2RVAL(pango_attr_list_get_iterator(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_attrlist(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ATTR_LIST, "AttrList", mPango);
|
||||
|
||||
id_call = rb_intern("call");
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(insert, 1);
|
||||
RG_DEF_METHOD(insert_before, 1);
|
||||
RG_DEF_METHOD(change, 1);
|
||||
RG_DEF_METHOD(splice, 3);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(filter, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(iterator, 0);
|
||||
|
||||
}
|
115
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairo.c
Normal file
115
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairo.c
Normal file
@ -0,0 +1,115 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2006 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Kouhei Sutou
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#ifdef CAIRO_AVAILABLE
|
||||
|
||||
#define RG_TARGET_NAMESPACE cCairoFontMap
|
||||
#define _SELF(self) (RVAL2PANGOCAIROFONTMAP(self))
|
||||
|
||||
static VALUE
|
||||
rg_s_create(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
VALUE rb_font_type;
|
||||
PangoFontMap *font_map = NULL;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &rb_font_type);
|
||||
if (NIL_P(rb_font_type)) {
|
||||
font_map = pango_cairo_font_map_new();
|
||||
} else {
|
||||
cairo_font_type_t font_type = CAIRO_FONT_TYPE_USER;
|
||||
if (rbgutil_key_equal(rb_font_type, "ft") ||
|
||||
rbgutil_key_equal(rb_font_type, "freetype")) {
|
||||
font_type = CAIRO_FONT_TYPE_FT;
|
||||
} else if (rbgutil_key_equal(rb_font_type, "win32")) {
|
||||
font_type = CAIRO_FONT_TYPE_WIN32;
|
||||
} else if (rbgutil_key_equal(rb_font_type, "quartz")) {
|
||||
font_type = CAIRO_FONT_TYPE_QUARTZ;
|
||||
} else {
|
||||
rb_raise(rb_eArgError,
|
||||
"font type must be one of "
|
||||
":ft, :freetype, :win32 or :quartz: %s",
|
||||
RBG_INSPECT(rb_font_type));
|
||||
}
|
||||
font_map = pango_cairo_font_map_new_for_font_type(font_type);
|
||||
}
|
||||
|
||||
return GOBJ2RVAL(font_map);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_default(G_GNUC_UNUSED VALUE klass)
|
||||
{
|
||||
return GOBJ2RVAL(pango_cairo_font_map_get_default());
|
||||
}
|
||||
|
||||
# if PANGO_CHECK_VERSION(1, 22, 0)
|
||||
static VALUE
|
||||
rg_s_set_default(VALUE klass, VALUE font_map)
|
||||
{
|
||||
pango_cairo_font_map_set_default(RVAL2GOBJ(font_map));
|
||||
return klass;
|
||||
}
|
||||
# endif
|
||||
|
||||
static VALUE
|
||||
rg_set_resolution(VALUE self, VALUE dpi)
|
||||
{
|
||||
pango_cairo_font_map_set_resolution(_SELF(self), NUM2DBL(dpi));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_resolution(VALUE self)
|
||||
{
|
||||
return rb_float_new(pango_cairo_font_map_get_resolution(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_create_context(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(pango_cairo_font_map_create_context(_SELF(self)));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_cairo(VALUE mPango)
|
||||
{
|
||||
#ifdef CAIRO_AVAILABLE
|
||||
VALUE RG_TARGET_NAMESPACE;
|
||||
|
||||
/* Pango::CairoFontMap */
|
||||
RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_CAIRO_FONT_MAP, "CairoFontMap", mPango);
|
||||
|
||||
RG_DEF_SMETHOD(create, -1);
|
||||
RG_DEF_SMETHOD(default, 0);
|
||||
# if PANGO_CHECK_VERSION(1, 22, 0)
|
||||
RG_DEF_SMETHOD(set_default, 1);
|
||||
# endif
|
||||
|
||||
RG_DEF_METHOD(set_resolution, 1);
|
||||
RG_DEF_METHOD(resolution, 0);
|
||||
RG_DEF_METHOD(create_context, 0);
|
||||
#endif
|
||||
}
|
151
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairocontext.c
Normal file
151
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocairocontext.c
Normal file
@ -0,0 +1,151 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2006 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Kouhei Sutou
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,10,0) && defined(HAVE_RB_CAIRO_H)
|
||||
# define CAIRO_AVAILABLE 1
|
||||
#endif
|
||||
|
||||
#ifdef CAIRO_AVAILABLE
|
||||
|
||||
#define RG_TARGET_NAMESPACE rb_cCairo_Context
|
||||
|
||||
static VALUE
|
||||
rg_update_pango_context(VALUE self, VALUE context)
|
||||
{
|
||||
pango_cairo_update_context(RVAL2CRCONTEXT(self), RVAL2PANGOCONTEXT(context));
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Convenience */
|
||||
static VALUE
|
||||
rg_create_pango_layout(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(pango_cairo_create_layout(RVAL2CRCONTEXT(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_update_pango_layout(VALUE self, VALUE layout)
|
||||
{
|
||||
pango_cairo_update_layout(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Rendering */
|
||||
static VALUE
|
||||
rg_show_pango_glyph_string(VALUE self, VALUE font, VALUE glyphs)
|
||||
{
|
||||
pango_cairo_show_glyph_string(RVAL2CRCONTEXT(self),
|
||||
RVAL2PANGOFONT(font),
|
||||
RVAL2PANGOGLYPHSTRING(glyphs));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_show_pango_layout_line(VALUE self, VALUE line)
|
||||
{
|
||||
pango_cairo_show_layout_line(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUTLINE(line));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_show_pango_layout(VALUE self, VALUE layout)
|
||||
{
|
||||
pango_cairo_show_layout(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
static VALUE
|
||||
rg_show_pango_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
pango_cairo_show_error_underline(RVAL2CRCONTEXT(self),
|
||||
NUM2DBL(x), NUM2DBL(y),
|
||||
NUM2DBL(width), NUM2DBL(height));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Rendering to a path */
|
||||
static VALUE
|
||||
rg_pango_glyph_string_path(VALUE self, VALUE font, VALUE glyphs)
|
||||
{
|
||||
pango_cairo_glyph_string_path(RVAL2CRCONTEXT(self),
|
||||
RVAL2PANGOFONT(font),
|
||||
RVAL2PANGOGLYPHSTRING(glyphs));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pango_layout_line_path(VALUE self, VALUE line)
|
||||
{
|
||||
pango_cairo_layout_line_path(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUTLINE(line));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pango_layout_path(VALUE self, VALUE layout)
|
||||
{
|
||||
pango_cairo_layout_path(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
static VALUE
|
||||
rg_pango_error_underline_path(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
pango_cairo_error_underline_path(RVAL2CRCONTEXT(self),
|
||||
NUM2DBL(x), NUM2DBL(y),
|
||||
NUM2DBL(width), NUM2DBL(height));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_cairo_context(VALUE mPango)
|
||||
{
|
||||
#ifdef CAIRO_AVAILABLE
|
||||
/* Cairo::Context */
|
||||
RG_DEF_METHOD(update_pango_context, 1);
|
||||
/* Convenience */
|
||||
RG_DEF_METHOD(create_pango_layout, 0);
|
||||
RG_DEF_METHOD(update_pango_layout, 1);
|
||||
/* Rendering */
|
||||
RG_DEF_METHOD(show_pango_glyph_string, 2);
|
||||
RG_DEF_METHOD(show_pango_layout_line, 1);
|
||||
RG_DEF_METHOD(show_pango_layout, 1);
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
RG_DEF_METHOD(show_pango_error_underline, 4);
|
||||
#endif
|
||||
/* Rendering to a path */
|
||||
RG_DEF_METHOD(pango_glyph_string_path, 2);
|
||||
RG_DEF_METHOD(pango_layout_line_path, 1);
|
||||
RG_DEF_METHOD(pango_layout_path, 1);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
RG_DEF_METHOD(pango_error_underline_path, 4);
|
||||
#endif
|
||||
#endif
|
||||
}
|
120
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocolor.c
Normal file
120
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocolor.c
Normal file
@ -0,0 +1,120 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cColor
|
||||
#define _SELF(self) (RVAL2PANGOCOLOR(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE red, VALUE green, VALUE blue)
|
||||
{
|
||||
PangoColor color;
|
||||
|
||||
color.red = NUM2UINT(red);
|
||||
color.green = NUM2UINT(green);
|
||||
color.blue = NUM2UINT(blue);
|
||||
|
||||
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_COLOR, &color));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_parse(VALUE self, VALUE spec)
|
||||
{
|
||||
return CBOOL2RVAL(pango_color_parse(_SELF(self), RVAL2CSTR(spec)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_red(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->red);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_red(VALUE self, VALUE red)
|
||||
{
|
||||
_SELF(self)->red = NUM2UINT(red);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_green(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->green);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_green(VALUE self, VALUE green)
|
||||
{
|
||||
_SELF(self)->green = NUM2UINT(green);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_blue(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->blue);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_blue(VALUE self, VALUE blue)
|
||||
{
|
||||
_SELF(self)->blue = NUM2UINT(blue);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_a(VALUE self)
|
||||
{
|
||||
PangoColor *c = _SELF(self);
|
||||
return rb_ary_new3(3,
|
||||
UINT2NUM(c->red),
|
||||
UINT2NUM(c->green),
|
||||
UINT2NUM(c->blue));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_color_equal(VALUE self, VALUE other)
|
||||
{
|
||||
PangoColor* c1 = _SELF(self);
|
||||
PangoColor* c2 = _SELF(other);
|
||||
|
||||
return CBOOL2RVAL((c1->red == c2->red) && (c1->green == c2->green) &&
|
||||
(c1->blue == c2->blue));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_color(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_COLOR, "Color", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 3);
|
||||
RG_DEF_METHOD(parse, 1);
|
||||
RG_DEF_METHOD(red, 0);
|
||||
RG_DEF_METHOD(set_red, 1);
|
||||
RG_DEF_METHOD(green, 0);
|
||||
RG_DEF_METHOD(set_green, 1);
|
||||
RG_DEF_METHOD(blue, 0);
|
||||
RG_DEF_METHOD(set_blue, 1);
|
||||
RG_DEF_METHOD(to_a, 0);
|
||||
RG_DEF_METHOD_OPERATOR("==", color_equal, 1);
|
||||
}
|
321
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocontext.c
Normal file
321
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocontext.c
Normal file
@ -0,0 +1,321 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cContext
|
||||
#define _SELF(self) (RVAL2PANGOCONTEXT(self))
|
||||
|
||||
static VALUE
|
||||
rg_itemize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE arg1, arg2, arg3, arg4, arg5, arg6;
|
||||
GList* list;
|
||||
|
||||
rb_scan_args(argc, argv, "42", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6);
|
||||
|
||||
if (TYPE(arg1) == T_STRING) {
|
||||
list = pango_itemize(_SELF(self),
|
||||
RVAL2CSTR(arg1), /* text */
|
||||
NUM2INT(arg2), /* start_index */
|
||||
NUM2INT(arg3), /* length */
|
||||
RVAL2PANGOATTRLIST(arg4), /* attrs */
|
||||
NIL_P(arg5) ? NULL : RVAL2PANGOATTRITERATOR(arg5)); /* cached_iter */
|
||||
} else {
|
||||
#ifdef HAVE_PANGO_ITEMIZE_WITH_BASE_DIR
|
||||
list = pango_itemize_with_base_dir(_SELF(self),
|
||||
RVAL2PANGODIRECTION(arg1), /* base_dir */
|
||||
RVAL2CSTR(arg2), /* text */
|
||||
NUM2INT(arg3), /* start_index */
|
||||
NUM2INT(arg4), /* length */
|
||||
RVAL2PANGOATTRLIST(arg5), /* attrs */
|
||||
NIL_P(arg6) ? NULL : RVAL2PANGOATTRITERATOR(arg6)); /* cached_iter */
|
||||
#else
|
||||
rb_warn("Pango::Context#itemize(base_dir, text, start_index, length, attrs, cached_iter) isn't supported on this environment.");
|
||||
list = pango_itemize(_SELF(self),
|
||||
RVAL2CSTR(arg1), /* text */
|
||||
NUM2INT(arg2), /* start_index */
|
||||
NUM2INT(arg3), /* length */
|
||||
RVAL2PANGOATTRLIST(arg4), /* attrs */
|
||||
NIL_P(arg5) ? NULL : RVAL2PANGOATTRITERATOR(arg5)); /* cached_iter */
|
||||
#endif
|
||||
}
|
||||
return GLIST2ARY2F(list, PANGO_TYPE_ITEM);
|
||||
}
|
||||
|
||||
/* Move to Pango module (rbpangomain.c)
|
||||
GList* pango_reorder_items (GList *logical_items);
|
||||
*/
|
||||
|
||||
#ifdef PANGO_ENABLE_BACKEND
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_context_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_font_map(VALUE self, VALUE font_map)
|
||||
{
|
||||
pango_context_set_font_map(_SELF(self), RVAL2PANGOFONTMAP(font_map));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
static VALUE
|
||||
rg_font_map(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(pango_context_get_font_map(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
#endif /* PANGO_ENABLE_BACKEND */
|
||||
|
||||
static VALUE
|
||||
rg_font_description(VALUE self)
|
||||
{
|
||||
PangoFontDescription* ret = pango_context_get_font_description(_SELF(self));
|
||||
return PANGOFONTDESCRIPTION2RVAL(ret);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_font_description(VALUE self, VALUE desc)
|
||||
{
|
||||
pango_context_set_font_description(_SELF(self), RVAL2PANGOFONTDESCRIPTION(desc));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_language(VALUE self)
|
||||
{
|
||||
PangoLanguage* ret = pango_context_get_language(_SELF(self));
|
||||
return PANGOLANGUAGE2RVAL(ret);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_language(VALUE self, VALUE lang)
|
||||
{
|
||||
pango_context_set_language(_SELF(self),
|
||||
RVAL2PANGOLANGUAGE(lang));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_base_dir(VALUE self)
|
||||
{
|
||||
return PANGODIRECTION2RVAL(pango_context_get_base_dir(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_base_dir(VALUE self, VALUE direction)
|
||||
{
|
||||
pango_context_set_base_dir(_SELF(self), RVAL2PANGODIRECTION(direction));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
static VALUE
|
||||
rg_base_gravity(VALUE self)
|
||||
{
|
||||
return PANGOGRAVITY2RVAL(pango_context_get_base_gravity(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_base_gravity(VALUE self, VALUE gravity)
|
||||
{
|
||||
pango_context_set_base_gravity(_SELF(self), RVAL2PANGOGRAVITY(gravity));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_gravity_hint(VALUE self)
|
||||
{
|
||||
return PANGOGRAVITYHINT2RVAL(pango_context_get_gravity_hint(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_gravity_hint(VALUE self, VALUE gravity_hint)
|
||||
{
|
||||
pango_context_set_gravity_hint(_SELF(self), RVAL2PANGOGRAVITYHINT(gravity_hint));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
static VALUE
|
||||
rg_matrix(VALUE self)
|
||||
{
|
||||
const PangoMatrix* matrix = pango_context_get_matrix(_SELF(self));
|
||||
return PANGOMATRIX2RVAL((PangoMatrix*)matrix);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_matrix(VALUE self, VALUE matrix)
|
||||
{
|
||||
pango_context_set_matrix(_SELF(self),
|
||||
RVAL2PANGOMATRIX(matrix));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_load_font(VALUE self, VALUE desc)
|
||||
{
|
||||
return GOBJ2RVAL(pango_context_load_font(_SELF(self), RVAL2PANGOFONTDESCRIPTION(desc)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_load_fontset(VALUE self, VALUE desc, VALUE lang)
|
||||
{
|
||||
return GOBJ2RVAL(pango_context_load_fontset(_SELF(self),
|
||||
RVAL2PANGOFONTDESCRIPTION(desc), RVAL2PANGOLANGUAGE(lang)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_metrics(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE desc, lang;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &desc, &lang);
|
||||
|
||||
return PANGOFONTMETRICS2RVAL(pango_context_get_metrics(_SELF(self),
|
||||
RVAL2PANGOFONTDESCRIPTION(desc),
|
||||
NIL_P(lang) ? NULL : RVAL2PANGOLANGUAGE(lang)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_families(VALUE self)
|
||||
{
|
||||
int n_families;
|
||||
PangoFontFamily** families;
|
||||
int i;
|
||||
VALUE result;
|
||||
|
||||
pango_context_list_families(_SELF(self),
|
||||
&families,
|
||||
&n_families);
|
||||
|
||||
result = rb_ary_new2(n_families);
|
||||
for (i = 0; i < n_families; i++)
|
||||
rb_ary_store(result, i, GOBJ2RVAL(families[i]));
|
||||
|
||||
g_free(families);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,10,0)
|
||||
# ifdef HAVE_RB_CAIRO_H
|
||||
static VALUE
|
||||
rg_set_font_options(VALUE self, VALUE options)
|
||||
{
|
||||
if (NIL_P(options))
|
||||
pango_cairo_context_set_font_options(_SELF(self), NULL);
|
||||
else
|
||||
pango_cairo_context_set_font_options(_SELF(self),
|
||||
RVAL2CRFONTOPTIONS(options));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_font_options(VALUE self)
|
||||
{
|
||||
const cairo_font_options_t *options;
|
||||
options = pango_cairo_context_get_font_options(_SELF(self));
|
||||
if (options)
|
||||
return CRFONTOPTIONS2RVAL(cairo_font_options_copy(options));
|
||||
else
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_resolution(VALUE self, VALUE dpi)
|
||||
{
|
||||
pango_cairo_context_set_resolution(_SELF(self), NUM2DBL(dpi));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_resolution(VALUE self)
|
||||
{
|
||||
return rb_float_new(pango_cairo_context_get_resolution(_SELF(self)));
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_list_families(VALUE self)
|
||||
{
|
||||
rb_warn("Deprecated. Use Pango::Context#families instead.");
|
||||
return rg_families(self);
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_context(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_CONTEXT, "Context", mPango);
|
||||
|
||||
RG_DEF_METHOD(itemize, -1);
|
||||
|
||||
#ifdef PANGO_ENABLE_BACKEND
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(set_font_map, 1);
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
RG_DEF_METHOD(font_map, 0);
|
||||
#endif
|
||||
#endif /* PANGO_ENABLE_BACKEND */
|
||||
RG_DEF_METHOD(font_description, 0);
|
||||
RG_DEF_METHOD(set_font_description, 1);
|
||||
RG_DEF_METHOD(language, 0);
|
||||
RG_DEF_METHOD(set_language, 1);
|
||||
RG_DEF_METHOD(base_dir, 0);
|
||||
RG_DEF_METHOD(set_base_dir, 1);
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
RG_DEF_METHOD(base_gravity, 0);
|
||||
RG_DEF_METHOD(set_base_gravity, 1);
|
||||
RG_DEF_METHOD(gravity_hint, 0);
|
||||
RG_DEF_METHOD(set_gravity_hint, 1);
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
RG_DEF_METHOD(matrix, 0);
|
||||
RG_DEF_METHOD(set_matrix, 1);
|
||||
#endif
|
||||
RG_DEF_METHOD(load_font, 1);
|
||||
RG_DEF_METHOD(load_fontset, 2);
|
||||
RG_DEF_METHOD(get_metrics, -1);
|
||||
RG_DEF_METHOD(families, 0);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,10,0)
|
||||
# ifdef HAVE_RB_CAIRO_H
|
||||
RG_DEF_METHOD(set_font_options, 1);
|
||||
RG_DEF_METHOD(font_options, 0);
|
||||
RG_DEF_METHOD(set_resolution, 1);
|
||||
RG_DEF_METHOD(resolution, 0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This will remove 2 or 3 releases later since 0.14.0. */
|
||||
RG_DEF_METHOD(list_families, 0);
|
||||
|
||||
/* PangoDirection */
|
||||
G_DEF_CLASS(PANGO_TYPE_DIRECTION, "Direction", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_DIRECTION, "PANGO_");
|
||||
}
|
111
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoconversions.h
Normal file
111
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoconversions.h
Normal file
@ -0,0 +1,111 @@
|
||||
/* -*- 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 __PANGOCONVERSIONS_H__
|
||||
#define __PANGOCONVERSIONS_H__
|
||||
|
||||
#define RVAL2PANGOCAIROFONTMAP(o) (PANGO_CAIRO_FONT_MAP(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOCONTEXT(o) (PANGO_CONTEXT(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOENGINE(o) (PANGO_ENGINE(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOENGINELANG(o) (PANGO_ENGINE_LANG(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOENGINESHAPE(o) (PANGO_ENGINE_SHAPE(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONT(o) (PANGO_FONT(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONTSET(o) (PANGO_FONTSET(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONTSETSIMPLE(o) (PANGO_FONTSET_SIMPLE(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONTFACE(o) (PANGO_FONT_FACE(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONTFAMILY(o) (PANGO_FONT_FAMILY(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOFONTMAP(o) (PANGO_FONT_MAP(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGOLAYOUT(o) (PANGO_LAYOUT(RVAL2GOBJ(o)))
|
||||
#define RVAL2PANGORENDERER(o) (PANGO_RENDERER(RVAL2GOBJ(o)))
|
||||
|
||||
#define RVAL2PANGOANALYSIS(o) ((PangoAnalysis*)RVAL2BOXED(o, PANGO_TYPE_ANALYSIS))
|
||||
#define PANGOANALYSIS2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_ANALYSIS))
|
||||
#define RVAL2PANGOATTRITERATOR(o) ((PangoAttrIterator*)RVAL2BOXED(o, PANGO_TYPE_ATTR_ITERATOR))
|
||||
#define PANGOATTRITERATOR2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_ATTR_ITERATOR))
|
||||
#define RVAL2PANGOATTRLIST(o) ((PangoAttrList*)RVAL2BOXED(o, PANGO_TYPE_ATTR_LIST))
|
||||
#define PANGOATTRLIST2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_ATTR_LIST))
|
||||
#define RVAL2PANGOCOLOR(o) ((PangoColor*)RVAL2BOXED(o, PANGO_TYPE_COLOR))
|
||||
#define PANGOCOLOR2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_COLOR))
|
||||
#define RVAL2PANGOCOVERAGE(o) ((PangoCoverage*)RVAL2BOXED(o, PANGO_TYPE_COVERAGE))
|
||||
#define PANGOCOVERAGE2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_COVERAGE))
|
||||
#define RVAL2PANGOFONTDESCRIPTION(o) ((PangoFontDescription*)RVAL2BOXED(o, PANGO_TYPE_FONT_DESCRIPTION))
|
||||
#define PANGOFONTDESCRIPTION2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_FONT_DESCRIPTION))
|
||||
#define RVAL2PANGOFONTMETRICS(o) ((PangoFontMetrics*)RVAL2BOXED(o, PANGO_TYPE_FONT_METRICS))
|
||||
#define PANGOFONTMETRICS2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_FONT_METRICS))
|
||||
#define RVAL2PANGOGLYPHINFO(o) ((PangoGlyphInfo*)RVAL2BOXED(o, PANGO_TYPE_GLYPH_INFO))
|
||||
#define PANGOGLYPHINFO2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_GLYPH_INFO))
|
||||
#define RVAL2PANGOGLYPHITEM(o) ((PangoGlyphItem*)RVAL2BOXED(o, PANGO_TYPE_GLYPH_ITEM))
|
||||
#define PANGOGLYPHITEM2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_GLYPH_ITEM))
|
||||
#define RVAL2PANGOGLYPHSTRING(o) ((PangoGlyphString*)RVAL2BOXED(o, PANGO_TYPE_GLYPH_STRING))
|
||||
#define PANGOGLYPHSTRING2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_GLYPH_STRING))
|
||||
#define RVAL2PANGOITEM(o) ((PangoItem*)RVAL2BOXED(o, PANGO_TYPE_ITEM))
|
||||
#define PANGOITEM2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_ITEM))
|
||||
#define RVAL2PANGOLANGUAGE(o) ((PangoLanguage*)RVAL2BOXED(o, PANGO_TYPE_LANGUAGE))
|
||||
#define PANGOLANGUAGE2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_LANGUAGE))
|
||||
#define RVAL2PANGOLAYOUTITER(o) ((PangoLayoutIter*)RVAL2BOXED(o, PANGO_TYPE_LAYOUT_ITER))
|
||||
#define PANGOLAYOUTITER2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_LAYOUT_ITER))
|
||||
#define RVAL2PANGOLAYOUTLINE(o) ((PangoLayoutLine*)RVAL2BOXED(o, PANGO_TYPE_LAYOUT_LINE))
|
||||
#define PANGOLAYOUTLINE2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_LAYOUT_LINE))
|
||||
#define RVAL2PANGOLOGATTR(o) ((PangoLogAttr*)RVAL2BOXED(o, PANGO_TYPE_LOG_ATTR))
|
||||
#define PANGOLOGATTR2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_LOG_ATTR))
|
||||
#define RVAL2PANGOMATRIX(o) ((PangoMatrix*)RVAL2BOXED(o, PANGO_TYPE_MATRIX))
|
||||
#define PANGOMATRIX2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_MATRIX))
|
||||
#define RVAL2PANGORECTANGLE(o) ((PangoRectangle*)RVAL2BOXED(o, PANGO_TYPE_RECTANGLE))
|
||||
#define PANGORECTANGLE2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_RECTANGLE))
|
||||
#define RVAL2PANGOSCRIPTITER(o) ((PangoScriptIter*)RVAL2BOXED(o, PANGO_TYPE_SCRIPT_ITER))
|
||||
#define PANGOSCRIPTITER2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_SCRIPT_ITER))
|
||||
#define RVAL2PANGOTABARRAY(o) ((PangoTabArray*)RVAL2BOXED(o, PANGO_TYPE_TAB_ARRAY))
|
||||
#define PANGOTABARRAY2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_TAB_ARRAY))
|
||||
|
||||
#define RVAL2PANGOALIGNMENT(o) (RVAL2GENUM(o, PANGO_TYPE_ALIGNMENT))
|
||||
#define PANGOALIGNMENT2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_ALIGNMENT))
|
||||
#define RVAL2PANGOCOVERAGELEVEL(o) (RVAL2GENUM(o, PANGO_TYPE_COVERAGE_LEVEL))
|
||||
#define PANGOCOVERAGELEVEL2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_COVERAGE_LEVEL))
|
||||
#define RVAL2PANGODIRECTION(o) (RVAL2GENUM(o, PANGO_TYPE_DIRECTION))
|
||||
#define PANGODIRECTION2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_DIRECTION))
|
||||
#define RVAL2PANGOELLIPSIZEMODE(o) (RVAL2GENUM(o, PANGO_TYPE_ELLIPSIZE_MODE))
|
||||
#define PANGOELLIPSIZEMODE2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_ELLIPSIZE_MODE))
|
||||
#define RVAL2PANGOGRAVITY(o) (RVAL2GENUM(o, PANGO_TYPE_GRAVITY))
|
||||
#define PANGOGRAVITY2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_GRAVITY))
|
||||
#define RVAL2PANGOGRAVITYHINT(o) (RVAL2GENUM(o, PANGO_TYPE_GRAVITY_HINT))
|
||||
#define PANGOGRAVITYHINT2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_GRAVITY_HINT))
|
||||
#define RVAL2PANGORENDERPART(o) (RVAL2GENUM(o, PANGO_TYPE_RENDER_PART))
|
||||
#define PANGORENDERPART2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_RENDER_PART))
|
||||
#define RVAL2PANGOSCRIPT(o) (RVAL2GENUM(o, PANGO_TYPE_SCRIPT))
|
||||
#define PANGOSCRIPT2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_SCRIPT))
|
||||
#define RVAL2PANGOSTRETCH(o) (RVAL2GENUM(o, PANGO_TYPE_STRETCH))
|
||||
#define PANGOSTRETCH2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_STRETCH))
|
||||
#define RVAL2PANGOSTYLE(o) (RVAL2GENUM(o, PANGO_TYPE_STYLE))
|
||||
#define PANGOSTYLE2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_STYLE))
|
||||
#define RVAL2PANGOTABALIGN(o) (RVAL2GENUM(o, PANGO_TYPE_TAB_ALIGN))
|
||||
#define PANGOTABALIGN2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_TAB_ALIGN))
|
||||
#define RVAL2PANGOUNDERLINE(o) (RVAL2GENUM(o, PANGO_TYPE_UNDERLINE))
|
||||
#define PANGOUNDERLINE2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_UNDERLINE))
|
||||
#define RVAL2PANGOVARIANT(o) (RVAL2GENUM(o, PANGO_TYPE_VARIANT))
|
||||
#define PANGOVARIANT2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_VARIANT))
|
||||
#define RVAL2PANGOWEIGHT(o) (RVAL2GENUM(o, PANGO_TYPE_WEIGHT))
|
||||
#define PANGOWEIGHT2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_WEIGHT))
|
||||
#define RVAL2PANGOWRAPMODE(o) (RVAL2GENUM(o, PANGO_TYPE_WRAP_MODE))
|
||||
#define PANGOWRAPMODE2RVAL(o) (GENUM2RVAL(o, PANGO_TYPE_WRAP_MODE))
|
||||
|
||||
#define RVAL2PANGOFONTMASK(o) (RVAL2GFLAGS(o, PANGO_TYPE_FONT_MASK))
|
||||
#define PANGOFONTMASK2RVAL(o) (GFLAGS2RVAL(o, PANGO_TYPE_FONT_MASK))
|
||||
|
||||
#endif /* __PANGOCONVERSIONS_H__ */
|
106
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocoverage.c
Normal file
106
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangocoverage.c
Normal file
@ -0,0 +1,106 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cCoverage
|
||||
#define _SELF(self) (RVAL2PANGOCOVERAGE(self))
|
||||
|
||||
/**********************************/
|
||||
GType
|
||||
pango_coverage_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoCoverage",
|
||||
(GBoxedCopyFunc)pango_coverage_copy,
|
||||
(GBoxedFreeFunc)pango_coverage_unref);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_coverage_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_level(VALUE self, VALUE index_)
|
||||
{
|
||||
return PANGOCOVERAGELEVEL2RVAL(pango_coverage_get(_SELF(self), NUM2INT(index_)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_max_bang(VALUE self, VALUE other)
|
||||
{
|
||||
pango_coverage_max(_SELF(self), _SELF(other));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set(VALUE self, VALUE index_, VALUE level)
|
||||
{
|
||||
pango_coverage_set(_SELF(self), NUM2INT(index_),
|
||||
RVAL2PANGOCOVERAGELEVEL(level));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_bytes(VALUE self)
|
||||
{
|
||||
guchar* bytes;
|
||||
int n_bytes;
|
||||
VALUE ret;
|
||||
|
||||
pango_coverage_to_bytes(_SELF(self), &bytes, &n_bytes);
|
||||
ret = rb_str_new((const char*)bytes, n_bytes);
|
||||
g_free(bytes);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_from_bytes(G_GNUC_UNUSED VALUE self, VALUE bytes)
|
||||
{
|
||||
StringValue(bytes);
|
||||
return PANGOCOVERAGE2RVAL(pango_coverage_from_bytes((guchar *)RSTRING_PTR(bytes),
|
||||
RSTRING_LEN(bytes)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_coverage(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_COVERAGE, "Coverage", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(get_level, 0);
|
||||
RG_DEF_METHOD_BANG(max, 1);
|
||||
RG_DEF_METHOD(set, 2);
|
||||
RG_DEF_METHOD(to_bytes, 0);
|
||||
RG_DEF_SMETHOD(from_bytes, 1);
|
||||
|
||||
/* PangoCoverageLevel */
|
||||
G_DEF_CLASS(PANGO_TYPE_COVERAGE_LEVEL, "Level", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_COVERAGE_LEVEL, "PANGO_COVERAGE_");
|
||||
}
|
73
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoengine.c
Normal file
73
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoengine.c
Normal file
@ -0,0 +1,73 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#ifdef PANGO_TYPE_ENGINE
|
||||
|
||||
#define _SELF(self) (RVAL2PANGOENGINE(self))
|
||||
|
||||
/* FIXME
|
||||
static VALUE
|
||||
rbpango_s_engine_list(VALUE self)
|
||||
{
|
||||
PangoEngineInfo* engines = g_new(PangoEngineInfo, 1);
|
||||
int i, n;
|
||||
VALUE ary;
|
||||
|
||||
script_engine_list(&engines, &n);
|
||||
ary = rb_ary_new();
|
||||
|
||||
for(i = 0; i < n; i++){
|
||||
rb_ary_push(ary, GOBJ2RVAL(&engines[i]));
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rbpango_s_engine_create(VALUE self, VALUE id)
|
||||
{
|
||||
return GOBJ2RVAL(script_engine_create(RVAL2CSTR(id)));
|
||||
}
|
||||
*/
|
||||
/*
|
||||
void script_engine_init (GTypeModule *module);
|
||||
void script_engine_exit (void);
|
||||
PangoEngine* script_engine_create (const char *id);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_engine(VALUE mPango)
|
||||
{
|
||||
#ifdef PANGO_TYPE_ENGINE
|
||||
G_DEF_CLASS(PANGO_TYPE_ENGINE, "Engine", mPango);
|
||||
|
||||
/* FIXME
|
||||
rb_define_singleton_method(engine, "engines", rbpango_s_engine_list, 0);
|
||||
rb_define_singleton_method(engine, "create", rbpango_s_engine_create, 1);
|
||||
*/
|
||||
G_DEF_CLASS(PANGO_TYPE_ENGINE_LANG, "EngineLang", mPango);
|
||||
G_DEF_CLASS(PANGO_TYPE_ENGINE_SHAPE, "EngineShape", mPango);
|
||||
#endif
|
||||
}
|
||||
|
122
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofont.c
Normal file
122
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofont.c
Normal file
@ -0,0 +1,122 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-2006 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFont
|
||||
#define _SELF(self) (RVAL2PANGOFONT(self))
|
||||
|
||||
static VALUE
|
||||
rg_find_shaper(VALUE self, VALUE language, VALUE ch)
|
||||
{
|
||||
return GOBJ2RVAL(pango_font_find_shaper(_SELF(self),
|
||||
RVAL2PANGOLANGUAGE(language),
|
||||
NUM2UINT(ch)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_describe(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE desc, absolute_size;
|
||||
rb_scan_args(argc, argv, "01", &absolute_size);
|
||||
|
||||
if (NIL_P(absolute_size) || ! RVAL2CBOOL(absolute_size)){
|
||||
desc = PANGOFONTDESCRIPTION2RVAL(pango_font_describe(_SELF(self)));
|
||||
} else {
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
desc = PANGOFONTDESCRIPTION2RVAL(pango_font_describe_with_absolute_size(_SELF(self)));
|
||||
#else
|
||||
rb_warning("Pango::Font#describe(absolute) has been supported since GTK+-2.10.x. Use Pango::Font#describe() instead.");
|
||||
desc = PANGOFONTDESCRIPTION2RVAL(pango_font_describe(_SELF(self)));
|
||||
#endif
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_coverage(VALUE self, VALUE language)
|
||||
{
|
||||
PangoCoverage* c = pango_font_get_coverage(_SELF(self),
|
||||
RVAL2PANGOLANGUAGE(language));
|
||||
return PANGOCOVERAGE2RVAL(c);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_glyph_extents(VALUE self, VALUE glyph)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
pango_font_get_glyph_extents(_SELF(self),
|
||||
NUM2UINT(glyph),
|
||||
&ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_metrics(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE language;
|
||||
PangoLanguage* lang = NULL;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &language);
|
||||
|
||||
if (!NIL_P(language))
|
||||
lang = RVAL2PANGOLANGUAGE(language);
|
||||
|
||||
return PANGOFONTMETRICS2RVAL(pango_font_get_metrics(_SELF(self), lang));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,9,0)
|
||||
static VALUE
|
||||
rg_font_map(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(pango_font_get_font_map(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_font(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT, "Font", mPango);
|
||||
|
||||
RG_DEF_METHOD(find_shaper, 2);
|
||||
RG_DEF_METHOD(describe, -1);
|
||||
RG_DEF_METHOD(get_coverage, 1);
|
||||
RG_DEF_METHOD(get_glyph_extents, 1);
|
||||
RG_DEF_METHOD(metrics, -1);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,9,0)
|
||||
RG_DEF_METHOD(font_map, 0);
|
||||
#endif
|
||||
|
||||
G_DEF_CLASS3("PangoXFont", "XFont", mPango);
|
||||
G_DEF_CLASS3("PangoFT2Font", "FT2Font", mPango);
|
||||
G_DEF_CLASS3("PangoFcFont", "FcFont", mPango);
|
||||
G_DEF_CLASS3("PangoXftFont", "XftFont", mPango);
|
||||
G_DEF_CLASS3("PangoCairoFcFont", "CairoFcFont", mPango);
|
||||
G_DEF_CLASS3("PangoCairoFont", "CairoFont", mPango);
|
||||
G_DEF_CLASS3("PangoCairoWin32Font", "CairoWin32Font", mPango);
|
||||
#if PANGO_CHECK_VERSION(1,12,0)
|
||||
G_DEF_CLASS3("PangoATSUIFont", "ATSUIFont", mPango);
|
||||
#endif
|
||||
}
|
287
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontdescription.c
Normal file
287
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontdescription.c
Normal file
@ -0,0 +1,287 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011-2013 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontDescription
|
||||
#define _SELF(self) (RVAL2PANGOFONTDESCRIPTION(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE str;
|
||||
PangoFontDescription *description;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &str);
|
||||
|
||||
if (NIL_P(str)) {
|
||||
description = pango_font_description_new();
|
||||
} else {
|
||||
description = pango_font_description_from_string(RVAL2CSTR(str));
|
||||
}
|
||||
|
||||
G_INITIALIZE(self, description);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
/*
|
||||
PangoFontDescription* pango_font_description_copy
|
||||
(const PangoFontDescription *desc);
|
||||
PangoFontDescription* pango_font_description_copy_static
|
||||
(const PangoFontDescription *desc);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_hash(VALUE self)
|
||||
{
|
||||
return UINT2NUM(pango_font_description_hash(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_font_desc_equal(VALUE self, VALUE other)
|
||||
{
|
||||
return CBOOL2RVAL(pango_font_description_equal(_SELF(self), _SELF(other)));
|
||||
}
|
||||
|
||||
/* Don't we need this?
|
||||
void pango_font_descriptions_free (PangoFontDescription **descs,
|
||||
int n_descs);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_set_family(VALUE self, VALUE family)
|
||||
{
|
||||
pango_font_description_set_family(_SELF(self), RVAL2CSTR(family));
|
||||
return self;
|
||||
}
|
||||
/* Don't we need this?
|
||||
void pango_font_description_set_family_static
|
||||
(PangoFontDescription *desc,
|
||||
const char *family);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_family(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_description_get_family(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_style(VALUE self, VALUE style)
|
||||
{
|
||||
pango_font_description_set_style(_SELF(self), RVAL2PANGOSTYLE(style));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_style(VALUE self)
|
||||
{
|
||||
return PANGOSTYLE2RVAL(pango_font_description_get_style(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_variant(VALUE self, VALUE variant)
|
||||
{
|
||||
pango_font_description_set_variant(_SELF(self), RVAL2PANGOVARIANT(variant));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_variant(VALUE self)
|
||||
{
|
||||
return PANGOVARIANT2RVAL(pango_font_description_get_variant(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_weight(VALUE self, VALUE weight)
|
||||
{
|
||||
pango_font_description_set_weight(_SELF(self),
|
||||
RVAL2PANGOWEIGHT(weight));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_weight(VALUE self)
|
||||
{
|
||||
return PANGOWEIGHT2RVAL(pango_font_description_get_weight(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_stretch(VALUE self, VALUE stretch)
|
||||
{
|
||||
pango_font_description_set_stretch(_SELF(self), RVAL2PANGOSTRETCH(stretch));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_stretch(VALUE self)
|
||||
{
|
||||
return PANGOSTRETCH2RVAL(pango_font_description_get_stretch(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_size(VALUE self, VALUE size)
|
||||
{
|
||||
pango_font_description_set_size(_SELF(self), NUM2INT(size));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_description_get_size(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
static VALUE
|
||||
rg_set_absolute_size(VALUE self, VALUE size)
|
||||
{
|
||||
pango_font_description_set_absolute_size(_SELF(self), NUM2INT(size));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size_is_absolute_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_font_description_get_size_is_absolute(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
static VALUE
|
||||
rg_gravity(VALUE self)
|
||||
{
|
||||
return PANGOGRAVITY2RVAL(pango_font_description_get_gravity(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_gravity(VALUE self, VALUE gravity)
|
||||
{
|
||||
pango_font_description_set_gravity(_SELF(self), RVAL2PANGOGRAVITY(gravity));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_set_fields(VALUE self)
|
||||
{
|
||||
return PANGOFONTMASK2RVAL(pango_font_description_get_set_fields(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_unset_fields(VALUE self, VALUE to_unset)
|
||||
{
|
||||
pango_font_description_unset_fields(_SELF(self), RVAL2PANGOFONTMASK(to_unset));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_merge(VALUE self, VALUE desc_to_merge, VALUE replace_existing)
|
||||
{
|
||||
pango_font_description_merge(_SELF(self), _SELF(desc_to_merge),
|
||||
RVAL2CBOOL(replace_existing));
|
||||
return self;
|
||||
}
|
||||
|
||||
/* Don't we need this?
|
||||
void pango_font_description_merge_static
|
||||
(PangoFontDescription *desc,
|
||||
const PangoFontDescription *desc_to_merge,
|
||||
gboolean replace_existing);
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_better_match(VALUE self, VALUE old_match, VALUE new_match)
|
||||
{
|
||||
return CBOOL2RVAL(pango_font_description_better_match(_SELF(self),
|
||||
_SELF(old_match),
|
||||
_SELF(new_match)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_str(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_description_to_string(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_filename(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_description_to_filename(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_font_description(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_DESCRIPTION, "FontDescription", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
RG_DEF_METHOD(hash, 0);
|
||||
RG_DEF_METHOD_OPERATOR("==", font_desc_equal, 1);
|
||||
RG_DEF_METHOD(set_family, 1);
|
||||
RG_DEF_METHOD(family, 0);
|
||||
RG_DEF_METHOD(set_style, 1);
|
||||
RG_DEF_METHOD(style, 0);
|
||||
RG_DEF_METHOD(set_variant, 1);
|
||||
RG_DEF_METHOD(variant, 0);
|
||||
RG_DEF_METHOD(set_weight, 1);
|
||||
RG_DEF_METHOD(weight, 0);
|
||||
RG_DEF_METHOD(set_stretch, 1);
|
||||
RG_DEF_METHOD(stretch, 0);
|
||||
RG_DEF_METHOD(set_size, 1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
RG_DEF_METHOD(set_absolute_size, 1);
|
||||
RG_DEF_METHOD_P(size_is_absolute, 0);
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
RG_DEF_METHOD(set_gravity, 1);
|
||||
RG_DEF_METHOD(gravity, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_fields, 0);
|
||||
RG_DEF_METHOD(unset_fields, 1);
|
||||
RG_DEF_METHOD(merge, 2);
|
||||
RG_DEF_METHOD(better_match, 2);
|
||||
RG_DEF_METHOD(to_str, 0);
|
||||
RG_DEF_ALIAS("to_s", "to_str");
|
||||
RG_DEF_METHOD(to_filename, 0);
|
||||
|
||||
/* PangoStyle */
|
||||
G_DEF_CLASS(PANGO_TYPE_STYLE, "Style", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_STYLE, "PANGO_");
|
||||
|
||||
/* PangoWeight */
|
||||
G_DEF_CLASS(PANGO_TYPE_WEIGHT, "Weight", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_WEIGHT, "PANGO_");
|
||||
|
||||
/* PangoVariant */
|
||||
G_DEF_CLASS(PANGO_TYPE_VARIANT, "Variant", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_VARIANT, "PANGO_");
|
||||
|
||||
/* PangoStretch */
|
||||
G_DEF_CLASS(PANGO_TYPE_STRETCH, "Stretch", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_STRETCH, "PANGO_");
|
||||
|
||||
/* PangoFontMask */
|
||||
G_DEF_CLASS(PANGO_TYPE_FONT_MASK, "FontMask", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_FONT_MASK, "PANGO_");
|
||||
}
|
79
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontface.c
Normal file
79
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontface.c
Normal file
@ -0,0 +1,79 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontFace
|
||||
#define _SELF(self) (RVAL2PANGOFONTFACE(self))
|
||||
|
||||
static VALUE
|
||||
rg_name(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_face_get_face_name(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_describe(VALUE self)
|
||||
{
|
||||
return PANGOFONTDESCRIPTION2RVAL(pango_font_face_describe(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_sizes(VALUE self)
|
||||
{
|
||||
int n_sizes;
|
||||
int* sizes;
|
||||
int i;
|
||||
VALUE result;
|
||||
|
||||
pango_font_face_list_sizes(_SELF(self),
|
||||
&sizes,
|
||||
&n_sizes);
|
||||
|
||||
result = rb_ary_new();
|
||||
for (i = 0; i < n_sizes; i++)
|
||||
rb_ary_push(result, GOBJ2RVAL(&sizes[i]));
|
||||
|
||||
g_free(sizes);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_font_face(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_FACE, "FontFace", mPango);
|
||||
|
||||
RG_DEF_METHOD(name, 0);
|
||||
RG_DEF_METHOD(describe, 0);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(sizes, 0);
|
||||
#endif
|
||||
G_DEF_CLASS3("PangoFcFace", "FcFace", mPango);
|
||||
G_DEF_CLASS3("PangoFT2Face", "FT2Face", mPango);
|
||||
G_DEF_CLASS3("PangoXftFace", "XftFace", mPango);
|
||||
G_DEF_CLASS3("PangoXFace", "XFace", mPango);
|
||||
G_DEF_CLASS3("PangoWin32Face", "Win32Face", mPango);
|
||||
#if PANGO_CHECK_VERSION(1,12,0)
|
||||
G_DEF_CLASS3("PangoATSUIFace", "ATSUIFace", mPango);
|
||||
#endif
|
||||
}
|
82
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontfamily.c
Normal file
82
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontfamily.c
Normal file
@ -0,0 +1,82 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontFamily
|
||||
#define _SELF(self) (RVAL2PANGOFONTFAMILY(self))
|
||||
|
||||
static VALUE
|
||||
rg_name(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_family_get_name(_SELF(self)));
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
|
||||
static VALUE
|
||||
rg_monospace_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_font_family_is_monospace(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_faces(VALUE self)
|
||||
{
|
||||
int n_faces;
|
||||
PangoFontFace** faces;
|
||||
int i;
|
||||
VALUE result;
|
||||
|
||||
pango_font_family_list_faces(_SELF(self),
|
||||
&faces,
|
||||
&n_faces);
|
||||
|
||||
result = rb_ary_new2(n_faces);
|
||||
for (i = 0; i < n_faces; i++)
|
||||
rb_ary_store(result, i, GOBJ2RVAL(faces[i]));
|
||||
|
||||
g_free(faces);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_font_family(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_FAMILY, "FontFamily", mPango);
|
||||
|
||||
RG_DEF_METHOD(name, 0);
|
||||
#ifdef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
|
||||
RG_DEF_METHOD_P(monospace, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(faces, 0);
|
||||
|
||||
G_DEF_CLASS3("PangoFcFamily", "FcFamily", mPango);
|
||||
G_DEF_CLASS3("PangoFT2Family", "FT2Family", mPango);
|
||||
G_DEF_CLASS3("PangoXftFamily", "XftFamily", mPango);
|
||||
G_DEF_CLASS3("PangoXFamily", "XFamily", mPango);
|
||||
G_DEF_CLASS3("PangoWin32Family", "Win32Family", mPango);
|
||||
#if PANGO_CHECK_VERSION(1,12,0)
|
||||
G_DEF_CLASS3("PangoATSUIFamily", "ATSUIFamily", mPango);
|
||||
#endif
|
||||
|
||||
}
|
106
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmap.c
Normal file
106
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmap.c
Normal file
@ -0,0 +1,106 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011-2013 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontMap
|
||||
#define _SELF(self) (RVAL2PANGOFONTMAP(self))
|
||||
|
||||
/*
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_ft2_font_map_new());
|
||||
return Qnil;
|
||||
}
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
rg_load_font(VALUE self, VALUE context, VALUE desc)
|
||||
{
|
||||
return GOBJ2RVAL(pango_font_map_load_font(_SELF(self),
|
||||
RVAL2PANGOCONTEXT(context),
|
||||
RVAL2PANGOFONTDESCRIPTION(desc)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_load_fontset(VALUE self, VALUE context, VALUE desc, VALUE lang)
|
||||
{
|
||||
return GOBJ2RVAL(pango_font_map_load_fontset(_SELF(self),
|
||||
RVAL2PANGOCONTEXT(context),
|
||||
RVAL2PANGOFONTDESCRIPTION(desc),
|
||||
RVAL2PANGOLANGUAGE(lang)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_families(VALUE self)
|
||||
{
|
||||
int n_families;
|
||||
PangoFontFamily** families;
|
||||
int i;
|
||||
VALUE result;
|
||||
|
||||
pango_font_map_list_families(_SELF(self),
|
||||
&families,
|
||||
&n_families);
|
||||
|
||||
result = rb_ary_new2(n_families);
|
||||
for (i = 0; i < n_families; i++)
|
||||
rb_ary_store(result, i, GOBJ2RVAL(families[i]));
|
||||
|
||||
g_free(families);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_shape_engine_type(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_font_map_get_shape_engine_type(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_font_map(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_MAP, "FontMap", mPango);
|
||||
|
||||
/*
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
*/
|
||||
RG_DEF_METHOD(load_font, 2);
|
||||
RG_DEF_METHOD(load_fontset, 3);
|
||||
RG_DEF_METHOD(families, 0);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(shape_engine_type, 0);
|
||||
#endif
|
||||
|
||||
G_DEF_CLASS3("PangoFcFontMap", "FcFontMap", mPango);
|
||||
G_DEF_CLASS3("PangoXftFontMap", "XftFontMap", mPango);
|
||||
G_DEF_CLASS3("PangoFT2FontMap", "FT2FontMap", mPango);
|
||||
G_DEF_CLASS3("PangoXFontMap", "XFontMap", mPango);
|
||||
G_DEF_CLASS3("PangoWin32FontMap", "Win32FontMap", mPango);
|
||||
G_DEF_CLASS3("PangoCoreTextFontMap", "CoreTextFontMap", mPango);
|
||||
G_DEF_CLASS3("PangoCairoFcFontMap", "CairoFcFontMap", mPango);
|
||||
G_DEF_CLASS3("PangoCairoWin32FontMap", "CairoWin32FontMap", mPango);
|
||||
G_DEF_CLASS3("PangoCairoCoreTextFontMap", "CairoCoreTextFontMap", mPango);
|
||||
}
|
88
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmetrics.c
Normal file
88
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontmetrics.c
Normal file
@ -0,0 +1,88 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontMetrics
|
||||
#define _SELF(self) (RVAL2PANGOFONTMETRICS(self))
|
||||
|
||||
static VALUE
|
||||
rg_ascent(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_ascent(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_descent(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_descent(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_approximate_char_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_approximate_char_width(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_approximate_digit_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_approximate_digit_width(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
static VALUE
|
||||
rg_underline_thickness(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_underline_thickness(_SELF(self)));
|
||||
}
|
||||
static VALUE
|
||||
rg_underline_position(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_underline_position(_SELF(self)));
|
||||
}
|
||||
static VALUE
|
||||
rg_strikethrough_thickness(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_strikethrough_thickness(_SELF(self)));
|
||||
}
|
||||
static VALUE
|
||||
rg_strikethrough_position(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_font_metrics_get_strikethrough_position(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
void
|
||||
Init_pango_font_metrics(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_METRICS, "FontMetrics", mPango);
|
||||
|
||||
RG_DEF_METHOD(ascent, 0);
|
||||
RG_DEF_METHOD(descent, 0);
|
||||
RG_DEF_METHOD(approximate_char_width, 0);
|
||||
RG_DEF_METHOD(approximate_digit_width, 0);
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
RG_DEF_METHOD(underline_thickness, 0);
|
||||
RG_DEF_METHOD(underline_position, 0);
|
||||
RG_DEF_METHOD(strikethrough_thickness, 0);
|
||||
RG_DEF_METHOD(strikethrough_position, 0);
|
||||
#endif
|
||||
}
|
73
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontset.c
Normal file
73
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontset.c
Normal file
@ -0,0 +1,73 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontset
|
||||
#define _SELF(self) (RVAL2PANGOFONTSET(self))
|
||||
|
||||
static ID id_call;
|
||||
|
||||
static VALUE
|
||||
rg_get_font(VALUE self, VALUE wc)
|
||||
{
|
||||
return GOBJ2RVAL(pango_fontset_get_font(_SELF(self), NUM2UINT(wc)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_metrics(VALUE self)
|
||||
{
|
||||
return PANGOFONTMETRICS2RVAL(pango_fontset_get_metrics(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static gboolean
|
||||
fontset_each(PangoFontset *fontset, PangoFont *font, gpointer func)
|
||||
{
|
||||
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call,
|
||||
2, GOBJ2RVAL(fontset), GOBJ2RVAL(font)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_each(VALUE self)
|
||||
{
|
||||
VALUE func = rb_block_proc();
|
||||
G_RELATIVE(self, func);
|
||||
pango_fontset_foreach(_SELF(self),
|
||||
(PangoFontsetForeachFunc)fontset_each,
|
||||
(gpointer)func);
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_fontset(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONTSET, "Fontset", mPango);
|
||||
|
||||
id_call = rb_intern("call");
|
||||
|
||||
RG_DEF_METHOD(get_font, 1);
|
||||
RG_DEF_METHOD(metrics, 0);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(each, 0);
|
||||
#endif
|
||||
}
|
60
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontsetsimple.c
Normal file
60
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangofontsetsimple.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#ifdef PANGO_ENABLE_BACKEND
|
||||
|
||||
#define RG_TARGET_NAMESPACE cFontsetSimple
|
||||
#define _SELF(self) (RVAL2PANGOFONTSETSIMPLE(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE lang)
|
||||
{
|
||||
G_INITIALIZE(self, pango_fontset_simple_new(RVAL2PANGOLANGUAGE(lang)));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_append(VALUE self, VALUE font)
|
||||
{
|
||||
pango_fontset_simple_append(_SELF(self), RVAL2PANGOFONT(font));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_fontset_simple_size(_SELF(self)));
|
||||
}
|
||||
|
||||
#endif
|
||||
void
|
||||
Init_pango_fontset_simple(VALUE mPango)
|
||||
{
|
||||
#ifdef PANGO_ENABLE_BACKEND
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONTSET_SIMPLE, "FontsetSimple", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
RG_DEF_METHOD(append, 1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
#endif
|
||||
}
|
123
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphinfo.c
Normal file
123
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphinfo.c
Normal file
@ -0,0 +1,123 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cGlyphInfo
|
||||
#define _SELF(self) (RVAL2PANGOGLYPHINFO(self))
|
||||
|
||||
/**********************************/
|
||||
static PangoGlyphInfo *
|
||||
pango_glyph_info_copy(const PangoGlyphInfo *info)
|
||||
{
|
||||
PangoGlyphInfo *data;
|
||||
|
||||
g_return_val_if_fail(info != NULL, NULL);
|
||||
|
||||
data = g_new(PangoGlyphInfo, 1);
|
||||
*data = *info;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_glyph_info_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoGlyphInfo",
|
||||
(GBoxedCopyFunc)pango_glyph_info_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, g_new0(PangoGlyphInfo, 1));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_glyph(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->glyph);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_glyph(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->glyph = NUM2UINT(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_geometry(VALUE self)
|
||||
{
|
||||
PangoGlyphGeometry geo = _SELF(self)->geometry;
|
||||
|
||||
return rb_ary_new3(3, INT2NUM(geo.width),
|
||||
INT2NUM(geo.x_offset), INT2NUM(geo.y_offset));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_geometry(VALUE self, VALUE width, VALUE x_offset, VALUE y_offset)
|
||||
{
|
||||
PangoGlyphGeometry geo = _SELF(self)->geometry;
|
||||
|
||||
geo.width = NUM2INT(width);
|
||||
geo.x_offset = NUM2INT(x_offset);
|
||||
geo.y_offset = NUM2INT(y_offset);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
/*
|
||||
This method may be changed in the future following Pango implementation.
|
||||
*/
|
||||
static VALUE
|
||||
rg_cluster_start_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(_SELF(self)->attr.is_cluster_start);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_cluster_start(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->attr.is_cluster_start = RVAL2CBOOL(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_glyph_info(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_GLYPH_INFO, "GlyphInfo", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(glyph, 0);
|
||||
RG_DEF_METHOD(set_glyph, 1);
|
||||
RG_DEF_METHOD(geometry, 0);
|
||||
RG_DEF_METHOD(set_geometry, 3);
|
||||
RG_DEF_METHOD_P(cluster_start, 0);
|
||||
RG_DEF_METHOD(set_cluster_start, 1);
|
||||
}
|
133
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphitem.c
Normal file
133
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphitem.c
Normal file
@ -0,0 +1,133 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,2,0)
|
||||
#define RG_TARGET_NAMESPACE cGlyphItem
|
||||
#define _SELF(r) (RVAL2PANGOGLYPHITEM(r))
|
||||
|
||||
/**********************************/
|
||||
#ifndef HAVE_PANGO_GLYPH_ITEM_GET_TYPE
|
||||
static PangoGlyphItem*
|
||||
glyph_item_copy(const PangoGlyphItem *ref)
|
||||
{
|
||||
PangoGlyphItem* new_ref;
|
||||
g_return_val_if_fail (ref != NULL, NULL);
|
||||
new_ref = g_new(PangoGlyphItem, 1);
|
||||
*new_ref = *ref;
|
||||
return new_ref;
|
||||
}
|
||||
|
||||
# ifndef HAVE_PANGO_GLYPH_ITEM_FREE
|
||||
void
|
||||
pango_glyph_item_free(PangoGlyphItem* glyph_item)
|
||||
{
|
||||
if (glyph_item->item)
|
||||
pango_item_free(glyph_item->item);
|
||||
if (glyph_item->glyphs)
|
||||
pango_glyph_string_free(glyph_item->glyphs);
|
||||
g_free(glyph_item);
|
||||
}
|
||||
# endif
|
||||
|
||||
GType
|
||||
pango_glyph_item_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoGlyphItem",
|
||||
(GBoxedCopyFunc)glyph_item_copy,
|
||||
(GBoxedFreeFunc)pango_glyph_item_free);
|
||||
return our_type;
|
||||
}
|
||||
#endif
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_item(VALUE self)
|
||||
{
|
||||
PangoItem* item = _SELF(self)->item;
|
||||
return PANGOITEM2RVAL(item);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_glyphs(VALUE self)
|
||||
{
|
||||
PangoGlyphString* glyphs = _SELF(self)->glyphs;
|
||||
return PANGOGLYPHSTRING2RVAL(glyphs);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_split(VALUE self, VALUE text, VALUE split_index)
|
||||
{
|
||||
return PANGOGLYPHITEM2RVAL(pango_glyph_item_split(_SELF(self), RVAL2CSTR(text),
|
||||
NUM2INT(split_index)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_appy_attrs(VALUE self, VALUE text, VALUE attrs)
|
||||
{
|
||||
GSList* list = pango_glyph_item_apply_attrs(_SELF(self), RVAL2CSTR(text),
|
||||
RVAL2PANGOATTRLIST(attrs));
|
||||
|
||||
VALUE ret = rb_ary_new();
|
||||
|
||||
while (list) {
|
||||
rb_ary_push(ret, PANGOGLYPHITEM2RVAL(list->data));
|
||||
pango_glyph_item_free(list->data);
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
g_slist_free(list);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
static VALUE
|
||||
rg_letter_space(VALUE self, VALUE text, VALUE log_attrs, VALUE letter_spacing)
|
||||
{
|
||||
pango_glyph_item_letter_space(_SELF(self), RVAL2CSTR(text),
|
||||
RVAL2PANGOLOGATTR(log_attrs),
|
||||
NUM2INT(letter_spacing));
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_glyph_item(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,2,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_GLYPH_ITEM, "GlyphItem", mPango);
|
||||
|
||||
RG_DEF_METHOD(item, 0);
|
||||
RG_DEF_METHOD(glyphs, 0);
|
||||
|
||||
RG_DEF_METHOD(split, 2);
|
||||
RG_DEF_METHOD(appy_attrs, 2);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
RG_DEF_METHOD(letter_space, 3);
|
||||
#endif
|
||||
#endif
|
||||
}
|
155
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphstring.c
Normal file
155
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoglyphstring.c
Normal file
@ -0,0 +1,155 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-2006 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cGlyphString
|
||||
#define _SELF(self) (RVAL2PANGOGLYPHSTRING(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_glyph_string_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_size(VALUE self, VALUE len)
|
||||
{
|
||||
pango_glyph_string_set_size(_SELF(self), NUM2INT(len));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_extents(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE font, start_index, end_index;
|
||||
PangoRectangle ink_rect;
|
||||
PangoRectangle logical_rect;
|
||||
|
||||
rb_scan_args(argc, argv, "12", &font, &start_index, &end_index);
|
||||
|
||||
if (NIL_P(start_index)){
|
||||
pango_glyph_string_extents(_SELF(self),
|
||||
RVAL2PANGOFONT(font),
|
||||
&ink_rect, &logical_rect);
|
||||
} else {
|
||||
pango_glyph_string_extents_range(_SELF(self),
|
||||
NUM2INT(start_index), NUM2INT(end_index),
|
||||
RVAL2PANGOFONT(font),
|
||||
&ink_rect, &logical_rect);
|
||||
}
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
static VALUE
|
||||
rg_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_glyph_string_get_width(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_index_to_x(VALUE self, VALUE text, VALUE analysis, VALUE index, VALUE trailing)
|
||||
{
|
||||
int x_pos;
|
||||
StringValue(text);
|
||||
|
||||
pango_glyph_string_index_to_x(_SELF(self),
|
||||
/* NOTE: This is a bug in the signature of
|
||||
* pango_glyph_string_index_to_x */
|
||||
(char *)RSTRING_PTR(text),
|
||||
RSTRING_LEN(text),
|
||||
RVAL2PANGOANALYSIS(analysis),
|
||||
NUM2INT(index), RVAL2CBOOL(trailing),
|
||||
&x_pos);
|
||||
return INT2NUM(x_pos);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_x_to_index(VALUE self, VALUE text, VALUE analysis, VALUE x_pos)
|
||||
{
|
||||
int index;
|
||||
int trailing;
|
||||
|
||||
StringValue(text);
|
||||
pango_glyph_string_x_to_index(_SELF(self),
|
||||
/* NOTE: This is a bug in the signature of
|
||||
* pango_glyph_string_index_to_x */
|
||||
(char *)RSTRING_PTR(text),
|
||||
RSTRING_LEN(text),
|
||||
RVAL2PANGOANALYSIS(analysis),
|
||||
NUM2INT(x_pos),
|
||||
&index, &trailing);
|
||||
return rb_assoc_new(INT2NUM(index), CBOOL2RVAL(trailing));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_logical_widths(VALUE self, VALUE rbtext, VALUE rbembedding_level)
|
||||
{
|
||||
PangoGlyphString *glyphs = _SELF(self);
|
||||
const char *text = RVAL2CSTR(rbtext);
|
||||
long length = RSTRING_LEN(rbtext);
|
||||
int embedding_level = NUM2INT(rbembedding_level);
|
||||
glong n = g_utf8_strlen(text, length);
|
||||
int *logical_widths = g_new(int, n);
|
||||
|
||||
pango_glyph_string_get_logical_widths(glyphs, text, length, embedding_level,
|
||||
logical_widths);
|
||||
|
||||
return GINTS2RVAL_FREE(logical_widths, n);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_glyphs(VALUE self)
|
||||
{
|
||||
int i;
|
||||
PangoGlyphInfo *glyphs = _SELF(self)->glyphs;
|
||||
gint* log_clusters = _SELF(self)->log_clusters;
|
||||
|
||||
VALUE ret = rb_ary_new();
|
||||
for (i = 0; i < _SELF(self)->num_glyphs; i++) {
|
||||
rb_ary_push(ret,
|
||||
rb_assoc_new(PANGOGLYPHINFO2RVAL(glyphs + i),
|
||||
INT2NUM(log_clusters[i])));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_glyph_string(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_GLYPH_STRING, "GlyphString", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(set_size, 1);
|
||||
RG_DEF_METHOD(extents, -1);
|
||||
#if PANGO_CHECK_VERSION(1,14,0)
|
||||
RG_DEF_METHOD(width, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(index_to_x, 4);
|
||||
RG_DEF_METHOD(x_to_index, 3);
|
||||
RG_DEF_METHOD(get_logical_widths, 2);
|
||||
RG_DEF_METHOD(glyphs, 0);
|
||||
}
|
54
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangogravity.c
Normal file
54
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangogravity.c
Normal file
@ -0,0 +1,54 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
|
||||
#define RG_TARGET_NAMESPACE mGravity
|
||||
|
||||
static VALUE
|
||||
rg_s_to_rotation(G_GNUC_UNUSED VALUE self, VALUE gravity)
|
||||
{
|
||||
return rb_float_new(pango_gravity_to_rotation(RVAL2PANGOGRAVITY(gravity)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_vertical_p(G_GNUC_UNUSED VALUE self, VALUE gravity)
|
||||
{
|
||||
return CBOOL2RVAL(PANGO_GRAVITY_IS_VERTICAL(RVAL2PANGOGRAVITY(gravity)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_gravity(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mPango, "Gravity");
|
||||
|
||||
RG_DEF_SMETHOD(to_rotation, 1);
|
||||
RG_DEF_SMETHOD_P(vertical, 1);
|
||||
|
||||
G_DEF_CLASS(PANGO_TYPE_GRAVITY, "Gravity", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_GRAVITY, "PANGO_GRAVITY_");
|
||||
G_DEF_CLASS(PANGO_TYPE_GRAVITY_HINT, "Hint", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_GRAVITY_HINT, "PANGO_GRAVITY_");
|
||||
#endif
|
||||
}
|
111
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoitem.c
Normal file
111
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoitem.c
Normal file
@ -0,0 +1,111 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cItem
|
||||
#define _SELF(self) (RVAL2PANGOITEM(self))
|
||||
|
||||
#define ATTR_INT(name)\
|
||||
static VALUE \
|
||||
item_int_ ## name (VALUE self)\
|
||||
{\
|
||||
return INT2NUM(_SELF(self)->name);\
|
||||
}\
|
||||
static VALUE \
|
||||
item_int_set_ ## name (VALUE self, VALUE val)\
|
||||
{\
|
||||
_SELF(self)->name = NUM2INT(val); \
|
||||
return self;\
|
||||
}
|
||||
|
||||
#define DEF_INT_ACCESSOR(name) \
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(name), item_int_ ## name, 0);\
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(set_ ## name), item_int_set_ ## name, 1);
|
||||
|
||||
/**********************************/
|
||||
#if ! PANGO_CHECK_VERSION(1,9,0)
|
||||
GType
|
||||
pango_item_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoItem",
|
||||
(GBoxedCopyFunc)pango_item_copy,
|
||||
(GBoxedFreeFunc)pango_item_free);
|
||||
return our_type;
|
||||
}
|
||||
#endif
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
G_INITIALIZE(self, pango_item_new());
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_split(VALUE self, VALUE split_index, VALUE split_offset)
|
||||
{
|
||||
return PANGOITEM2RVAL(pango_item_split(_SELF(self),
|
||||
NUM2INT(split_index),
|
||||
NUM2INT(split_offset)));
|
||||
}
|
||||
/* Move to Pango module (rbpangomain.c)
|
||||
GList* pango_reorder_items (GList *logical_items);
|
||||
*/
|
||||
|
||||
ATTR_INT(offset);
|
||||
ATTR_INT(length);
|
||||
ATTR_INT(num_chars);
|
||||
|
||||
static VALUE
|
||||
rg_analysis(VALUE self)
|
||||
{
|
||||
PangoAnalysis ana = _SELF(self)->analysis;
|
||||
return PANGOANALYSIS2RVAL(&ana);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_analysis(VALUE self, VALUE val)
|
||||
{
|
||||
PangoAnalysis* ana = RVAL2PANGOANALYSIS(val);
|
||||
_SELF(self)->analysis = *ana;
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_item(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ITEM, "Item", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
RG_DEF_METHOD(split, 2);
|
||||
|
||||
DEF_INT_ACCESSOR(offset);
|
||||
DEF_INT_ACCESSOR(length);
|
||||
DEF_INT_ACCESSOR(num_chars);
|
||||
|
||||
RG_DEF_METHOD(analysis, 0);
|
||||
RG_DEF_METHOD(set_analysis, 1);
|
||||
}
|
91
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolanguage.c
Normal file
91
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolanguage.c
Normal file
@ -0,0 +1,91 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2009 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cLanguage
|
||||
#define _SELF(self) (RVAL2PANGOLANGUAGE(self))
|
||||
|
||||
static VALUE
|
||||
rg_s_default(G_GNUC_UNUSED VALUE self)
|
||||
{
|
||||
return PANGOLANGUAGE2RVAL(pango_language_get_default());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE language)
|
||||
{
|
||||
G_INITIALIZE(self, pango_language_from_string(RVAL2CSTR(language)));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_s_to_string(G_GNUC_UNUSED VALUE self, VALUE language)
|
||||
{
|
||||
return CSTR2RVAL(pango_language_to_string(RVAL2CSTR(language)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_matches(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE range_list;
|
||||
|
||||
rb_scan_args(argc, argv, "01", &range_list);
|
||||
|
||||
return CBOOL2RVAL(pango_language_matches(_SELF(self),
|
||||
RVAL2CSTR_ACCEPT_NIL(range_list)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_to_str(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_language_to_string(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
/* Moved from Pango::Script */
|
||||
static VALUE
|
||||
rg_includes_script(VALUE self, VALUE script)
|
||||
{
|
||||
return CBOOL2RVAL(pango_language_includes_script(_SELF(self),
|
||||
RVAL2PANGOSCRIPT(script)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_language(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LANGUAGE, "Language", mPango);
|
||||
|
||||
RG_DEF_SMETHOD(default, 0);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
RG_DEF_SMETHOD(to_string, 1);
|
||||
RG_DEF_METHOD(matches, -1);
|
||||
RG_DEF_METHOD(to_str, 0);
|
||||
RG_DEF_ALIAS("to_s", "to_str");
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(includes_script, 1);
|
||||
#endif
|
||||
|
||||
}
|
555
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayout.c
Normal file
555
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayout.c
Normal file
@ -0,0 +1,555 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cLayout
|
||||
#define _SELF(self) (RVAL2PANGOLAYOUT(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE context)
|
||||
{
|
||||
G_INITIALIZE(self, pango_layout_new(RVAL2PANGOCONTEXT(context)));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_copy(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL_UNREF(pango_layout_copy(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_context(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(pango_layout_get_context(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_context_changed(VALUE self)
|
||||
{
|
||||
pango_layout_context_changed(_SELF(self));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_text(VALUE self, VALUE text)
|
||||
{
|
||||
StringValue(text);
|
||||
|
||||
pango_layout_set_text(_SELF(self), RSTRING_PTR(text), RSTRING_LEN(text));
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_text(VALUE self)
|
||||
{
|
||||
return CSTR2RVAL(pango_layout_get_text(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_markup(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE markup, accel_marker;
|
||||
gunichar accel_char = 0;
|
||||
|
||||
rb_scan_args(argc, argv, "11", &markup, &accel_marker);
|
||||
|
||||
StringValue(markup);
|
||||
|
||||
if (NIL_P(accel_marker)){
|
||||
pango_layout_set_markup(_SELF(self),
|
||||
RSTRING_PTR(markup),
|
||||
RSTRING_LEN(markup));
|
||||
} else {
|
||||
pango_layout_set_markup_with_accel(_SELF(self),
|
||||
RSTRING_PTR(markup),
|
||||
RSTRING_LEN(markup),
|
||||
NUM2CHR(accel_marker), &accel_char);
|
||||
}
|
||||
return CHR2FIX(accel_char);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_operator_layout_set_markup_eq(VALUE self, VALUE markup)
|
||||
{
|
||||
StringValue(markup);
|
||||
|
||||
pango_layout_set_markup(_SELF(self), RSTRING_PTR(markup), RSTRING_LEN(markup));
|
||||
|
||||
return markup;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_attributes(VALUE self, VALUE attrs)
|
||||
{
|
||||
pango_layout_set_attributes(_SELF(self),
|
||||
RVAL2PANGOATTRLIST(attrs));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_attributes(VALUE self)
|
||||
{
|
||||
return PANGOATTRLIST2RVAL(pango_layout_get_attributes(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_font_description(VALUE self, VALUE rb_desc)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
gboolean desc_created = FALSE;
|
||||
|
||||
if (RVAL2CBOOL(rb_obj_is_kind_of(rb_desc, rb_cString))) {
|
||||
desc = pango_font_description_from_string(RVAL2CSTR(rb_desc));
|
||||
desc_created = TRUE;
|
||||
} else {
|
||||
desc = RVAL2PANGOFONTDESCRIPTION(rb_desc);
|
||||
}
|
||||
|
||||
pango_layout_set_font_description(_SELF(self), desc);
|
||||
|
||||
if (desc_created)
|
||||
pango_font_description_free(desc);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGO_LAYOUT_GET_FONT_DESCRIPTION
|
||||
static VALUE
|
||||
rg_font_description(VALUE self)
|
||||
{
|
||||
const PangoFontDescription* desc = pango_layout_get_font_description(_SELF(self));
|
||||
return PANGOFONTDESCRIPTION2RVAL((gpointer)desc);
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_set_width(VALUE self, VALUE width)
|
||||
{
|
||||
pango_layout_set_width(_SELF(self), NUM2INT(width));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_width(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_get_width(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_wrap(VALUE self, VALUE wrap)
|
||||
{
|
||||
pango_layout_set_wrap(_SELF(self), RVAL2PANGOWRAPMODE(wrap));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_wrap(VALUE self)
|
||||
{
|
||||
return PANGOWRAPMODE2RVAL(pango_layout_get_wrap(_SELF(self)));
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGO_LAYOUT_SET_ELLIPSIZE
|
||||
static VALUE
|
||||
rg_set_ellipsize(VALUE self, VALUE ellipsize)
|
||||
{
|
||||
pango_layout_set_ellipsize(_SELF(self), RVAL2PANGOELLIPSIZEMODE(ellipsize));
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_ellipsize(VALUE self)
|
||||
{
|
||||
return PANGOELLIPSIZEMODE2RVAL(pango_layout_get_ellipsize(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_set_indent(VALUE self, VALUE indent)
|
||||
{
|
||||
pango_layout_set_indent(_SELF(self), NUM2INT(indent));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_indent(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_get_indent(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_spacing(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_get_spacing(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_spacing(VALUE self, VALUE spacing)
|
||||
{
|
||||
pango_layout_set_spacing(_SELF(self), NUM2INT(spacing));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_justify(VALUE self, VALUE justify)
|
||||
{
|
||||
pango_layout_set_justify(_SELF(self), RVAL2CBOOL(justify));
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_justify_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_get_justify(_SELF(self)));
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_set_auto_dir(VALUE self, VALUE auto_dir)
|
||||
{
|
||||
pango_layout_set_auto_dir(_SELF(self), RVAL2CBOOL(auto_dir));
|
||||
return self;
|
||||
}
|
||||
static VALUE
|
||||
rg_auto_dir_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_get_auto_dir(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_set_alignment(VALUE self, VALUE align)
|
||||
{
|
||||
pango_layout_set_alignment(_SELF(self), RVAL2PANGOALIGNMENT(align));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_alignment(VALUE self)
|
||||
{
|
||||
return PANGOALIGNMENT2RVAL(pango_layout_get_alignment(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_tabs(VALUE self, VALUE tabs)
|
||||
{
|
||||
pango_layout_set_tabs(_SELF(self),
|
||||
RVAL2PANGOTABARRAY(tabs));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_tabs(VALUE self)
|
||||
{
|
||||
VALUE ret = Qnil;
|
||||
PangoTabArray* tabs = pango_layout_get_tabs(_SELF(self));
|
||||
|
||||
if (tabs) {
|
||||
ret = PANGOTABARRAY2RVAL(tabs);
|
||||
pango_tab_array_free(tabs);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_single_paragraph_mode(VALUE self, VALUE setting)
|
||||
{
|
||||
pango_layout_set_single_paragraph_mode(_SELF(self), RVAL2CBOOL(setting));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_single_paragraph_mode_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_get_single_paragraph_mode(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_log_attrs(VALUE self)
|
||||
{
|
||||
PangoLogAttr* attrs;
|
||||
gint i, n_attrs;
|
||||
VALUE ary;
|
||||
|
||||
pango_layout_get_log_attrs(_SELF(self), &attrs, &n_attrs);
|
||||
|
||||
ary = rb_ary_new();
|
||||
|
||||
for (i = 0; i < n_attrs; i++) {
|
||||
rb_ary_assoc(ary, PANGOLOGATTR2RVAL(&attrs[i]));
|
||||
}
|
||||
g_free(attrs);
|
||||
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_xy_to_index(VALUE self, VALUE x, VALUE y)
|
||||
{
|
||||
int index, trailing;
|
||||
gboolean ret = pango_layout_xy_to_index(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y),
|
||||
&index, &trailing);
|
||||
|
||||
return rb_ary_new3(3, CBOOL2RVAL(ret), INT2NUM(index), INT2NUM(trailing));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_index_to_pos(VALUE self, VALUE index)
|
||||
{
|
||||
PangoRectangle pos;
|
||||
pango_layout_index_to_pos(_SELF(self), NUM2INT(index), &pos);
|
||||
return PANGORECTANGLE2RVAL(&pos);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_cursor_pos(VALUE self, VALUE index)
|
||||
{
|
||||
PangoRectangle strong_pos, weak_pos;
|
||||
pango_layout_get_cursor_pos(_SELF(self), NUM2INT(index), &strong_pos, &weak_pos);
|
||||
return rb_ary_new3(2, PANGORECTANGLE2RVAL(&strong_pos),
|
||||
PANGORECTANGLE2RVAL(&weak_pos));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_move_cursor_visually(VALUE self, VALUE strong, VALUE old_index, VALUE old_trailing, VALUE direction)
|
||||
{
|
||||
int new_index, new_trailing;
|
||||
pango_layout_move_cursor_visually(_SELF(self), RVAL2CBOOL(strong),
|
||||
NUM2INT(old_index), NUM2INT(old_trailing),
|
||||
NUM2INT(direction),
|
||||
&new_index, &new_trailing);
|
||||
return rb_ary_new3(2, INT2NUM(new_index), INT2NUM(new_trailing));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_extents(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE ink_rect, logical_rect;
|
||||
PangoRectangle rink, rlog;
|
||||
|
||||
rb_scan_args(argc, argv, "02", &ink_rect, &logical_rect);
|
||||
|
||||
if (NIL_P(ink_rect)){
|
||||
rink.x = 0;
|
||||
rink.y = 0;
|
||||
rink.width = 0;
|
||||
rink.height = 0;
|
||||
} else {
|
||||
PangoRectangle* rect = RVAL2PANGORECTANGLE(ink_rect);
|
||||
rink.x = rect->x;
|
||||
rink.y = rect->y;
|
||||
rink.width = rect->width;
|
||||
rink.height = rect->height;
|
||||
}
|
||||
if (NIL_P(logical_rect)){
|
||||
rlog.x = 0;
|
||||
rlog.y = 0;
|
||||
rlog.width = 0;
|
||||
rlog.height = 0;
|
||||
} else {
|
||||
PangoRectangle* rect = RVAL2PANGORECTANGLE(logical_rect);
|
||||
rlog.x = rect->x;
|
||||
rlog.y = rect->y;
|
||||
rlog.width = rect->width;
|
||||
rlog.height = rect->height;
|
||||
}
|
||||
|
||||
pango_layout_get_extents(_SELF(self), &rink, &rlog);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&rink),
|
||||
PANGORECTANGLE2RVAL(&rlog));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle rink = {0, 0, 0, 0};
|
||||
PangoRectangle rlog = {0, 0, 0, 0};
|
||||
|
||||
pango_layout_get_extents(_SELF(self), &rink, &rlog);
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&rink),
|
||||
PANGORECTANGLE2RVAL(&rlog));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_pixel_extents(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE ink_rect, logical_rect;
|
||||
PangoRectangle rink, rlog;
|
||||
|
||||
rb_scan_args(argc, argv, "02", &ink_rect, &logical_rect);
|
||||
|
||||
if (NIL_P(ink_rect)){
|
||||
rink.x = 0;
|
||||
rink.y = 0;
|
||||
rink.width = 0;
|
||||
rink.height = 0;
|
||||
} else {
|
||||
PangoRectangle* rect = RVAL2PANGORECTANGLE(ink_rect);
|
||||
rink.x = rect->x;
|
||||
rink.y = rect->y;
|
||||
rink.width = rect->width;
|
||||
rink.height = rect->height;
|
||||
}
|
||||
if (NIL_P(logical_rect)){
|
||||
rlog.x = 0;
|
||||
rlog.y = 0;
|
||||
rlog.width = 0;
|
||||
rlog.height = 0;
|
||||
} else {
|
||||
PangoRectangle* rect = RVAL2PANGORECTANGLE(logical_rect);
|
||||
rlog.x = rect->x;
|
||||
rlog.y = rect->y;
|
||||
rlog.width = rect->width;
|
||||
rlog.height = rect->height;
|
||||
}
|
||||
|
||||
pango_layout_get_pixel_extents(_SELF(self), &rink, &rlog);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&rink),
|
||||
PANGORECTANGLE2RVAL(&rlog));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixel_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle rink = {0, 0, 0, 0};
|
||||
PangoRectangle rlog = {0, 0, 0, 0};
|
||||
|
||||
pango_layout_get_pixel_extents(_SELF(self), &rink, &rlog);
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&rink),
|
||||
PANGORECTANGLE2RVAL(&rlog));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
int width, height;
|
||||
pango_layout_get_size(_SELF(self), &width, &height);
|
||||
return rb_ary_new3(2, INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixel_size(VALUE self)
|
||||
{
|
||||
int width, height;
|
||||
pango_layout_get_pixel_size(_SELF(self), &width, &height);
|
||||
return rb_ary_new3(2, INT2NUM(width), INT2NUM(height));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_line_count(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_get_line_count(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_line(VALUE self, VALUE line)
|
||||
{
|
||||
return PANGOLAYOUTLINE2RVAL(pango_layout_get_line(_SELF(self), NUM2INT(line)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_lines(VALUE self)
|
||||
{
|
||||
return GSLIST2ARY2(pango_layout_get_lines(_SELF(self)), PANGO_TYPE_LAYOUT_LINE);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_iter(VALUE self)
|
||||
{
|
||||
return PANGOLAYOUTITER2RVAL(pango_layout_get_iter(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_layout(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LAYOUT, "Layout", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
RG_DEF_METHOD(copy, 0);
|
||||
RG_DEF_METHOD(context, 0);
|
||||
RG_DEF_METHOD(context_changed, 0);
|
||||
RG_DEF_METHOD(set_text, 1);
|
||||
RG_DEF_METHOD(text, 0);
|
||||
RG_DEF_METHOD(set_markup, -1);
|
||||
RG_DEF_METHOD_OPERATOR("markup=", layout_set_markup_eq, 1);
|
||||
RG_DEF_METHOD(set_attributes, 1);
|
||||
RG_DEF_METHOD(attributes, 0);
|
||||
RG_DEF_METHOD(set_font_description, 1);
|
||||
#ifdef HAVE_PANGO_LAYOUT_GET_FONT_DESCRIPTION
|
||||
RG_DEF_METHOD(font_description, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_width, 1);
|
||||
RG_DEF_METHOD(width, 0);
|
||||
RG_DEF_METHOD(set_wrap, 1);
|
||||
RG_DEF_METHOD(wrap, 0);
|
||||
#ifdef HAVE_PANGO_LAYOUT_SET_ELLIPSIZE
|
||||
RG_DEF_METHOD(set_ellipsize, 1);
|
||||
RG_DEF_METHOD(ellipsize, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_indent, 1);
|
||||
RG_DEF_METHOD(indent, 0);
|
||||
RG_DEF_METHOD(spacing, 0);
|
||||
RG_DEF_METHOD(set_spacing, 1);
|
||||
RG_DEF_METHOD(set_justify, 1);
|
||||
RG_DEF_METHOD_P(justify, 0);
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD(set_auto_dir, 1);
|
||||
RG_DEF_METHOD_P(auto_dir, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_alignment, 1);
|
||||
RG_DEF_METHOD(alignment, 0);
|
||||
RG_DEF_METHOD(set_tabs, 1);
|
||||
RG_DEF_METHOD(tabs, 0);
|
||||
RG_DEF_METHOD(set_single_paragraph_mode, 1);
|
||||
RG_DEF_METHOD_P(single_paragraph_mode, 0);
|
||||
RG_DEF_METHOD(log_attrs, 0);
|
||||
RG_DEF_METHOD(xy_to_index, 2);
|
||||
RG_DEF_METHOD(index_to_pos, 1);
|
||||
RG_DEF_METHOD(get_cursor_pos, 1);
|
||||
RG_DEF_METHOD(move_cursor_visually, 4);
|
||||
RG_DEF_METHOD(get_extents, -1);
|
||||
RG_DEF_METHOD(extents, 0);
|
||||
RG_DEF_METHOD(get_pixel_extents, -1);
|
||||
RG_DEF_METHOD(pixel_extents, 0);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(pixel_size, 0);
|
||||
RG_DEF_METHOD(line_count, 0);
|
||||
RG_DEF_METHOD(get_line, 1);
|
||||
RG_DEF_METHOD(lines, 0);
|
||||
RG_DEF_METHOD(iter, 0);
|
||||
|
||||
/* PangoWrapMode */
|
||||
G_DEF_CLASS(PANGO_TYPE_WRAP_MODE, "WrapMode", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_WRAP_MODE, "PANGO_");
|
||||
|
||||
/* PangoAlignment */
|
||||
G_DEF_CLASS(PANGO_TYPE_ALIGNMENT, "Alignment", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_ALIGNMENT, "PANGO_");
|
||||
|
||||
#ifdef HAVE_PANGO_LAYOUT_SET_ELLIPSIZE
|
||||
/* PangoEllipsizeMode */
|
||||
G_DEF_CLASS(PANGO_TYPE_ELLIPSIZE_MODE, "EllipsizeMode", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_ELLIPSIZE_MODE, "PANGO_");
|
||||
#endif
|
||||
}
|
189
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutiter.c
Normal file
189
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutiter.c
Normal file
@ -0,0 +1,189 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cLayoutIter
|
||||
#define _SELF(r) (RVAL2PANGOLAYOUTITER(r))
|
||||
|
||||
/**********************************/
|
||||
#ifndef HAVE_PANGO_LAYOUT_ITER_GET_TYPE
|
||||
static PangoLayoutIter *
|
||||
layout_iter_copy(const PangoLayoutIter *ref)
|
||||
{
|
||||
return (PangoLayoutIter *)ref;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_layout_iter_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoLayoutIter",
|
||||
(GBoxedCopyFunc)layout_iter_copy,
|
||||
(GBoxedFreeFunc)pango_layout_iter_free);
|
||||
return our_type;
|
||||
}
|
||||
#endif
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_next_run_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_iter_next_run(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_next_char_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_iter_next_char(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_next_cluster_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_iter_next_cluster(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_next_line_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_iter_next_line(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_at_last_line_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_layout_iter_at_last_line(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_index(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_iter_get_index(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_baseline(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_layout_iter_get_baseline(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_run(VALUE self)
|
||||
{
|
||||
PangoLayoutRun* run = pango_layout_iter_get_run(_SELF(self));
|
||||
return PANGOGLYPHITEM2RVAL(run);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_line(VALUE self)
|
||||
{
|
||||
return PANGOLAYOUTLINE2RVAL(pango_layout_iter_get_line(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_char_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle logical_rect;
|
||||
|
||||
pango_layout_iter_get_char_extents(_SELF(self), &logical_rect);
|
||||
return PANGORECTANGLE2RVAL(&logical_rect);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_cluster_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_iter_get_cluster_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_run_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_iter_get_run_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_line_yrange(VALUE self)
|
||||
{
|
||||
int y0, y1;
|
||||
pango_layout_iter_get_line_yrange(_SELF(self), &y0, &y1);
|
||||
return rb_assoc_new(INT2NUM(y0), INT2NUM(y1));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_line_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_iter_get_line_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
static VALUE
|
||||
rg_layout_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_iter_get_layout_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_layout_iter(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LAYOUT_ITER, "LayoutIter", mPango);
|
||||
|
||||
rbgobj_boxed_not_copy_obj(PANGO_TYPE_LAYOUT_ITER);
|
||||
|
||||
RG_DEF_METHOD_BANG(next_run, 0);
|
||||
RG_DEF_METHOD_BANG(next_char, 0);
|
||||
RG_DEF_METHOD_BANG(next_cluster, 0);
|
||||
RG_DEF_METHOD_BANG(next_line, 0);
|
||||
RG_DEF_METHOD_P(at_last_line, 0);
|
||||
/* for backword compatibility. :< */
|
||||
RG_DEF_ALIAS("at_last_line!", "at_last_line?");
|
||||
RG_DEF_METHOD(index, 0);
|
||||
RG_DEF_METHOD(baseline, 0);
|
||||
RG_DEF_METHOD(run, 0);
|
||||
RG_DEF_METHOD(line, 0);
|
||||
RG_DEF_METHOD(char_extents, 0);
|
||||
RG_DEF_METHOD(cluster_extents, 0);
|
||||
RG_DEF_METHOD(run_extents, 0);
|
||||
RG_DEF_METHOD(line_yrange, 0);
|
||||
RG_DEF_METHOD(line_extents, 0);
|
||||
RG_DEF_METHOD(layout_extents, 0);
|
||||
|
||||
}
|
272
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutline.c
Normal file
272
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangolayoutline.c
Normal file
@ -0,0 +1,272 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2002-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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cLayoutLine
|
||||
#define _SELF(r) (RVAL2PANGOLAYOUTLINE(r))
|
||||
|
||||
/**********************************/
|
||||
#if !PANGO_CHECK_VERSION(1,9,0)
|
||||
static PangoLayoutLine*
|
||||
layout_line_copy(PangoLayoutLine *ref)
|
||||
{
|
||||
g_return_val_if_fail (ref != NULL, NULL);
|
||||
pango_layout_line_ref(ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_layout_line_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoLayoutLine",
|
||||
(GBoxedCopyFunc)layout_line_copy,
|
||||
(GBoxedFreeFunc)pango_layout_line_unref);
|
||||
return our_type;
|
||||
}
|
||||
#endif
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_line_get_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_pixel_extents(VALUE self)
|
||||
{
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
|
||||
pango_layout_line_get_pixel_extents(_SELF(self), &ink_rect, &logical_rect);
|
||||
|
||||
return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
|
||||
PANGORECTANGLE2RVAL(&logical_rect));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_index_to_x(VALUE self, VALUE index, VALUE trailing)
|
||||
{
|
||||
int x_pos;
|
||||
pango_layout_line_index_to_x(_SELF(self), NUM2INT(index),
|
||||
RVAL2CBOOL(trailing), &x_pos);
|
||||
return INT2NUM(x_pos);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_x_to_index(VALUE self, VALUE x_pos)
|
||||
{
|
||||
int index, trailing;
|
||||
|
||||
gboolean ret = pango_layout_line_x_to_index(_SELF(self), NUM2INT(x_pos),
|
||||
&index, &trailing);
|
||||
return rb_ary_new3(CBOOL2RVAL(ret), INT2NUM(index), INT2NUM(trailing));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_x_ranges(VALUE self, VALUE start_index, VALUE end_index)
|
||||
{
|
||||
int* ranges;
|
||||
int i, n_ranges;
|
||||
VALUE ary;
|
||||
|
||||
pango_layout_line_get_x_ranges(_SELF(self), NUM2INT(start_index),
|
||||
NUM2INT(end_index), &ranges, &n_ranges);
|
||||
|
||||
ary = rb_ary_new();
|
||||
for (i = 0; i < n_ranges; i++) {
|
||||
rb_ary_push(ary, INT2NUM(ranges[i]));
|
||||
}
|
||||
|
||||
g_free(ranges);
|
||||
return ary;
|
||||
}
|
||||
|
||||
/* Structure members */
|
||||
static VALUE
|
||||
rg_layout(VALUE self)
|
||||
{
|
||||
return GOBJ2RVAL(_SELF(self)->layout);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_layout(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->layout = RVAL2PANGOLAYOUT(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_start_index(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->start_index);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_start_index(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->start_index = NUM2INT(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_length(VALUE self)
|
||||
{
|
||||
return INT2NUM(_SELF(self)->length);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_length(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->length = NUM2INT(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,2,0)
|
||||
static VALUE
|
||||
rg_runs(VALUE self)
|
||||
{
|
||||
GSList* list = _SELF(self)->runs;
|
||||
VALUE ary = rb_ary_new();
|
||||
while (list) {
|
||||
PangoGlyphItem* old_item = (PangoGlyphItem*)list->data;
|
||||
PangoGlyphItem new_item;
|
||||
|
||||
new_item.item = pango_item_copy(old_item->item);
|
||||
new_item.glyphs = pango_glyph_string_copy(old_item->glyphs);
|
||||
|
||||
rb_ary_push(ary, PANGOGLYPHITEM2RVAL(&new_item));
|
||||
list = list->next;
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct layout_line_set_runs_args {
|
||||
PangoLayoutLine *line;
|
||||
VALUE ary;
|
||||
long n;
|
||||
GSList *result;
|
||||
};
|
||||
|
||||
static VALUE
|
||||
layout_line_set_runs_body(VALUE value)
|
||||
{
|
||||
struct layout_line_set_runs_args *args = (struct layout_line_set_runs_args *)value;
|
||||
long i;
|
||||
|
||||
for (i = 0; i < args->n; i++)
|
||||
args->result = g_slist_append(args->result,
|
||||
RVAL2PANGOGLYPHITEM(RARRAY_PTR(args->ary)[i]));
|
||||
|
||||
g_slist_free(args->line->runs);
|
||||
args->line->runs = args->result;
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN VALUE
|
||||
layout_line_set_runs_rescue(VALUE value)
|
||||
{
|
||||
g_slist_free(((struct layout_line_set_runs_args *)value)->result);
|
||||
|
||||
rb_exc_raise(rb_errinfo());
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_runs(VALUE self, VALUE attrs)
|
||||
{
|
||||
struct layout_line_set_runs_args args;
|
||||
args.line = _SELF(self);
|
||||
args.ary = rb_ary_to_ary(attrs);
|
||||
args.n = RARRAY_LEN(args.ary);
|
||||
args.result = NULL;
|
||||
|
||||
rb_rescue(layout_line_set_runs_body, (VALUE)&args,
|
||||
layout_line_set_runs_rescue, (VALUE)&args);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
static VALUE
|
||||
rg_paragraph_start_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(_SELF(self)->is_paragraph_start);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_paragraph_start(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->is_paragraph_start = RVAL2CBOOL(val);
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_resolved_dir(VALUE self)
|
||||
{
|
||||
return UINT2NUM(_SELF(self)->resolved_dir);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_resolved_dir(VALUE self, VALUE val)
|
||||
{
|
||||
_SELF(self)->resolved_dir = NUM2UINT(val);
|
||||
return self;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_layout_line(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LAYOUT_LINE, "LayoutLine", mPango);
|
||||
|
||||
RG_DEF_METHOD(extents, 0);
|
||||
RG_DEF_METHOD(pixel_extents, 0);
|
||||
RG_DEF_METHOD(index_to_x, 2);
|
||||
RG_DEF_METHOD(x_to_index, 1);
|
||||
RG_DEF_METHOD(get_x_ranges, 2);
|
||||
RG_DEF_METHOD(layout, 0);
|
||||
RG_DEF_METHOD(set_layout, 1);
|
||||
RG_DEF_METHOD(start_index, 0);
|
||||
RG_DEF_METHOD(set_start_index, 1);
|
||||
RG_DEF_METHOD(length, 0);
|
||||
RG_DEF_METHOD(set_length, 1);
|
||||
#if PANGO_CHECK_VERSION(1,2,0)
|
||||
RG_DEF_METHOD(runs, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(set_runs, 1);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
RG_DEF_METHOD_P(paragraph_start, 0);
|
||||
RG_DEF_METHOD(set_paragraph_start, 1);
|
||||
RG_DEF_METHOD(resolved_dir, 0);
|
||||
RG_DEF_METHOD(set_resolved_dir, 1);
|
||||
#endif
|
||||
}
|
114
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangologattr.c
Normal file
114
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangologattr.c
Normal file
@ -0,0 +1,114 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cLogAttr
|
||||
#define _SELF(s) (RVAL2PANGOLOGATTR(s))
|
||||
|
||||
/**********************************/
|
||||
static PangoLogAttr*
|
||||
log_copy(const PangoLogAttr* val)
|
||||
{
|
||||
PangoLogAttr* new_val;
|
||||
g_return_val_if_fail (val != NULL, NULL);
|
||||
new_val = g_new(PangoLogAttr, 1);
|
||||
*new_val = *val;
|
||||
return new_val;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_log_attr_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoLogAttr",
|
||||
(GBoxedCopyFunc)log_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
#define ATTR_BOOL(name)\
|
||||
static VALUE \
|
||||
log_get_ ## name (VALUE self)\
|
||||
{\
|
||||
return CBOOL2RVAL(_SELF(self)->name);\
|
||||
}\
|
||||
static VALUE \
|
||||
log_set_ ## name (VALUE self, VALUE val)\
|
||||
{\
|
||||
_SELF(self)->name = RVAL2CBOOL(val);\
|
||||
return self;\
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self)
|
||||
{
|
||||
PangoLogAttr attribute;
|
||||
memset(&attribute, 0, sizeof(PangoLogAttr));
|
||||
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_LOG_ATTR, &attribute));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#define DEFINE_ACCESSOR(logattr, name) \
|
||||
rbg_define_method(logattr, G_STRINGIFY(name?), log_get_is_ ## name, 0);\
|
||||
rbg_define_method(logattr, G_STRINGIFY(set_ ## name), log_set_is_ ## name, 1);
|
||||
|
||||
ATTR_BOOL(is_line_break);
|
||||
ATTR_BOOL(is_mandatory_break);
|
||||
ATTR_BOOL(is_char_break);
|
||||
ATTR_BOOL(is_white);
|
||||
ATTR_BOOL(is_cursor_position);
|
||||
ATTR_BOOL(is_word_start);
|
||||
ATTR_BOOL(is_word_end);
|
||||
ATTR_BOOL(is_sentence_boundary);
|
||||
ATTR_BOOL(is_sentence_start);
|
||||
ATTR_BOOL(is_sentence_end);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
ATTR_BOOL(backspace_deletes_character);
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_logattr(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LOG_ATTR, "LogAttr", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 0);
|
||||
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, line_break);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, mandatory_break);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, char_break);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, white);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, cursor_position);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, word_start);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, word_end);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_boundary);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_start);
|
||||
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_end);
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, "backspace_deletes_character?", log_get_backspace_deletes_character, 0);
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, "set_backspace_deletes_character", log_set_backspace_deletes_character, 1);
|
||||
#endif
|
||||
}
|
153
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangomatrix.c
Normal file
153
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangomatrix.c
Normal file
@ -0,0 +1,153 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
|
||||
#define RG_TARGET_NAMESPACE cMatrix
|
||||
#define _SELF(self) (RVAL2PANGOMATRIX(self))
|
||||
|
||||
#define ATTR_FLOAT(name)\
|
||||
static VALUE \
|
||||
matrix_get_ ## name (VALUE self)\
|
||||
{\
|
||||
return rb_float_new(_SELF(self)->name);\
|
||||
}\
|
||||
static VALUE \
|
||||
matrix_set_ ## name (VALUE self, VALUE val)\
|
||||
{\
|
||||
_SELF(self)->name = NUM2DBL(val);\
|
||||
return self;\
|
||||
}
|
||||
|
||||
#define DEFINE_ACCESSOR(name) \
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(name), matrix_get_ ## name, 0);\
|
||||
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(set_ ## name), matrix_set_## name, 1);
|
||||
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
VALUE xx, xy, yx, yy, x0, y0;
|
||||
|
||||
rb_scan_args(argc, argv, "06", &xx, &xy, &yx, &yy, &x0, &y0);
|
||||
|
||||
if (argc > 0){
|
||||
matrix.xx = NUM2DBL(xx);
|
||||
matrix.xy = NUM2DBL(xy);
|
||||
matrix.yx = NUM2DBL(yx);
|
||||
matrix.yy = NUM2DBL(yy);
|
||||
matrix.x0 = NUM2DBL(x0);
|
||||
matrix.y0 = NUM2DBL(y0);
|
||||
}
|
||||
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_MATRIX, &matrix));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_translate_bang(VALUE self, VALUE tx, VALUE ty)
|
||||
{
|
||||
pango_matrix_translate(_SELF(self), NUM2DBL(tx), NUM2DBL(ty));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_scale_bang(VALUE self, VALUE scale_x, VALUE scale_y)
|
||||
{
|
||||
pango_matrix_scale(_SELF(self), NUM2DBL(scale_x), NUM2DBL(scale_y));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_rotate_bang(VALUE self, VALUE degrees)
|
||||
{
|
||||
pango_matrix_rotate(_SELF(self), NUM2DBL(degrees));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
static VALUE
|
||||
rg_gravity(VALUE self)
|
||||
{
|
||||
return PANGOGRAVITY2RVAL(pango_gravity_get_for_matrix(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rg_concat_bang(VALUE self, VALUE new_matrix)
|
||||
{
|
||||
pango_matrix_concat(_SELF(self), _SELF(new_matrix));
|
||||
return self;
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,12,0)
|
||||
static VALUE
|
||||
rg_font_scale_factor(VALUE self)
|
||||
{
|
||||
return rb_float_new(pango_matrix_get_font_scale_factor(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
ATTR_FLOAT(xx);
|
||||
ATTR_FLOAT(xy);
|
||||
ATTR_FLOAT(yx);
|
||||
ATTR_FLOAT(yy);
|
||||
ATTR_FLOAT(x0);
|
||||
ATTR_FLOAT(y0);
|
||||
|
||||
static VALUE
|
||||
rg_to_a(VALUE self)
|
||||
{
|
||||
PangoMatrix* matrix = _SELF(self);
|
||||
return rb_ary_new3(6, INT2NUM(matrix->xx), INT2NUM(matrix->xy), INT2NUM(matrix->yx),
|
||||
INT2NUM(matrix->yy), INT2NUM(matrix->x0), INT2NUM(matrix->y0));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_matrix(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,6,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_MATRIX, "Matrix", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
RG_DEF_METHOD_BANG(translate, 2);
|
||||
RG_DEF_METHOD_BANG(scale, 2);
|
||||
RG_DEF_METHOD_BANG(rotate, 1);
|
||||
RG_DEF_METHOD_BANG(concat, 1);
|
||||
#if PANGO_CHECK_VERSION(1,12,0)
|
||||
RG_DEF_METHOD(font_scale_factor, 0);
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
RG_DEF_METHOD(gravity, 0);
|
||||
#endif
|
||||
RG_DEF_METHOD(to_a, 0);
|
||||
|
||||
DEFINE_ACCESSOR(xx);
|
||||
DEFINE_ACCESSOR(xy);
|
||||
DEFINE_ACCESSOR(yx);
|
||||
DEFINE_ACCESSOR(yy);
|
||||
DEFINE_ACCESSOR(x0);
|
||||
DEFINE_ACCESSOR(y0);
|
||||
#endif
|
||||
}
|
53
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoprivate.h
Normal file
53
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoprivate.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef RB_PANGO_PRIVATE_H
|
||||
#define RB_PANGO_PRIVATE_H
|
||||
|
||||
#include "rbpango.h"
|
||||
|
||||
#ifndef HAVE_RB_ERRINFO
|
||||
# define rb_errinfo() (ruby_errinfo)
|
||||
#endif
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,10,0) && defined(HAVE_RB_CAIRO_H)
|
||||
# define CAIRO_AVAILABLE 1
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_GNUC_INTERNAL void Init_pango_analysis(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_attribute(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_attriterator(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_attrlist(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_cairo(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_cairo_context(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_color(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_context(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_coverage(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_engine(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font_description(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font_face(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font_family(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font_map(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_font_metrics(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_fontset(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_fontset_simple(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_glyph_info(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_glyph_item(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_glyph_string(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_gravity(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_item(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_language(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_layout(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_layout_iter(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_layout_line(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_logattr(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_matrix(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_rectangle(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pangorenderer(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_script(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_script_iter(VALUE mPango);
|
||||
G_GNUC_INTERNAL void Init_pango_array(VALUE mPango);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* RB_PANGO_PRIVATE_H */
|
170
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorectangle.c
Normal file
170
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorectangle.c
Normal file
@ -0,0 +1,170 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cRectangle
|
||||
#define _SELF(s) (RVAL2PANGORECTANGLE(s))
|
||||
|
||||
/**********************************/
|
||||
static PangoRectangle*
|
||||
pango_rectangle_copy(const PangoRectangle *ref)
|
||||
{
|
||||
PangoRectangle* new_ref;
|
||||
g_return_val_if_fail (ref != NULL, NULL);
|
||||
new_ref = g_new(PangoRectangle, 1);
|
||||
*new_ref = *ref;
|
||||
return new_ref;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_rectangle_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoRectangle",
|
||||
(GBoxedCopyFunc)pango_rectangle_copy,
|
||||
(GBoxedFreeFunc)g_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
PangoRectangle rectangle;
|
||||
|
||||
rectangle.x = NUM2INT(x);
|
||||
rectangle.y = NUM2INT(y);
|
||||
rectangle.width = NUM2INT(width);
|
||||
rectangle.height = NUM2INT(height);
|
||||
|
||||
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_RECTANGLE, &rectangle));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
PangoRectangle* a = _SELF(self);
|
||||
return rb_ary_new3(4, INT2FIX(a->x), INT2FIX(a->y),
|
||||
INT2FIX(a->width), INT2FIX(a->height));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_ascent(VALUE self)
|
||||
{
|
||||
PangoRectangle* r =_SELF(self);
|
||||
return INT2NUM(PANGO_ASCENT(*r));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_descent(VALUE self)
|
||||
{
|
||||
PangoRectangle* r =_SELF(self);
|
||||
return INT2NUM(PANGO_DESCENT(*r));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_lbearing(VALUE self)
|
||||
{
|
||||
PangoRectangle* r =_SELF(self);
|
||||
return INT2NUM(PANGO_LBEARING(*r));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_rbearing(VALUE self)
|
||||
{
|
||||
PangoRectangle* r =_SELF(self);
|
||||
return INT2NUM(PANGO_RBEARING(*r));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_rectangle(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RECTANGLE, "Rectangle", mPango);
|
||||
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);
|
||||
|
||||
RG_DEF_METHOD(ascent, 0);
|
||||
RG_DEF_METHOD(descent, 0);
|
||||
RG_DEF_METHOD(lbearing, 0);
|
||||
RG_DEF_METHOD(rbearing, 0);
|
||||
}
|
199
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorenderer.c
Normal file
199
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangorenderer.c
Normal file
@ -0,0 +1,199 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
#define RG_TARGET_NAMESPACE cRenderer
|
||||
#define _SELF(self) (RVAL2PANGORENDERER(self))
|
||||
|
||||
static VALUE
|
||||
rg_draw_layout(VALUE self, VALUE layout, VALUE x, VALUE y)
|
||||
{
|
||||
pango_renderer_draw_layout(_SELF(self),
|
||||
RVAL2PANGOLAYOUT(layout),
|
||||
NUM2INT(x), NUM2INT(y));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_layout_line(VALUE self, VALUE line, VALUE x, VALUE y)
|
||||
{
|
||||
pango_renderer_draw_layout_line(_SELF(self),
|
||||
RVAL2PANGOLAYOUTLINE(line),
|
||||
NUM2INT(x), NUM2INT(y));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_glyphs(VALUE self, VALUE font, VALUE glyphs, VALUE x, VALUE y)
|
||||
{
|
||||
pango_renderer_draw_glyphs(_SELF(self),
|
||||
RVAL2PANGOFONT(font),
|
||||
RVAL2PANGOGLYPHSTRING(glyphs),
|
||||
NUM2INT(x), NUM2INT(y));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_rectangle(VALUE self, VALUE part, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
pango_renderer_draw_rectangle(_SELF(self), RVAL2PANGORENDERPART(part),
|
||||
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
||||
#else
|
||||
pango_renderer_draw_rectangle(_SELF(self), NUM2INT(part),
|
||||
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
||||
{
|
||||
pango_renderer_draw_error_underline(_SELF(self),
|
||||
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_trapezoid(VALUE self, VALUE part, VALUE y1, VALUE x11, VALUE x21, VALUE y2, VALUE x12, VALUE x22)
|
||||
{
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
pango_renderer_draw_trapezoid(_SELF(self),
|
||||
RVAL2PANGORENDERPART(part),
|
||||
NUM2DBL(y1), NUM2DBL(x11), NUM2DBL(x21),
|
||||
NUM2DBL(y2), NUM2DBL(x12), NUM2DBL(x22));
|
||||
#else
|
||||
pango_renderer_draw_trapezoid(_SELF(self), NUM2INT(part),
|
||||
NUM2DBL(y1), NUM2DBL(x11), NUM2DBL(x21),
|
||||
NUM2DBL(y2), NUM2DBL(x12), NUM2DBL(x22));
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_draw_glyph(VALUE self, VALUE font, VALUE glyph, VALUE x, VALUE y)
|
||||
{
|
||||
pango_renderer_draw_glyph(_SELF(self), RVAL2PANGOFONT(font),
|
||||
NUM2INT(glyph), NUM2INT(x), NUM2INT(y));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_deactivate(VALUE self)
|
||||
{
|
||||
pango_renderer_deactivate(_SELF(self));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_activate(VALUE self)
|
||||
{
|
||||
pango_renderer_activate(_SELF(self));
|
||||
if (rb_block_given_p()) {
|
||||
rb_ensure(rb_yield, self, rg_deactivate, self);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_part_changed(VALUE self, VALUE part)
|
||||
{
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
pango_renderer_part_changed(_SELF(self), RVAL2PANGORENDERPART(part));
|
||||
#else
|
||||
pango_renderer_part_changed(_SELF(self), NUM2INT(part));
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_color(VALUE self, VALUE part, VALUE color)
|
||||
{
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
pango_renderer_set_color(_SELF(self), RVAL2PANGORENDERPART(part),
|
||||
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
||||
#else
|
||||
pango_renderer_set_color(_SELF(self), NUM2INT(part),
|
||||
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_color(VALUE self, VALUE part)
|
||||
{
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
PangoColor* color = pango_renderer_get_color(_SELF(self),
|
||||
RVAL2PANGORENDERPART(part));
|
||||
#else
|
||||
PangoColor* color = pango_renderer_get_color(_SELF(self),NUM2INT(part));
|
||||
#endif
|
||||
return PANGOCOLOR2RVAL(color);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_matrix(VALUE self, VALUE matrix)
|
||||
{
|
||||
pango_renderer_set_matrix(_SELF(self),
|
||||
NIL_P(matrix) ? NULL : RVAL2PANGOMATRIX(matrix));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_matrix(VALUE self)
|
||||
{
|
||||
const PangoMatrix* matrix = pango_renderer_get_matrix(_SELF(self));
|
||||
return PANGOMATRIX2RVAL((PangoMatrix*)matrix);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pangorenderer(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,8,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RENDERER, "Renderer", mPango);
|
||||
|
||||
RG_DEF_METHOD(draw_layout, 3);
|
||||
RG_DEF_METHOD(draw_layout_line, 3);
|
||||
RG_DEF_METHOD(draw_glyphs, 4);
|
||||
RG_DEF_METHOD(draw_rectangle, 5);
|
||||
RG_DEF_METHOD(draw_error_underline, 4);
|
||||
RG_DEF_METHOD(draw_trapezoid, 7);
|
||||
RG_DEF_METHOD(draw_glyph, 4);
|
||||
RG_DEF_METHOD(activate, 0);
|
||||
RG_DEF_METHOD(deactivate, 0);
|
||||
RG_DEF_METHOD(part_changed, 1);
|
||||
RG_DEF_METHOD(set_color, 2);
|
||||
RG_DEF_METHOD(get_color, 1);
|
||||
RG_DEF_METHOD(set_matrix, 1);
|
||||
RG_DEF_METHOD(matrix, 0);
|
||||
|
||||
/* PangoRenderPart */
|
||||
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
||||
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_RENDER_PART, "PANGO_RENDER_");
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
88
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscript.c
Normal file
88
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscript.c
Normal file
@ -0,0 +1,88 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
#define RG_TARGET_NAMESPACE cScript
|
||||
#define _SELF(r) (RVAL2PANGOSCRIPT(r))
|
||||
|
||||
static VALUE
|
||||
rg_s_for_unichar(G_GNUC_UNUSED VALUE self, VALUE ch)
|
||||
{
|
||||
return PANGOSCRIPT2RVAL(pango_script_for_unichar(NUM2UINT(ch)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_sample_language(VALUE self)
|
||||
{
|
||||
PangoLanguage* lang = pango_script_get_sample_language(_SELF(self));
|
||||
return PANGOLANGUAGE2RVAL(lang);
|
||||
}
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
static VALUE
|
||||
rg_get_gravity(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE wide, gravity, gravity_hint;
|
||||
int n;
|
||||
PangoGravity g;
|
||||
|
||||
n = rb_scan_args(argc, argv, "21", &gravity, &gravity_hint, &wide);
|
||||
|
||||
if (n == 2) {
|
||||
g = pango_gravity_get_for_script(_SELF(self),
|
||||
RVAL2PANGOGRAVITY(gravity),
|
||||
RVAL2PANGOGRAVITYHINT(gravity_hint));
|
||||
} else {
|
||||
# if PANGO_CHECK_VERSION(1,26,0)
|
||||
g = pango_gravity_get_for_script_and_width(_SELF(self),
|
||||
RVAL2CBOOL(wide),
|
||||
RVAL2PANGOGRAVITY(gravity),
|
||||
RVAL2PANGOGRAVITYHINT(gravity_hint));
|
||||
# else
|
||||
rb_raise(rb_eArgError,
|
||||
"the 3rd 'wide' argument requires Pango >= 1.26");
|
||||
# endif
|
||||
}
|
||||
return PANGOGRAVITY2RVAL(g);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Move to Pango::Language
|
||||
gboolean pango_language_includes_script (PangoLanguage *language,
|
||||
PangoScript script);
|
||||
*/
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_script(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_SCRIPT, "Script", mPango);
|
||||
|
||||
RG_DEF_SMETHOD(for_unichar, 1);
|
||||
RG_DEF_METHOD(sample_language, 0);
|
||||
#endif
|
||||
#if PANGO_CHECK_VERSION(1,16,0)
|
||||
RG_DEF_METHOD(get_gravity, -1);
|
||||
#endif
|
||||
}
|
97
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscriptiter.c
Normal file
97
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangoscriptiter.c
Normal file
@ -0,0 +1,97 @@
|
||||
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
||||
* Copyright (C) 2005 Masao Mutoh
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "rbpangoprivate.h"
|
||||
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
|
||||
/**********************************/
|
||||
static PangoScriptIter*
|
||||
rbpango_script_iter_copy(PangoScriptIter *ref)
|
||||
{
|
||||
/*
|
||||
PangoScriptIter* new_ref = pango_script_iter_new("", 0);
|
||||
g_return_val_if_fail (ref != NULL, NULL);
|
||||
new_ref = g_new(PangoScriptIter, 1);
|
||||
*new_ref = *ref;
|
||||
return new_ref;
|
||||
*/
|
||||
return ref;
|
||||
}
|
||||
|
||||
GType
|
||||
pango_script_iter_get_type(void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static ("PangoScriptIter",
|
||||
(GBoxedCopyFunc)rbpango_script_iter_copy,
|
||||
(GBoxedFreeFunc)pango_script_iter_free);
|
||||
return our_type;
|
||||
}
|
||||
/**********************************/
|
||||
|
||||
#define RG_TARGET_NAMESPACE cScriptIter
|
||||
#define _SELF(r) (RVAL2PANGOSCRIPTITER(r))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(VALUE self, VALUE text)
|
||||
{
|
||||
PangoScriptIter* iter;
|
||||
|
||||
StringValue(text);
|
||||
iter = pango_script_iter_new(RSTRING_PTR(text), RSTRING_LEN(text));
|
||||
G_INITIALIZE(self, iter);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_range(VALUE self)
|
||||
{
|
||||
G_CONST_RETURN char* start;
|
||||
G_CONST_RETURN char* end;
|
||||
PangoScript script;
|
||||
|
||||
pango_script_iter_get_range(_SELF(self), &start, &end, &script);
|
||||
|
||||
return rb_ary_new3(3, CSTR2RVAL(start), CSTR2RVAL(end),
|
||||
PANGOSCRIPT2RVAL(script));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_next_bang(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_script_iter_next(_SELF(self)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_pango_script_iter(VALUE mPango)
|
||||
{
|
||||
#if PANGO_CHECK_VERSION(1,4,0)
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_SCRIPT_ITER, "ScriptIter", mPango);
|
||||
|
||||
RG_DEF_METHOD(initialize, 1);
|
||||
RG_DEF_METHOD(range, 0);
|
||||
RG_DEF_METHOD_BANG(next, 0);
|
||||
#endif
|
||||
}
|
128
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangotabarray.c
Normal file
128
lib/ruby-gtk2-2.0.2/pango/ext/pango/rbpangotabarray.c
Normal file
@ -0,0 +1,128 @@
|
||||
/* -*- 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 "rbpangoprivate.h"
|
||||
|
||||
#define RG_TARGET_NAMESPACE cTabArray
|
||||
#define _SELF(self) (RVAL2PANGOTABARRAY(self))
|
||||
|
||||
static VALUE
|
||||
rg_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE size, positions_in_pixels, attr_ary;
|
||||
PangoTabArray *array;
|
||||
int i;
|
||||
|
||||
rb_scan_args(argc, argv, "2*", &size, &positions_in_pixels, &attr_ary);
|
||||
|
||||
array = pango_tab_array_new(NUM2INT(size),
|
||||
RVAL2CBOOL(positions_in_pixels));
|
||||
G_INITIALIZE(self, array);
|
||||
|
||||
if (! NIL_P(attr_ary)){
|
||||
for (i = 0; i < RARRAY_LEN(attr_ary); i++) {
|
||||
pango_tab_array_set_tab(array, i,
|
||||
RVAL2PANGOTABALIGN(RARRAY_PTR(RARRAY_PTR(attr_ary)[i])[0]),
|
||||
FIX2INT(RARRAY_PTR(RARRAY_PTR(attr_ary)[i])[1]));
|
||||
}
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
/* This is implemented in rtab_initialize.
|
||||
PangoTabArray* pango_tab_array_new_with_positions
|
||||
(gint size,
|
||||
gboolean positions_in_pixels,
|
||||
PangoTabAlign first_alignment,
|
||||
gint first_position,
|
||||
...);
|
||||
*/
|
||||
static VALUE
|
||||
rg_size(VALUE self)
|
||||
{
|
||||
return INT2NUM(pango_tab_array_get_size(_SELF(self)));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_resize(VALUE self, VALUE size)
|
||||
{
|
||||
pango_tab_array_resize(_SELF(self), NUM2INT(size));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_set_tab(VALUE self, VALUE tab_index, VALUE align, VALUE location)
|
||||
{
|
||||
pango_tab_array_set_tab(_SELF(self), NUM2INT(tab_index), RVAL2PANGOTABALIGN(align),
|
||||
NUM2INT(location));
|
||||
return self;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_get_tab(VALUE self, VALUE tab_index)
|
||||
{
|
||||
PangoTabAlign align;
|
||||
gint location;
|
||||
pango_tab_array_get_tab(_SELF(self), NUM2INT(tab_index),
|
||||
&align, &location);
|
||||
return rb_ary_new3(2, PANGOTABALIGN2RVAL(align), INT2NUM(location));
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_tabs(VALUE self)
|
||||
{
|
||||
PangoTabAlign* aligns;
|
||||
gint* locations;
|
||||
VALUE ary = rb_ary_new();
|
||||
PangoTabArray* tab_array = _SELF(self);
|
||||
gint i;
|
||||
|
||||
pango_tab_array_get_tabs(tab_array, &aligns, &locations);
|
||||
|
||||
for (i = 0; i < pango_tab_array_get_size(tab_array); i++){
|
||||
rb_ary_push(ary, rb_ary_new3(2, PANGOTABALIGN2RVAL(aligns[i]),
|
||||
INT2NUM(locations[i])));
|
||||
}
|
||||
return ary;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rg_positions_in_pixels_p(VALUE self)
|
||||
{
|
||||
return CBOOL2RVAL(pango_tab_array_get_positions_in_pixels(_SELF(self)));
|
||||
}
|
||||
|
||||
void
|
||||
Init_pango_array(VALUE mPango)
|
||||
{
|
||||
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_TAB_ARRAY, "TabArray", mPango);
|
||||
RG_DEF_METHOD(initialize, -1);
|
||||
RG_DEF_METHOD(size, 0);
|
||||
RG_DEF_METHOD(resize, 1);
|
||||
RG_DEF_METHOD(set_tab, 3);
|
||||
RG_DEF_METHOD(get_tab, 1);
|
||||
RG_DEF_METHOD(tabs, 0);
|
||||
RG_DEF_METHOD_P(positions_in_pixels, 0);
|
||||
|
||||
/* PangoTabAlign */
|
||||
G_DEF_CLASS(PANGO_TYPE_TAB_ALIGN, "TabAlign", RG_TARGET_NAMESPACE);
|
||||
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_TAB_ALIGN, "PANGO_");
|
||||
}
|
Reference in New Issue
Block a user