glib2 0.90.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3115 -0
- data/README +40 -0
- data/Rakefile +69 -0
- data/ext/glib2/depend +10 -0
- data/ext/glib2/extconf.rb +61 -0
- data/ext/glib2/glib2.def +89 -0
- data/ext/glib2/rbgcompat.h +30 -0
- data/ext/glib2/rbglib.c +330 -0
- data/ext/glib2/rbglib.h +96 -0
- data/ext/glib2/rbglib_bookmarkfile.c +595 -0
- data/ext/glib2/rbglib_completion.c +192 -0
- data/ext/glib2/rbglib_convert.c +195 -0
- data/ext/glib2/rbglib_error.c +95 -0
- data/ext/glib2/rbglib_fileutils.c +83 -0
- data/ext/glib2/rbglib_i18n.c +44 -0
- data/ext/glib2/rbglib_int64.c +157 -0
- data/ext/glib2/rbglib_iochannel.c +883 -0
- data/ext/glib2/rbglib_keyfile.c +846 -0
- data/ext/glib2/rbglib_maincontext.c +915 -0
- data/ext/glib2/rbglib_mainloop.c +87 -0
- data/ext/glib2/rbglib_messages.c +150 -0
- data/ext/glib2/rbglib_pollfd.c +111 -0
- data/ext/glib2/rbglib_shell.c +68 -0
- data/ext/glib2/rbglib_source.c +190 -0
- data/ext/glib2/rbglib_spawn.c +345 -0
- data/ext/glib2/rbglib_threads.c +51 -0
- data/ext/glib2/rbglib_timer.c +127 -0
- data/ext/glib2/rbglib_unicode.c +611 -0
- data/ext/glib2/rbglib_utils.c +386 -0
- data/ext/glib2/rbglib_win32.c +136 -0
- data/ext/glib2/rbgobj_boxed.c +251 -0
- data/ext/glib2/rbgobj_closure.c +337 -0
- data/ext/glib2/rbgobj_convert.c +167 -0
- data/ext/glib2/rbgobj_enums.c +961 -0
- data/ext/glib2/rbgobj_fundamental.c +30 -0
- data/ext/glib2/rbgobj_object.c +892 -0
- data/ext/glib2/rbgobj_param.c +390 -0
- data/ext/glib2/rbgobj_paramspecs.c +305 -0
- data/ext/glib2/rbgobj_signal.c +963 -0
- data/ext/glib2/rbgobj_strv.c +61 -0
- data/ext/glib2/rbgobj_type.c +851 -0
- data/ext/glib2/rbgobj_typeinstance.c +121 -0
- data/ext/glib2/rbgobj_typeinterface.c +148 -0
- data/ext/glib2/rbgobj_typemodule.c +66 -0
- data/ext/glib2/rbgobj_typeplugin.c +49 -0
- data/ext/glib2/rbgobj_value.c +313 -0
- data/ext/glib2/rbgobj_valuearray.c +59 -0
- data/ext/glib2/rbgobj_valuetypes.c +298 -0
- data/ext/glib2/rbgobject.c +406 -0
- data/ext/glib2/rbgobject.h +265 -0
- data/ext/glib2/rbgprivate.h +88 -0
- data/ext/glib2/rbgutil.c +316 -0
- data/ext/glib2/rbgutil.h +82 -0
- data/ext/glib2/rbgutil_callback.c +231 -0
- data/extconf.rb +49 -0
- data/lib/1.8/glib2.so +0 -0
- data/lib/1.9/glib2.so +0 -0
- data/lib/glib-mkenums.rb +199 -0
- data/lib/glib2.rb +239 -0
- data/lib/gnome2-win32-binary-downloader.rb +92 -0
- data/lib/mkmf-gnome2.rb +377 -0
- data/sample/bookmarkfile.rb +66 -0
- data/sample/completion.rb +45 -0
- data/sample/idle.rb +41 -0
- data/sample/iochannel.rb +44 -0
- data/sample/keyfile.rb +62 -0
- data/sample/shell.rb +36 -0
- data/sample/spawn.rb +25 -0
- data/sample/timeout.rb +28 -0
- data/sample/timeout2.rb +35 -0
- data/sample/timer.rb +40 -0
- data/sample/type-register.rb +103 -0
- data/sample/type-register2.rb +104 -0
- data/sample/utils.rb +54 -0
- data/test/glib-test-init.rb +6 -0
- data/test/glib-test-utils.rb +12 -0
- data/test/run-test.rb +21 -0
- data/test/test_enum.rb +99 -0
- data/test/test_file_utils.rb +15 -0
- data/test/test_glib2.rb +120 -0
- data/test/test_iochannel.rb +275 -0
- data/test/test_key_file.rb +38 -0
- data/test/test_mkenums.rb +25 -0
- data/test/test_signal.rb +20 -0
- data/test/test_timeout.rb +28 -0
- data/test/test_unicode.rb +369 -0
- data/test/test_utils.rb +37 -0
- data/test/test_win32.rb +13 -0
- data/test-unit/COPYING +56 -0
- data/test-unit/GPL +340 -0
- data/test-unit/History.txt +232 -0
- data/test-unit/Manifest.txt +110 -0
- data/test-unit/PSFL +271 -0
- data/test-unit/README.txt +75 -0
- data/test-unit/Rakefile +53 -0
- data/test-unit/TODO +5 -0
- data/test-unit/bin/testrb +5 -0
- data/test-unit/html/bar.png +0 -0
- data/test-unit/html/bar.svg +153 -0
- data/test-unit/html/developer.png +0 -0
- data/test-unit/html/developer.svg +469 -0
- data/test-unit/html/famfamfam-logo.png +0 -0
- data/test-unit/html/favicon.ico +0 -0
- data/test-unit/html/favicon.png +0 -0
- data/test-unit/html/favicon.svg +82 -0
- data/test-unit/html/heading-mark.png +0 -0
- data/test-unit/html/heading-mark.svg +393 -0
- data/test-unit/html/index.html +247 -0
- data/test-unit/html/index.html.ja +270 -0
- data/test-unit/html/install.png +0 -0
- data/test-unit/html/install.svg +636 -0
- data/test-unit/html/jp.png +0 -0
- data/test-unit/html/kinotan-failure.png +0 -0
- data/test-unit/html/kinotan-pass.png +0 -0
- data/test-unit/html/logo.png +0 -0
- data/test-unit/html/logo.svg +483 -0
- data/test-unit/html/reference.png +0 -0
- data/test-unit/html/rubyforge.png +0 -0
- data/test-unit/html/tango-logo.png +0 -0
- data/test-unit/html/test-unit.css +339 -0
- data/test-unit/html/tutorial.png +0 -0
- data/test-unit/html/tutorial.svg +559 -0
- data/test-unit/html/us.png +0 -0
- data/test-unit/images/color-diff.png +0 -0
- data/test-unit/lib/test/unit/assertionfailederror.rb +25 -0
- data/test-unit/lib/test/unit/assertions.rb +1334 -0
- data/test-unit/lib/test/unit/attribute.rb +125 -0
- data/test-unit/lib/test/unit/autorunner.rb +363 -0
- data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
- data/test-unit/lib/test/unit/collector/dir.rb +108 -0
- data/test-unit/lib/test/unit/collector/load.rb +144 -0
- data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
- data/test-unit/lib/test/unit/collector.rb +36 -0
- data/test-unit/lib/test/unit/color-scheme.rb +106 -0
- data/test-unit/lib/test/unit/color.rb +96 -0
- data/test-unit/lib/test/unit/diff.rb +740 -0
- data/test-unit/lib/test/unit/error.rb +130 -0
- data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
- data/test-unit/lib/test/unit/failure.rb +136 -0
- data/test-unit/lib/test/unit/fixture.rb +176 -0
- data/test-unit/lib/test/unit/notification.rb +129 -0
- data/test-unit/lib/test/unit/omission.rb +191 -0
- data/test-unit/lib/test/unit/pending.rb +150 -0
- data/test-unit/lib/test/unit/priority.rb +180 -0
- data/test-unit/lib/test/unit/runner/console.rb +52 -0
- data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
- data/test-unit/lib/test/unit/runner/tap.rb +8 -0
- data/test-unit/lib/test/unit/testcase.rb +483 -0
- data/test-unit/lib/test/unit/testresult.rb +121 -0
- data/test-unit/lib/test/unit/testsuite.rb +110 -0
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +430 -0
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +63 -0
- data/test-unit/lib/test/unit/ui/tap/testrunner.rb +82 -0
- data/test-unit/lib/test/unit/ui/testrunner.rb +53 -0
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/test-unit/lib/test/unit/util/backtracefilter.rb +42 -0
- data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/test-unit/lib/test/unit/util/observable.rb +90 -0
- data/test-unit/lib/test/unit/util/output.rb +31 -0
- data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
- data/test-unit/lib/test/unit/version.rb +7 -0
- data/test-unit/lib/test/unit.rb +328 -0
- data/test-unit/sample/adder.rb +13 -0
- data/test-unit/sample/subtracter.rb +12 -0
- data/test-unit/sample/test_adder.rb +20 -0
- data/test-unit/sample/test_subtracter.rb +20 -0
- data/test-unit/sample/test_user.rb +23 -0
- data/test-unit/test/collector/test-descendant.rb +133 -0
- data/test-unit/test/collector/test-load.rb +442 -0
- data/test-unit/test/collector/test_dir.rb +406 -0
- data/test-unit/test/collector/test_objectspace.rb +100 -0
- data/test-unit/test/run-test.rb +15 -0
- data/test-unit/test/test-attribute.rb +86 -0
- data/test-unit/test/test-color-scheme.rb +69 -0
- data/test-unit/test/test-color.rb +47 -0
- data/test-unit/test/test-diff.rb +518 -0
- data/test-unit/test/test-emacs-runner.rb +60 -0
- data/test-unit/test/test-fixture.rb +287 -0
- data/test-unit/test/test-notification.rb +33 -0
- data/test-unit/test/test-omission.rb +81 -0
- data/test-unit/test/test-pending.rb +70 -0
- data/test-unit/test/test-priority.rb +119 -0
- data/test-unit/test/test-testcase.rb +544 -0
- data/test-unit/test/test_assertions.rb +1197 -0
- data/test-unit/test/test_error.rb +26 -0
- data/test-unit/test/test_failure.rb +33 -0
- data/test-unit/test/test_testresult.rb +113 -0
- data/test-unit/test/test_testsuite.rb +129 -0
- data/test-unit/test/testunit-test-util.rb +14 -0
- data/test-unit/test/ui/test_tap.rb +33 -0
- data/test-unit/test/ui/test_testrunmediator.rb +20 -0
- data/test-unit/test/util/test-method-owner-finder.rb +38 -0
- data/test-unit/test/util/test-output.rb +11 -0
- data/test-unit/test/util/test_backtracefilter.rb +41 -0
- data/test-unit/test/util/test_observable.rb +102 -0
- data/test-unit/test/util/test_procwrapper.rb +36 -0
- data/vendor/local/bin/envsubst.exe +0 -0
- data/vendor/local/bin/gettext.exe +0 -0
- data/vendor/local/bin/gettext.sh +123 -0
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
- data/vendor/local/bin/glib-gettextize +188 -0
- data/vendor/local/bin/glib-mkenums +511 -0
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
- data/vendor/local/bin/intl.dll +0 -0
- data/vendor/local/bin/libasprintf-0.dll +0 -0
- data/vendor/local/bin/libgcc_s_dw2-1.dll +0 -0
- data/vendor/local/bin/libgio-2.0-0.dll +0 -0
- data/vendor/local/bin/libglib-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
- data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
- data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
- data/vendor/local/bin/ngettext.exe +0 -0
- data/vendor/local/include/autosprintf.h +66 -0
- data/vendor/local/include/glib-2.0/gio/gappinfo.h +237 -0
- data/vendor/local/include/glib-2.0/gio/gasyncinitable.h +119 -0
- data/vendor/local/include/glib-2.0/gio/gasyncresult.h +73 -0
- data/vendor/local/include/glib-2.0/gio/gbufferedinputstream.h +123 -0
- data/vendor/local/include/glib-2.0/gio/gbufferedoutputstream.h +82 -0
- data/vendor/local/include/glib-2.0/gio/gcancellable.h +103 -0
- data/vendor/local/include/glib-2.0/gio/gcharsetconverter.h +60 -0
- data/vendor/local/include/glib-2.0/gio/gcontenttype.h +57 -0
- data/vendor/local/include/glib-2.0/gio/gconverter.h +95 -0
- data/vendor/local/include/glib-2.0/gio/gconverterinputstream.h +80 -0
- data/vendor/local/include/glib-2.0/gio/gconverteroutputstream.h +80 -0
- data/vendor/local/include/glib-2.0/gio/gdatainputstream.h +133 -0
- data/vendor/local/include/glib-2.0/gio/gdataoutputstream.h +116 -0
- data/vendor/local/include/glib-2.0/gio/gdrive.h +225 -0
- data/vendor/local/include/glib-2.0/gio/gemblem.h +58 -0
- data/vendor/local/include/glib-2.0/gio/gemblemedicon.h +62 -0
- data/vendor/local/include/glib-2.0/gio/gfile.h +1017 -0
- data/vendor/local/include/glib-2.0/gio/gfileattribute.h +77 -0
- data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +133 -0
- data/vendor/local/include/glib-2.0/gio/gfileicon.h +56 -0
- data/vendor/local/include/glib-2.0/gio/gfileinfo.h +951 -0
- data/vendor/local/include/glib-2.0/gio/gfileinputstream.h +112 -0
- data/vendor/local/include/glib-2.0/gio/gfileiostream.h +118 -0
- data/vendor/local/include/glib-2.0/gio/gfilemonitor.h +95 -0
- data/vendor/local/include/glib-2.0/gio/gfilenamecompleter.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gfileoutputstream.h +119 -0
- data/vendor/local/include/glib-2.0/gio/gfilterinputstream.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gfilteroutputstream.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gicon.h +91 -0
- data/vendor/local/include/glib-2.0/gio/ginetaddress.h +103 -0
- data/vendor/local/include/glib-2.0/gio/ginetsocketaddress.h +69 -0
- data/vendor/local/include/glib-2.0/gio/ginitable.h +96 -0
- data/vendor/local/include/glib-2.0/gio/ginputstream.h +172 -0
- data/vendor/local/include/glib-2.0/gio/gio.h +101 -0
- data/vendor/local/include/glib-2.0/gio/gioenums.h +703 -0
- data/vendor/local/include/glib-2.0/gio/gioenumtypes.h +79 -0
- data/vendor/local/include/glib-2.0/gio/gioerror.h +48 -0
- data/vendor/local/include/glib-2.0/gio/giomodule.h +132 -0
- data/vendor/local/include/glib-2.0/gio/gioscheduler.h +52 -0
- data/vendor/local/include/glib-2.0/gio/giostream.h +112 -0
- data/vendor/local/include/glib-2.0/gio/giotypes.h +339 -0
- data/vendor/local/include/glib-2.0/gio/gloadableicon.h +97 -0
- data/vendor/local/include/glib-2.0/gio/gmemoryinputstream.h +82 -0
- data/vendor/local/include/glib-2.0/gio/gmemoryoutputstream.h +97 -0
- data/vendor/local/include/glib-2.0/gio/gmount.h +242 -0
- data/vendor/local/include/glib-2.0/gio/gmountoperation.h +123 -0
- data/vendor/local/include/glib-2.0/gio/gnativevolumemonitor.h +62 -0
- data/vendor/local/include/glib-2.0/gio/gnetworkaddress.h +69 -0
- data/vendor/local/include/glib-2.0/gio/gnetworkservice.h +69 -0
- data/vendor/local/include/glib-2.0/gio/goutputstream.h +207 -0
- data/vendor/local/include/glib-2.0/gio/gresolver.h +167 -0
- data/vendor/local/include/glib-2.0/gio/gseekable.h +99 -0
- data/vendor/local/include/glib-2.0/gio/gsimpleasyncresult.h +125 -0
- data/vendor/local/include/glib-2.0/gio/gsocket.h +176 -0
- data/vendor/local/include/glib-2.0/gio/gsocketaddress.h +79 -0
- data/vendor/local/include/glib-2.0/gio/gsocketaddressenumerator.h +89 -0
- data/vendor/local/include/glib-2.0/gio/gsocketclient.h +130 -0
- data/vendor/local/include/glib-2.0/gio/gsocketconnectable.h +68 -0
- data/vendor/local/include/glib-2.0/gio/gsocketconnection.h +91 -0
- data/vendor/local/include/glib-2.0/gio/gsocketcontrolmessage.h +105 -0
- data/vendor/local/include/glib-2.0/gio/gsocketlistener.h +138 -0
- data/vendor/local/include/glib-2.0/gio/gsocketservice.h +88 -0
- data/vendor/local/include/glib-2.0/gio/gsrvtarget.h +52 -0
- data/vendor/local/include/glib-2.0/gio/gtcpconnection.h +68 -0
- data/vendor/local/include/glib-2.0/gio/gthemedicon.h +63 -0
- data/vendor/local/include/glib-2.0/gio/gthreadedsocketservice.h +81 -0
- data/vendor/local/include/glib-2.0/gio/gvfs.h +125 -0
- data/vendor/local/include/glib-2.0/gio/gvolume.h +211 -0
- data/vendor/local/include/glib-2.0/gio/gvolumemonitor.h +151 -0
- data/vendor/local/include/glib-2.0/gio/gzlibcompressor.h +55 -0
- data/vendor/local/include/glib-2.0/gio/gzlibdecompressor.h +54 -0
- data/vendor/local/include/glib-2.0/glib/galloca.h +63 -0
- data/vendor/local/include/glib-2.0/glib/garray.h +179 -0
- data/vendor/local/include/glib-2.0/glib/gasyncqueue.h +120 -0
- data/vendor/local/include/glib-2.0/glib/gatomic.h +85 -0
- data/vendor/local/include/glib-2.0/glib/gbacktrace.h +68 -0
- data/vendor/local/include/glib-2.0/glib/gbase64.h +57 -0
- data/vendor/local/include/glib-2.0/glib/gbitlock.h +43 -0
- data/vendor/local/include/glib-2.0/glib/gbookmarkfile.h +191 -0
- data/vendor/local/include/glib-2.0/glib/gcache.h +69 -0
- data/vendor/local/include/glib-2.0/glib/gchecksum.h +86 -0
- data/vendor/local/include/glib-2.0/glib/gcompletion.h +77 -0
- data/vendor/local/include/glib-2.0/glib/gconvert.h +138 -0
- data/vendor/local/include/glib-2.0/glib/gdataset.h +122 -0
- data/vendor/local/include/glib-2.0/glib/gdate.h +263 -0
- data/vendor/local/include/glib-2.0/glib/gdir.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gerror.h +98 -0
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +128 -0
- data/vendor/local/include/glib-2.0/glib/ghash.h +166 -0
- data/vendor/local/include/glib-2.0/glib/ghook.h +181 -0
- data/vendor/local/include/glib-2.0/glib/ghostutils.h +40 -0
- data/vendor/local/include/glib-2.0/glib/gi18n-lib.h +38 -0
- data/vendor/local/include/glib-2.0/glib/gi18n.h +34 -0
- data/vendor/local/include/glib-2.0/glib/giochannel.h +366 -0
- data/vendor/local/include/glib-2.0/glib/gkeyfile.h +250 -0
- data/vendor/local/include/glib-2.0/glib/glist.h +120 -0
- data/vendor/local/include/glib-2.0/glib/gmacros.h +277 -0
- data/vendor/local/include/glib-2.0/glib/gmain.h +304 -0
- data/vendor/local/include/glib-2.0/glib/gmappedfile.h +49 -0
- data/vendor/local/include/glib-2.0/glib/gmarkup.h +163 -0
- data/vendor/local/include/glib-2.0/glib/gmem.h +203 -0
- data/vendor/local/include/glib-2.0/glib/gmessages.h +343 -0
- data/vendor/local/include/glib-2.0/glib/gnode.h +288 -0
- data/vendor/local/include/glib-2.0/glib/goption.h +370 -0
- data/vendor/local/include/glib-2.0/glib/gpattern.h +49 -0
- data/vendor/local/include/glib-2.0/glib/gpoll.h +93 -0
- data/vendor/local/include/glib-2.0/glib/gprimes.h +51 -0
- data/vendor/local/include/glib-2.0/glib/gprintf.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gqsort.h +46 -0
- data/vendor/local/include/glib-2.0/glib/gquark.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gqueue.h +127 -0
- data/vendor/local/include/glib-2.0/glib/grand.h +85 -0
- data/vendor/local/include/glib-2.0/glib/gregex.h +243 -0
- data/vendor/local/include/glib-2.0/glib/grel.h +97 -0
- data/vendor/local/include/glib-2.0/glib/gscanner.h +278 -0
- data/vendor/local/include/glib-2.0/glib/gsequence.h +128 -0
- data/vendor/local/include/glib-2.0/glib/gshell.h +55 -0
- data/vendor/local/include/glib-2.0/glib/gslice.h +86 -0
- data/vendor/local/include/glib-2.0/glib/gslist.h +114 -0
- data/vendor/local/include/glib-2.0/glib/gspawn.h +139 -0
- data/vendor/local/include/glib-2.0/glib/gstdio.h +159 -0
- data/vendor/local/include/glib-2.0/glib/gstrfuncs.h +267 -0
- data/vendor/local/include/glib-2.0/glib/gstring.h +178 -0
- data/vendor/local/include/glib-2.0/glib/gtestutils.h +292 -0
- data/vendor/local/include/glib-2.0/glib/gthread.h +408 -0
- data/vendor/local/include/glib-2.0/glib/gthreadpool.h +114 -0
- data/vendor/local/include/glib-2.0/glib/gtimer.h +65 -0
- data/vendor/local/include/glib-2.0/glib/gtree.h +91 -0
- data/vendor/local/include/glib-2.0/glib/gtypes.h +451 -0
- data/vendor/local/include/glib-2.0/glib/gunicode.h +404 -0
- data/vendor/local/include/glib-2.0/glib/gurifuncs.h +81 -0
- data/vendor/local/include/glib-2.0/glib/gutils.h +490 -0
- data/vendor/local/include/glib-2.0/glib/gvariant.h +224 -0
- data/vendor/local/include/glib-2.0/glib/gvarianttype.h +305 -0
- data/vendor/local/include/glib-2.0/glib/gwin32.h +114 -0
- data/vendor/local/include/glib-2.0/glib-object.h +41 -0
- data/vendor/local/include/glib-2.0/glib.h +97 -0
- data/vendor/local/include/glib-2.0/gmodule.h +101 -0
- data/vendor/local/include/glib-2.0/gobject/gboxed.h +236 -0
- data/vendor/local/include/glib-2.0/gobject/gclosure.h +251 -0
- data/vendor/local/include/glib-2.0/gobject/genums.h +261 -0
- data/vendor/local/include/glib-2.0/gobject/gmarshal.h +169 -0
- data/vendor/local/include/glib-2.0/gobject/gobject.h +562 -0
- data/vendor/local/include/glib-2.0/gobject/gobjectnotifyqueue.c +166 -0
- data/vendor/local/include/glib-2.0/gobject/gparam.h +410 -0
- data/vendor/local/include/glib-2.0/gobject/gparamspecs.h +1083 -0
- data/vendor/local/include/glib-2.0/gobject/gsignal.h +509 -0
- data/vendor/local/include/glib-2.0/gobject/gsourceclosure.h +51 -0
- data/vendor/local/include/glib-2.0/gobject/gtype.h +1608 -0
- data/vendor/local/include/glib-2.0/gobject/gtypemodule.h +263 -0
- data/vendor/local/include/glib-2.0/gobject/gtypeplugin.h +134 -0
- data/vendor/local/include/glib-2.0/gobject/gvalue.h +159 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluearray.h +77 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluecollector.h +222 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluetypes.h +243 -0
- data/vendor/local/include/libintl.h +464 -0
- data/vendor/local/lib/GNU.Gettext.dll +0 -0
- data/vendor/local/lib/gio-2.0.def +800 -0
- data/vendor/local/lib/gio-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +284 -0
- data/vendor/local/lib/glib-2.0.def +1381 -0
- data/vendor/local/lib/glib-2.0.lib +0 -0
- data/vendor/local/lib/gmodule-2.0.def +11 -0
- data/vendor/local/lib/gmodule-2.0.lib +0 -0
- data/vendor/local/lib/gobject-2.0.def +349 -0
- data/vendor/local/lib/gobject-2.0.lib +0 -0
- data/vendor/local/lib/gthread-2.0.def +3 -0
- data/vendor/local/lib/gthread-2.0.lib +0 -0
- data/vendor/local/lib/intl.lib +0 -0
- data/vendor/local/lib/libasprintf.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libintl.def +31 -0
- data/vendor/local/lib/libintl.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gio-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +15 -0
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +11 -0
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +11 -0
- data/vendor/local/manifest/gettext-runtime-dev_0.18.1.1-2_win32.mft +81 -0
- data/vendor/local/manifest/gettext-runtime_0.18.1.1-2_win32.mft +3 -0
- data/vendor/local/manifest/glib-dev_2.24.2-2_win32.mft +491 -0
- data/vendor/local/manifest/glib_2.24.2-2_win32.mft +101 -0
- data/vendor/local/share/aclocal/glib-2.0.m4 +211 -0
- data/vendor/local/share/aclocal/glib-gettext.m4 +432 -0
- data/vendor/local/share/doc/gettext/bind_textdomain_codeset.3.html +165 -0
- data/vendor/local/share/doc/gettext/bindtextdomain.3.html +160 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext.html +8 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceManager.html +305 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceSet.html +356 -0
- data/vendor/local/share/doc/gettext/csharpdoc/begin.html +11 -0
- data/vendor/local/share/doc/gettext/csharpdoc/index.html +10 -0
- data/vendor/local/share/doc/gettext/csharpdoc/namespaces.html +6 -0
- data/vendor/local/share/doc/gettext/envsubst.1.html +213 -0
- data/vendor/local/share/doc/gettext/gettext.1.html +266 -0
- data/vendor/local/share/doc/gettext/gettext.3.html +186 -0
- data/vendor/local/share/doc/gettext/ngettext.1.html +280 -0
- data/vendor/local/share/doc/gettext/ngettext.3.html +143 -0
- data/vendor/local/share/doc/gettext/textdomain.3.html +150 -0
- data/vendor/local/share/doc/glib-2.24.2/COPYING +482 -0
- data/vendor/local/share/doc/glib-dev-2.24.2/COPYING +482 -0
- data/vendor/local/share/doc/libasprintf/autosprintf_all.html +174 -0
- data/vendor/local/share/glib-2.0/gdb/glib.py +252 -0
- data/vendor/local/share/glib-2.0/gdb/gobject.py +305 -0
- data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +111 -0
- data/vendor/local/share/glib-2.0/gettext/po/Makefile.in.in +277 -0
- data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +1390 -0
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +531 -0
- data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +343 -0
- data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +568 -0
- data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +295 -0
- data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +620 -0
- data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +245 -0
- data/vendor/local/share/gtk-doc/html/gio/GConverter.html +388 -0
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +993 -0
- data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +544 -0
- data/vendor/local/share/gtk-doc/html/gio/GDrive.html +1416 -0
- data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +272 -0
- data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +206 -0
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +7450 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +115 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +520 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +312 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +155 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +3116 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +262 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +353 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +301 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +217 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +182 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +183 -0
- data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +261 -0
- data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +479 -0
- data/vendor/local/share/gtk-doc/html/gio/GIcon.html +331 -0
- data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +717 -0
- data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +195 -0
- data/vendor/local/share/gtk-doc/html/gio/GInitable.html +388 -0
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +808 -0
- data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +301 -0
- data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +185 -0
- data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +362 -0
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +1465 -0
- data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +848 -0
- data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +263 -0
- data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +248 -0
- data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +1006 -0
- data/vendor/local/share/gtk-doc/html/gio/GResolver.html +787 -0
- data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +350 -0
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +979 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +2152 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +297 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +930 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +428 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +548 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +274 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +741 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +258 -0
- data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +377 -0
- data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +197 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +381 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +280 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +237 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +237 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +306 -0
- data/vendor/local/share/gtk-doc/html/gio/GVfs.html +274 -0
- data/vendor/local/share/gtk-doc/html/gio/GVolume.html +1028 -0
- data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +709 -0
- data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +180 -0
- data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +128 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +153 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +155 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +1088 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +206 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +97 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +4499 -0
- data/vendor/local/share/gtk-doc/html/gio/async.html +44 -0
- data/vendor/local/share/gtk-doc/html/gio/ch01.html +171 -0
- data/vendor/local/share/gtk-doc/html/gio/ch02.html +45 -0
- data/vendor/local/share/gtk-doc/html/gio/ch03.html +80 -0
- data/vendor/local/share/gtk-doc/html/gio/ch19.html +75 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20.html +217 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20s02.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20s03.html +39 -0
- data/vendor/local/share/gtk-doc/html/gio/conversion.html +44 -0
- data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +96 -0
- data/vendor/local/share/gtk-doc/html/gio/extending.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +38 -0
- data/vendor/local/share/gtk-doc/html/gio/file_mon.html +33 -0
- data/vendor/local/share/gtk-doc/html/gio/file_ops.html +50 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +339 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +465 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +381 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +163 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +163 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +927 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +328 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +297 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GSrvTarget.html +313 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +918 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +107 -0
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +1235 -0
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +1384 -0
- data/vendor/local/share/gtk-doc/html/gio/gvfs-overview.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +47 -0
- data/vendor/local/share/gtk-doc/html/gio/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/icons.html +50 -0
- data/vendor/local/share/gtk-doc/html/gio/index.html +318 -0
- data/vendor/local/share/gtk-doc/html/gio/index.sgml +1795 -0
- data/vendor/local/share/gtk-doc/html/gio/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/migrating.html +42 -0
- data/vendor/local/share/gtk-doc/html/gio/networking.html +57 -0
- data/vendor/local/share/gtk-doc/html/gio/pt01.html +39 -0
- data/vendor/local/share/gtk-doc/html/gio/pt02.html +293 -0
- data/vendor/local/share/gtk-doc/html/gio/resolver.html +47 -0
- data/vendor/local/share/gtk-doc/html/gio/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/streaming.html +92 -0
- data/vendor/local/share/gtk-doc/html/gio/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/gio/types.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/utils.html +33 -0
- data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +47 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +180 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +312 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +563 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +362 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +102 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +124 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +83 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +194 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +419 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +389 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +413 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +158 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +340 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +7835 -0
- data/vendor/local/share/gtk-doc/html/glib/file-name-encodings.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +893 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +818 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +413 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +430 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +802 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +372 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +500 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +2054 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +560 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +1686 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +398 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +1187 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +1665 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +460 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +528 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +2042 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +1278 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +1406 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +548 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +1023 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +1810 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +3798 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +1815 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +295 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +1512 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +1367 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +229 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +629 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +2196 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +2556 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +612 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +1451 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +389 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +1029 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +141 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +706 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +510 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +703 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +1045 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +1523 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +1466 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +204 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +2648 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +752 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +269 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +578 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +483 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +1353 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +238 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +1283 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +1212 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +924 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +466 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +301 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +2947 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +1290 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +1719 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +3379 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +606 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +3411 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +245 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +188 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +263 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +314 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +3356 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +150 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +438 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +476 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-building.html +438 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +159 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +118 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-core.html +64 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +160 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +120 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +59 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +93 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +2395 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +121 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +302 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +112 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +2084 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +2556 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.html +80 -0
- data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +72 -0
- data/vendor/local/share/gtk-doc/html/glib/gtester.html +131 -0
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +1171 -0
- data/vendor/local/share/gtk-doc/html/glib/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/index.html +336 -0
- data/vendor/local/share/gtk-doc/html/glib/index.sgml +2717 -0
- data/vendor/local/share/gtk-doc/html/glib/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/mainloop-states.gif +0 -0
- data/vendor/local/share/gtk-doc/html/glib/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/glib/tools.html +41 -0
- data/vendor/local/share/gtk-doc/html/glib/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +710 -0
- data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +453 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +85 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +51 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +46 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +38 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +46 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +72 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +178 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +42 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +42 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +50 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +2577 -0
- data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +136 -0
- data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +113 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +293 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +263 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +92 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +214 -0
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +355 -0
- data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +295 -0
- data/vendor/local/share/gtk-doc/html/gobject/glue.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +406 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +2355 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +847 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +1423 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +776 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +2741 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +5242 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +2609 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +4227 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +413 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +230 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +234 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +270 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +117 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +723 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +757 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +143 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +287 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +316 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +76 -0
- data/vendor/local/share/gtk-doc/html/gobject/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +100 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +86 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +113 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +122 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +257 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +283 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +125 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +167 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +160 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +121 -0
- data/vendor/local/share/gtk-doc/html/gobject/index.html +187 -0
- data/vendor/local/share/gtk-doc/html/gobject/index.sgml +734 -0
- data/vendor/local/share/gtk-doc/html/gobject/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/pr01.html +72 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt01.html +80 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt02.html +66 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt03.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/rn01.html +82 -0
- data/vendor/local/share/gtk-doc/html/gobject/rn02.html +47 -0
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +377 -0
- data/vendor/local/share/gtk-doc/html/gobject/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +35 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +40 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +63 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +43 -0
- data/vendor/local/share/gtk-doc/html/gobject/up.png +0 -0
- data/vendor/local/share/locale/af/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/am/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/locale.alias +77 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/rw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/man/man1/envsubst.1 +54 -0
- data/vendor/local/share/man/man1/gettext.1 +69 -0
- data/vendor/local/share/man/man1/glib-genmarshal.1 +307 -0
- data/vendor/local/share/man/man1/glib-mkenums.1 +234 -0
- data/vendor/local/share/man/man1/gobject-query.1 +83 -0
- data/vendor/local/share/man/man1/ngettext.1 +68 -0
- data/vendor/local/share/man/man3/bind_textdomain_codeset.3 +72 -0
- data/vendor/local/share/man/man3/bindtextdomain.3 +69 -0
- data/vendor/local/share/man/man3/dcgettext.3 +1 -0
- data/vendor/local/share/man/man3/dcngettext.3 +1 -0
- data/vendor/local/share/man/man3/dgettext.3 +1 -0
- data/vendor/local/share/man/man3/dngettext.3 +1 -0
- data/vendor/local/share/man/man3/gettext.3 +99 -0
- data/vendor/local/share/man/man3/ngettext.3 +60 -0
- data/vendor/local/share/man/man3/textdomain.3 +57 -0
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.log +10423 -0
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.sh +457 -0
- data/vendor/local/src/tml/packaging/glib_2.24.2-2_win32.log +2602 -0
- data/vendor/local/src/tml/packaging/glib_2.24.2-2_win32.sh +290 -0
- metadata +940 -0
@@ -0,0 +1,961 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/**********************************************************************
|
3
|
+
|
4
|
+
rbgobj_enums.c -
|
5
|
+
|
6
|
+
$Author: ktou $
|
7
|
+
$Date: 2007/08/08 11:53:09 $
|
8
|
+
created at: Sat Jul 27 16:56:01 JST 2002
|
9
|
+
|
10
|
+
Copyright (C) 2004-2006 Ruby-GNOME2 Project Team
|
11
|
+
Copyright (C) 2002,2003 Masahiro Sakai
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "rbgprivate.h"
|
15
|
+
#include <ctype.h>
|
16
|
+
|
17
|
+
VALUE rbgobj_cEnum, rbgobj_cFlags;
|
18
|
+
|
19
|
+
static ID id_new;
|
20
|
+
static ID id_module_eval;
|
21
|
+
static ID id_to_s;
|
22
|
+
static ID id_or;
|
23
|
+
|
24
|
+
/**********************************************************************/
|
25
|
+
|
26
|
+
typedef struct {
|
27
|
+
char *original;
|
28
|
+
char *replacement;
|
29
|
+
} constant_map;
|
30
|
+
|
31
|
+
static GSList *rbgobj_cmap = NULL;
|
32
|
+
|
33
|
+
static gchar *
|
34
|
+
nick_to_const_name(const gchar *nick)
|
35
|
+
{
|
36
|
+
gchar *const_name;
|
37
|
+
gchar *p;
|
38
|
+
|
39
|
+
if (!nick)
|
40
|
+
return NULL;
|
41
|
+
|
42
|
+
const_name = g_strdup(nick);
|
43
|
+
for (p = const_name; *p; p++) {
|
44
|
+
if (*p == '-' || *p == ' ')
|
45
|
+
*p = '_';
|
46
|
+
else
|
47
|
+
*p = g_ascii_toupper(*p);
|
48
|
+
}
|
49
|
+
return const_name;
|
50
|
+
}
|
51
|
+
|
52
|
+
static VALUE
|
53
|
+
resolve_enum_value(VALUE klass, VALUE nick)
|
54
|
+
{
|
55
|
+
VALUE value = Qnil;
|
56
|
+
gchar *const_nick;
|
57
|
+
ID const_nick_id;
|
58
|
+
|
59
|
+
if (RVAL2CBOOL(rb_obj_is_kind_of(nick, klass)))
|
60
|
+
return nick;
|
61
|
+
|
62
|
+
nick = rb_funcall(nick, id_to_s, 0);
|
63
|
+
const_nick = nick_to_const_name(RVAL2CSTR(nick));
|
64
|
+
const_nick_id = rb_intern(const_nick);
|
65
|
+
if (rb_const_defined(klass, const_nick_id)) {
|
66
|
+
value = rb_const_get(klass, const_nick_id);
|
67
|
+
}
|
68
|
+
g_free(const_nick);
|
69
|
+
|
70
|
+
return value;
|
71
|
+
}
|
72
|
+
|
73
|
+
static VALUE
|
74
|
+
resolve_flags_value(VALUE klass, VALUE nick_or_nicks)
|
75
|
+
{
|
76
|
+
int i, len;
|
77
|
+
VALUE flags_value;
|
78
|
+
|
79
|
+
if (!RVAL2CBOOL(rb_obj_is_kind_of(nick_or_nicks, rb_cArray)))
|
80
|
+
return resolve_enum_value(klass, nick_or_nicks);
|
81
|
+
|
82
|
+
len = RARRAY_LEN(nick_or_nicks);
|
83
|
+
flags_value = rb_funcall(klass, id_new, 0);
|
84
|
+
for (i = 0; i < len; i++) {
|
85
|
+
VALUE value;
|
86
|
+
|
87
|
+
value = resolve_enum_value(klass, RARRAY_PTR(nick_or_nicks)[i]);
|
88
|
+
if (NIL_P(value))
|
89
|
+
return Qnil;
|
90
|
+
|
91
|
+
flags_value = rb_funcall(flags_value, id_or, 1, value);
|
92
|
+
}
|
93
|
+
|
94
|
+
return flags_value;
|
95
|
+
}
|
96
|
+
|
97
|
+
static gint
|
98
|
+
rbgobj_constant_find(constant_map *a, char *name)
|
99
|
+
{
|
100
|
+
return strcmp(a->original, name);
|
101
|
+
}
|
102
|
+
|
103
|
+
void
|
104
|
+
rbgobj_constant_remap(const char *original, const char *replacement)
|
105
|
+
{
|
106
|
+
constant_map *map = g_new(constant_map,1);
|
107
|
+
|
108
|
+
map -> original = g_strdup(original);
|
109
|
+
map -> replacement = g_strdup(replacement);
|
110
|
+
|
111
|
+
rbgobj_cmap = g_slist_append(rbgobj_cmap, map);
|
112
|
+
}
|
113
|
+
|
114
|
+
static char *
|
115
|
+
rbgobj_constant_lookup(const char *name)
|
116
|
+
{
|
117
|
+
GSList *p = rbgobj_cmap;
|
118
|
+
|
119
|
+
p = g_slist_find_custom(rbgobj_cmap, name,
|
120
|
+
(GCompareFunc)rbgobj_constant_find);
|
121
|
+
if (p)
|
122
|
+
{
|
123
|
+
char *replacement;
|
124
|
+
constant_map *map;
|
125
|
+
|
126
|
+
map = (constant_map*) p -> data;
|
127
|
+
rbgobj_cmap = g_slist_delete_link(rbgobj_cmap, p);
|
128
|
+
replacement = map -> replacement;
|
129
|
+
|
130
|
+
g_free(map -> original);
|
131
|
+
g_free(map);
|
132
|
+
|
133
|
+
return replacement;
|
134
|
+
}
|
135
|
+
return NULL;
|
136
|
+
}
|
137
|
+
|
138
|
+
void
|
139
|
+
rbgobj_define_const(VALUE mod, const char *name,
|
140
|
+
VALUE value)
|
141
|
+
{
|
142
|
+
if (name[0] >= 'A' && name[0] <= 'Z')
|
143
|
+
{
|
144
|
+
rb_define_const(mod, name, value);
|
145
|
+
}
|
146
|
+
else
|
147
|
+
{
|
148
|
+
char *new_name = rbgobj_constant_lookup(name);
|
149
|
+
|
150
|
+
if (new_name)
|
151
|
+
{
|
152
|
+
rb_define_const(mod, new_name, value);
|
153
|
+
g_free(new_name);
|
154
|
+
}
|
155
|
+
else
|
156
|
+
{
|
157
|
+
rb_warn("Invalid constant name '%s' - skipped", name);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
static void
|
163
|
+
rbgobj_enum_add_constants(VALUE mod, GType enum_type,
|
164
|
+
const gchar *strip_prefix)
|
165
|
+
{
|
166
|
+
GEnumClass *gclass;
|
167
|
+
int i;
|
168
|
+
int prefix_len = strlen(strip_prefix);
|
169
|
+
|
170
|
+
gclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
|
171
|
+
|
172
|
+
for (i = 0; i < gclass->n_values; i++) {
|
173
|
+
const GEnumValue* value = &gclass->values[i];
|
174
|
+
|
175
|
+
if (strncmp(value->value_name, strip_prefix, prefix_len)) {
|
176
|
+
g_warning("\"%s\" doesn't have prefix \"%s\"",
|
177
|
+
value->value_name, strip_prefix);
|
178
|
+
} else {
|
179
|
+
const char* name = value->value_name + prefix_len;
|
180
|
+
rbgobj_define_const(mod, name,
|
181
|
+
rbgobj_make_enum(value->value, enum_type));
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
g_type_class_unref(gclass);
|
186
|
+
}
|
187
|
+
|
188
|
+
static void
|
189
|
+
rbgobj_flags_add_constants(VALUE mod, GType flags_type,
|
190
|
+
const gchar *strip_prefix)
|
191
|
+
{
|
192
|
+
GFlagsClass *gclass;
|
193
|
+
int i;
|
194
|
+
int prefix_len = strlen(strip_prefix);
|
195
|
+
|
196
|
+
gclass = G_FLAGS_CLASS(g_type_class_ref(flags_type));
|
197
|
+
|
198
|
+
for (i = 0; i < gclass->n_values; i++) {
|
199
|
+
const GFlagsValue* value = &gclass->values[i];
|
200
|
+
|
201
|
+
if (strncmp(value->value_name, strip_prefix, prefix_len)) {
|
202
|
+
g_warning("\"%s\" doesn't have prefix \"%s\"",
|
203
|
+
value->value_name, strip_prefix);
|
204
|
+
} else {
|
205
|
+
const char* name = value->value_name + prefix_len;
|
206
|
+
rbgobj_define_const(mod, name,
|
207
|
+
rbgobj_make_flags(value->value, flags_type));
|
208
|
+
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
g_type_class_unref(gclass);
|
213
|
+
}
|
214
|
+
|
215
|
+
void
|
216
|
+
rbgobj_add_constants(VALUE mod, GType type, const gchar *strip_prefix)
|
217
|
+
{
|
218
|
+
if (G_TYPE_IS_ENUM(type)) {
|
219
|
+
rbgobj_enum_add_constants(mod, type, strip_prefix);
|
220
|
+
} else if (G_TYPE_IS_FLAGS(type)) {
|
221
|
+
rbgobj_flags_add_constants(mod, type, strip_prefix);
|
222
|
+
} else {
|
223
|
+
g_warning("`%s' is not an enum/flags type", g_type_name(type));
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
/**********************************************************************/
|
228
|
+
|
229
|
+
typedef struct {
|
230
|
+
GEnumClass* gclass;
|
231
|
+
gint value;
|
232
|
+
GEnumValue* info;
|
233
|
+
} enum_holder;
|
234
|
+
|
235
|
+
static void
|
236
|
+
enum_free(enum_holder* p)
|
237
|
+
{
|
238
|
+
g_type_class_unref(p->gclass);
|
239
|
+
free(p);
|
240
|
+
}
|
241
|
+
|
242
|
+
static enum_holder*
|
243
|
+
enum_get_holder(VALUE obj)
|
244
|
+
{
|
245
|
+
enum_holder* p;
|
246
|
+
Data_Get_Struct(obj, enum_holder, p);
|
247
|
+
return p;
|
248
|
+
}
|
249
|
+
|
250
|
+
static VALUE
|
251
|
+
make_enum(gint n, VALUE klass)
|
252
|
+
{
|
253
|
+
return rb_funcall(klass, id_new, 1, INT2NUM(n));
|
254
|
+
}
|
255
|
+
|
256
|
+
VALUE
|
257
|
+
rbgobj_make_enum(gint n, GType gtype)
|
258
|
+
{
|
259
|
+
return make_enum(n, GTYPE2CLASS(gtype));
|
260
|
+
}
|
261
|
+
|
262
|
+
gint
|
263
|
+
rbgobj_get_enum(VALUE obj, GType gtype)
|
264
|
+
{
|
265
|
+
VALUE klass;
|
266
|
+
|
267
|
+
if (!g_type_is_a(gtype, G_TYPE_ENUM))
|
268
|
+
rb_raise(rb_eTypeError, "%s is not a %s: %s",
|
269
|
+
g_type_name(gtype), g_type_name(G_TYPE_ENUM),
|
270
|
+
RBG_INSPECT(obj));
|
271
|
+
|
272
|
+
/* for compatibility */
|
273
|
+
if (rb_obj_is_kind_of(obj, rb_cInteger))
|
274
|
+
obj = rbgobj_make_enum(NUM2INT(obj), gtype);
|
275
|
+
|
276
|
+
klass = GTYPE2CLASS(gtype);
|
277
|
+
|
278
|
+
if (!rb_obj_is_kind_of(obj, klass)) {
|
279
|
+
VALUE enum_value;
|
280
|
+
|
281
|
+
enum_value = resolve_enum_value(klass, obj);
|
282
|
+
if (!NIL_P(enum_value))
|
283
|
+
obj = enum_value;
|
284
|
+
}
|
285
|
+
|
286
|
+
if (rb_obj_is_kind_of(obj, klass))
|
287
|
+
return enum_get_holder(obj)->value;
|
288
|
+
else
|
289
|
+
rb_raise(rb_eTypeError, "not a %s: %s",
|
290
|
+
rb_class2name(klass), RBG_INSPECT(obj));
|
291
|
+
}
|
292
|
+
|
293
|
+
/**********************************************************************/
|
294
|
+
|
295
|
+
void
|
296
|
+
rbgobj_init_enum_class(VALUE klass)
|
297
|
+
{
|
298
|
+
GEnumClass* gclass = g_type_class_ref(CLASS2GTYPE(klass));
|
299
|
+
int i;
|
300
|
+
|
301
|
+
for (i = 0; i < gclass->n_values; i++) {
|
302
|
+
GEnumValue* entry = &(gclass->values[i]);
|
303
|
+
gchar *const_nick_name;
|
304
|
+
|
305
|
+
const_nick_name = nick_to_const_name(entry->value_nick);
|
306
|
+
|
307
|
+
#if 0
|
308
|
+
{
|
309
|
+
ID id = rb_intern(const_nick_name);
|
310
|
+
if (rb_is_const_id(id)) {
|
311
|
+
VALUE value;
|
312
|
+
|
313
|
+
value = make_enum(entry->value, klass);
|
314
|
+
rb_define_const(klass, const_nick_name, value);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
#else
|
318
|
+
{
|
319
|
+
if (const_nick_name) {
|
320
|
+
VALUE value;
|
321
|
+
|
322
|
+
value = make_enum(entry->value, klass);
|
323
|
+
rbgobj_define_const(klass, const_nick_name, value);
|
324
|
+
}
|
325
|
+
}
|
326
|
+
#endif
|
327
|
+
|
328
|
+
g_free(const_nick_name);
|
329
|
+
}
|
330
|
+
|
331
|
+
g_type_class_unref(gclass);
|
332
|
+
}
|
333
|
+
|
334
|
+
static VALUE
|
335
|
+
enum_s_range(self)
|
336
|
+
VALUE self;
|
337
|
+
{
|
338
|
+
GEnumClass* gclass = g_type_class_ref(CLASS2GTYPE(self));
|
339
|
+
VALUE result = rb_range_new(INT2NUM(gclass->minimum),
|
340
|
+
INT2NUM(gclass->maximum),
|
341
|
+
FALSE);
|
342
|
+
g_type_class_unref(gclass);
|
343
|
+
return result;
|
344
|
+
}
|
345
|
+
|
346
|
+
static VALUE
|
347
|
+
enum_s_values(VALUE self)
|
348
|
+
{
|
349
|
+
GEnumClass *gclass;
|
350
|
+
VALUE result;
|
351
|
+
int i;
|
352
|
+
|
353
|
+
gclass = g_type_class_ref(CLASS2GTYPE(self));;
|
354
|
+
result = rb_ary_new();
|
355
|
+
for (i = 0; i < gclass->n_values; i++) {
|
356
|
+
GEnumValue *p = &(gclass->values[i]);
|
357
|
+
rb_ary_push(result, make_enum(p->value, self));
|
358
|
+
}
|
359
|
+
|
360
|
+
g_type_class_unref(gclass);
|
361
|
+
return result;
|
362
|
+
}
|
363
|
+
|
364
|
+
static VALUE
|
365
|
+
enum_s_allocate(VALUE self)
|
366
|
+
{
|
367
|
+
GType gtype = CLASS2GTYPE(self);
|
368
|
+
|
369
|
+
if (G_TYPE_IS_ABSTRACT(gtype)) {
|
370
|
+
rb_raise(rb_eTypeError, "abstract class");
|
371
|
+
} else {
|
372
|
+
enum_holder* p;
|
373
|
+
VALUE result = Data_Make_Struct(self, enum_holder, NULL, enum_free, p);
|
374
|
+
p->gclass = g_type_class_ref(gtype);
|
375
|
+
p->info = NULL;
|
376
|
+
return result;
|
377
|
+
}
|
378
|
+
}
|
379
|
+
|
380
|
+
static VALUE
|
381
|
+
enum_initialize(VALUE self, VALUE arg)
|
382
|
+
{
|
383
|
+
enum_holder* p = enum_get_holder(self);
|
384
|
+
|
385
|
+
if (rb_respond_to(arg, rb_intern("to_str"))) {
|
386
|
+
const char* str = StringValuePtr(arg);
|
387
|
+
p->info = g_enum_get_value_by_name(p->gclass, str);
|
388
|
+
if (! p->info)
|
389
|
+
p->info = g_enum_get_value_by_nick(p->gclass, str);
|
390
|
+
if (! p->info)
|
391
|
+
rb_raise(rb_eArgError, "invalid argument");
|
392
|
+
} else {
|
393
|
+
p->value = NUM2INT(arg);
|
394
|
+
p->info = g_enum_get_value(p->gclass, p->value);
|
395
|
+
}
|
396
|
+
|
397
|
+
return Qnil;
|
398
|
+
}
|
399
|
+
|
400
|
+
static VALUE
|
401
|
+
enum_to_i(VALUE self)
|
402
|
+
{
|
403
|
+
enum_holder* p = enum_get_holder(self);
|
404
|
+
return INT2NUM(p->value);
|
405
|
+
}
|
406
|
+
|
407
|
+
static VALUE
|
408
|
+
enum_name(VALUE self)
|
409
|
+
{
|
410
|
+
enum_holder* p = enum_get_holder(self);
|
411
|
+
return p->info ? rb_str_new2(p->info->value_name) : Qnil;
|
412
|
+
}
|
413
|
+
|
414
|
+
static VALUE
|
415
|
+
enum_nick(VALUE self)
|
416
|
+
{
|
417
|
+
enum_holder* p = enum_get_holder(self);
|
418
|
+
return p->info ? rb_str_new2(p->info->value_nick) : Qnil;
|
419
|
+
}
|
420
|
+
|
421
|
+
static VALUE
|
422
|
+
enum_inspect(VALUE self)
|
423
|
+
{
|
424
|
+
const char* cname = rb_class2name(CLASS_OF(self));
|
425
|
+
enum_holder* p = enum_get_holder(self);
|
426
|
+
gchar* str;
|
427
|
+
VALUE result;
|
428
|
+
|
429
|
+
if (p->info)
|
430
|
+
str = g_strdup_printf("#<%s %s>",
|
431
|
+
cname, p->info->value_nick);
|
432
|
+
else
|
433
|
+
str = g_strdup_printf("#<%s %d>",
|
434
|
+
cname, p->value);
|
435
|
+
result = rb_str_new2(str);
|
436
|
+
g_free(str);
|
437
|
+
|
438
|
+
return result;
|
439
|
+
}
|
440
|
+
|
441
|
+
static VALUE
|
442
|
+
enum_eqv(VALUE self, VALUE rhs)
|
443
|
+
{
|
444
|
+
enum_holder* p = enum_get_holder(self);
|
445
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
446
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
447
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
448
|
+
return Qnil;
|
449
|
+
return CBOOL2RVAL(rbgobj_get_enum(self, gtype) == rbgobj_get_enum(rhs, gtype));
|
450
|
+
}
|
451
|
+
|
452
|
+
static VALUE
|
453
|
+
enum_hash(VALUE self)
|
454
|
+
{
|
455
|
+
enum_holder* p = enum_get_holder(self);
|
456
|
+
return UINT2NUM(p->value ^ G_TYPE_FROM_CLASS(p->gclass));
|
457
|
+
}
|
458
|
+
|
459
|
+
static VALUE
|
460
|
+
enum_coerce(VALUE self, VALUE other)
|
461
|
+
{
|
462
|
+
enum_holder *holder;
|
463
|
+
GType gtype;
|
464
|
+
|
465
|
+
if (!rb_obj_is_kind_of(other, rb_cInteger))
|
466
|
+
rb_raise(rb_eTypeError, "can't coerce");
|
467
|
+
|
468
|
+
holder = enum_get_holder(self);
|
469
|
+
gtype = G_TYPE_FROM_CLASS(holder->gclass);
|
470
|
+
other = rbgobj_make_enum(NUM2INT(other), gtype);
|
471
|
+
return rb_ary_new3(2, other, self);
|
472
|
+
}
|
473
|
+
|
474
|
+
static void
|
475
|
+
Init_enum()
|
476
|
+
{
|
477
|
+
VALUE cEnum;
|
478
|
+
|
479
|
+
rbgobj_cEnum = G_DEF_CLASS(G_TYPE_ENUM, "Enum", mGLib);
|
480
|
+
cEnum = rbgobj_cEnum;
|
481
|
+
|
482
|
+
rb_define_singleton_method(cEnum, "gtype", generic_s_gtype, 0);
|
483
|
+
rb_define_method(cEnum, "gtype", generic_gtype, 0);
|
484
|
+
|
485
|
+
rb_define_singleton_method(cEnum, "range", enum_s_range, 0);
|
486
|
+
rb_define_singleton_method(cEnum, "values", enum_s_values, 0);
|
487
|
+
|
488
|
+
rb_define_alloc_func(cEnum, enum_s_allocate);
|
489
|
+
|
490
|
+
rb_define_method(cEnum, "initialize", enum_initialize, 1);
|
491
|
+
rb_define_method(cEnum, "to_i", enum_to_i, 0);
|
492
|
+
rb_define_method(cEnum, "name", enum_name, 0);
|
493
|
+
rb_define_method(cEnum, "nick", enum_nick, 0);
|
494
|
+
|
495
|
+
rb_define_method(cEnum, "inspect", enum_inspect, 0);
|
496
|
+
rb_define_method(cEnum, "==", enum_eqv, 1);
|
497
|
+
rb_define_method(cEnum, "hash", enum_hash, 0);
|
498
|
+
rb_define_method(cEnum, "eql?", enum_eqv, 1);
|
499
|
+
|
500
|
+
/* for compatibility */
|
501
|
+
rb_define_method(cEnum, "coerce", enum_coerce, 1);
|
502
|
+
rb_define_alias(cEnum, "to_int", "to_i");
|
503
|
+
}
|
504
|
+
|
505
|
+
/**********************************************************************/
|
506
|
+
|
507
|
+
typedef struct {
|
508
|
+
GFlagsClass* gclass;
|
509
|
+
guint value;
|
510
|
+
GFlagsValue* info;
|
511
|
+
} flags_holder;
|
512
|
+
|
513
|
+
static void
|
514
|
+
flags_free(enum_holder* p)
|
515
|
+
{
|
516
|
+
g_type_class_unref(p->gclass);
|
517
|
+
free(p);
|
518
|
+
}
|
519
|
+
|
520
|
+
static flags_holder*
|
521
|
+
flags_get_holder(VALUE obj)
|
522
|
+
{
|
523
|
+
flags_holder* p;
|
524
|
+
Data_Get_Struct(obj, flags_holder, p);
|
525
|
+
return p;
|
526
|
+
}
|
527
|
+
|
528
|
+
static VALUE
|
529
|
+
make_flags(guint n, VALUE klass)
|
530
|
+
{
|
531
|
+
return rb_funcall(klass, id_new, 1, UINT2NUM(n));
|
532
|
+
}
|
533
|
+
|
534
|
+
VALUE
|
535
|
+
rbgobj_make_flags(guint n, GType gtype)
|
536
|
+
{
|
537
|
+
return make_flags(n, GTYPE2CLASS(gtype));
|
538
|
+
}
|
539
|
+
|
540
|
+
guint
|
541
|
+
rbgobj_get_flags(VALUE obj, GType gtype)
|
542
|
+
{
|
543
|
+
VALUE klass;
|
544
|
+
|
545
|
+
if (!g_type_is_a(gtype, G_TYPE_FLAGS))
|
546
|
+
rb_raise(rb_eTypeError, "%s is not a %s",
|
547
|
+
g_type_name(gtype), g_type_name(G_TYPE_FLAGS));
|
548
|
+
|
549
|
+
/* for compatibility */
|
550
|
+
if (rb_obj_is_kind_of(obj, rb_cInteger))
|
551
|
+
obj = rbgobj_make_flags(NUM2UINT(obj), gtype);
|
552
|
+
|
553
|
+
klass = GTYPE2CLASS(gtype);
|
554
|
+
|
555
|
+
if (!rb_obj_is_kind_of(obj, klass)) {
|
556
|
+
VALUE flags_value = Qnil;
|
557
|
+
|
558
|
+
flags_value = resolve_flags_value(klass, obj);
|
559
|
+
if (!NIL_P(flags_value))
|
560
|
+
obj = flags_value;
|
561
|
+
}
|
562
|
+
|
563
|
+
if (rb_obj_is_kind_of(obj, klass))
|
564
|
+
return flags_get_holder(obj)->value;
|
565
|
+
else
|
566
|
+
rb_raise(rb_eTypeError, "not a %s: %s",
|
567
|
+
rb_class2name(klass), RBG_INSPECT(obj));
|
568
|
+
}
|
569
|
+
|
570
|
+
/**********************************************************************/
|
571
|
+
|
572
|
+
void
|
573
|
+
rbgobj_init_flags_class(VALUE klass)
|
574
|
+
{
|
575
|
+
GFlagsClass* gclass = g_type_class_ref(CLASS2GTYPE(klass));
|
576
|
+
GString* source = g_string_new(NULL);
|
577
|
+
int i;
|
578
|
+
|
579
|
+
for (i = 0; i < gclass->n_values; i++) {
|
580
|
+
GFlagsValue* entry = &(gclass->values[i]);
|
581
|
+
gchar* nick;
|
582
|
+
gchar* p;
|
583
|
+
gchar* replace_nick;
|
584
|
+
|
585
|
+
replace_nick = rbgobj_constant_lookup(entry->value_nick);
|
586
|
+
if (replace_nick){
|
587
|
+
nick = g_strdup(replace_nick);
|
588
|
+
} else {
|
589
|
+
nick = g_strdup(entry->value_nick);
|
590
|
+
}
|
591
|
+
|
592
|
+
for (p = nick; *p; p++)
|
593
|
+
if (*p == '-' || *p == ' ')
|
594
|
+
*p = '_';
|
595
|
+
else
|
596
|
+
*p = tolower(*p);
|
597
|
+
|
598
|
+
g_string_append_printf(
|
599
|
+
source,
|
600
|
+
"def %s%s?; self >= self.class.new(%d); end\n",
|
601
|
+
g_ascii_isdigit(nick[0]) ? "_" : "",
|
602
|
+
nick, entry->value);
|
603
|
+
|
604
|
+
for (p = nick; *p; p++)
|
605
|
+
*p = g_ascii_toupper(*p);
|
606
|
+
|
607
|
+
#if 0
|
608
|
+
{
|
609
|
+
ID id = rb_intern(nick);
|
610
|
+
if (rb_is_const_id(id)) {
|
611
|
+
rb_define_const(klass, nick, make_flags(entry->value, klass));
|
612
|
+
}
|
613
|
+
}
|
614
|
+
#else
|
615
|
+
{
|
616
|
+
rbgobj_define_const(klass, nick, make_flags(entry->value, klass));
|
617
|
+
}
|
618
|
+
#endif
|
619
|
+
|
620
|
+
g_free(nick);
|
621
|
+
}
|
622
|
+
|
623
|
+
rb_funcall(klass, id_module_eval, 1, rb_str_new2(source->str));
|
624
|
+
g_string_free(source, TRUE);
|
625
|
+
|
626
|
+
g_type_class_unref(gclass);
|
627
|
+
}
|
628
|
+
|
629
|
+
static VALUE
|
630
|
+
flags_s_mask(VALUE klass)
|
631
|
+
{
|
632
|
+
GFlagsClass* gclass = g_type_class_ref(CLASS2GTYPE(klass));
|
633
|
+
VALUE result = UINT2NUM(gclass->mask);
|
634
|
+
g_type_class_unref(gclass);
|
635
|
+
return result;
|
636
|
+
}
|
637
|
+
|
638
|
+
static VALUE
|
639
|
+
flags_s_values(VALUE klass)
|
640
|
+
{
|
641
|
+
GFlagsClass *gclass;
|
642
|
+
VALUE result;
|
643
|
+
int i;
|
644
|
+
|
645
|
+
gclass = g_type_class_ref(CLASS2GTYPE(klass));
|
646
|
+
result = rb_ary_new();
|
647
|
+
for (i = 0; i < gclass->n_values; i++) {
|
648
|
+
GFlagsValue *p = &(gclass->values[i]);
|
649
|
+
rb_ary_push(result, make_flags(p->value, klass));
|
650
|
+
}
|
651
|
+
g_type_class_unref(gclass);
|
652
|
+
|
653
|
+
return result;
|
654
|
+
}
|
655
|
+
|
656
|
+
static VALUE
|
657
|
+
flags_s_allocate(VALUE self)
|
658
|
+
{
|
659
|
+
GType gtype = CLASS2GTYPE(self);
|
660
|
+
|
661
|
+
if (G_TYPE_IS_ABSTRACT(gtype)) {
|
662
|
+
rb_raise(rb_eTypeError, "abstract class");
|
663
|
+
} else {
|
664
|
+
flags_holder* p;
|
665
|
+
VALUE result = Data_Make_Struct(self, flags_holder, NULL, flags_free, p);
|
666
|
+
p->gclass = g_type_class_ref(gtype);
|
667
|
+
p->value = 0;
|
668
|
+
p->info = NULL;
|
669
|
+
return result;
|
670
|
+
}
|
671
|
+
}
|
672
|
+
|
673
|
+
static VALUE
|
674
|
+
flags_initialize(int argc, VALUE* argv, VALUE self)
|
675
|
+
{
|
676
|
+
flags_holder* p = flags_get_holder(self);
|
677
|
+
VALUE arg;
|
678
|
+
|
679
|
+
rb_scan_args(argc, argv, "01", &arg);
|
680
|
+
|
681
|
+
if (argc == 0) {
|
682
|
+
p->value = 0;
|
683
|
+
} else {
|
684
|
+
if (rb_respond_to(arg, rb_intern("to_str"))) {
|
685
|
+
const char* str = StringValuePtr(arg);
|
686
|
+
p->info = g_flags_get_value_by_name(p->gclass, str);
|
687
|
+
if (!p->info)
|
688
|
+
p->info = g_flags_get_value_by_nick(p->gclass, str);
|
689
|
+
if (!p->info)
|
690
|
+
rb_raise(rb_eArgError, "invalid argument");
|
691
|
+
p->value = p->info->value;
|
692
|
+
} else {
|
693
|
+
p->value = NUM2UINT(arg);
|
694
|
+
}
|
695
|
+
}
|
696
|
+
|
697
|
+
if (!p->info) {
|
698
|
+
int i;
|
699
|
+
for (i = 0; i < p->gclass->n_values; i++){
|
700
|
+
GFlagsValue* val = &(p->gclass->values[i]);
|
701
|
+
if (val->value == p->value){
|
702
|
+
p->info = val;
|
703
|
+
break;
|
704
|
+
}
|
705
|
+
}
|
706
|
+
}
|
707
|
+
|
708
|
+
return Qnil;
|
709
|
+
}
|
710
|
+
|
711
|
+
static VALUE
|
712
|
+
flags_to_i(VALUE self)
|
713
|
+
{
|
714
|
+
flags_holder* p = flags_get_holder(self);
|
715
|
+
return UINT2NUM(p->value);
|
716
|
+
}
|
717
|
+
|
718
|
+
static VALUE
|
719
|
+
flags_name(VALUE self)
|
720
|
+
{
|
721
|
+
flags_holder* p = flags_get_holder(self);
|
722
|
+
return p->info ? rb_str_new2(p->info->value_name) : Qnil;
|
723
|
+
}
|
724
|
+
|
725
|
+
static VALUE
|
726
|
+
flags_nick(VALUE self)
|
727
|
+
{
|
728
|
+
flags_holder* p = flags_get_holder(self);
|
729
|
+
return p->info ? rb_str_new2(p->info->value_nick) : Qnil;
|
730
|
+
}
|
731
|
+
|
732
|
+
static VALUE
|
733
|
+
flags_compare(VALUE self, VALUE rhs)
|
734
|
+
{
|
735
|
+
flags_holder* p = flags_get_holder(self);
|
736
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
737
|
+
guint rhs_val;
|
738
|
+
|
739
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
740
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
741
|
+
return Qnil;
|
742
|
+
|
743
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
744
|
+
|
745
|
+
if (p->value == rhs_val)
|
746
|
+
return INT2FIX(0);
|
747
|
+
else if ((p->value & rhs_val) == rhs_val)
|
748
|
+
return INT2FIX(1);
|
749
|
+
else if ((p->value & rhs_val) == p->value)
|
750
|
+
return INT2FIX(-1);
|
751
|
+
else
|
752
|
+
return Qnil;
|
753
|
+
}
|
754
|
+
|
755
|
+
static VALUE
|
756
|
+
flags_eqv(VALUE self, VALUE rhs)
|
757
|
+
{
|
758
|
+
flags_holder* p = flags_get_holder(self);
|
759
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
760
|
+
guint rhs_val;
|
761
|
+
|
762
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
763
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
764
|
+
return Qnil;
|
765
|
+
|
766
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
767
|
+
return CBOOL2RVAL(p->value == rhs_val);
|
768
|
+
}
|
769
|
+
|
770
|
+
static VALUE
|
771
|
+
flags_gt_eq(VALUE self, VALUE rhs)
|
772
|
+
{
|
773
|
+
flags_holder* p = flags_get_holder(self);
|
774
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
775
|
+
guint rhs_val;
|
776
|
+
|
777
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
778
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
779
|
+
return Qnil;
|
780
|
+
|
781
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
782
|
+
return CBOOL2RVAL((p->value & rhs_val) == rhs_val);
|
783
|
+
}
|
784
|
+
|
785
|
+
static VALUE
|
786
|
+
flags_lt_eq(VALUE self, VALUE rhs)
|
787
|
+
{
|
788
|
+
flags_holder* p = flags_get_holder(self);
|
789
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
790
|
+
guint rhs_val;
|
791
|
+
|
792
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
793
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
794
|
+
return Qnil;
|
795
|
+
|
796
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
797
|
+
return CBOOL2RVAL((p->value & rhs_val) == p->value);
|
798
|
+
}
|
799
|
+
|
800
|
+
static VALUE
|
801
|
+
flags_gt(VALUE self, VALUE rhs)
|
802
|
+
{
|
803
|
+
flags_holder* p = flags_get_holder(self);
|
804
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
805
|
+
guint rhs_val;
|
806
|
+
|
807
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
808
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
809
|
+
return Qnil;
|
810
|
+
|
811
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
812
|
+
return CBOOL2RVAL((p->value & rhs_val) == rhs_val &&
|
813
|
+
p->value != rhs_val);
|
814
|
+
}
|
815
|
+
|
816
|
+
static VALUE
|
817
|
+
flags_lt(VALUE self, VALUE rhs)
|
818
|
+
{
|
819
|
+
flags_holder* p = flags_get_holder(self);
|
820
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
821
|
+
guint rhs_val;
|
822
|
+
|
823
|
+
if (CLASS_OF(rhs) != CLASS_OF(self) &&
|
824
|
+
!rb_obj_is_kind_of(rhs, rb_cInteger))
|
825
|
+
return Qnil;
|
826
|
+
|
827
|
+
rhs_val = rbgobj_get_flags(rhs, gtype);
|
828
|
+
return CBOOL2RVAL((p->value & rhs_val) == p->value &&
|
829
|
+
p->value != rhs_val);
|
830
|
+
}
|
831
|
+
|
832
|
+
static VALUE
|
833
|
+
flags_not(VALUE self, VALUE rhs)
|
834
|
+
{
|
835
|
+
flags_holder* p = flags_get_holder(self);
|
836
|
+
return rbgobj_make_flags((~ p->value) & p->gclass->mask,
|
837
|
+
G_TYPE_FROM_CLASS(p->gclass));
|
838
|
+
}
|
839
|
+
|
840
|
+
#define LIFT_BINARY_OP(funcname, op) \
|
841
|
+
static VALUE \
|
842
|
+
funcname(VALUE self, VALUE rhs) \
|
843
|
+
{ \
|
844
|
+
flags_holder* p = flags_get_holder(self); \
|
845
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass); \
|
846
|
+
return rbgobj_make_flags(p->value op rbgobj_get_flags(rhs, gtype), \
|
847
|
+
gtype); \
|
848
|
+
}
|
849
|
+
|
850
|
+
LIFT_BINARY_OP(flags_and, &)
|
851
|
+
LIFT_BINARY_OP(flags_or, |)
|
852
|
+
LIFT_BINARY_OP(flags_xor, ^)
|
853
|
+
|
854
|
+
static VALUE
|
855
|
+
flags_minus(VALUE self, VALUE rhs)
|
856
|
+
{
|
857
|
+
flags_holder* p = flags_get_holder(self);
|
858
|
+
GType gtype = G_TYPE_FROM_CLASS(p->gclass);
|
859
|
+
return rbgobj_make_flags(p->value & ~rbgobj_get_flags(rhs, gtype),
|
860
|
+
gtype);
|
861
|
+
}
|
862
|
+
|
863
|
+
static VALUE
|
864
|
+
flags_empty_p(VALUE self)
|
865
|
+
{
|
866
|
+
flags_holder* p = flags_get_holder(self);
|
867
|
+
return CBOOL2RVAL(p->value == 0);
|
868
|
+
}
|
869
|
+
|
870
|
+
static VALUE
|
871
|
+
flags_hash(VALUE self)
|
872
|
+
{
|
873
|
+
flags_holder* p = flags_get_holder(self);
|
874
|
+
return UINT2NUM(p->value ^ G_TYPE_FROM_CLASS(p->gclass));
|
875
|
+
}
|
876
|
+
|
877
|
+
static VALUE
|
878
|
+
flags_coerce(VALUE self, VALUE other)
|
879
|
+
{
|
880
|
+
flags_holder *holder;
|
881
|
+
GType gtype;
|
882
|
+
|
883
|
+
if (rb_obj_is_kind_of(other, rb_cInteger))
|
884
|
+
rb_raise(rb_eTypeError, "can't coerce");
|
885
|
+
|
886
|
+
holder = flags_get_holder(self);
|
887
|
+
gtype = G_TYPE_FROM_CLASS(holder->gclass);
|
888
|
+
other = rbgobj_make_flags(NUM2UINT(other), gtype);
|
889
|
+
return rb_ary_new3(2, other, self);
|
890
|
+
}
|
891
|
+
|
892
|
+
static VALUE
|
893
|
+
flags_nonzero_p(VALUE self)
|
894
|
+
{
|
895
|
+
flags_holder* p = flags_get_holder(self);
|
896
|
+
return CBOOL2RVAL(p->value != 0);
|
897
|
+
}
|
898
|
+
|
899
|
+
static void
|
900
|
+
Init_flags()
|
901
|
+
{
|
902
|
+
VALUE cFlags;
|
903
|
+
|
904
|
+
rbgobj_cFlags = G_DEF_CLASS(G_TYPE_FLAGS, "Flags", mGLib);
|
905
|
+
cFlags = rbgobj_cFlags;
|
906
|
+
|
907
|
+
rb_define_singleton_method(cFlags, "gtype", generic_s_gtype, 0);
|
908
|
+
rb_define_method(cFlags, "gtype", generic_gtype, 0);
|
909
|
+
|
910
|
+
rb_define_singleton_method(cFlags, "mask", flags_s_mask, 0);
|
911
|
+
rb_define_singleton_method(cFlags, "values", flags_s_values, 0);
|
912
|
+
|
913
|
+
rb_define_alloc_func(cFlags, flags_s_allocate);
|
914
|
+
|
915
|
+
rb_define_method(cFlags, "initialize", flags_initialize, -1);
|
916
|
+
|
917
|
+
rb_define_method(cFlags, "to_i", flags_to_i, 0);
|
918
|
+
rb_define_alias(cFlags, "to_int", "to_i");
|
919
|
+
rb_define_method(cFlags, "name", flags_name, 0);
|
920
|
+
rb_define_method(cFlags, "nick", flags_nick, 0);
|
921
|
+
|
922
|
+
/*
|
923
|
+
rb_define_method(cFlags, "inspect", flags_inspect, 0);
|
924
|
+
*/
|
925
|
+
|
926
|
+
rb_define_method(cFlags, "<=>", flags_compare, 1);
|
927
|
+
rb_define_method(cFlags, "==", flags_eqv, 1);
|
928
|
+
rb_define_method(cFlags, ">=", flags_gt_eq, 1);
|
929
|
+
rb_define_method(cFlags, "<=", flags_lt_eq, 1);
|
930
|
+
rb_define_method(cFlags, ">", flags_gt, 1);
|
931
|
+
rb_define_method(cFlags, "<", flags_lt, 1);
|
932
|
+
rb_define_method(cFlags, "~", flags_not, 0);
|
933
|
+
rb_define_method(cFlags, "&", flags_and, 1);
|
934
|
+
rb_define_method(cFlags, "|", flags_or, 1);
|
935
|
+
rb_define_method(cFlags, "^", flags_xor, 1);
|
936
|
+
rb_define_method(cFlags, "-", flags_minus, 1);
|
937
|
+
|
938
|
+
rb_define_method(cFlags, "empty?", flags_empty_p, 0);
|
939
|
+
|
940
|
+
rb_define_method(cFlags, "hash", flags_hash, 0);
|
941
|
+
rb_define_method(cFlags, "eql?", flags_eqv, 1);
|
942
|
+
|
943
|
+
/* for compatibility */
|
944
|
+
rb_define_method(cFlags, "coerce", flags_coerce, 1);
|
945
|
+
rb_define_method(cFlags, "zero?", flags_empty_p, 0);
|
946
|
+
rb_define_method(cFlags, "nonzero?", flags_nonzero_p, 0);
|
947
|
+
}
|
948
|
+
|
949
|
+
/**********************************************************************/
|
950
|
+
|
951
|
+
void
|
952
|
+
Init_gobject_genums()
|
953
|
+
{
|
954
|
+
id_module_eval = rb_intern("module_eval");
|
955
|
+
id_new = rb_intern("new");
|
956
|
+
id_to_s = rb_intern("to_s");
|
957
|
+
id_or = rb_intern("|");
|
958
|
+
|
959
|
+
Init_enum();
|
960
|
+
Init_flags();
|
961
|
+
}
|