glib2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -8,7 +8,7 @@
|
|
8
8
|
<link rel="up" href="application.html" title="Application support">
|
9
9
|
<link rel="prev" href="GApplication.html" title="GApplication">
|
10
10
|
<link rel="next" href="extending.html" title="Extending GIO">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
14
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
@@ -93,6 +93,12 @@ invocation) or remote (ie: some other process forwarded the
|
|
93
93
|
commandline to this process).
|
94
94
|
</p>
|
95
95
|
<p>
|
96
|
+
The GApplicationCommandLine object can provide the <em class="parameter"><code>argc</code></em> and <em class="parameter"><code>argv</code></em>
|
97
|
+
parameters for use with the <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a> command-line parsing API,
|
98
|
+
with the <a class="link" href="GApplicationCommandLine.html#g-application-command-line-get-arguments" title="g_application_command_line_get_arguments ()"><code class="function">g_application_command_line_get_arguments()</code></a> function. See
|
99
|
+
<a class="xref" href="GApplicationCommandLine.html#gapplication-example-cmdline3" title="Example 17. Deferred commandline handling">Example 17, “Deferred commandline handling”</a> for an example.
|
100
|
+
</p>
|
101
|
+
<p>
|
96
102
|
The exit status of the originally-invoked process may be set and
|
97
103
|
messages can be printed to stdout or stderr of that process. The
|
98
104
|
lifecycle of the originally-invoked process is tied to the lifecycle
|
@@ -100,326 +106,332 @@ of this object (ie: the process exits when the last reference is
|
|
100
106
|
dropped).
|
101
107
|
</p>
|
102
108
|
<p>
|
109
|
+
The main use for <span class="type">GApplicationCommandline</span> (and the
|
110
|
+
<a class="link" href="GApplication.html#GApplication-command-line" title='The "command-line" signal'><span class="type">"command-line"</span></a> signal) is 'Emacs server' like use cases:
|
111
|
+
You can set the <code class="envar">EDITOR</code> environment variable to have
|
112
|
+
e.g. git use your favourite editor to edit commit messages, and if you
|
113
|
+
already have an instance of the editor running, the editing will happen
|
114
|
+
in the running instance, instead of opening a new one. An important
|
115
|
+
aspect of this use case is that the process that gets started by git
|
116
|
+
does not return until the editing is done.
|
117
|
+
</p>
|
118
|
+
<p>
|
103
119
|
</p>
|
104
120
|
<div class="example">
|
105
121
|
<a name="gapplication-example-cmdline"></a><p class="title"><b>Example 15. Handling commandline arguments with GApplication</b></p>
|
106
122
|
<div class="example-contents">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<span class="function"><a href="/usr/share/gtk-doc/html/libiptcdata/iptc-commandline.html#command-line">command_line</a></span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">application</span><span class="symbol">,</span>
|
159
|
-
<span class="normal"> </span><span class="usertype">GApplicationCommandLine</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cmdline</span><span class="symbol">)</span>
|
160
|
-
<span class="cbracket">{</span>
|
161
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">argv</span><span class="symbol">;</span>
|
162
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> argc</span><span class="symbol">;</span>
|
163
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> i</span><span class="symbol">;</span>
|
164
|
-
|
165
|
-
<span class="normal"> argv </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GApplicationCommandLine.html#g-application-command-line-get-arguments">g_application_command_line_get_arguments</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cmdline</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argc</span><span class="symbol">);</span>
|
166
|
-
|
167
|
-
<span class="normal"> </span><span class="function"><a href="GApplicationCommandLine.html#g-application-command-line-print">g_application_command_line_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cmdline</span><span class="symbol">,</span>
|
168
|
-
<span class="normal"> </span><span class="string">"This text is written back</span><span class="specialchar">\n</span><span class="string">"</span>
|
169
|
-
<span class="normal"> </span><span class="string">"to stdout of the caller</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">);</span>
|
170
|
-
|
171
|
-
<span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol"><</span><span class="normal"> argc</span><span class="symbol">;</span><span class="normal"> i</span><span class="symbol">++)</span>
|
172
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"argument %d: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> i</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]);</span>
|
173
|
-
|
174
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev">g_strfreev</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">argv</span><span class="symbol">);</span>
|
175
|
-
|
176
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
|
177
|
-
<span class="cbracket">}</span>
|
178
|
-
|
179
|
-
<span class="type">int</span>
|
180
|
-
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">argv</span><span class="symbol">)</span>
|
181
|
-
<span class="cbracket">{</span>
|
182
|
-
<span class="normal"> </span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">;</span>
|
183
|
-
<span class="normal"> </span><span class="type">int</span><span class="normal"> status</span><span class="symbol">;</span>
|
184
|
-
|
185
|
-
<span class="normal"> app </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GApplication.html#g-application-new">g_application_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"org.gtk.TestApplication"</span><span class="symbol">,</span>
|
186
|
-
<span class="normal"> <a href="GApplication.html#G-APPLICATION-HANDLES-COMMAND-LINE:CAPS">G_APPLICATION_HANDLES_COMMAND_LINE</a></span><span class="symbol">);</span>
|
187
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"command-line"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/libiptcdata/iptc-commandline.html#command-line">command_line</a></span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
188
|
-
<span class="normal"> </span><span class="function"><a href="GApplication.html#g-application-set-inactivity-timeout">g_application_set_inactivity_timeout</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> </span><span class="number">10000</span><span class="symbol">);</span>
|
189
|
-
|
190
|
-
<span class="normal"> status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GApplication.html#g-application-run">g_application_run</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">);</span>
|
191
|
-
|
192
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">);</span>
|
193
|
-
|
194
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> status</span><span class="symbol">;</span>
|
195
|
-
<span class="cbracket">}</span></pre></td>
|
196
|
-
</tr>
|
197
|
-
</tbody>
|
198
|
-
</table>
|
199
|
-
</div>
|
123
|
+
<p>
|
124
|
+
A simple example where the commandline is completely handled
|
125
|
+
in the <a class="link" href="GApplication.html#GApplication-command-line" title='The "command-line" signal'><span class="type">"command-line"</span></a> handler. The launching instance exits
|
126
|
+
once the signal handler in the primary instance has returned, and the
|
127
|
+
return value of the signal handler becomes the exit status of the launching
|
128
|
+
instance.
|
129
|
+
</p>
|
130
|
+
<pre class="programlisting">
|
131
|
+
#include <gio/gio.h>
|
132
|
+
#include <stdlib.h>
|
133
|
+
#include <string.h>
|
134
|
+
|
135
|
+
static int
|
136
|
+
command_line (GApplication *application,
|
137
|
+
GApplicationCommandLine *cmdline)
|
138
|
+
{
|
139
|
+
gchar **argv;
|
140
|
+
gint argc;
|
141
|
+
gint i;
|
142
|
+
|
143
|
+
argv = g_application_command_line_get_arguments (cmdline, &argc);
|
144
|
+
|
145
|
+
g_application_command_line_print (cmdline,
|
146
|
+
"This text is written back\n"
|
147
|
+
"to stdout of the caller\n");
|
148
|
+
|
149
|
+
for (i = 0; i < argc; i++)
|
150
|
+
g_print ("argument %d: %s\n", i, argv[i]);
|
151
|
+
|
152
|
+
g_strfreev (argv);
|
153
|
+
|
154
|
+
return 0;
|
155
|
+
}
|
156
|
+
|
157
|
+
int
|
158
|
+
main (int argc, char **argv)
|
159
|
+
{
|
160
|
+
GApplication *app;
|
161
|
+
int status;
|
162
|
+
|
163
|
+
app = g_application_new ("org.gtk.TestApplication",
|
164
|
+
G_APPLICATION_HANDLES_COMMAND_LINE);
|
165
|
+
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
166
|
+
g_application_set_inactivity_timeout (app, 10000);
|
167
|
+
|
168
|
+
status = g_application_run (app, argc, argv);
|
169
|
+
|
170
|
+
g_object_unref (app);
|
171
|
+
|
172
|
+
return status;
|
173
|
+
}
|
200
174
|
|
175
|
+
</pre>
|
176
|
+
</div>
|
201
177
|
</div>
|
202
178
|
<p><br class="example-break">
|
203
179
|
</p>
|
204
180
|
<p>
|
205
181
|
</p>
|
206
182
|
<div class="example">
|
207
|
-
<a name="gapplication-example-cmdline2"></a><p class="title"><b>Example 16.
|
183
|
+
<a name="gapplication-example-cmdline2"></a><p class="title"><b>Example 16. Split commandline handling</b></p>
|
208
184
|
<div class="example-contents">
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> i</span><span class="symbol">;</span>
|
326
|
-
|
327
|
-
<span class="normal"> argv </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GApplicationCommandLine.html#g-application-command-line-get-arguments">g_application_command_line_get_arguments</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cmdline</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argc</span><span class="symbol">);</span>
|
328
|
-
|
329
|
-
<span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol"><</span><span class="normal"> argc</span><span class="symbol">;</span><span class="normal"> i</span><span class="symbol">++)</span>
|
330
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"handling argument %s remotely</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]);</span>
|
331
|
-
|
332
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev">g_strfreev</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">argv</span><span class="symbol">);</span>
|
333
|
-
|
334
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
|
335
|
-
<span class="cbracket">}</span>
|
336
|
-
|
337
|
-
<span class="keyword">static</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a></span>
|
338
|
-
<span class="function">test_local_cmdline</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">application</span><span class="symbol">,</span>
|
339
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">***</span><span class="normal">arguments</span><span class="symbol">,</span>
|
340
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">exit_status</span><span class="symbol">)</span>
|
341
|
-
<span class="cbracket">{</span>
|
342
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> i</span><span class="symbol">,</span><span class="normal"> j</span><span class="symbol">;</span>
|
343
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">argv</span><span class="symbol">;</span>
|
344
|
-
|
345
|
-
<span class="normal"> argv </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">arguments</span><span class="symbol">;</span>
|
346
|
-
|
347
|
-
<span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">];</span><span class="normal"> i</span><span class="symbol">++)</span>
|
348
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
349
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-str-has-prefix">g_str_has_prefix</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">argv</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">],</span><span class="normal"> </span><span class="string">"--local-"</span><span class="symbol">))</span>
|
350
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
351
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"handling argument %s locally</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]);</span>
|
352
|
-
<span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">j </span><span class="symbol">=</span><span class="normal"> i </span><span class="symbol">+</span><span class="normal"> </span><span class="number">1</span><span class="symbol">;</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">j</span><span class="symbol">];</span><span class="normal"> j</span><span class="symbol">++)</span>
|
353
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
354
|
-
<span class="normal"> argv</span><span class="symbol">[</span><span class="normal">j </span><span class="symbol">-</span><span class="normal"> </span><span class="number">1</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> argv</span><span class="symbol">[</span><span class="normal">j</span><span class="symbol">];</span>
|
355
|
-
<span class="normal"> argv</span><span class="symbol">[</span><span class="normal">j</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
|
356
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
357
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
358
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
359
|
-
|
360
|
-
<span class="normal"> </span><span class="symbol">*</span><span class="normal">exit_status </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
|
361
|
-
|
362
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span>
|
363
|
-
<span class="cbracket">}</span>
|
364
|
-
|
365
|
-
<span class="keyword">typedef</span><span class="normal"> </span><span class="usertype">GApplication</span><span class="normal"> TestApplication</span><span class="symbol">;</span>
|
366
|
-
<span class="keyword">typedef</span><span class="normal"> </span><span class="usertype">GApplicationClass</span><span class="normal"> TestApplicationClass</span><span class="symbol">;</span>
|
367
|
-
|
368
|
-
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TestApplication</span><span class="symbol">,</span><span class="normal"> test_application</span><span class="symbol">,</span><span class="normal"> G_TYPE_APPLICATION</span><span class="symbol">)</span>
|
369
|
-
|
370
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
371
|
-
<span class="function">test_application_finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">)</span>
|
372
|
-
<span class="cbracket">{</span>
|
373
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">test_application_parent_class</span><span class="symbol">)-></span><span class="function">finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">);</span>
|
374
|
-
<span class="cbracket">}</span>
|
375
|
-
|
376
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
377
|
-
<span class="function">test_application_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TestApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">)</span>
|
378
|
-
<span class="cbracket">{</span>
|
379
|
-
<span class="cbracket">}</span>
|
380
|
-
|
381
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
382
|
-
<span class="function">test_application_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TestApplicationClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
|
383
|
-
<span class="cbracket">{</span>
|
384
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">)-></span><span class="normal">finalize </span><span class="symbol">=</span><span class="normal"> test_application_finalize</span><span class="symbol">;</span>
|
385
|
-
<span class="normal"> </span><span class="function">G_APPLICATION_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">)-></span><span class="normal">local_command_line </span><span class="symbol">=</span><span class="normal"> test_local_cmdline</span><span class="symbol">;</span>
|
386
|
-
<span class="cbracket">}</span>
|
387
|
-
|
388
|
-
<span class="normal"><a href="GApplication.html">GApplication</a> </span><span class="symbol">*</span>
|
389
|
-
<span class="function">test_application_new</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">application_id</span><span class="symbol">,</span>
|
390
|
-
<span class="normal"> </span><span class="usertype">GApplicationFlags</span><span class="normal"> flags</span><span class="symbol">)</span>
|
391
|
-
<span class="cbracket">{</span>
|
392
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GApplication.html#g-application-id-is-valid">g_application_id_is_valid</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">application_id</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
393
|
-
|
394
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#g-type-init">g_type_init</a></span><span class="normal"> </span><span class="symbol">();</span>
|
395
|
-
|
396
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">test_application_get_type</span><span class="normal"> </span><span class="symbol">(),</span>
|
397
|
-
<span class="normal"> </span><span class="string">"application-id"</span><span class="symbol">,</span><span class="normal"> application_id</span><span class="symbol">,</span>
|
398
|
-
<span class="normal"> </span><span class="string">"flags"</span><span class="symbol">,</span><span class="normal"> flags</span><span class="symbol">,</span>
|
399
|
-
<span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
400
|
-
<span class="cbracket">}</span>
|
401
|
-
|
402
|
-
<span class="type">int</span>
|
403
|
-
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">argv</span><span class="symbol">)</span>
|
404
|
-
<span class="cbracket">{</span>
|
405
|
-
<span class="normal"> </span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">;</span>
|
406
|
-
<span class="normal"> </span><span class="type">int</span><span class="normal"> status</span><span class="symbol">;</span>
|
407
|
-
|
408
|
-
<span class="normal"> app </span><span class="symbol">=</span><span class="normal"> </span><span class="function">test_application_new</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"org.gtk.TestApplication"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
409
|
-
<span class="normal"> </span><span class="function"><a href="GApplication.html#g-application-set-inactivity-timeout">g_application_set_inactivity_timeout</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> </span><span class="number">10000</span><span class="symbol">);</span>
|
410
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"command-line"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/libiptcdata/iptc-commandline.html#command-line">command_line</a></span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
411
|
-
|
412
|
-
<span class="normal"> status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GApplication.html#g-application-run">g_application_run</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">,</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">);</span>
|
413
|
-
|
414
|
-
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">);</span>
|
415
|
-
|
416
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> status</span><span class="symbol">;</span>
|
417
|
-
<span class="cbracket">}</span></pre></td>
|
418
|
-
</tr>
|
419
|
-
</tbody>
|
420
|
-
</table>
|
185
|
+
<p>
|
186
|
+
An example of split commandline handling. Options that start with
|
187
|
+
<code class="literal">--local-</code> are handled locally, all other options are
|
188
|
+
passed to the <a class="link" href="GApplication.html#GApplication-command-line" title='The "command-line" signal'><span class="type">"command-line"</span></a> handler which runs in the primary
|
189
|
+
instance.
|
190
|
+
</p>
|
191
|
+
<pre class="programlisting">
|
192
|
+
#include <gio/gio.h>
|
193
|
+
#include <stdlib.h>
|
194
|
+
#include <string.h>
|
195
|
+
|
196
|
+
static int
|
197
|
+
command_line (GApplication *application,
|
198
|
+
GApplicationCommandLine *cmdline)
|
199
|
+
{
|
200
|
+
gchar **argv;
|
201
|
+
gint argc;
|
202
|
+
gint i;
|
203
|
+
|
204
|
+
argv = g_application_command_line_get_arguments (cmdline, &argc);
|
205
|
+
|
206
|
+
for (i = 0; i < argc; i++)
|
207
|
+
g_print ("handling argument %s remotely\n", argv[i]);
|
208
|
+
|
209
|
+
g_strfreev (argv);
|
210
|
+
|
211
|
+
return 0;
|
212
|
+
}
|
213
|
+
|
214
|
+
static gboolean
|
215
|
+
test_local_cmdline (GApplication *application,
|
216
|
+
gchar ***arguments,
|
217
|
+
gint *exit_status)
|
218
|
+
{
|
219
|
+
gint i, j;
|
220
|
+
gchar **argv;
|
221
|
+
|
222
|
+
argv = *arguments;
|
223
|
+
|
224
|
+
i = 1;
|
225
|
+
while (argv[i])
|
226
|
+
{
|
227
|
+
if (g_str_has_prefix (argv[i], "--local-"))
|
228
|
+
{
|
229
|
+
g_print ("handling argument %s locally\n", argv[i]);
|
230
|
+
g_free (argv[i]);
|
231
|
+
for (j = i; argv[j]; j++)
|
232
|
+
argv[j] = argv[j + 1];
|
233
|
+
}
|
234
|
+
else
|
235
|
+
{
|
236
|
+
g_print ("not handling argument %s locally\n", argv[i]);
|
237
|
+
i++;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
*exit_status = 0;
|
242
|
+
|
243
|
+
return FALSE;
|
244
|
+
}
|
245
|
+
|
246
|
+
typedef GApplication TestApplication;
|
247
|
+
typedef GApplicationClass TestApplicationClass;
|
248
|
+
|
249
|
+
G_DEFINE_TYPE (TestApplication, test_application, G_TYPE_APPLICATION)
|
250
|
+
|
251
|
+
static void
|
252
|
+
test_application_finalize (GObject *object)
|
253
|
+
{
|
254
|
+
G_OBJECT_CLASS (test_application_parent_class)->finalize (object);
|
255
|
+
}
|
256
|
+
|
257
|
+
static void
|
258
|
+
test_application_init (TestApplication *app)
|
259
|
+
{
|
260
|
+
}
|
261
|
+
|
262
|
+
static void
|
263
|
+
test_application_class_init (TestApplicationClass *class)
|
264
|
+
{
|
265
|
+
G_OBJECT_CLASS (class)->finalize = test_application_finalize;
|
266
|
+
G_APPLICATION_CLASS (class)->local_command_line = test_local_cmdline;
|
267
|
+
}
|
268
|
+
|
269
|
+
GApplication *
|
270
|
+
test_application_new (const gchar *application_id,
|
271
|
+
GApplicationFlags flags)
|
272
|
+
{
|
273
|
+
g_return_val_if_fail (g_application_id_is_valid (application_id), NULL);
|
274
|
+
|
275
|
+
g_type_init ();
|
276
|
+
|
277
|
+
return g_object_new (test_application_get_type (),
|
278
|
+
"application-id", application_id,
|
279
|
+
"flags", flags,
|
280
|
+
NULL);
|
281
|
+
}
|
282
|
+
|
283
|
+
int
|
284
|
+
main (int argc, char **argv)
|
285
|
+
{
|
286
|
+
GApplication *app;
|
287
|
+
int status;
|
288
|
+
|
289
|
+
app = test_application_new ("org.gtk.TestApplication", 0);
|
290
|
+
g_application_set_inactivity_timeout (app, 10000);
|
291
|
+
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
292
|
+
|
293
|
+
status = g_application_run (app, argc, argv);
|
294
|
+
|
295
|
+
g_object_unref (app);
|
296
|
+
|
297
|
+
return status;
|
298
|
+
}
|
299
|
+
|
300
|
+
</pre>
|
421
301
|
</div>
|
302
|
+
</div>
|
303
|
+
<p><br class="example-break">
|
304
|
+
</p>
|
305
|
+
<p>
|
306
|
+
</p>
|
307
|
+
<div class="example">
|
308
|
+
<a name="gapplication-example-cmdline3"></a><p class="title"><b>Example 17. Deferred commandline handling</b></p>
|
309
|
+
<div class="example-contents">
|
310
|
+
<p>
|
311
|
+
An example of deferred commandline handling. Here, the commandline is
|
312
|
+
not completely handled before the <a class="link" href="GApplication.html#GApplication-command-line" title='The "command-line" signal'><span class="type">"command-line"</span></a> handler
|
313
|
+
returns. Instead, we keep a reference to the GApplicationCommandline
|
314
|
+
object and handle it later(in this example, in an idle). Note that it
|
315
|
+
is necessary to hold the application until you are done with the
|
316
|
+
commandline.
|
317
|
+
</p>
|
318
|
+
<p>
|
319
|
+
This example also shows how to use <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a> for parsing the
|
320
|
+
commandline arguments. Note that it is necessary to disable the
|
321
|
+
built-in help-handling of <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a>, since it calls <code class="function">exit()</code>
|
322
|
+
after printing help, which is not what you want to happen in
|
323
|
+
the primary instance.
|
324
|
+
</p>
|
325
|
+
<pre class="programlisting">
|
326
|
+
#include <gio/gio.h>
|
327
|
+
#include <stdlib.h>
|
328
|
+
#include <string.h>
|
329
|
+
|
330
|
+
static gboolean
|
331
|
+
my_cmdline_handler (gpointer data)
|
332
|
+
{
|
333
|
+
GApplicationCommandLine *cmdline = data;
|
334
|
+
gchar **args;
|
335
|
+
gchar **argv;
|
336
|
+
gint argc;
|
337
|
+
gint arg1;
|
338
|
+
gboolean arg2;
|
339
|
+
gboolean help;
|
340
|
+
GOptionContext *context;
|
341
|
+
GOptionEntry entries[] = {
|
342
|
+
{ "arg1", 0, 0, G_OPTION_ARG_INT, &arg1, NULL, NULL },
|
343
|
+
{ "arg2", 0, 0, G_OPTION_ARG_NONE, &arg2, NULL, NULL },
|
344
|
+
{ "help", '?', 0, G_OPTION_ARG_NONE, &help, NULL, NULL },
|
345
|
+
{ NULL }
|
346
|
+
};
|
347
|
+
GError *error;
|
348
|
+
gint i;
|
349
|
+
|
350
|
+
args = g_application_command_line_get_arguments (cmdline, &argc);
|
351
|
+
|
352
|
+
/* We have to make an extra copy of the array, since g_option_context_parse()
|
353
|
+
* assumes that it can remove strings from the array without freeing them.
|
354
|
+
*/
|
355
|
+
argv = g_new (gchar*, argc + 1);
|
356
|
+
for (i = 0; i <= argc; i++)
|
357
|
+
argv[i] = args[i];
|
358
|
+
|
359
|
+
context = g_option_context_new (NULL);
|
360
|
+
g_option_context_set_help_enabled (context, FALSE);
|
361
|
+
g_option_context_add_main_entries (context, entries, NULL);
|
362
|
+
|
363
|
+
arg1 = 0;
|
364
|
+
arg2 = FALSE;
|
365
|
+
help = FALSE;
|
366
|
+
error = NULL;
|
367
|
+
if (!g_option_context_parse (context, &argc, &argv, &error))
|
368
|
+
{
|
369
|
+
g_application_command_line_printerr (cmdline, "%s\n", error->message);
|
370
|
+
g_error_free (error);
|
371
|
+
g_application_command_line_set_exit_status (cmdline, 1);
|
372
|
+
}
|
373
|
+
else if (help)
|
374
|
+
{
|
375
|
+
gchar *text;
|
376
|
+
text = g_option_context_get_help (context, FALSE, NULL);
|
377
|
+
g_application_command_line_print (cmdline, "%s", text);
|
378
|
+
g_free (text);
|
379
|
+
}
|
380
|
+
else
|
381
|
+
{
|
382
|
+
g_application_command_line_print (cmdline, "arg1 is %d and arg2 is %s\n",
|
383
|
+
arg1, arg2 ? "TRUE" : "FALSE");
|
384
|
+
g_application_command_line_set_exit_status (cmdline, 0);
|
385
|
+
}
|
386
|
+
|
387
|
+
g_free (argv);
|
388
|
+
g_strfreev (args);
|
389
|
+
|
390
|
+
g_option_context_free (context);
|
391
|
+
|
392
|
+
/* we are done handling this commandline */
|
393
|
+
g_object_unref (cmdline);
|
394
|
+
|
395
|
+
return FALSE;
|
396
|
+
}
|
397
|
+
|
398
|
+
static int
|
399
|
+
command_line (GApplication *application,
|
400
|
+
GApplicationCommandLine *cmdline)
|
401
|
+
{
|
402
|
+
/* keep the application running until we are done with this commandline */
|
403
|
+
g_application_hold (application);
|
404
|
+
|
405
|
+
g_object_set_data_full (G_OBJECT (cmdline),
|
406
|
+
"application", application,
|
407
|
+
(GDestroyNotify)g_application_release);
|
408
|
+
|
409
|
+
g_object_ref (cmdline);
|
410
|
+
g_idle_add (my_cmdline_handler, cmdline);
|
411
|
+
|
412
|
+
return 0;
|
413
|
+
}
|
414
|
+
|
415
|
+
int
|
416
|
+
main (int argc, char **argv)
|
417
|
+
{
|
418
|
+
GApplication *app;
|
419
|
+
int status;
|
420
|
+
|
421
|
+
app = g_application_new ("org.gtk.TestApplication",
|
422
|
+
G_APPLICATION_HANDLES_COMMAND_LINE);
|
423
|
+
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
424
|
+
g_application_set_inactivity_timeout (app, 10000);
|
425
|
+
|
426
|
+
status = g_application_run (app, argc, argv);
|
427
|
+
|
428
|
+
g_object_unref (app);
|
429
|
+
|
430
|
+
return status;
|
431
|
+
}
|
422
432
|
|
433
|
+
</pre>
|
434
|
+
</div>
|
423
435
|
</div>
|
424
436
|
<p><br class="example-break">
|
425
437
|
</p>
|
@@ -492,8 +504,8 @@ containing the arguments (the argv). <span class="annotation">[<acronym title="P
|
|
492
504
|
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * g_application_command_line_get_cwd
|
493
505
|
(<em class="parameter"><code><a class="link" href="GApplicationCommandLine.html" title="GApplicationCommandLine"><span class="type">GApplicationCommandLine</span></a> *cmdline</code></em>);</pre>
|
494
506
|
<p>
|
495
|
-
Gets the working directory of the command line invocation.
|
496
|
-
string may contain non-utf8 data.
|
507
|
+
Gets the working directory of the command line invocation.
|
508
|
+
The string may contain non-utf8 data.
|
497
509
|
</p>
|
498
510
|
<p>
|
499
511
|
It is possible that the remote application did not send a working
|
@@ -527,8 +539,9 @@ long as <em class="parameter"><code>cmdline</code></em> exists.
|
|
527
539
|
(<em class="parameter"><code><a class="link" href="GApplicationCommandLine.html" title="GApplicationCommandLine"><span class="type">GApplicationCommandLine</span></a> *cmdline</code></em>);</pre>
|
528
540
|
<p>
|
529
541
|
Gets the contents of the 'environ' variable of the command line
|
530
|
-
invocation, as would be returned by <a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-get-environ"><code class="function">g_get_environ()</code></a
|
531
|
-
|
542
|
+
invocation, as would be returned by <a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-get-environ"><code class="function">g_get_environ()</code></a>, ie as a
|
543
|
+
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of strings in the form 'NAME=VALUE'.
|
544
|
+
The strings may contain non-utf8 data.
|
532
545
|
</p>
|
533
546
|
<p>
|
534
547
|
The remote application usually does not send an environment. Use
|
@@ -540,6 +553,10 @@ to invocation messages from other applications).
|
|
540
553
|
The return value should not be modified or freed and is valid for as
|
541
554
|
long as <em class="parameter"><code>cmdline</code></em> exists.
|
542
555
|
</p>
|
556
|
+
<p>
|
557
|
+
See <a class="link" href="GApplicationCommandLine.html#g-application-command-line-getenv" title="g_application_command_line_getenv ()"><code class="function">g_application_command_line_getenv()</code></a> if you are only interested
|
558
|
+
in the value of a single environment variable.
|
559
|
+
</p>
|
543
560
|
<div class="variablelist"><table border="0">
|
544
561
|
<col align="left" valign="top">
|
545
562
|
<tbody>
|
@@ -810,6 +827,6 @@ calling <a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-
|
|
810
827
|
</div>
|
811
828
|
<div class="footer">
|
812
829
|
<hr>
|
813
|
-
Generated by GTK-Doc V1.
|
830
|
+
Generated by GTK-Doc V1.17</div>
|
814
831
|
</body>
|
815
832
|
</html>
|