glib2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/glib2/extconf.rb +1 -0
- data/ext/glib2/glib2.def +23 -0
- data/ext/glib2/rbgcompat.h +19 -5
- data/ext/glib2/rbglib.c +607 -160
- data/ext/glib2/rbglib.h +81 -26
- data/ext/glib2/rbglib2conversions.h +57 -0
- data/ext/glib2/rbglib_bookmarkfile.c +117 -107
- data/ext/glib2/rbglib_completion.c +37 -26
- data/ext/glib2/rbglib_convert.c +42 -30
- data/ext/glib2/rbglib_error.c +20 -10
- data/ext/glib2/rbglib_fileutils.c +48 -37
- data/ext/glib2/rbglib_i18n.c +24 -14
- data/ext/glib2/rbglib_int64.c +24 -16
- data/ext/glib2/rbglib_iochannel.c +146 -204
- data/ext/glib2/rbglib_iochannel_win32_socket.c +56 -0
- data/ext/glib2/rbglib_iochannelerror.c +49 -0
- data/ext/glib2/rbglib_keyfile.c +171 -182
- data/ext/glib2/rbglib_maincontext.c +107 -92
- data/ext/glib2/rbglib_mainloop.c +34 -21
- data/ext/glib2/rbglib_messages.c +53 -44
- data/ext/glib2/rbglib_pollfd.c +37 -26
- data/ext/glib2/rbglib_shell.c +29 -22
- data/ext/glib2/rbglib_shellerror.c +34 -0
- data/ext/glib2/rbglib_source.c +49 -36
- data/ext/glib2/rbglib_spawn.c +50 -61
- data/ext/glib2/rbglib_spawnerror.c +53 -0
- data/ext/glib2/rbglib_threads.c +28 -16
- data/ext/glib2/rbglib_timer.c +35 -24
- data/ext/glib2/rbglib_ucs4.c +79 -0
- data/ext/glib2/rbglib_unichar.c +209 -0
- data/ext/glib2/rbglib_unicode.c +34 -584
- data/ext/glib2/rbglib_utf16.c +78 -0
- data/ext/glib2/rbglib_utf8.c +259 -0
- data/ext/glib2/rbglib_utils.c +95 -91
- data/ext/glib2/rbglib_win32.c +52 -45
- data/ext/glib2/rbglibdeprecated.c +56 -0
- data/ext/glib2/rbglibdeprecated.h +34 -0
- data/ext/glib2/rbgobj_boxed.c +40 -33
- data/ext/glib2/rbgobj_closure.c +45 -34
- data/ext/glib2/rbgobj_convert.c +19 -9
- data/ext/glib2/rbgobj_enumflags.c +109 -0
- data/ext/glib2/rbgobj_enums.c +67 -646
- data/ext/glib2/rbgobj_flags.c +522 -0
- data/ext/glib2/rbgobj_fundamental.c +19 -6
- data/ext/glib2/rbgobj_object.c +90 -81
- data/ext/glib2/rbgobj_param.c +78 -83
- data/ext/glib2/rbgobj_paramspecs.c +20 -12
- data/ext/glib2/rbgobj_signal.c +248 -193
- data/ext/glib2/rbgobj_strv.c +20 -10
- data/ext/glib2/rbgobj_type.c +153 -149
- data/ext/glib2/rbgobj_typeinstance.c +49 -39
- data/ext/glib2/rbgobj_typeinterface.c +37 -27
- data/ext/glib2/rbgobj_typemodule.c +39 -29
- data/ext/glib2/rbgobj_typeplugin.c +36 -26
- data/ext/glib2/rbgobj_value.c +41 -11
- data/ext/glib2/rbgobj_valuearray.c +59 -23
- data/ext/glib2/rbgobj_valuetypes.c +27 -17
- data/ext/glib2/rbgobject.c +26 -40
- data/ext/glib2/rbgobject.h +38 -20
- data/ext/glib2/rbgprivate.h +87 -5
- data/ext/glib2/rbgutil.c +52 -238
- data/ext/glib2/rbgutil.h +55 -42
- data/ext/glib2/rbgutil_callback.c +47 -12
- data/ext/glib2/rbgutil_list.c +173 -0
- data/ext/glib2/rbgutil_list.h +85 -0
- data/ext/glib2/rbgutildeprecated.c +252 -0
- data/ext/glib2/rbgutildeprecated.h +63 -0
- data/lib/1.8/glib2.so +0 -0
- data/lib/1.9/glib2.so +0 -0
- data/lib/glib-mkenums.rb +2 -2
- data/lib/glib2.rb +2 -25
- data/lib/glib2/deprecatable.rb +149 -0
- data/lib/gnome2-raketask.rb +45 -15
- data/lib/gnome2-win32-binary-downloader.rb +1 -1
- data/lib/mkmf-gnome2.rb +37 -18
- data/test/test_flags.rb +129 -0
- data/test/test_key_file.rb +6 -2
- data/test/test_spawn.rb +33 -0
- data/vendor/local/bin/gdbus.exe +0 -0
- data/vendor/local/bin/gio-querymodules.exe +0 -0
- data/vendor/local/bin/glib-compile-schemas.exe +0 -0
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
- data/vendor/local/bin/glib-gettextize +2 -2
- data/vendor/local/bin/glib-mkenums +1 -1
- 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/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/etc/bash_completion.d/gdbus-bash-completion.sh +33 -0
- data/vendor/local/etc/bash_completion.d/gsettings-bash-completion.sh +67 -0
- data/vendor/local/include/gio-win32-2.0/gio/gwin32inputstream.h +79 -0
- data/vendor/local/include/gio-win32-2.0/gio/gwin32outputstream.h +78 -0
- data/vendor/local/include/glib-2.0/gio/gapplication.h +13 -7
- data/vendor/local/include/glib-2.0/gio/gioenums.h +16 -5
- data/vendor/local/include/glib-2.0/glib/gconvert.h +2 -0
- data/vendor/local/include/glib-2.0/glib/gdir.h +2 -0
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +2 -0
- data/vendor/local/include/glib-2.0/glib/giochannel.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gspawn.h +2 -0
- data/vendor/local/include/glib-2.0/glib/gutils.h +6 -2
- data/vendor/local/include/glib-2.0/glib/gvarianttype.h +10 -10
- data/vendor/local/include/glib-2.0/gobject/gtype.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gvalue.h +9 -1
- data/vendor/local/lib/gio-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0.def +1 -0
- data/vendor/local/lib/glib-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +1 -1
- data/vendor/local/lib/gmodule-2.0.lib +0 -0
- data/vendor/local/lib/gobject-2.0.lib +0 -0
- data/vendor/local/lib/gthread-2.0.lib +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/pkgconfig/gio-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +1 -1
- data/vendor/local/manifest/{glib-dev_2.28.1-1_win32.mft → glib-dev_2.28.8-1_win32.mft} +33 -20
- data/vendor/local/manifest/{glib_2.28.1-1_win32.mft → glib_2.28.8-1_win32.mft} +3 -3
- data/vendor/local/share/aclocal/gsettings.m4 +83 -0
- data/vendor/local/share/doc/{glib-2.28.1 → glib-2.28.8}/COPYING +0 -0
- data/vendor/local/share/doc/{glib-dev-2.28.1 → glib-dev-2.28.8}/COPYING +0 -0
- data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +0 -0
- data/vendor/local/share/gtk-doc/html/gio/GAction.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GActionGroup.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GApplication.html +115 -32
- data/vendor/local/share/gtk-doc/html/gio/GApplicationCommandLine.html +329 -312
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GConverter.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GCredentials.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GDBusAuthObserver.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GDBusConnection.html +95 -40
- data/vendor/local/share/gtk-doc/html/gio/GDBusError.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GDBusMessage.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/GDBusMethodInvocation.html +6 -4
- data/vendor/local/share/gtk-doc/html/gio/GDBusProxy.html +21 -11
- data/vendor/local/share/gtk-doc/html/gio/GDBusServer.html +3 -4
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GDrive.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +9 -7
- data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GIcon.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GInitable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +6 -6
- data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GPermission.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GPollableInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GPollableOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GProxy.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GProxyAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GProxyResolver.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GResolver.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSettings.html +11 -4
- data/vendor/local/share/gtk-doc/html/gio/GSettingsBackend.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAction.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GSimpleActionGroup.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSimplePermission.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSrvTarget.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTcpConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTcpWrapperConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsBackend.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsCertificate.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsClientConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsServerConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixConnection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixCredentialsMessage.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GVfs.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GVolume.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/annotation-glossary.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-26.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-28.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/application.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/async.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/ch01.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch02.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/ch03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch26.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch27.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/ch27s02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch27s03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch28.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/ch28s02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch28s03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch28s04.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch28s05.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch28s06.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/ch28s07.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch29.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/ch29s02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch29s03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch29s04.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch29s05.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/ch29s06.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/conversion.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/extending.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/file_mon.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/file_ops.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gdbus-convenience.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gdbus-lowlevel.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gdbus.html +9 -9
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Addresses.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +6 -5
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-TLS-Overview.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-Watching-Bus-Names.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-querymodules.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +8 -8
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +8 -8
- data/vendor/local/share/gtk-doc/html/gio/glib-compile-schemas.html +7 -5
- data/vendor/local/share/gtk-doc/html/gio/gsettings-tool.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/icons.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/index.html +6 -6
- data/vendor/local/share/gtk-doc/html/gio/migrating.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/networking.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/permissions.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/pt01.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/pt02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/resolver.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/settings.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/streaming.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/tls.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/tools.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/types.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/utils.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/annotation-glossary.html +8 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-26.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-28.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +26 -26
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +99 -19
- data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +147 -49
- data/vendor/local/share/gtk-doc/html/glib/glib-GDateTime.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-GTimeZone.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +123 -94
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +52 -47
- data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +4 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +5 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +6 -6
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +83 -48
- data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +6 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +287 -52
- data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +19 -14
- data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +17 -14
- data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +16 -8
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +6 -6
- data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-building.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-core.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +47 -47
- data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +8 -8
- data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +49 -49
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +49 -49
- data/vendor/local/share/gtk-doc/html/glib/glib.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/gtester.html +5 -5
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +35 -35
- data/vendor/local/share/gtk-doc/html/glib/gvariant-text.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/index.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/index.sgml +1 -0
- data/vendor/local/share/gtk-doc/html/glib/tools.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/GBinding.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/annotation-glossary.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-26.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-28.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +10 -10
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +11 -11
- data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +8 -8
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +5 -5
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +7 -7
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +8 -3
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +5 -3
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +5 -5
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +8 -8
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +8 -8
- data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +5 -5
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +5 -5
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/index.html +9 -9
- data/vendor/local/share/gtk-doc/html/gobject/pr01.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/pt01.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/pt02.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/pt03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/rn01.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/rn02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +2 -2
- data/vendor/local/share/locale/af/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/glib20.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/glib20.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/glib20.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/hu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -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/mr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/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/glib20.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ug/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/glib20.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/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/man/man1/gdbus.1 +249 -0
- data/vendor/local/share/man/man1/gio-querymodules.1 +44 -0
- data/vendor/local/share/man/man1/glib-compile-schemas.1 +86 -0
- data/vendor/local/share/man/man1/glib-genmarshal.1 +2 -2
- data/vendor/local/share/man/man1/glib-gettextize.1 +80 -0
- data/vendor/local/share/man/man1/glib-mkenums.1 +2 -2
- data/vendor/local/share/man/man1/gobject-query.1 +2 -2
- data/vendor/local/share/man/man1/gsettings.1 +153 -0
- data/vendor/local/src/dieterv/packaging/glib_2.28.8-1_win32.log +2919 -0
- data/vendor/local/src/dieterv/packaging/glib_2.28.8-1_win32.sh +157 -0
- metadata +45 -13
- data/ChangeLog +0 -3513
- data/vendor/local/src/tml/packaging/glib_2.28.1-1_win32.log +0 -2775
- data/vendor/local/src/tml/packaging/glib_2.28.1-1_win32.sh +0 -62
@@ -0,0 +1,78 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2006 Kouhei Sutou
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgprivate.h"
|
23
|
+
#include "rbglib.h"
|
24
|
+
|
25
|
+
#define RG_TARGET_NAMESPACE mUTF16
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_m_to_ucs4(G_GNUC_UNUSED VALUE self, VALUE rb_utf16)
|
29
|
+
{
|
30
|
+
VALUE result;
|
31
|
+
gunichar *ucs4;
|
32
|
+
gunichar2 *utf16;
|
33
|
+
glong len, items_written;
|
34
|
+
GError *error = NULL;
|
35
|
+
|
36
|
+
utf16 = (gunichar2 *)StringValueCStr(rb_utf16);
|
37
|
+
len = RSTRING_LEN(rb_utf16) / sizeof(*utf16);
|
38
|
+
|
39
|
+
ucs4 = g_utf16_to_ucs4(utf16, len, NULL, &items_written, &error);
|
40
|
+
|
41
|
+
if (error)
|
42
|
+
RAISE_GERROR(error);
|
43
|
+
|
44
|
+
result = CSTR2RVAL_LEN_UCS4((char *)ucs4, items_written * sizeof(*ucs4));
|
45
|
+
g_free(ucs4);
|
46
|
+
return result;
|
47
|
+
}
|
48
|
+
|
49
|
+
static VALUE
|
50
|
+
rg_m_to_utf8(G_GNUC_UNUSED VALUE self, VALUE rb_utf16)
|
51
|
+
{
|
52
|
+
VALUE result;
|
53
|
+
gchar *utf8;
|
54
|
+
gunichar2 *utf16;
|
55
|
+
glong len, items_written;
|
56
|
+
GError *error = NULL;
|
57
|
+
|
58
|
+
utf16 = (gunichar2 *)StringValueCStr(rb_utf16);
|
59
|
+
len = RSTRING_LEN(rb_utf16) / sizeof(*utf16);
|
60
|
+
|
61
|
+
utf8 = g_utf16_to_utf8(utf16, len, NULL, &items_written, &error);
|
62
|
+
|
63
|
+
if (error)
|
64
|
+
RAISE_GERROR(error);
|
65
|
+
|
66
|
+
result = CSTR2RVAL_LEN(utf8, items_written * sizeof(*utf8));
|
67
|
+
g_free(utf8);
|
68
|
+
return result;
|
69
|
+
}
|
70
|
+
|
71
|
+
void
|
72
|
+
Init_glib_utf16(void)
|
73
|
+
{
|
74
|
+
VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGLib, "UTF16");
|
75
|
+
|
76
|
+
RG_DEF_MODFUNC(to_ucs4, 1);
|
77
|
+
RG_DEF_MODFUNC(to_utf8, 1);
|
78
|
+
}
|
@@ -0,0 +1,259 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2006 Kouhei Sutou
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgprivate.h"
|
23
|
+
#include "rbglib.h"
|
24
|
+
|
25
|
+
#define RG_TARGET_NAMESPACE mUTF8
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_m_get_char(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
29
|
+
{
|
30
|
+
VALUE utf8, validate;
|
31
|
+
gunichar result;
|
32
|
+
|
33
|
+
rb_scan_args(argc, argv, "11", &utf8, &validate);
|
34
|
+
|
35
|
+
if (RVAL2CBOOL(validate)) {
|
36
|
+
StringValue(utf8);
|
37
|
+
result = g_utf8_get_char_validated(RSTRING_PTR(utf8),
|
38
|
+
RSTRING_LEN(utf8));
|
39
|
+
if (result == (gunichar)-1) {
|
40
|
+
return INT2NUM(-1);
|
41
|
+
} else if (result == (gunichar)-2) {
|
42
|
+
return INT2NUM(-2);
|
43
|
+
}
|
44
|
+
} else {
|
45
|
+
result = g_utf8_get_char(StringValueCStr(utf8));
|
46
|
+
}
|
47
|
+
|
48
|
+
return UINT2NUM(result);
|
49
|
+
}
|
50
|
+
|
51
|
+
static VALUE
|
52
|
+
rg_m_size(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
53
|
+
{
|
54
|
+
gchar *utf8;
|
55
|
+
|
56
|
+
utf8 = StringValueCStr(rb_utf8);
|
57
|
+
return INT2NUM(g_utf8_strlen(utf8, RSTRING_LEN(rb_utf8)));
|
58
|
+
}
|
59
|
+
|
60
|
+
static VALUE
|
61
|
+
rg_m_reverse(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
62
|
+
{
|
63
|
+
VALUE result;
|
64
|
+
gchar *utf8, *reversed_utf8;
|
65
|
+
|
66
|
+
utf8 = StringValueCStr(rb_utf8);
|
67
|
+
reversed_utf8 = g_utf8_strreverse(utf8, RSTRING_LEN(rb_utf8));
|
68
|
+
result = CSTR2RVAL(reversed_utf8);
|
69
|
+
g_free(reversed_utf8);
|
70
|
+
return result;
|
71
|
+
}
|
72
|
+
|
73
|
+
static VALUE
|
74
|
+
rg_m_validate(G_GNUC_UNUSED VALUE self, VALUE str)
|
75
|
+
{
|
76
|
+
StringValue(str);
|
77
|
+
return CBOOL2RVAL(g_utf8_validate(RSTRING_PTR(str), RSTRING_LEN(str),
|
78
|
+
NULL));
|
79
|
+
}
|
80
|
+
|
81
|
+
static VALUE
|
82
|
+
rg_m_upcase(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
83
|
+
{
|
84
|
+
VALUE result;
|
85
|
+
gchar *utf8, *upcased_utf8;
|
86
|
+
|
87
|
+
utf8 = StringValueCStr(rb_utf8);
|
88
|
+
upcased_utf8 = g_utf8_strup(utf8, RSTRING_LEN(rb_utf8));
|
89
|
+
result = CSTR2RVAL(upcased_utf8);
|
90
|
+
g_free(upcased_utf8);
|
91
|
+
return result;
|
92
|
+
}
|
93
|
+
|
94
|
+
static VALUE
|
95
|
+
rg_m_downcase(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
96
|
+
{
|
97
|
+
VALUE result;
|
98
|
+
gchar *utf8, *downcased_utf8;
|
99
|
+
|
100
|
+
utf8 = StringValueCStr(rb_utf8);
|
101
|
+
downcased_utf8 = g_utf8_strdown(utf8, RSTRING_LEN(rb_utf8));
|
102
|
+
result = CSTR2RVAL(downcased_utf8);
|
103
|
+
g_free(downcased_utf8);
|
104
|
+
return result;
|
105
|
+
}
|
106
|
+
|
107
|
+
static VALUE
|
108
|
+
rg_m_casefold(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
109
|
+
{
|
110
|
+
VALUE result;
|
111
|
+
gchar *utf8, *casefolded_utf8;
|
112
|
+
|
113
|
+
utf8 = StringValueCStr(rb_utf8);
|
114
|
+
casefolded_utf8 = g_utf8_casefold(utf8, RSTRING_LEN(rb_utf8));
|
115
|
+
result = CSTR2RVAL(casefolded_utf8);
|
116
|
+
g_free(casefolded_utf8);
|
117
|
+
return result;
|
118
|
+
}
|
119
|
+
|
120
|
+
static VALUE
|
121
|
+
rg_m_normalize(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
122
|
+
{
|
123
|
+
VALUE rb_utf8, rb_mode, result;
|
124
|
+
gchar *utf8, *normalized_utf8;
|
125
|
+
GNormalizeMode mode = G_NORMALIZE_DEFAULT;
|
126
|
+
|
127
|
+
rb_scan_args(argc, argv, "11", &rb_utf8, &rb_mode);
|
128
|
+
|
129
|
+
if (!NIL_P(rb_mode))
|
130
|
+
mode = RVAL2GENUM(rb_mode, G_TYPE_NORMALIZE_MODE);
|
131
|
+
|
132
|
+
utf8 = StringValueCStr(rb_utf8);
|
133
|
+
normalized_utf8 = g_utf8_normalize(utf8, RSTRING_LEN(rb_utf8), mode);
|
134
|
+
result = CSTR2RVAL(normalized_utf8);
|
135
|
+
g_free(normalized_utf8);
|
136
|
+
return result;
|
137
|
+
}
|
138
|
+
|
139
|
+
static VALUE
|
140
|
+
rg_m_collate(G_GNUC_UNUSED VALUE self, VALUE utf8a, VALUE utf8b)
|
141
|
+
{
|
142
|
+
return INT2NUM(g_utf8_collate(StringValueCStr(utf8a),
|
143
|
+
StringValueCStr(utf8b)));
|
144
|
+
}
|
145
|
+
|
146
|
+
static VALUE
|
147
|
+
rg_m_collate_key(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
148
|
+
{
|
149
|
+
VALUE result, rb_utf8, for_filename;
|
150
|
+
gchar *key, *utf8;
|
151
|
+
gssize len;
|
152
|
+
|
153
|
+
rb_scan_args(argc, argv, "11", &rb_utf8, &for_filename);
|
154
|
+
|
155
|
+
utf8 = StringValueCStr(rb_utf8);
|
156
|
+
len = RSTRING_LEN(rb_utf8);
|
157
|
+
#if GLIB_CHECK_VERSION(2,8,0)
|
158
|
+
if (RVAL2CBOOL(for_filename))
|
159
|
+
key = g_utf8_collate_key_for_filename(utf8, len);
|
160
|
+
else
|
161
|
+
#endif
|
162
|
+
key = g_utf8_collate_key(utf8, len);
|
163
|
+
|
164
|
+
result = CSTR2RVAL(key);
|
165
|
+
g_free(key);
|
166
|
+
return result;
|
167
|
+
}
|
168
|
+
|
169
|
+
static VALUE
|
170
|
+
rg_m_to_utf16(G_GNUC_UNUSED VALUE self, VALUE rb_utf8)
|
171
|
+
{
|
172
|
+
VALUE result;
|
173
|
+
gchar *utf8;
|
174
|
+
gunichar2 *utf16;
|
175
|
+
glong len, items_written;
|
176
|
+
GError *error = NULL;
|
177
|
+
|
178
|
+
utf8 = StringValueCStr(rb_utf8);
|
179
|
+
len = RSTRING_LEN(rb_utf8);
|
180
|
+
|
181
|
+
utf16 = g_utf8_to_utf16(utf8, len, NULL, &items_written, &error);
|
182
|
+
|
183
|
+
if (error)
|
184
|
+
RAISE_GERROR(error);
|
185
|
+
|
186
|
+
result = CSTR2RVAL_LEN_UTF16((char *)utf16,
|
187
|
+
items_written * sizeof(*utf16));
|
188
|
+
g_free(utf16);
|
189
|
+
return result;
|
190
|
+
}
|
191
|
+
|
192
|
+
static VALUE
|
193
|
+
rg_m_to_ucs4(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
194
|
+
{
|
195
|
+
VALUE result, rb_utf8, is_fast;
|
196
|
+
gchar *utf8;
|
197
|
+
gunichar *ucs4;
|
198
|
+
glong len, items_written;
|
199
|
+
|
200
|
+
rb_scan_args(argc, argv, "11", &rb_utf8, &is_fast);
|
201
|
+
|
202
|
+
utf8 = StringValueCStr(rb_utf8);
|
203
|
+
len = RSTRING_LEN(rb_utf8);
|
204
|
+
|
205
|
+
if (RVAL2CBOOL(is_fast)) {
|
206
|
+
ucs4 = g_utf8_to_ucs4_fast(utf8, len, &items_written);
|
207
|
+
} else {
|
208
|
+
GError *error = NULL;
|
209
|
+
ucs4 = g_utf8_to_ucs4(utf8, len, NULL, &items_written, &error);
|
210
|
+
|
211
|
+
if (error)
|
212
|
+
RAISE_GERROR(error);
|
213
|
+
}
|
214
|
+
|
215
|
+
result = CSTR2RVAL_LEN_UCS4((char *)ucs4, items_written * sizeof(*ucs4));
|
216
|
+
g_free(ucs4);
|
217
|
+
return result;
|
218
|
+
}
|
219
|
+
|
220
|
+
void
|
221
|
+
Init_glib_utf8(void)
|
222
|
+
{
|
223
|
+
VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGLib, "UTF8");
|
224
|
+
|
225
|
+
/*
|
226
|
+
Not implemented.
|
227
|
+
g_utf8_next_char
|
228
|
+
*/
|
229
|
+
RG_DEF_MODFUNC(get_char, -1);
|
230
|
+
/*
|
231
|
+
Not implemented.
|
232
|
+
g_utf8_offset_to_pointer
|
233
|
+
g_utf8_pointer_to_offset
|
234
|
+
g_utf8_prev_char
|
235
|
+
g_utf8_find_next_char
|
236
|
+
g_utf8_find_prev_char
|
237
|
+
g_utf8_prev_char
|
238
|
+
*/
|
239
|
+
RG_DEF_MODFUNC(size, 1);
|
240
|
+
/*
|
241
|
+
Not implemented.
|
242
|
+
g_utf8_strncpy
|
243
|
+
g_utf8_strrchr
|
244
|
+
*/
|
245
|
+
RG_DEF_MODFUNC(reverse, 1);
|
246
|
+
RG_DEF_MODFUNC(validate, 1);
|
247
|
+
|
248
|
+
RG_DEF_MODFUNC(upcase, 1);
|
249
|
+
RG_DEF_MODFUNC(downcase, 1);
|
250
|
+
RG_DEF_MODFUNC(casefold, 1);
|
251
|
+
|
252
|
+
RG_DEF_MODFUNC(normalize, -1);
|
253
|
+
|
254
|
+
RG_DEF_MODFUNC(collate, 2);
|
255
|
+
RG_DEF_MODFUNC(collate_key, -1);
|
256
|
+
|
257
|
+
RG_DEF_MODFUNC(to_utf16, 1);
|
258
|
+
RG_DEF_MODFUNC(to_ucs4, -1);
|
259
|
+
}
|
data/ext/glib2/rbglib_utils.c
CHANGED
@@ -1,63 +1,74 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2004 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 2004 Pascal Terjan
|
6
|
+
*
|
7
|
+
* This library is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation; either
|
10
|
+
* version 2.1 of the License, or (at your option) any later version.
|
11
|
+
*
|
12
|
+
* This library is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
+
* Lesser General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
18
|
+
* License along with this library; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20
|
+
* MA 02110-1301 USA
|
21
|
+
*/
|
13
22
|
|
14
23
|
#include "rbgprivate.h"
|
15
24
|
|
25
|
+
#define RG_TARGET_NAMESPACE mGLib
|
26
|
+
|
16
27
|
#if GLIB_CHECK_VERSION(2,2,0)
|
17
28
|
static VALUE
|
18
|
-
|
29
|
+
rg_m_application_name(G_GNUC_UNUSED VALUE self)
|
19
30
|
{
|
20
31
|
return CSTR2RVAL(g_get_application_name());
|
21
32
|
}
|
22
33
|
|
23
34
|
static VALUE
|
24
|
-
|
35
|
+
rg_m_set_application_name(VALUE self, VALUE application_name)
|
25
36
|
{
|
26
|
-
g_set_prgname(
|
37
|
+
g_set_prgname(RVAL2CSTR_ACCEPT_NIL(application_name));
|
27
38
|
return self;
|
28
39
|
}
|
29
40
|
#endif
|
30
41
|
|
31
42
|
static VALUE
|
32
|
-
|
43
|
+
rg_m_prgname(G_GNUC_UNUSED VALUE self)
|
33
44
|
{
|
34
45
|
return CSTR2RVAL(g_get_prgname());
|
35
46
|
}
|
36
47
|
|
37
48
|
static VALUE
|
38
|
-
|
49
|
+
rg_m_set_prgname(VALUE self, VALUE prgname)
|
39
50
|
{
|
40
|
-
g_set_prgname(
|
51
|
+
g_set_prgname(RVAL2CSTR_ACCEPT_NIL(prgname));
|
41
52
|
return self;
|
42
53
|
}
|
43
54
|
|
44
55
|
static VALUE
|
45
|
-
|
56
|
+
rg_m_getenv(G_GNUC_UNUSED VALUE self, VALUE variable)
|
46
57
|
{
|
47
58
|
return CSTR2RVAL(g_getenv(RVAL2CSTR(variable)));
|
48
59
|
}
|
49
60
|
|
50
61
|
#if GLIB_CHECK_VERSION(2,4,0)
|
51
62
|
static VALUE
|
52
|
-
|
63
|
+
rg_m_setenv(G_GNUC_UNUSED VALUE self, VALUE variable, VALUE value, VALUE overwrite)
|
53
64
|
{
|
54
65
|
return CBOOL2RVAL(g_setenv(RVAL2CSTR(variable),
|
55
|
-
|
66
|
+
RVAL2CSTR_ACCEPT_NIL(value),
|
56
67
|
RVAL2CBOOL(overwrite)));
|
57
68
|
}
|
58
69
|
|
59
70
|
static VALUE
|
60
|
-
|
71
|
+
rg_m_unsetenv(VALUE self, VALUE variable)
|
61
72
|
{
|
62
73
|
g_unsetenv(RVAL2CSTR(variable));
|
63
74
|
return self;
|
@@ -65,9 +76,9 @@ rbglib_m_unsetenv(VALUE self, VALUE variable)
|
|
65
76
|
#endif
|
66
77
|
|
67
78
|
#if GLIB_CHECK_VERSION(2,8,0)
|
68
|
-
#
|
79
|
+
#ifdef HAVE_G_LISTENV
|
69
80
|
static VALUE
|
70
|
-
|
81
|
+
rg_m_listenv(VALUE self)
|
71
82
|
{
|
72
83
|
gchar** c_list;
|
73
84
|
gchar** c_var;
|
@@ -83,51 +94,51 @@ rbglib_m_listenv(VALUE self)
|
|
83
94
|
#endif
|
84
95
|
|
85
96
|
static VALUE
|
86
|
-
|
97
|
+
rg_m_host_name(G_GNUC_UNUSED VALUE self)
|
87
98
|
{
|
88
99
|
return CSTR2RVAL(g_get_host_name());
|
89
100
|
}
|
90
101
|
#endif
|
91
102
|
|
92
103
|
static VALUE
|
93
|
-
|
104
|
+
rg_m_user_name(G_GNUC_UNUSED VALUE self)
|
94
105
|
{
|
95
106
|
return CSTR2RVAL(g_get_user_name());
|
96
107
|
}
|
97
108
|
|
98
109
|
static VALUE
|
99
|
-
|
110
|
+
rg_m_real_name(G_GNUC_UNUSED VALUE self)
|
100
111
|
{
|
101
112
|
return CSTR2RVAL(g_get_real_name());
|
102
113
|
}
|
103
114
|
|
104
115
|
#if GLIB_CHECK_VERSION(2, 6, 0)
|
105
116
|
static VALUE
|
106
|
-
|
117
|
+
rg_m_user_cache_dir(G_GNUC_UNUSED VALUE self)
|
107
118
|
{
|
108
119
|
return CSTR2RVAL(g_get_user_cache_dir());
|
109
120
|
}
|
110
121
|
|
111
122
|
static VALUE
|
112
|
-
|
123
|
+
rg_m_user_data_dir(G_GNUC_UNUSED VALUE self)
|
113
124
|
{
|
114
125
|
return CSTR2RVAL(g_get_user_data_dir());
|
115
126
|
}
|
116
127
|
|
117
128
|
static VALUE
|
118
|
-
|
129
|
+
rg_m_user_config_dir(G_GNUC_UNUSED VALUE self)
|
119
130
|
{
|
120
131
|
return CSTR2RVAL(g_get_user_config_dir());
|
121
132
|
}
|
122
133
|
|
123
134
|
static VALUE
|
124
|
-
|
135
|
+
rg_m_system_data_dirs(G_GNUC_UNUSED VALUE self)
|
125
136
|
{
|
126
137
|
return STRV2RVAL((const gchar **)g_get_system_data_dirs());
|
127
138
|
}
|
128
139
|
|
129
140
|
static VALUE
|
130
|
-
|
141
|
+
rg_m_system_config_dirs(G_GNUC_UNUSED VALUE self)
|
131
142
|
{
|
132
143
|
return STRV2RVAL((const gchar **)g_get_system_config_dirs());
|
133
144
|
}
|
@@ -135,27 +146,27 @@ rbglib_m_system_config_dirs(VALUE self)
|
|
135
146
|
|
136
147
|
#if GLIB_CHECK_VERSION(2, 14, 0)
|
137
148
|
static VALUE
|
138
|
-
|
149
|
+
rg_m_get_user_special_dir(G_GNUC_UNUSED VALUE self, VALUE directory)
|
139
150
|
{
|
140
151
|
return CSTR2RVAL(g_get_user_special_dir(RVAL2GENUM(directory,
|
141
|
-
|
152
|
+
G_TYPE_USER_DIRECTORY)));
|
142
153
|
}
|
143
154
|
#endif
|
144
155
|
|
145
156
|
static VALUE
|
146
|
-
|
157
|
+
rg_m_home_dir(G_GNUC_UNUSED VALUE self)
|
147
158
|
{
|
148
159
|
return CSTR2RVAL(g_get_home_dir());
|
149
160
|
}
|
150
161
|
|
151
162
|
static VALUE
|
152
|
-
|
163
|
+
rg_m_tmp_dir(G_GNUC_UNUSED VALUE self)
|
153
164
|
{
|
154
165
|
return CSTR2RVAL(g_get_tmp_dir());
|
155
166
|
}
|
156
167
|
|
157
168
|
static VALUE
|
158
|
-
|
169
|
+
rg_m_current_dir(G_GNUC_UNUSED VALUE self)
|
159
170
|
{
|
160
171
|
gchar* dir = g_get_current_dir();
|
161
172
|
VALUE ret = CSTR2RVAL(dir);
|
@@ -164,25 +175,25 @@ rbglib_m_current_dir(VALUE self)
|
|
164
175
|
}
|
165
176
|
|
166
177
|
static VALUE
|
167
|
-
|
178
|
+
rg_m_path_is_absolute_p(G_GNUC_UNUSED VALUE self, VALUE fname)
|
168
179
|
{
|
169
180
|
return CBOOL2RVAL(g_path_is_absolute(RVAL2CSTR(fname)));
|
170
181
|
}
|
171
182
|
|
172
183
|
static VALUE
|
173
|
-
|
184
|
+
rg_m_path_skip_root(G_GNUC_UNUSED VALUE self, VALUE fname)
|
174
185
|
{
|
175
186
|
return CSTR2RVAL(g_path_skip_root(RVAL2CSTR(fname)));
|
176
187
|
}
|
177
188
|
|
178
189
|
static VALUE
|
179
|
-
|
190
|
+
rg_m_path_get_basename(G_GNUC_UNUSED VALUE self, VALUE fname)
|
180
191
|
{
|
181
192
|
return CSTR2RVAL(g_path_get_basename(RVAL2CSTR(fname)));
|
182
193
|
}
|
183
194
|
|
184
195
|
static VALUE
|
185
|
-
|
196
|
+
rg_m_path_get_dirname(G_GNUC_UNUSED VALUE self, VALUE fname)
|
186
197
|
{
|
187
198
|
return CSTR2RVAL(g_path_get_dirname(RVAL2CSTR(fname)));
|
188
199
|
}
|
@@ -200,7 +211,7 @@ gchar* g_build_pathv (const gchar *separator,
|
|
200
211
|
*/
|
201
212
|
|
202
213
|
static VALUE
|
203
|
-
|
214
|
+
rg_m_find_program_in_path(G_GNUC_UNUSED VALUE self, VALUE program)
|
204
215
|
{
|
205
216
|
gchar* path = g_find_program_in_path(RVAL2CSTR(program));
|
206
217
|
VALUE ret = CSTR2RVAL(path);
|
@@ -209,25 +220,25 @@ rbglib_m_find_program_in_path(VALUE self, VALUE program)
|
|
209
220
|
}
|
210
221
|
|
211
222
|
static VALUE
|
212
|
-
|
223
|
+
rg_m_bit_nth_lsf(G_GNUC_UNUSED VALUE self, VALUE mask, VALUE nth_bit)
|
213
224
|
{
|
214
225
|
return INT2NUM(g_bit_nth_lsf(NUM2ULONG(mask), NUM2INT(nth_bit)));
|
215
226
|
}
|
216
227
|
|
217
228
|
static VALUE
|
218
|
-
|
229
|
+
rg_m_bit_nth_msf(G_GNUC_UNUSED VALUE self, VALUE mask, VALUE nth_bit)
|
219
230
|
{
|
220
231
|
return INT2NUM(g_bit_nth_msf(NUM2ULONG(mask), NUM2INT(nth_bit)));
|
221
232
|
}
|
222
233
|
|
223
234
|
static VALUE
|
224
|
-
|
235
|
+
rg_m_bit_storage(G_GNUC_UNUSED VALUE self, VALUE number)
|
225
236
|
{
|
226
237
|
return UINT2NUM(g_bit_storage(NUM2ULONG(number)));
|
227
238
|
}
|
228
239
|
|
229
240
|
static VALUE
|
230
|
-
|
241
|
+
rg_m_spaced_primes_closest(G_GNUC_UNUSED VALUE self, VALUE num)
|
231
242
|
{
|
232
243
|
return UINT2NUM(g_spaced_primes_closest(NUM2UINT(num)));
|
233
244
|
}
|
@@ -238,7 +249,7 @@ void g_atexit (GVoidFunc func);
|
|
238
249
|
*/
|
239
250
|
|
240
251
|
static VALUE
|
241
|
-
|
252
|
+
rg_m_parse_debug_string(G_GNUC_UNUSED VALUE self, VALUE string, VALUE keys)
|
242
253
|
{
|
243
254
|
gint i, nkeys;
|
244
255
|
VALUE ary;
|
@@ -252,7 +263,7 @@ rbglib_m_parse_debug_string(VALUE self, VALUE string, VALUE keys)
|
|
252
263
|
gkeys[i].key = RVAL2CSTR(RARRAY_PTR(RARRAY_PTR(ary)[i])[0]);
|
253
264
|
gkeys[i].value = NUM2UINT(RARRAY_PTR(RARRAY_PTR(ary)[i])[1]);
|
254
265
|
}
|
255
|
-
|
266
|
+
|
256
267
|
return UINT2NUM(g_parse_debug_string(RVAL2CSTR(string), gkeys, nkeys));
|
257
268
|
}
|
258
269
|
|
@@ -271,7 +282,7 @@ void g_nullify_pointer (gpointer *nullify_location);
|
|
271
282
|
*/
|
272
283
|
|
273
284
|
static VALUE
|
274
|
-
|
285
|
+
rg_m_check_version_p(G_GNUC_UNUSED VALUE self, VALUE major, VALUE minor, VALUE micro)
|
275
286
|
{
|
276
287
|
return CBOOL2RVAL(glib_major_version > NUM2UINT(major) ||
|
277
288
|
(glib_major_version == NUM2UINT(major) &&
|
@@ -282,65 +293,58 @@ rbglib_m_check_version(VALUE self, VALUE major, VALUE minor, VALUE micro)
|
|
282
293
|
}
|
283
294
|
|
284
295
|
void
|
285
|
-
Init_glib_utils()
|
296
|
+
Init_glib_utils(void)
|
286
297
|
{
|
287
298
|
/* glib/gutils.h */
|
288
299
|
#if GLIB_CHECK_VERSION(2, 14, 0)
|
289
|
-
G_DEF_CLASS(G_TYPE_USER_DIRECTORY, "UserDirectory",
|
290
|
-
G_DEF_CONSTANTS(
|
300
|
+
G_DEF_CLASS(G_TYPE_USER_DIRECTORY, "UserDirectory", RG_TARGET_NAMESPACE);
|
301
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_USER_DIRECTORY, "G_");
|
291
302
|
#endif
|
292
303
|
|
293
304
|
#if GLIB_CHECK_VERSION(2,2,0)
|
294
|
-
|
295
|
-
|
305
|
+
RG_DEF_MODFUNC(application_name, 0);
|
306
|
+
RG_DEF_MODFUNC(set_application_name, 1);
|
296
307
|
#endif
|
297
|
-
|
298
|
-
|
299
|
-
|
308
|
+
RG_DEF_MODFUNC(prgname, 0);
|
309
|
+
RG_DEF_MODFUNC(set_prgname, 1);
|
310
|
+
RG_DEF_MODFUNC(getenv, 1);
|
300
311
|
#if GLIB_CHECK_VERSION(2,4,0)
|
301
|
-
|
302
|
-
|
312
|
+
RG_DEF_MODFUNC(setenv, 2);
|
313
|
+
RG_DEF_MODFUNC(unsetenv, 1);
|
303
314
|
#endif
|
304
315
|
#if GLIB_CHECK_VERSION(2,8,0)
|
305
|
-
#
|
306
|
-
|
316
|
+
#ifdef HAVE_G_LISTENV
|
317
|
+
RG_DEF_MODFUNC(listenv, 0);
|
307
318
|
#endif
|
308
|
-
|
319
|
+
RG_DEF_MODFUNC(host_name, 0);
|
309
320
|
#endif
|
310
|
-
|
311
|
-
|
321
|
+
RG_DEF_MODFUNC(user_name, 0);
|
322
|
+
RG_DEF_MODFUNC(real_name, 0);
|
312
323
|
|
313
324
|
#if GLIB_CHECK_VERSION(2, 6, 0)
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
rbglib_m_user_config_dir, 0);
|
320
|
-
rb_define_module_function(mGLib, "system_data_dirs",
|
321
|
-
rbglib_m_system_data_dirs, 0);
|
322
|
-
rb_define_module_function(mGLib, "system_config_dirs",
|
323
|
-
rbglib_m_system_config_dirs, 0);
|
325
|
+
RG_DEF_MODFUNC(user_cache_dir, 0);
|
326
|
+
RG_DEF_MODFUNC(user_data_dir, 0);
|
327
|
+
RG_DEF_MODFUNC(user_config_dir, 0);
|
328
|
+
RG_DEF_MODFUNC(system_data_dirs, 0);
|
329
|
+
RG_DEF_MODFUNC(system_config_dirs, 0);
|
324
330
|
#endif
|
325
331
|
#if GLIB_CHECK_VERSION(2, 14, 0)
|
326
|
-
|
327
|
-
rbglib_m_get_user_special_dir, 1);
|
332
|
+
RG_DEF_MODFUNC(get_user_special_dir, 1);
|
328
333
|
#endif
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
334
|
+
RG_DEF_MODFUNC(home_dir, 0);
|
335
|
+
RG_DEF_MODFUNC(tmp_dir, 0);
|
336
|
+
RG_DEF_MODFUNC(current_dir, 0);
|
337
|
+
|
338
|
+
RG_DEF_MODFUNC_P(path_is_absolute, 1);
|
339
|
+
RG_DEF_MODFUNC(path_skip_root, 1);
|
340
|
+
RG_DEF_MODFUNC(path_get_basename, 1);
|
341
|
+
RG_DEF_MODFUNC(path_get_dirname, 1);
|
342
|
+
RG_DEF_MODFUNC(find_program_in_path, 1);
|
343
|
+
RG_DEF_MODFUNC(bit_nth_lsf, 2);
|
344
|
+
RG_DEF_MODFUNC(bit_nth_msf, 2);
|
345
|
+
RG_DEF_MODFUNC(bit_storage, 1);
|
346
|
+
RG_DEF_MODFUNC(spaced_primes_closest, 1);
|
347
|
+
RG_DEF_MODFUNC(parse_debug_string, 2);
|
348
|
+
RG_DEF_MODFUNC_P(check_version, 3);
|
344
349
|
|
345
350
|
}
|
346
|
-
|